diff -Nru libfshfs-20201104/ABOUT-NLS libfshfs-20240221/ABOUT-NLS --- libfshfs-20201104/ABOUT-NLS 2016-02-17 07:57:20.000000000 +0000 +++ libfshfs-20240221/ABOUT-NLS 2023-12-03 09:06:45.000000000 +0000 @@ -1,1282 +1 @@ -1 Notes on the Free Translation Project -*************************************** - -Free software is going international! The Free Translation Project is -a way to get maintainers of free software, translators, and users all -together, so that free software will gradually become able to speak many -languages. A few packages already provide translations for their -messages. - - If you found this `ABOUT-NLS' file inside a distribution, you may -assume that the distributed package does use GNU `gettext' internally, -itself available at your nearest GNU archive site. But you do _not_ -need to install GNU `gettext' prior to configuring, installing or using -this package with messages translated. - - Installers will find here some useful hints. These notes also -explain how users should proceed for getting the programs to use the -available translations. They tell how people wanting to contribute and -work on translations can contact the appropriate team. - -1.1 INSTALL Matters -=================== - -Some packages are "localizable" when properly installed; the programs -they contain can be made to speak your own native language. Most such -packages use GNU `gettext'. Other packages have their own ways to -internationalization, predating GNU `gettext'. - - By default, this package will be installed to allow translation of -messages. It will automatically detect whether the system already -provides the GNU `gettext' functions. Installers may use special -options at configuration time for changing the default behaviour. The -command: - - ./configure --disable-nls - -will _totally_ disable translation of messages. - - When you already have GNU `gettext' installed on your system and run -configure without an option for your new package, `configure' will -probably detect the previously built and installed `libintl' library -and will decide to use it. If not, you may have to to use the -`--with-libintl-prefix' option to tell `configure' where to look for it. - - Internationalized packages usually have many `po/LL.po' files, where -LL gives an ISO 639 two-letter code identifying the language. Unless -translations have been forbidden at `configure' time by using the -`--disable-nls' switch, all available translations are installed -together with the package. However, the environment variable `LINGUAS' -may be set, prior to configuration, to limit the installed set. -`LINGUAS' should then contain a space separated list of two-letter -codes, stating which languages are allowed. - -1.2 Using This Package -====================== - -As a user, if your language has been installed for this package, you -only have to set the `LANG' environment variable to the appropriate -`LL_CC' combination. If you happen to have the `LC_ALL' or some other -`LC_xxx' environment variables set, you should unset them before -setting `LANG', otherwise the setting of `LANG' will not have the -desired effect. Here `LL' is an ISO 639 two-letter language code, and -`CC' is an ISO 3166 two-letter country code. For example, let's -suppose that you speak German and live in Germany. At the shell -prompt, merely execute `setenv LANG de_DE' (in `csh'), -`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash'). -This can be done from your `.login' or `.profile' file, once and for -all. - - You might think that the country code specification is redundant. -But in fact, some languages have dialects in different countries. For -example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The -country code serves to distinguish the dialects. - - The locale naming convention of `LL_CC', with `LL' denoting the -language and `CC' denoting the country, is the one use on systems based -on GNU libc. On other systems, some variations of this scheme are -used, such as `LL' or `LL_CC.ENCODING'. You can get the list of -locales supported by your system for your language by running the -command `locale -a | grep '^LL''. - - Not all programs have translations for all languages. By default, an -English message is shown in place of a nonexistent translation. If you -understand other languages, you can set up a priority list of languages. -This is done through a different environment variable, called -`LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG' -for the purpose of message handling, but you still need to have `LANG' -set to the primary language; this is required by other parts of the -system libraries. For example, some Swedish users who would rather -read translations in German than English for when Swedish is not -available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'. - - Special advice for Norwegian users: The language code for Norwegian -bokma*l changed from `no' to `nb' recently (in 2003). During the -transition period, while some message catalogs for this language are -installed under `nb' and some older ones under `no', it's recommended -for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and -older translations are used. - - In the `LANGUAGE' environment variable, but not in the `LANG' -environment variable, `LL_CC' combinations can be abbreviated as `LL' -to denote the language's main dialect. For example, `de' is equivalent -to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT' -(Portuguese as spoken in Portugal) in this context. - -1.3 Translating Teams -===================== - -For the Free Translation Project to be a success, we need interested -people who like their own language and write it well, and who are also -able to synergize with other translators speaking the same language. -Each translation team has its own mailing list. The up-to-date list of -teams can be found at the Free Translation Project's homepage, -`http://translationproject.org/', in the "Teams" area. - - If you'd like to volunteer to _work_ at translating messages, you -should become a member of the translating team for your own language. -The subscribing address is _not_ the same as the list itself, it has -`-request' appended. For example, speakers of Swedish can send a -message to `sv-request@li.org', having this message body: - - subscribe - - Keep in mind that team members are expected to participate -_actively_ in translations, or at solving translational difficulties, -rather than merely lurking around. If your team does not exist yet and -you want to start one, or if you are unsure about what to do or how to -get started, please write to `coordinator@translationproject.org' to -reach the coordinator for all translator teams. - - The English team is special. It works at improving and uniformizing -the terminology in use. Proven linguistic skills are praised more than -programming skills, here. - -1.4 Available Packages -====================== - -Languages are not equally supported in all packages. The following -matrix shows the current state of internationalization, as of June -2010. The matrix shows, in regard of each package, for which languages -PO files have been submitted to translation coordination, with a -translation percentage of at least 50%. - - Ready PO files af am an ar as ast az be be@latin bg bn_IN bs ca - +--------------------------------------------------+ - a2ps | [] [] | - aegis | | - ant-phone | | - anubis | | - aspell | [] [] | - bash | | - bfd | | - bibshelf | [] | - binutils | | - bison | | - bison-runtime | [] | - bluez-pin | [] [] | - bombono-dvd | | - buzztard | | - cflow | | - clisp | | - coreutils | [] [] | - cpio | | - cppi | | - cpplib | [] | - cryptsetup | | - dfarc | | - dialog | [] [] | - dico | | - diffutils | [] | - dink | | - doodle | | - e2fsprogs | [] | - enscript | [] | - exif | | - fetchmail | [] | - findutils | [] | - flex | [] | - freedink | | - gas | | - gawk | [] [] | - gcal | [] | - gcc | | - gettext-examples | [] [] [] [] | - gettext-runtime | [] [] | - gettext-tools | [] [] | - gip | [] | - gjay | | - gliv | [] | - glunarclock | [] [] | - gnubiff | | - gnucash | [] | - gnuedu | | - gnulib | | - gnunet | | - gnunet-gtk | | - gnutls | | - gold | | - gpe-aerial | | - gpe-beam | | - gpe-bluetooth | | - gpe-calendar | | - gpe-clock | [] | - gpe-conf | | - gpe-contacts | | - gpe-edit | | - gpe-filemanager | | - gpe-go | | - gpe-login | | - gpe-ownerinfo | [] | - gpe-package | | - gpe-sketchbook | | - gpe-su | [] | - gpe-taskmanager | [] | - gpe-timesheet | [] | - gpe-today | [] | - gpe-todo | | - gphoto2 | | - gprof | [] | - gpsdrive | | - gramadoir | | - grep | | - grub | [] [] | - gsasl | | - gss | | - gst-plugins-bad | [] | - gst-plugins-base | [] | - gst-plugins-good | [] | - gst-plugins-ugly | [] | - gstreamer | [] [] [] | - gtick | | - gtkam | [] | - gtkorphan | [] | - gtkspell | [] [] [] | - gutenprint | | - hello | [] | - help2man | | - hylafax | | - idutils | | - indent | [] [] | - iso_15924 | | - iso_3166 | [] [] [] [] [] [] [] | - iso_3166_2 | | - iso_4217 | | - iso_639 | [] [] [] [] | - iso_639_3 | | - jwhois | | - kbd | | - keytouch | [] | - keytouch-editor | | - keytouch-keyboa... | [] | - klavaro | [] | - latrine | | - ld | [] | - leafpad | [] [] | - libc | [] [] | - libexif | () | - libextractor | | - libgnutls | | - libgpewidget | | - libgpg-error | | - libgphoto2 | | - libgphoto2_port | | - libgsasl | | - libiconv | [] | - libidn | | - lifelines | | - liferea | [] [] | - lilypond | | - linkdr | [] | - lordsawar | | - lprng | | - lynx | [] | - m4 | | - mailfromd | | - mailutils | | - make | | - man-db | | - man-db-manpages | | - minicom | | - mkisofs | | - myserver | | - nano | [] [] | - opcodes | | - parted | | - pies | | - popt | | - psmisc | | - pspp | [] | - pwdutils | | - radius | [] | - recode | [] [] | - rosegarden | | - rpm | | - rush | | - sarg | | - screem | | - scrollkeeper | [] [] [] | - sed | [] [] | - sharutils | [] [] | - shishi | | - skencil | | - solfege | | - solfege-manual | | - soundtracker | | - sp | | - sysstat | | - tar | [] | - texinfo | | - tin | | - unicode-han-tra... | | - unicode-transla... | | - util-linux-ng | [] | - vice | | - vmm | | - vorbis-tools | | - wastesedge | | - wdiff | | - wget | [] [] | - wyslij-po | | - xchat | [] [] [] [] | - xdg-user-dirs | [] [] [] [] [] [] [] [] [] | - xkeyboard-config | [] [] | - +--------------------------------------------------+ - af am an ar as ast az be be@latin bg bn_IN bs ca - 6 0 1 2 3 19 1 10 3 28 3 1 38 - - crh cs da de el en en_GB en_ZA eo es et eu fa - +-------------------------------------------------+ - a2ps | [] [] [] [] [] [] [] | - aegis | [] [] [] | - ant-phone | [] () | - anubis | [] [] | - aspell | [] [] [] [] [] | - bash | [] [] [] | - bfd | [] | - bibshelf | [] [] [] | - binutils | [] | - bison | [] [] | - bison-runtime | [] [] [] [] | - bluez-pin | [] [] [] [] [] [] | - bombono-dvd | [] | - buzztard | [] [] [] | - cflow | [] [] | - clisp | [] [] [] [] | - coreutils | [] [] [] [] | - cpio | | - cppi | | - cpplib | [] [] [] | - cryptsetup | [] | - dfarc | [] [] [] | - dialog | [] [] [] [] [] | - dico | | - diffutils | [] [] [] [] [] [] | - dink | [] [] [] | - doodle | [] | - e2fsprogs | [] [] [] | - enscript | [] [] [] | - exif | () [] [] | - fetchmail | [] [] () [] [] [] | - findutils | [] [] [] | - flex | [] [] | - freedink | [] [] [] | - gas | [] | - gawk | [] [] [] | - gcal | [] | - gcc | [] [] | - gettext-examples | [] [] [] [] | - gettext-runtime | [] [] [] [] | - gettext-tools | [] [] [] | - gip | [] [] [] [] | - gjay | [] | - gliv | [] [] [] | - glunarclock | [] [] | - gnubiff | () | - gnucash | [] () () () () | - gnuedu | [] [] | - gnulib | [] [] | - gnunet | | - gnunet-gtk | [] | - gnutls | [] [] | - gold | [] | - gpe-aerial | [] [] [] [] | - gpe-beam | [] [] [] [] | - gpe-bluetooth | [] [] | - gpe-calendar | [] | - gpe-clock | [] [] [] [] | - gpe-conf | [] [] [] | - gpe-contacts | [] [] [] | - gpe-edit | [] [] | - gpe-filemanager | [] [] [] | - gpe-go | [] [] [] [] | - gpe-login | [] [] | - gpe-ownerinfo | [] [] [] [] | - gpe-package | [] [] [] | - gpe-sketchbook | [] [] [] [] | - gpe-su | [] [] [] [] | - gpe-taskmanager | [] [] [] [] | - gpe-timesheet | [] [] [] [] | - gpe-today | [] [] [] [] | - gpe-todo | [] [] [] | - gphoto2 | [] [] () [] [] [] | - gprof | [] [] [] | - gpsdrive | [] [] [] | - gramadoir | [] [] [] | - grep | [] | - grub | [] [] | - gsasl | [] | - gss | | - gst-plugins-bad | [] [] [] [] [] | - gst-plugins-base | [] [] [] [] [] | - gst-plugins-good | [] [] [] [] [] [] | - gst-plugins-ugly | [] [] [] [] [] [] | - gstreamer | [] [] [] [] [] | - gtick | [] () [] | - gtkam | [] [] () [] [] | - gtkorphan | [] [] [] [] | - gtkspell | [] [] [] [] [] [] [] | - gutenprint | [] [] [] | - hello | [] [] [] [] | - help2man | [] | - hylafax | [] [] | - idutils | [] [] | - indent | [] [] [] [] [] [] [] | - iso_15924 | [] () [] [] | - iso_3166 | [] [] [] [] () [] [] [] () | - iso_3166_2 | () | - iso_4217 | [] [] [] () [] [] | - iso_639 | [] [] [] [] () [] [] | - iso_639_3 | [] | - jwhois | [] | - kbd | [] [] [] [] [] | - keytouch | [] [] | - keytouch-editor | [] [] | - keytouch-keyboa... | [] | - klavaro | [] [] [] [] | - latrine | [] () | - ld | [] [] | - leafpad | [] [] [] [] [] [] | - libc | [] [] [] [] | - libexif | [] [] () | - libextractor | | - libgnutls | [] | - libgpewidget | [] [] | - libgpg-error | [] [] | - libgphoto2 | [] () | - libgphoto2_port | [] () [] | - libgsasl | | - libiconv | [] [] [] [] [] | - libidn | [] [] [] | - lifelines | [] () | - liferea | [] [] [] [] [] | - lilypond | [] [] [] | - linkdr | [] [] [] | - lordsawar | [] | - lprng | | - lynx | [] [] [] [] | - m4 | [] [] [] [] | - mailfromd | | - mailutils | [] | - make | [] [] [] | - man-db | | - man-db-manpages | | - minicom | [] [] [] [] | - mkisofs | | - myserver | | - nano | [] [] [] | - opcodes | [] [] | - parted | [] [] | - pies | | - popt | [] [] [] [] [] | - psmisc | [] [] [] | - pspp | [] | - pwdutils | [] | - radius | [] | - recode | [] [] [] [] [] [] | - rosegarden | () () () | - rpm | [] [] [] | - rush | | - sarg | | - screem | | - scrollkeeper | [] [] [] [] [] | - sed | [] [] [] [] [] [] | - sharutils | [] [] [] [] | - shishi | | - skencil | [] () [] | - solfege | [] [] [] | - solfege-manual | [] [] | - soundtracker | [] [] [] | - sp | [] | - sysstat | [] [] [] | - tar | [] [] [] [] | - texinfo | [] [] [] | - tin | [] [] | - unicode-han-tra... | | - unicode-transla... | | - util-linux-ng | [] [] [] [] | - vice | () () | - vmm | [] | - vorbis-tools | [] [] | - wastesedge | [] | - wdiff | [] [] | - wget | [] [] [] | - wyslij-po | | - xchat | [] [] [] [] [] | - xdg-user-dirs | [] [] [] [] [] [] [] [] [] | - xkeyboard-config | [] [] [] [] [] [] | - +-------------------------------------------------+ - crh cs da de el en en_GB en_ZA eo es et eu fa - 5 64 105 117 18 1 8 0 28 89 18 19 0 - - fi fr ga gl gu he hi hr hu hy id is it ja ka kn - +----------------------------------------------------+ - a2ps | [] [] [] [] | - aegis | [] [] | - ant-phone | [] [] | - anubis | [] [] [] [] | - aspell | [] [] [] [] | - bash | [] [] [] [] | - bfd | [] [] [] | - bibshelf | [] [] [] [] [] | - binutils | [] [] [] | - bison | [] [] [] [] | - bison-runtime | [] [] [] [] [] [] | - bluez-pin | [] [] [] [] [] [] [] [] | - bombono-dvd | [] | - buzztard | [] | - cflow | [] [] [] | - clisp | [] | - coreutils | [] [] [] [] [] | - cpio | [] [] [] [] | - cppi | [] [] | - cpplib | [] [] [] | - cryptsetup | [] [] [] | - dfarc | [] [] [] | - dialog | [] [] [] [] [] [] [] | - dico | | - diffutils | [] [] [] [] [] [] [] [] [] | - dink | [] | - doodle | [] [] | - e2fsprogs | [] [] | - enscript | [] [] [] [] | - exif | [] [] [] [] [] [] | - fetchmail | [] [] [] [] | - findutils | [] [] [] [] [] [] | - flex | [] [] [] | - freedink | [] [] [] | - gas | [] [] | - gawk | [] [] [] [] () [] | - gcal | [] | - gcc | [] | - gettext-examples | [] [] [] [] [] [] [] | - gettext-runtime | [] [] [] [] [] [] | - gettext-tools | [] [] [] [] | - gip | [] [] [] [] [] [] | - gjay | [] | - gliv | [] () | - glunarclock | [] [] [] [] | - gnubiff | () [] () | - gnucash | () () () () () [] | - gnuedu | [] [] | - gnulib | [] [] [] [] [] [] | - gnunet | | - gnunet-gtk | [] | - gnutls | [] [] | - gold | [] [] | - gpe-aerial | [] [] [] | - gpe-beam | [] [] [] [] | - gpe-bluetooth | [] [] [] [] | - gpe-calendar | [] [] | - gpe-clock | [] [] [] [] [] | - gpe-conf | [] [] [] [] | - gpe-contacts | [] [] [] [] | - gpe-edit | [] [] [] | - gpe-filemanager | [] [] [] [] | - gpe-go | [] [] [] [] [] | - gpe-login | [] [] [] | - gpe-ownerinfo | [] [] [] [] [] | - gpe-package | [] [] [] | - gpe-sketchbook | [] [] [] [] | - gpe-su | [] [] [] [] [] [] | - gpe-taskmanager | [] [] [] [] [] | - gpe-timesheet | [] [] [] [] [] | - gpe-today | [] [] [] [] [] [] [] | - gpe-todo | [] [] [] | - gphoto2 | [] [] [] [] [] [] | - gprof | [] [] [] [] | - gpsdrive | [] [] [] | - gramadoir | [] [] [] | - grep | [] [] | - grub | [] [] [] [] | - gsasl | [] [] [] [] [] | - gss | [] [] [] [] [] | - gst-plugins-bad | [] [] [] [] [] [] | - gst-plugins-base | [] [] [] [] [] [] | - gst-plugins-good | [] [] [] [] [] [] | - gst-plugins-ugly | [] [] [] [] [] [] | - gstreamer | [] [] [] [] [] | - gtick | [] [] [] [] [] | - gtkam | [] [] [] [] [] | - gtkorphan | [] [] [] | - gtkspell | [] [] [] [] [] [] [] [] [] | - gutenprint | [] [] [] [] | - hello | [] [] [] | - help2man | [] [] | - hylafax | [] | - idutils | [] [] [] [] [] [] | - indent | [] [] [] [] [] [] [] [] | - iso_15924 | [] () [] [] | - iso_3166 | [] () [] [] [] [] [] [] [] [] [] [] | - iso_3166_2 | () [] [] [] | - iso_4217 | [] () [] [] [] [] | - iso_639 | [] () [] [] [] [] [] [] [] | - iso_639_3 | () [] [] | - jwhois | [] [] [] [] [] | - kbd | [] [] | - keytouch | [] [] [] [] [] [] | - keytouch-editor | [] [] [] [] [] | - keytouch-keyboa... | [] [] [] [] [] | - klavaro | [] [] | - latrine | [] [] [] | - ld | [] [] [] [] | - leafpad | [] [] [] [] [] [] [] () | - libc | [] [] [] [] [] | - libexif | [] | - libextractor | | - libgnutls | [] [] | - libgpewidget | [] [] [] [] | - libgpg-error | [] [] | - libgphoto2 | [] [] [] | - libgphoto2_port | [] [] [] | - libgsasl | [] [] [] [] [] | - libiconv | [] [] [] [] [] [] | - libidn | [] [] [] [] | - lifelines | () | - liferea | [] [] [] [] | - lilypond | [] [] | - linkdr | [] [] [] [] [] | - lordsawar | | - lprng | [] | - lynx | [] [] [] [] [] | - m4 | [] [] [] [] [] [] | - mailfromd | | - mailutils | [] [] | - make | [] [] [] [] [] [] [] [] [] | - man-db | [] [] | - man-db-manpages | [] | - minicom | [] [] [] [] [] | - mkisofs | [] [] [] [] | - myserver | | - nano | [] [] [] [] [] [] | - opcodes | [] [] [] [] | - parted | [] [] [] [] | - pies | | - popt | [] [] [] [] [] [] [] [] [] | - psmisc | [] [] [] | - pspp | | - pwdutils | [] [] | - radius | [] [] | - recode | [] [] [] [] [] [] [] [] | - rosegarden | () () () () () | - rpm | [] [] | - rush | | - sarg | [] | - screem | [] [] | - scrollkeeper | [] [] [] [] | - sed | [] [] [] [] [] [] [] [] | - sharutils | [] [] [] [] [] [] [] | - shishi | [] | - skencil | [] | - solfege | [] [] [] [] | - solfege-manual | [] [] | - soundtracker | [] [] | - sp | [] () | - sysstat | [] [] [] [] [] | - tar | [] [] [] [] [] [] [] | - texinfo | [] [] [] [] | - tin | [] | - unicode-han-tra... | | - unicode-transla... | [] [] | - util-linux-ng | [] [] [] [] [] [] | - vice | () () () | - vmm | [] | - vorbis-tools | [] | - wastesedge | () () | - wdiff | [] | - wget | [] [] [] [] [] [] [] [] | - wyslij-po | [] [] [] | - xchat | [] [] [] [] [] [] [] [] [] | - xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] [] [] | - xkeyboard-config | [] [] [] [] [] | - +----------------------------------------------------+ - fi fr ga gl gu he hi hr hu hy id is it ja ka kn - 105 121 53 20 4 8 3 5 53 2 120 5 84 67 0 4 - - ko ku ky lg lt lv mk ml mn mr ms mt nb nds ne - +-----------------------------------------------+ - a2ps | [] | - aegis | | - ant-phone | | - anubis | [] [] | - aspell | [] | - bash | | - bfd | | - bibshelf | [] [] | - binutils | | - bison | [] | - bison-runtime | [] [] [] [] [] | - bluez-pin | [] [] [] [] [] | - bombono-dvd | | - buzztard | | - cflow | | - clisp | | - coreutils | [] | - cpio | | - cppi | | - cpplib | | - cryptsetup | | - dfarc | [] | - dialog | [] [] [] [] [] | - dico | | - diffutils | [] [] | - dink | | - doodle | | - e2fsprogs | | - enscript | | - exif | [] | - fetchmail | | - findutils | | - flex | | - freedink | [] | - gas | | - gawk | | - gcal | | - gcc | | - gettext-examples | [] [] [] [] | - gettext-runtime | [] | - gettext-tools | [] | - gip | [] [] | - gjay | | - gliv | | - glunarclock | [] | - gnubiff | | - gnucash | () () () () | - gnuedu | | - gnulib | | - gnunet | | - gnunet-gtk | | - gnutls | [] | - gold | | - gpe-aerial | [] | - gpe-beam | [] | - gpe-bluetooth | [] [] | - gpe-calendar | [] | - gpe-clock | [] [] [] [] [] | - gpe-conf | [] [] | - gpe-contacts | [] [] | - gpe-edit | [] | - gpe-filemanager | [] [] | - gpe-go | [] [] [] | - gpe-login | [] | - gpe-ownerinfo | [] [] | - gpe-package | [] [] | - gpe-sketchbook | [] [] | - gpe-su | [] [] [] [] [] [] | - gpe-taskmanager | [] [] [] [] [] [] | - gpe-timesheet | [] [] | - gpe-today | [] [] [] [] | - gpe-todo | [] [] | - gphoto2 | | - gprof | [] | - gpsdrive | | - gramadoir | | - grep | | - grub | | - gsasl | | - gss | | - gst-plugins-bad | [] [] [] [] | - gst-plugins-base | [] [] | - gst-plugins-good | [] [] | - gst-plugins-ugly | [] [] [] [] [] | - gstreamer | | - gtick | | - gtkam | [] | - gtkorphan | [] [] | - gtkspell | [] [] [] [] [] [] [] | - gutenprint | | - hello | [] [] [] | - help2man | | - hylafax | | - idutils | | - indent | | - iso_15924 | [] [] | - iso_3166 | [] [] () [] [] [] [] [] | - iso_3166_2 | | - iso_4217 | [] [] | - iso_639 | [] [] | - iso_639_3 | [] | - jwhois | [] | - kbd | | - keytouch | [] | - keytouch-editor | [] | - keytouch-keyboa... | [] | - klavaro | [] | - latrine | [] | - ld | | - leafpad | [] [] [] | - libc | [] | - libexif | | - libextractor | | - libgnutls | [] | - libgpewidget | [] [] | - libgpg-error | | - libgphoto2 | | - libgphoto2_port | | - libgsasl | | - libiconv | | - libidn | | - lifelines | | - liferea | | - lilypond | | - linkdr | | - lordsawar | | - lprng | | - lynx | | - m4 | | - mailfromd | | - mailutils | | - make | [] | - man-db | | - man-db-manpages | | - minicom | [] | - mkisofs | | - myserver | | - nano | [] [] | - opcodes | | - parted | | - pies | | - popt | [] [] [] | - psmisc | | - pspp | | - pwdutils | | - radius | | - recode | | - rosegarden | | - rpm | | - rush | | - sarg | | - screem | | - scrollkeeper | [] [] | - sed | | - sharutils | | - shishi | | - skencil | | - solfege | [] | - solfege-manual | | - soundtracker | | - sp | | - sysstat | [] | - tar | [] | - texinfo | [] | - tin | | - unicode-han-tra... | | - unicode-transla... | | - util-linux-ng | | - vice | | - vmm | | - vorbis-tools | | - wastesedge | | - wdiff | | - wget | [] | - wyslij-po | | - xchat | [] [] [] | - xdg-user-dirs | [] [] [] [] [] [] [] [] | - xkeyboard-config | [] [] [] | - +-----------------------------------------------+ - ko ku ky lg lt lv mk ml mn mr ms mt nb nds ne - 20 5 10 1 13 48 4 2 2 4 24 10 20 3 1 - - nl nn or pa pl ps pt pt_BR ro ru rw sk sl sq sr - +---------------------------------------------------+ - a2ps | [] [] [] [] [] [] [] [] | - aegis | [] [] [] | - ant-phone | [] [] | - anubis | [] [] [] | - aspell | [] [] [] [] [] | - bash | [] [] | - bfd | [] | - bibshelf | [] [] | - binutils | [] [] | - bison | [] [] [] | - bison-runtime | [] [] [] [] [] [] [] | - bluez-pin | [] [] [] [] [] [] [] [] | - bombono-dvd | [] () | - buzztard | [] [] | - cflow | [] | - clisp | [] [] | - coreutils | [] [] [] [] [] [] | - cpio | [] [] [] | - cppi | [] | - cpplib | [] | - cryptsetup | [] | - dfarc | [] | - dialog | [] [] [] [] | - dico | [] | - diffutils | [] [] [] [] [] [] | - dink | () | - doodle | [] [] | - e2fsprogs | [] [] | - enscript | [] [] [] [] [] | - exif | [] [] [] () [] | - fetchmail | [] [] [] [] | - findutils | [] [] [] [] [] | - flex | [] [] [] [] [] | - freedink | [] [] | - gas | | - gawk | [] [] [] [] | - gcal | | - gcc | [] | - gettext-examples | [] [] [] [] [] [] [] [] | - gettext-runtime | [] [] [] [] [] [] [] [] [] | - gettext-tools | [] [] [] [] [] [] | - gip | [] [] [] [] [] | - gjay | | - gliv | [] [] [] [] [] [] | - glunarclock | [] [] [] [] [] | - gnubiff | [] () | - gnucash | [] () () () | - gnuedu | [] | - gnulib | [] [] [] [] | - gnunet | | - gnunet-gtk | | - gnutls | [] [] | - gold | | - gpe-aerial | [] [] [] [] [] [] [] | - gpe-beam | [] [] [] [] [] [] [] | - gpe-bluetooth | [] [] | - gpe-calendar | [] [] [] [] | - gpe-clock | [] [] [] [] [] [] [] [] | - gpe-conf | [] [] [] [] [] [] [] | - gpe-contacts | [] [] [] [] [] | - gpe-edit | [] [] [] | - gpe-filemanager | [] [] [] | - gpe-go | [] [] [] [] [] [] [] [] | - gpe-login | [] [] | - gpe-ownerinfo | [] [] [] [] [] [] [] [] | - gpe-package | [] [] | - gpe-sketchbook | [] [] [] [] [] [] [] | - gpe-su | [] [] [] [] [] [] [] [] | - gpe-taskmanager | [] [] [] [] [] [] [] [] | - gpe-timesheet | [] [] [] [] [] [] [] [] | - gpe-today | [] [] [] [] [] [] [] [] | - gpe-todo | [] [] [] [] [] | - gphoto2 | [] [] [] [] [] [] [] [] | - gprof | [] [] [] | - gpsdrive | [] [] | - gramadoir | [] [] | - grep | [] [] [] [] | - grub | [] [] [] | - gsasl | [] [] [] [] | - gss | [] [] [] | - gst-plugins-bad | [] [] [] [] [] [] | - gst-plugins-base | [] [] [] [] [] | - gst-plugins-good | [] [] [] [] [] | - gst-plugins-ugly | [] [] [] [] [] [] | - gstreamer | [] [] [] [] [] | - gtick | [] [] [] | - gtkam | [] [] [] [] [] [] | - gtkorphan | [] | - gtkspell | [] [] [] [] [] [] [] [] [] [] | - gutenprint | [] [] | - hello | [] [] [] [] | - help2man | [] [] | - hylafax | [] | - idutils | [] [] [] [] [] | - indent | [] [] [] [] [] [] [] | - iso_15924 | [] [] [] [] | - iso_3166 | [] [] [] [] [] () [] [] [] [] [] [] [] [] | - iso_3166_2 | [] [] [] | - iso_4217 | [] [] [] [] [] [] [] [] | - iso_639 | [] [] [] [] [] [] [] [] [] | - iso_639_3 | [] [] | - jwhois | [] [] [] [] | - kbd | [] [] [] | - keytouch | [] [] [] | - keytouch-editor | [] [] [] | - keytouch-keyboa... | [] [] [] | - klavaro | [] [] | - latrine | [] [] | - ld | | - leafpad | [] [] [] [] [] [] [] [] [] | - libc | [] [] [] [] | - libexif | [] [] () [] | - libextractor | | - libgnutls | [] [] | - libgpewidget | [] [] [] | - libgpg-error | [] [] | - libgphoto2 | [] [] | - libgphoto2_port | [] [] [] [] [] | - libgsasl | [] [] [] [] [] | - libiconv | [] [] [] [] [] | - libidn | [] [] | - lifelines | [] [] | - liferea | [] [] [] [] [] () () [] | - lilypond | [] | - linkdr | [] [] [] | - lordsawar | | - lprng | [] | - lynx | [] [] [] | - m4 | [] [] [] [] [] | - mailfromd | [] | - mailutils | [] | - make | [] [] [] [] | - man-db | [] [] [] | - man-db-manpages | [] [] [] | - minicom | [] [] [] [] | - mkisofs | [] [] [] | - myserver | | - nano | [] [] [] [] | - opcodes | [] [] | - parted | [] [] [] [] | - pies | [] | - popt | [] [] [] [] | - psmisc | [] [] [] | - pspp | [] [] | - pwdutils | [] | - radius | [] [] [] | - recode | [] [] [] [] [] [] [] [] | - rosegarden | () () | - rpm | [] [] [] | - rush | [] [] | - sarg | | - screem | | - scrollkeeper | [] [] [] [] [] [] [] [] | - sed | [] [] [] [] [] [] [] [] [] | - sharutils | [] [] [] [] | - shishi | [] | - skencil | [] [] | - solfege | [] [] [] [] | - solfege-manual | [] [] [] | - soundtracker | [] | - sp | | - sysstat | [] [] [] [] | - tar | [] [] [] [] | - texinfo | [] [] [] [] | - tin | [] | - unicode-han-tra... | | - unicode-transla... | | - util-linux-ng | [] [] [] [] [] | - vice | [] | - vmm | [] | - vorbis-tools | [] [] | - wastesedge | [] | - wdiff | [] [] | - wget | [] [] [] [] [] [] [] | - wyslij-po | [] [] [] | - xchat | [] [] [] [] [] [] [] [] [] | - xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] [] [] [] | - xkeyboard-config | [] [] [] | - +---------------------------------------------------+ - nl nn or pa pl ps pt pt_BR ro ru rw sk sl sq sr - 135 10 4 7 105 1 29 62 47 91 3 54 46 9 37 - - sv sw ta te tg th tr uk vi wa zh_CN zh_HK zh_TW - +---------------------------------------------------+ - a2ps | [] [] [] [] [] | 27 - aegis | [] | 9 - ant-phone | [] [] [] [] | 9 - anubis | [] [] [] [] | 15 - aspell | [] [] [] | 20 - bash | [] [] [] | 12 - bfd | [] | 6 - bibshelf | [] [] [] | 16 - binutils | [] [] | 8 - bison | [] [] | 12 - bison-runtime | [] [] [] [] [] [] | 29 - bluez-pin | [] [] [] [] [] [] [] [] | 37 - bombono-dvd | [] | 4 - buzztard | [] | 7 - cflow | [] [] [] | 9 - clisp | | 10 - coreutils | [] [] [] [] | 22 - cpio | [] [] [] [] [] [] | 13 - cppi | [] [] | 5 - cpplib | [] [] [] [] [] [] | 14 - cryptsetup | [] [] | 7 - dfarc | [] | 9 - dialog | [] [] [] [] [] [] [] | 30 - dico | [] | 2 - diffutils | [] [] [] [] [] [] | 30 - dink | | 4 - doodle | [] [] | 7 - e2fsprogs | [] [] [] | 11 - enscript | [] [] [] [] | 17 - exif | [] [] [] | 16 - fetchmail | [] [] [] | 17 - findutils | [] [] [] [] [] | 20 - flex | [] [] [] [] | 15 - freedink | [] | 10 - gas | [] | 4 - gawk | [] [] [] [] | 18 - gcal | [] [] | 5 - gcc | [] [] [] | 7 - gettext-examples | [] [] [] [] [] [] [] | 34 - gettext-runtime | [] [] [] [] [] [] [] | 29 - gettext-tools | [] [] [] [] [] [] | 22 - gip | [] [] [] [] | 22 - gjay | [] | 3 - gliv | [] [] [] | 14 - glunarclock | [] [] [] [] [] | 19 - gnubiff | [] [] | 4 - gnucash | () [] () [] () | 10 - gnuedu | [] [] | 7 - gnulib | [] [] [] [] | 16 - gnunet | [] | 1 - gnunet-gtk | [] [] [] | 5 - gnutls | [] [] [] | 10 - gold | [] | 4 - gpe-aerial | [] [] [] | 18 - gpe-beam | [] [] [] | 19 - gpe-bluetooth | [] [] [] | 13 - gpe-calendar | [] [] [] [] | 12 - gpe-clock | [] [] [] [] [] | 28 - gpe-conf | [] [] [] [] | 20 - gpe-contacts | [] [] [] | 17 - gpe-edit | [] [] [] | 12 - gpe-filemanager | [] [] [] [] | 16 - gpe-go | [] [] [] [] [] | 25 - gpe-login | [] [] [] | 11 - gpe-ownerinfo | [] [] [] [] [] | 25 - gpe-package | [] [] [] | 13 - gpe-sketchbook | [] [] [] | 20 - gpe-su | [] [] [] [] [] | 30 - gpe-taskmanager | [] [] [] [] [] | 29 - gpe-timesheet | [] [] [] [] [] | 25 - gpe-today | [] [] [] [] [] [] | 30 - gpe-todo | [] [] [] [] | 17 - gphoto2 | [] [] [] [] [] | 24 - gprof | [] [] [] | 15 - gpsdrive | [] [] [] | 11 - gramadoir | [] [] [] | 11 - grep | [] [] [] | 10 - grub | [] [] [] | 14 - gsasl | [] [] [] [] | 14 - gss | [] [] [] | 11 - gst-plugins-bad | [] [] [] [] | 26 - gst-plugins-base | [] [] [] [] [] | 24 - gst-plugins-good | [] [] [] [] | 24 - gst-plugins-ugly | [] [] [] [] [] | 29 - gstreamer | [] [] [] [] | 22 - gtick | [] [] [] | 13 - gtkam | [] [] [] | 20 - gtkorphan | [] [] [] | 14 - gtkspell | [] [] [] [] [] [] [] [] [] | 45 - gutenprint | [] | 10 - hello | [] [] [] [] [] [] | 21 - help2man | [] [] | 7 - hylafax | [] | 5 - idutils | [] [] [] [] | 17 - indent | [] [] [] [] [] [] | 30 - iso_15924 | () [] () [] [] | 16 - iso_3166 | [] [] () [] [] () [] [] [] () | 53 - iso_3166_2 | () [] () [] | 9 - iso_4217 | [] () [] [] () [] [] | 26 - iso_639 | [] [] [] () [] () [] [] [] [] | 38 - iso_639_3 | [] () | 8 - jwhois | [] [] [] [] [] | 16 - kbd | [] [] [] [] [] | 15 - keytouch | [] [] [] | 16 - keytouch-editor | [] [] [] | 14 - keytouch-keyboa... | [] [] [] | 14 - klavaro | [] | 11 - latrine | [] [] [] | 10 - ld | [] [] [] [] | 11 - leafpad | [] [] [] [] [] [] | 33 - libc | [] [] [] [] [] | 21 - libexif | [] () | 7 - libextractor | [] | 1 - libgnutls | [] [] [] | 9 - libgpewidget | [] [] [] | 14 - libgpg-error | [] [] [] | 9 - libgphoto2 | [] [] | 8 - libgphoto2_port | [] [] [] [] | 14 - libgsasl | [] [] [] | 13 - libiconv | [] [] [] [] | 21 - libidn | () [] [] | 11 - lifelines | [] | 4 - liferea | [] [] [] | 21 - lilypond | [] | 7 - linkdr | [] [] [] [] [] | 17 - lordsawar | | 1 - lprng | [] | 3 - lynx | [] [] [] [] | 17 - m4 | [] [] [] [] | 19 - mailfromd | [] [] | 3 - mailutils | [] | 5 - make | [] [] [] [] | 21 - man-db | [] [] [] | 8 - man-db-manpages | | 4 - minicom | [] [] | 16 - mkisofs | [] [] | 9 - myserver | | 0 - nano | [] [] [] [] | 21 - opcodes | [] [] [] | 11 - parted | [] [] [] [] [] | 15 - pies | [] [] | 3 - popt | [] [] [] [] [] [] | 27 - psmisc | [] [] | 11 - pspp | | 4 - pwdutils | [] [] | 6 - radius | [] [] | 9 - recode | [] [] [] [] | 28 - rosegarden | () | 0 - rpm | [] [] [] | 11 - rush | [] [] | 4 - sarg | | 1 - screem | [] | 3 - scrollkeeper | [] [] [] [] [] | 27 - sed | [] [] [] [] [] | 30 - sharutils | [] [] [] [] [] | 22 - shishi | [] | 3 - skencil | [] [] | 7 - solfege | [] [] [] [] | 16 - solfege-manual | [] | 8 - soundtracker | [] [] [] | 9 - sp | [] | 3 - sysstat | [] [] | 15 - tar | [] [] [] [] [] [] | 23 - texinfo | [] [] [] [] [] | 17 - tin | | 4 - unicode-han-tra... | | 0 - unicode-transla... | | 2 - util-linux-ng | [] [] [] [] | 20 - vice | () () | 1 - vmm | [] | 4 - vorbis-tools | [] | 6 - wastesedge | | 2 - wdiff | [] [] | 7 - wget | [] [] [] [] [] | 26 - wyslij-po | [] [] | 8 - xchat | [] [] [] [] [] [] | 36 - xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] | 63 - xkeyboard-config | [] [] [] | 22 - +---------------------------------------------------+ - 85 teams sv sw ta te tg th tr uk vi wa zh_CN zh_HK zh_TW - 178 domains 119 1 3 3 0 10 65 51 155 17 98 7 41 2618 - - Some counters in the preceding matrix are higher than the number of -visible blocks let us expect. This is because a few extra PO files are -used for implementing regional variants of languages, or language -dialects. - - For a PO file in the matrix above to be effective, the package to -which it applies should also have been internationalized and -distributed as such by its maintainer. There might be an observable -lag between the mere existence a PO file and its wide availability in a -distribution. - - If June 2010 seems to be old, you may fetch a more recent copy of -this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date -matrix with full percentage details can be found at -`http://translationproject.org/extra/matrix.html'. - -1.5 Using `gettext' in new packages -=================================== - -If you are writing a freely available program and want to -internationalize it you are welcome to use GNU `gettext' in your -package. Of course you have to respect the GNU Library General Public -License which covers the use of the GNU `gettext' library. This means -in particular that even non-free programs can use `libintl' as a shared -library, whereas only free software can use `libintl' as a static -library or use modified versions of `libintl'. - - Once the sources are changed appropriately and the setup can handle -the use of `gettext' the only thing missing are the translations. The -Free Translation Project is also available for packages which are not -developed inside the GNU project. Therefore the information given above -applies also for every other Free Software Project. Contact -`coordinator@translationproject.org' to make the `.pot' files available -to the translation teams. - + diff -Nru libfshfs-20201104/AUTHORS libfshfs-20240221/AUTHORS --- libfshfs-20201104/AUTHORS 2020-11-04 04:19:42.000000000 +0000 +++ libfshfs-20240221/AUTHORS 2024-02-21 05:48:49.000000000 +0000 @@ -1,4 +1,4 @@ Acknowledgements: libfshfs -Copyright (C) 2009-2020, Joachim Metz +Copyright (C) 2009-2024, Joachim Metz diff -Nru libfshfs-20201104/ChangeLog libfshfs-20240221/ChangeLog --- libfshfs-20201104/ChangeLog 2020-11-04 05:31:39.000000000 +0000 +++ libfshfs-20240221/ChangeLog 2023-12-03 09:06:45.000000000 +0000 @@ -1,25 +1,37 @@ To do: -* complete name case folding and decomposition tests -* add support for resource fork data stream -* add support for extended attribute (named fork) data stream +* rename volume name to volume label ? + +* check if get directory entries uses previous/next node + +* add support for extended attribute (named fork) data stream with LIBFSHFS_ATTRIBUTE_RECORD_TYPE_EXTENTS +* for extended attributes by name look up use native B-tree structures + +* info handle implement is_empty ? + +* handle (hard) link count differently for indirect node files in /␀␀␀␀HFS+ Private Data/ +* what about a symbolic link to HFS+ Private data directory? + * on file_entry_initialize lookup com.apple.decmpfs specifically instead of all attributes? * catalog B-tree file, include name in branch key check * file entry API: add extents functions -* check flags to see if file entry has extended attributes - -* look at how case folding is stored +* add support to print information about special files (those without a catalog record) ? -* ensure traditional HFS input errors for now +* HFS+/HFSX +** add support for solaris and bsdos device numbers -* add support to print information about special files (those without a catalog record) - -* what about a directory with extended attributes? -** what if that attribute is named com.apple.decmpfs ? -* what about a symbolic link to HFS+ Private data directory? +* classic HFS +** fshfsinfo: add support retrieving non-directory file entries using fshfsinfo -E +*** files in classic HFS do not need to have a thread record +** API: add option to set file system encoding +** API: add means to determine if date and time values are in local time or UTC +** API: determine how to represent file mode +** add support for Mac OS codepages +** pass IO handle to directory, file and thread records to validate record types ? +** correct file record extents with extents start Format support: -* implement support for traditional HFS +* implement support for classic HFS pre Mac OS 9.0 * implement support for HFS+/HFX Unicode 2.1 version * implement support for folder and file information * implement support for extended folder and file information diff -Nru libfshfs-20201104/INSTALL libfshfs-20240221/INSTALL --- libfshfs-20201104/INSTALL 2020-11-04 11:56:30.000000000 +0000 +++ libfshfs-20240221/INSTALL 2024-02-21 06:04:25.000000000 +0000 @@ -1,8 +1,8 @@ Installation Instructions ************************* - Copyright (C) 1994-1996, 1999-2002, 2004-2016 Free Software -Foundation, Inc. + Copyright (C) 1994-1996, 1999-2002, 2004-2017, 2020-2021 Free +Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright @@ -225,7 +225,7 @@ and if that doesn't work, install pre-built binaries of GCC for HP-UX. - HP-UX 'make' updates targets which have the same time stamps as their + HP-UX 'make' updates targets which have the same timestamps as their prerequisites, which makes it generally unusable when shipped generated files such as 'configure' are involved. Use GNU 'make' instead. diff -Nru libfshfs-20201104/Makefile.am libfshfs-20240221/Makefile.am --- libfshfs-20201104/Makefile.am 2020-11-01 07:22:18.000000000 +0000 +++ libfshfs-20240221/Makefile.am 2023-12-03 09:06:45.000000000 +0000 @@ -17,12 +17,11 @@ libfdata \ libfdatetime \ libfguid \ + libfmos \ libfshfs \ libhmac \ fshfstools \ pyfshfs \ - pyfshfs-python2 \ - pyfshfs-python3 \ po \ manuals \ tests \ @@ -38,7 +37,6 @@ dpkg/rules \ dpkg/libfshfs.install \ dpkg/libfshfs-dev.install \ - dpkg/libfshfs-python.install \ dpkg/libfshfs-python3.install \ dpkg/libfshfs-tools.install \ dpkg/source/format @@ -51,6 +49,9 @@ libfshfs.pc.in SETUP_PY_FILES = \ + pyproject.toml \ + setup.cfg \ + setup.cfg.in \ setup.py SPEC_FILES = \ @@ -93,41 +94,19 @@ (cd $(srcdir)/libfdata && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/libfdatetime && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/libfguid && $(MAKE) $(AM_MAKEFLAGS)) + (cd $(srcdir)/libfmos && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/libfshfs && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/po && $(MAKE) $(AM_MAKEFLAGS)) distclean: clean - /bin/rm -f Makefile - /bin/rm -f config.status - /bin/rm -f config.cache - /bin/rm -f config.log - /bin/rm -f libfshfs.pc - /bin/rm -f libfshfs.spec + -rm -f Makefile + -rm -f config.status + -rm -f config.cache + -rm -f config.log + -rm -f libfshfs.pc + -rm -f libfshfs.spec @for dir in ${subdirs}; do \ (cd $$dir && $(MAKE) distclean) \ || case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" -splint: - (cd $(srcdir)/libcerror && $(MAKE) splint $(AM_MAKEFLAGS)) - (cd $(srcdir)/libcthreads && $(MAKE) splint $(AM_MAKEFLAGS)) - (cd $(srcdir)/libcdata && $(MAKE) splint $(AM_MAKEFLAGS)) - (cd $(srcdir)/libclocale && $(MAKE) splint $(AM_MAKEFLAGS)) - (cd $(srcdir)/libcnotify && $(MAKE) splint $(AM_MAKEFLAGS)) - (cd $(srcdir)/libcsplit && $(MAKE) splint $(AM_MAKEFLAGS)) - (cd $(srcdir)/libuna && $(MAKE) splint $(AM_MAKEFLAGS)) - (cd $(srcdir)/libcfile && $(MAKE) splint $(AM_MAKEFLAGS)) - (cd $(srcdir)/libcpath && $(MAKE) splint $(AM_MAKEFLAGS)) - (cd $(srcdir)/libbfio && $(MAKE) splint $(AM_MAKEFLAGS)) - (cd $(srcdir)/libfcache && $(MAKE) splint $(AM_MAKEFLAGS)) - (cd $(srcdir)/libfdata && $(MAKE) splint $(AM_MAKEFLAGS)) - (cd $(srcdir)/libfdatetime && $(MAKE) splint $(AM_MAKEFLAGS)) - (cd $(srcdir)/libfguid && $(MAKE) splint $(AM_MAKEFLAGS)) - (cd $(srcdir)/libfshfs && $(MAKE) splint $(AM_MAKEFLAGS)) - (cd $(srcdir)/libhmac && $(MAKE) $(AM_MAKEFLAGS)) - (cd $(srcdir)/fshfstools && $(MAKE) splint $(AM_MAKEFLAGS)) - (cd $(srcdir)/pyfshfs && $(MAKE) splint $(AM_MAKEFLAGS)) - (cd $(srcdir)/po && $(MAKE) splint $(AM_MAKEFLAGS)) - (cd $(srcdir)/tests && $(MAKE) splint $(AM_MAKEFLAGS)) - (cd $(srcdir)/ossfuzz && $(MAKE) splint $(AM_MAKEFLAGS)) - diff -Nru libfshfs-20201104/Makefile.in libfshfs-20240221/Makefile.in --- libfshfs-20201104/Makefile.in 2020-11-04 11:56:31.000000000 +0000 +++ libfshfs-20240221/Makefile.in 2024-02-21 06:04:25.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -91,25 +91,26 @@ subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcdata.m4 \ - $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \ - $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \ - $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcrypto.m4 \ - $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcthreads.m4 \ - $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ - $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ - $(top_srcdir)/m4/libhmac.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/libuna.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \ - $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \ - $(top_srcdir)/m4/zlib.m4 $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libbfio.m4 \ + $(top_srcdir)/m4/libcdata.m4 $(top_srcdir)/m4/libcerror.m4 \ + $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ + $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ + $(top_srcdir)/m4/libcrypto.m4 $(top_srcdir)/m4/libcsplit.m4 \ + $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \ + $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ + $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmos.m4 \ + $(top_srcdir)/m4/libfuse.m4 $(top_srcdir)/m4/libhmac.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/pthread.m4 \ + $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ + $(top_srcdir)/m4/types.m4 $(top_srcdir)/m4/zlib.m4 \ + $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ @@ -120,7 +121,7 @@ CONFIG_HEADER = $(top_builddir)/common/config.h CONFIG_CLEAN_FILES = include/libfshfs/definitions.h \ include/libfshfs/features.h include/libfshfs/types.h \ - dpkg/changelog libfshfs.pc libfshfs.spec + dpkg/changelog libfshfs.pc libfshfs.spec setup.cfg CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) @@ -186,6 +187,7 @@ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir distdir-am dist dist-all distcheck +am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -203,12 +205,10 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/libfshfs.pc.in \ - $(srcdir)/libfshfs.spec.in $(top_srcdir)/dpkg/changelog.in \ + $(srcdir)/libfshfs.spec.in $(srcdir)/setup.cfg.in \ + $(top_srcdir)/dpkg/changelog.in \ $(top_srcdir)/include/libfshfs/definitions.h.in \ $(top_srcdir)/include/libfshfs/features.h.in \ $(top_srcdir)/include/libfshfs/types.h.in ABOUT-NLS AUTHORS \ @@ -253,6 +253,8 @@ DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip +# Exists only to be overridden by the user if desired. +AM_DISTCHECK_DVI_TARGET = dvi distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' @@ -271,6 +273,8 @@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ @@ -286,8 +290,10 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -307,6 +313,8 @@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ +HAVE_LIBFMOS = @HAVE_LIBFMOS@ +HAVE_LIBFUSE = @HAVE_LIBFUSE@ HAVE_LIBHMAC = @HAVE_LIBHMAC@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ @@ -322,6 +330,7 @@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ +HAVE_LOCAL_LIBFMOS = @HAVE_LOCAL_LIBFMOS@ HAVE_LOCAL_LIBHMAC = @HAVE_LOCAL_LIBHMAC@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ @@ -375,8 +384,12 @@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ +LIBFMOS_CPPFLAGS = @LIBFMOS_CPPFLAGS@ +LIBFMOS_LIBADD = @LIBFMOS_LIBADD@ LIBFSHFS_DLL_EXPORT = @LIBFSHFS_DLL_EXPORT@ LIBFSHFS_DLL_IMPORT = @LIBFSHFS_DLL_IMPORT@ +LIBFUSE_CPPFLAGS = @LIBFUSE_CPPFLAGS@ +LIBFUSE_LIBADD = @LIBFUSE_LIBADD@ LIBHMAC_CPPFLAGS = @LIBHMAC_CPPFLAGS@ LIBHMAC_LIBADD = @LIBHMAC_LIBADD@ LIBICONV = @LIBICONV@ @@ -398,8 +411,8 @@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ @@ -422,26 +435,6 @@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ -PYTHON2 = @PYTHON2@ -PYTHON2_CONFIG = @PYTHON2_CONFIG@ -PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ -PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ -PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ -PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ -PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ -PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ -PYTHON2_PREFIX = @PYTHON2_PREFIX@ -PYTHON2_VERSION = @PYTHON2_VERSION@ -PYTHON3 = @PYTHON3@ -PYTHON3_CONFIG = @PYTHON3_CONFIG@ -PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ -PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ -PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ -PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ -PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ -PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ -PYTHON3_PREFIX = @PYTHON3_PREFIX@ -PYTHON3_VERSION = @PYTHON3_VERSION@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ @@ -519,6 +512,12 @@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ +ax_libfmos_pc_libs_private = @ax_libfmos_pc_libs_private@ +ax_libfmos_spec_build_requires = @ax_libfmos_spec_build_requires@ +ax_libfmos_spec_requires = @ax_libfmos_spec_requires@ +ax_libfuse_pc_libs_private = @ax_libfuse_pc_libs_private@ +ax_libfuse_spec_build_requires = @ax_libfuse_spec_build_requires@ +ax_libfuse_spec_requires = @ax_libfuse_spec_requires@ ax_libhmac_pc_libs_private = @ax_libhmac_pc_libs_private@ ax_libhmac_spec_build_requires = @ax_libhmac_spec_build_requires@ ax_libhmac_spec_requires = @ax_libhmac_spec_requires@ @@ -543,6 +542,8 @@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +fuse_CFLAGS = @fuse_CFLAGS@ +fuse_LIBS = @fuse_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -580,6 +581,8 @@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ +libfmos_CFLAGS = @libfmos_CFLAGS@ +libfmos_LIBS = @libfmos_LIBS@ libfshfs_spec_requires = @libfshfs_spec_requires@ libfshfs_spec_tools_build_requires = @libfshfs_spec_tools_build_requires@ libhmac_CFLAGS = @libhmac_CFLAGS@ @@ -598,11 +601,8 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ -pyexecdir2 = @pyexecdir2@ -pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ -pythondir2 = @pythondir2@ -pythondir3 = @pythondir3@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -631,12 +631,11 @@ libfdata \ libfdatetime \ libfguid \ + libfmos \ libfshfs \ libhmac \ fshfstools \ pyfshfs \ - pyfshfs-python2 \ - pyfshfs-python3 \ po \ manuals \ tests \ @@ -652,7 +651,6 @@ dpkg/rules \ dpkg/libfshfs.install \ dpkg/libfshfs-dev.install \ - dpkg/libfshfs-python.install \ dpkg/libfshfs-python3.install \ dpkg/libfshfs-tools.install \ dpkg/source/format @@ -665,6 +663,9 @@ libfshfs.pc.in SETUP_PY_FILES = \ + pyproject.toml \ + setup.cfg \ + setup.cfg.in \ setup.py SPEC_FILES = \ @@ -733,6 +734,8 @@ cd $(top_builddir) && $(SHELL) ./config.status $@ libfshfs.spec: $(top_builddir)/config.status $(srcdir)/libfshfs.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ +setup.cfg: $(top_builddir)/config.status $(srcdir)/setup.cfg.in + cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo @@ -797,6 +800,8 @@ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" +sources-local: +splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique @@ -869,7 +874,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am @@ -953,6 +957,10 @@ tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) +dist-zstd: distdir + tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst + $(am__post_remove_distdir) + dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @@ -995,6 +1003,8 @@ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ + *.tar.zst*) \ + zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) @@ -1010,7 +1020,7 @@ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ @@ -1165,6 +1175,14 @@ ps-am: +sources: sources-recursive + +sources-am: sources-local + +splint: splint-recursive + +splint-am: splint-local + uninstall-am: uninstall-pkgconfigDATA .MAKE: $(am__recursive_targets) install-am install-strip @@ -1173,18 +1191,19 @@ am--refresh check check-am clean clean-cscope clean-generic \ clean-libtool cscope cscopelist-am ctags ctags-am dist \ dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ - dist-xz dist-zip distcheck distclean distclean-generic \ - distclean-libtool distclean-tags distcleancheck distdir \ - distuninstallcheck dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-pkgconfigDATA install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ - uninstall-am uninstall-pkgconfigDATA + dist-xz dist-zip dist-zstd distcheck distclean \ + distclean-generic distclean-libtool distclean-tags \ + distcleancheck distdir distuninstallcheck dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-pkgconfigDATA install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + sources-am sources-local splint-am splint-local tags tags-am \ + uninstall uninstall-am uninstall-pkgconfigDATA .PRECIOUS: Makefile @@ -1210,44 +1229,22 @@ (cd $(srcdir)/libfdata && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/libfdatetime && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/libfguid && $(MAKE) $(AM_MAKEFLAGS)) + (cd $(srcdir)/libfmos && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/libfshfs && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/po && $(MAKE) $(AM_MAKEFLAGS)) distclean: clean - /bin/rm -f Makefile - /bin/rm -f config.status - /bin/rm -f config.cache - /bin/rm -f config.log - /bin/rm -f libfshfs.pc - /bin/rm -f libfshfs.spec + -rm -f Makefile + -rm -f config.status + -rm -f config.cache + -rm -f config.log + -rm -f libfshfs.pc + -rm -f libfshfs.spec @for dir in ${subdirs}; do \ (cd $$dir && $(MAKE) distclean) \ || case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" -splint: - (cd $(srcdir)/libcerror && $(MAKE) splint $(AM_MAKEFLAGS)) - (cd $(srcdir)/libcthreads && $(MAKE) splint $(AM_MAKEFLAGS)) - (cd $(srcdir)/libcdata && $(MAKE) splint $(AM_MAKEFLAGS)) - (cd $(srcdir)/libclocale && $(MAKE) splint $(AM_MAKEFLAGS)) - (cd $(srcdir)/libcnotify && $(MAKE) splint $(AM_MAKEFLAGS)) - (cd $(srcdir)/libcsplit && $(MAKE) splint $(AM_MAKEFLAGS)) - (cd $(srcdir)/libuna && $(MAKE) splint $(AM_MAKEFLAGS)) - (cd $(srcdir)/libcfile && $(MAKE) splint $(AM_MAKEFLAGS)) - (cd $(srcdir)/libcpath && $(MAKE) splint $(AM_MAKEFLAGS)) - (cd $(srcdir)/libbfio && $(MAKE) splint $(AM_MAKEFLAGS)) - (cd $(srcdir)/libfcache && $(MAKE) splint $(AM_MAKEFLAGS)) - (cd $(srcdir)/libfdata && $(MAKE) splint $(AM_MAKEFLAGS)) - (cd $(srcdir)/libfdatetime && $(MAKE) splint $(AM_MAKEFLAGS)) - (cd $(srcdir)/libfguid && $(MAKE) splint $(AM_MAKEFLAGS)) - (cd $(srcdir)/libfshfs && $(MAKE) splint $(AM_MAKEFLAGS)) - (cd $(srcdir)/libhmac && $(MAKE) $(AM_MAKEFLAGS)) - (cd $(srcdir)/fshfstools && $(MAKE) splint $(AM_MAKEFLAGS)) - (cd $(srcdir)/pyfshfs && $(MAKE) splint $(AM_MAKEFLAGS)) - (cd $(srcdir)/po && $(MAKE) splint $(AM_MAKEFLAGS)) - (cd $(srcdir)/tests && $(MAKE) splint $(AM_MAKEFLAGS)) - (cd $(srcdir)/ossfuzz && $(MAKE) splint $(AM_MAKEFLAGS)) - # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff -Nru libfshfs-20201104/README libfshfs-20240221/README --- libfshfs-20201104/README 2020-11-04 04:22:54.000000000 +0000 +++ libfshfs-20240221/README 2024-02-21 05:50:08.000000000 +0000 @@ -7,19 +7,20 @@ Read-only supported HFS formats: -* HFS+, Mac OS 10.3 and later (Unicode 3.2) -* HFSX, Mac OS 10.3 and later (Unicode 3.2) +* HFS+, Mac OS 10.3 and later (Unicode 3.2 case-insensitive) +* HFSX, Mac OS 10.3 and later (Unicode 3.2 case-sensitive) Unsupported HFS formats: * (traditional) HFS -* HFS+, Mac OS 8.1 through 10.2 (Unicode 2.1) -* HFSX, Mac OS 8.1 through 10.2 (Unicode 2.1) +* HFS+, Mac OS 8.1 through 10.2 (Unicode 2.1 case-insensitive) +* HFSX, Mac OS 8.1 through 10.2 (Unicode 2.1 case-sensitive) Supported HFS format features: * ZLIB (DEFLATE) compression * LZVN compression +* extended attributes Unsupported HFS format features: @@ -28,7 +29,7 @@ Planned: -* Finish library +* Complete extents extended attribute value data (kHFSPlusAttrExtents) support For more information see: diff -Nru libfshfs-20201104/acinclude.m4 libfshfs-20240221/acinclude.m4 --- libfshfs-20201104/acinclude.m4 2020-11-04 04:19:36.000000000 +0000 +++ libfshfs-20240221/acinclude.m4 2024-02-21 05:48:48.000000000 +0000 @@ -20,6 +20,15 @@ [Missing function: close], [1]) ]) + + dnl Headers included in fshfstools/fshfsmount.c + AC_CHECK_HEADERS([errno.h sys/time.h]) + + dnl Functions included in fshfstools/mount_file_system.c and fshfstools/mount_file_entry.c + AS_IF( + [test "x$ac_cv_enable_winapi" = xno], + [AC_CHECK_FUNCS([clock_gettime getegid geteuid time]) + ]) ]) dnl Function to check if DLL support is needed diff -Nru libfshfs-20201104/aclocal.m4 libfshfs-20240221/aclocal.m4 --- libfshfs-20201104/aclocal.m4 2020-11-04 11:56:27.000000000 +0000 +++ libfshfs-20240221/aclocal.m4 2024-02-21 06:04:22.000000000 +0000 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.16.1 -*- Autoconf -*- +# generated automatically by aclocal 1.16.5 -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2021 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,14 +14,14 @@ m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, -[m4_warning([this file was generated for autoconf 2.69. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],, +[m4_warning([this file was generated for autoconf 2.71. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -# serial 11 (pkg-config-0.29.1) +# pkg.m4 - Macros to locate and use pkg-config. -*- Autoconf -*- +# serial 12 (pkg-config-0.29.2) dnl Copyright © 2004 Scott James Remnant . dnl Copyright © 2012-2015 Dan Nicholson @@ -63,7 +63,7 @@ dnl See the "Since" comment for each macro you use to see what version dnl of the macros you require. m4_defun([PKG_PREREQ], -[m4_define([PKG_MACROS_VERSION], [0.29.1]) +[m4_define([PKG_MACROS_VERSION], [0.29.2]) m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) ])dnl PKG_PREREQ @@ -108,7 +108,7 @@ dnl PKG_CHECK_MODULES(), but does not set variables or print errors. dnl dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) -dnl only at the first occurence in configure.ac, so if the first place +dnl only at the first occurrence in configure.ac, so if the first place dnl it's called might be skipped (such as if it is within an "if", you dnl have to call PKG_CHECK_EXISTS manually AC_DEFUN([PKG_CHECK_EXISTS], @@ -164,7 +164,7 @@ AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no -AC_MSG_CHECKING([for $1]) +AC_MSG_CHECKING([for $2]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) @@ -174,17 +174,17 @@ See the pkg-config man page for more details.]) if test $pkg_failed = yes; then - AC_MSG_RESULT([no]) + AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then - $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` - else - $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` + else + $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi - # Put the nasty error message in config.log where it belongs - echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD + # Put the nasty error message in config.log where it belongs + echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD - m4_default([$4], [AC_MSG_ERROR( + m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS @@ -195,8 +195,8 @@ _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then - AC_MSG_RESULT([no]) - m4_default([$4], [AC_MSG_FAILURE( + AC_MSG_RESULT([no]) + m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. @@ -206,10 +206,10 @@ To get pkg-config, see .])[]dnl ]) else - $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS - $1[]_LIBS=$pkg_cv_[]$1[]_LIBS + $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS + $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) - $3 + $3 fi[]dnl ])dnl PKG_CHECK_MODULES @@ -364,7 +364,7 @@ [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])]) ])dnl PKG_HAVE_DEFINE_WITH_MODULES -# Copyright (C) 2002-2018 Free Software Foundation, Inc. +# Copyright (C) 2002-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -379,7 +379,7 @@ [am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.16.1], [], +m4_if([$1], [1.16.5], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -395,14 +395,14 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.16.1])dnl +[AM_AUTOMAKE_VERSION([1.16.5])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -454,7 +454,7 @@ # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2018 Free Software Foundation, Inc. +# Copyright (C) 1997-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -485,7 +485,7 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -676,7 +676,7 @@ # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -715,7 +715,9 @@ done if test $am_rc -ne 0; then AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. Try re-running configure with the + for automatic dependency tracking. If GNU make was not used, consider + re-running the configure script with MAKE="gmake" (or whatever is + necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking).]) fi @@ -740,9 +742,26 @@ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) +# AM_EXTRA_RECURSIVE_TARGETS -*- Autoconf -*- + +# Copyright (C) 2012-2021 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_EXTRA_RECURSIVE_TARGETS +# -------------------------- +# Define the list of user recursive targets. This macro exists only to +# be traced by Automake, which will ensure that a proper definition of +# user-defined recursive targets (and associated rules) is propagated +# into all the generated Makefiles. +# TODO: We should really reject non-literal arguments here... +AC_DEFUN([AM_EXTRA_RECURSIVE_TARGETS], []) + # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -770,6 +789,10 @@ # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl +m4_ifdef([_$0_ALREADY_INIT], + [m4_fatal([$0 expanded multiple times +]m4_defn([_$0_ALREADY_INIT]))], + [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl @@ -806,7 +829,7 @@ [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( - m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), + m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl @@ -858,6 +881,20 @@ [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) +# Variables for tags utilities; see am/tags.am +if test -z "$CTAGS"; then + CTAGS=ctags +fi +AC_SUBST([CTAGS]) +if test -z "$ETAGS"; then + ETAGS=etags +fi +AC_SUBST([ETAGS]) +if test -z "$CSCOPE"; then + CSCOPE=cscope +fi +AC_SUBST([CSCOPE]) + AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This @@ -939,7 +976,7 @@ done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -960,7 +997,7 @@ fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2018 Free Software Foundation, Inc. +# Copyright (C) 2003-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -981,7 +1018,7 @@ # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1024,7 +1061,7 @@ # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2018 Free Software Foundation, Inc. +# Copyright (C) 1997-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1045,12 +1082,7 @@ [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac + MISSING="\${SHELL} '$am_aux_dir/missing'" fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then @@ -1061,41 +1093,9 @@ fi ]) -# Copyright (C) 2003-2018 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_MKDIR_P -# --------------- -# Check for 'mkdir -p'. -AC_DEFUN([AM_PROG_MKDIR_P], -[AC_PREREQ([2.60])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -dnl FIXME we are no longer going to remove this! adjust warning -dnl FIXME message accordingly. -AC_DIAGNOSE([obsolete], -[$0: this macro is deprecated, and will soon be removed. -You should use the Autoconf-provided 'AC][_PROG_MKDIR_P' macro instead, -and use '$(MKDIR_P)' instead of '$(mkdir_p)'in your Makefile.am files.]) -dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, -dnl while keeping a definition of mkdir_p for backward compatibility. -dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. -dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of -dnl Makefile.ins that do not define MKDIR_P, so we do our own -dnl adjustment using top_builddir (which is defined more often than -dnl MKDIR_P). -AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl -case $mkdir_p in - [[\\/$]]* | ?:[[\\/]]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac -]) - # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1124,7 +1124,7 @@ AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1171,7 +1171,7 @@ # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1190,7 +1190,7 @@ # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1271,7 +1271,7 @@ rm -f conftest.file ]) -# Copyright (C) 2009-2018 Free Software Foundation, Inc. +# Copyright (C) 2009-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1331,7 +1331,7 @@ _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1359,7 +1359,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2018 Free Software Foundation, Inc. +# Copyright (C) 2006-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1378,7 +1378,7 @@ # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2018 Free Software Foundation, Inc. +# Copyright (C) 2004-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1511,6 +1511,7 @@ m4_include([m4/common.m4]) m4_include([m4/gettext.m4]) +m4_include([m4/host-cpu-c-abi.m4]) m4_include([m4/iconv.m4]) m4_include([m4/intlmacosx.m4]) m4_include([m4/lib-ld.m4]) @@ -1530,6 +1531,8 @@ m4_include([m4/libfdata.m4]) m4_include([m4/libfdatetime.m4]) m4_include([m4/libfguid.m4]) +m4_include([m4/libfmos.m4]) +m4_include([m4/libfuse.m4]) m4_include([m4/libhmac.m4]) m4_include([m4/libtool.m4]) m4_include([m4/libuna.m4]) diff -Nru libfshfs-20201104/common/Makefile.am libfshfs-20240221/common/Makefile.am --- libfshfs-20201104/common/Makefile.am 2020-11-04 04:19:34.000000000 +0000 +++ libfshfs-20240221/common/Makefile.am 2024-02-21 05:48:48.000000000 +0000 @@ -19,7 +19,7 @@ Makefile.in distclean: clean - /bin/rm -f config.h - /bin/rm -f types.h - /bin/rm -f Makefile + -rm -f config.h + -rm -f types.h + -rm -f Makefile diff -Nru libfshfs-20201104/common/Makefile.in libfshfs-20240221/common/Makefile.in --- libfshfs-20201104/common/Makefile.in 2020-11-04 11:56:31.000000000 +0000 +++ libfshfs-20240221/common/Makefile.in 2024-02-21 06:04:25.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -90,25 +90,26 @@ subdir = common ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcdata.m4 \ - $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \ - $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \ - $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcrypto.m4 \ - $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcthreads.m4 \ - $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ - $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ - $(top_srcdir)/m4/libhmac.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/libuna.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \ - $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \ - $(top_srcdir)/m4/zlib.m4 $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libbfio.m4 \ + $(top_srcdir)/m4/libcdata.m4 $(top_srcdir)/m4/libcerror.m4 \ + $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ + $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ + $(top_srcdir)/m4/libcrypto.m4 $(top_srcdir)/m4/libcsplit.m4 \ + $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \ + $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ + $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmos.m4 \ + $(top_srcdir)/m4/libfuse.m4 $(top_srcdir)/m4/libhmac.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/pthread.m4 \ + $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ + $(top_srcdir)/m4/types.m4 $(top_srcdir)/m4/zlib.m4 \ + $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) @@ -135,8 +136,9 @@ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ - $(LISP)config.h.in +am__extra_recursive_targets = sources-recursive splint-recursive +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \ + config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. @@ -153,8 +155,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(srcdir)/types.h.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -172,6 +172,8 @@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ @@ -187,8 +189,10 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -208,6 +212,8 @@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ +HAVE_LIBFMOS = @HAVE_LIBFMOS@ +HAVE_LIBFUSE = @HAVE_LIBFUSE@ HAVE_LIBHMAC = @HAVE_LIBHMAC@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ @@ -223,6 +229,7 @@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ +HAVE_LOCAL_LIBFMOS = @HAVE_LOCAL_LIBFMOS@ HAVE_LOCAL_LIBHMAC = @HAVE_LOCAL_LIBHMAC@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ @@ -276,8 +283,12 @@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ +LIBFMOS_CPPFLAGS = @LIBFMOS_CPPFLAGS@ +LIBFMOS_LIBADD = @LIBFMOS_LIBADD@ LIBFSHFS_DLL_EXPORT = @LIBFSHFS_DLL_EXPORT@ LIBFSHFS_DLL_IMPORT = @LIBFSHFS_DLL_IMPORT@ +LIBFUSE_CPPFLAGS = @LIBFUSE_CPPFLAGS@ +LIBFUSE_LIBADD = @LIBFUSE_LIBADD@ LIBHMAC_CPPFLAGS = @LIBHMAC_CPPFLAGS@ LIBHMAC_LIBADD = @LIBHMAC_LIBADD@ LIBICONV = @LIBICONV@ @@ -299,8 +310,8 @@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ @@ -323,26 +334,6 @@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ -PYTHON2 = @PYTHON2@ -PYTHON2_CONFIG = @PYTHON2_CONFIG@ -PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ -PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ -PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ -PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ -PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ -PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ -PYTHON2_PREFIX = @PYTHON2_PREFIX@ -PYTHON2_VERSION = @PYTHON2_VERSION@ -PYTHON3 = @PYTHON3@ -PYTHON3_CONFIG = @PYTHON3_CONFIG@ -PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ -PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ -PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ -PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ -PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ -PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ -PYTHON3_PREFIX = @PYTHON3_PREFIX@ -PYTHON3_VERSION = @PYTHON3_VERSION@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ @@ -420,6 +411,12 @@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ +ax_libfmos_pc_libs_private = @ax_libfmos_pc_libs_private@ +ax_libfmos_spec_build_requires = @ax_libfmos_spec_build_requires@ +ax_libfmos_spec_requires = @ax_libfmos_spec_requires@ +ax_libfuse_pc_libs_private = @ax_libfuse_pc_libs_private@ +ax_libfuse_spec_build_requires = @ax_libfuse_spec_build_requires@ +ax_libfuse_spec_requires = @ax_libfuse_spec_requires@ ax_libhmac_pc_libs_private = @ax_libhmac_pc_libs_private@ ax_libhmac_spec_build_requires = @ax_libhmac_spec_build_requires@ ax_libhmac_spec_requires = @ax_libhmac_spec_requires@ @@ -444,6 +441,8 @@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +fuse_CFLAGS = @fuse_CFLAGS@ +fuse_LIBS = @fuse_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -481,6 +480,8 @@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ +libfmos_CFLAGS = @libfmos_CFLAGS@ +libfmos_LIBS = @libfmos_LIBS@ libfshfs_spec_requires = @libfshfs_spec_requires@ libfshfs_spec_tools_build_requires = @libfshfs_spec_tools_build_requires@ libhmac_CFLAGS = @libhmac_CFLAGS@ @@ -499,11 +500,8 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ -pyexecdir2 = @pyexecdir2@ -pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ -pythondir2 = @pythondir2@ -pythondir3 = @pythondir3@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -589,6 +587,8 @@ clean-libtool: -rm -rf .libs _libs +sources-local: +splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique @@ -641,7 +641,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am @@ -772,6 +771,14 @@ ps-am: +sources: sources-am + +sources-am: sources-local + +splint: splint-am + +splint-am: splint-local + uninstall-am: .MAKE: all install-am install-strip @@ -787,15 +794,16 @@ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am + sources-am sources-local splint-am splint-local tags tags-am \ + uninstall uninstall-am .PRECIOUS: Makefile distclean: clean - /bin/rm -f config.h - /bin/rm -f types.h - /bin/rm -f Makefile + -rm -f config.h + -rm -f types.h + -rm -f Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru libfshfs-20201104/common/byte_stream.h libfshfs-20240221/common/byte_stream.h --- libfshfs-20201104/common/byte_stream.h 2020-11-04 04:19:42.000000000 +0000 +++ libfshfs-20240221/common/byte_stream.h 2024-02-21 05:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * Byte stream functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/common/common.h libfshfs-20240221/common/common.h --- libfshfs-20201104/common/common.h 2020-11-04 04:19:42.000000000 +0000 +++ libfshfs-20240221/common/common.h 2024-02-21 05:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * Common include file * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/common/config.h libfshfs-20240221/common/config.h --- libfshfs-20201104/common/config.h 2020-11-04 11:56:45.000000000 +0000 +++ libfshfs-20240221/common/config.h 2024-02-21 06:04:37.000000000 +0000 @@ -8,11 +8,11 @@ /* Define to 1 if you have the `bindtextdomain' function. */ #define HAVE_BINDTEXTDOMAIN 1 -/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the - CoreFoundation framework. */ -/* #undef HAVE_CFLOCALECOPYCURRENT */ +/* Define to 1 if you have the Mac OS X function + CFLocaleCopyPreferredLanguages in the CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES */ -/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in +/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework. */ /* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ @@ -52,6 +52,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_ERRNO_H 1 +/* Define to 1 if you have the `EVP_DigestInit_ex2' function". */ +#define HAVE_EVP_DIGESTINIT_EX2 1 + /* Define to 1 if you have the `EVP_md5' function". */ #define HAVE_EVP_MD5 1 @@ -112,15 +115,24 @@ /* Define to 1 if you have the `ftruncate' function. */ #define HAVE_FTRUNCATE 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_FUSE_H */ + /* Define to 1 if you have the `fwrite' function. */ #define HAVE_FWRITE 1 /* Define to 1 if you have the `getcwd' function. */ #define HAVE_GETCWD 1 +/* Define to 1 if you have the `getegid' function. */ +#define HAVE_GETEGID 1 + /* Define to 1 if you have the `getenv' function. */ #define HAVE_GETENV 1 +/* Define to 1 if you have the `geteuid' function. */ +#define HAVE_GETEUID 1 + /* Define to 1 if you have the `getopt' function. */ #define HAVE_GETOPT 1 @@ -229,6 +241,15 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBFGUID_H */ +/* Define to 1 if you have the `fmos' library (-lfmos). */ +/* #undef HAVE_LIBFMOS */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LIBFMOS_H */ + +/* Define to 1 if you have the 'fuse' library (-lfuse). */ +#define HAVE_LIBFUSE 1 + /* Define to 1 if you have the `hmac' library (-lhmac). */ /* #undef HAVE_LIBHMAC */ @@ -238,6 +259,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_LIBINTL_H 1 +/* Define to 1 if you have the 'osxfuse' library (-losxfuse). */ +/* #undef HAVE_LIBOSXFUSE */ + /* Define to 1 if you have the `una' library (-luna). */ /* #undef HAVE_LIBUNA */ @@ -298,6 +322,9 @@ /* Define to 1 if the local version of libfguid is used. */ #define HAVE_LOCAL_LIBFGUID 1 +/* Define to 1 if the local version of libfmos is used. */ +#define HAVE_LOCAL_LIBFMOS 1 + /* Define to 1 if the local version of libhmac is used. */ #define HAVE_LOCAL_LIBHMAC 1 @@ -319,9 +346,6 @@ /* Define to 1 if you have the `memcpy' function. */ #define HAVE_MEMCPY 1 -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - /* Define to 1 if you have the `memrchr' function. */ #define HAVE_MEMRCHR 1 @@ -358,6 +382,9 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_OPENSSL_SHA_H */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_OSXFUSE_FUSE_H */ + /* Define to 1 if you have the posix_fadvise function. */ #define HAVE_POSIX_FADVISE 1 @@ -424,7 +451,7 @@ /* Define to 1 if you have the `strerror' function. */ /* #undef HAVE_STRERROR */ -/* Define to 1 if you have the `strerror_r' function. */ +/* Define if you have `strerror_r'. */ #define HAVE_STRERROR_R 1 /* Define to 1 if you have the header file. */ @@ -475,6 +502,9 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_SYSLIMITS_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_SYS_TYPES_H 1 @@ -584,7 +614,7 @@ #define PACKAGE_NAME "libfshfs" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "libfshfs 20201104" +#define PACKAGE_STRING "libfshfs 20240221" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "libfshfs" @@ -593,7 +623,7 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "20201104" +#define PACKAGE_VERSION "20240221" /* The size of `int', as computed by sizeof. */ #define SIZEOF_INT 4 @@ -610,25 +640,19 @@ /* The size of `wchar_t', as computed by sizeof. */ #define SIZEOF_WCHAR_T 4 -/* Define to 1 if you have the ANSI C header files. */ +/* Define to 1 if all of the C90 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ #define STDC_HEADERS 1 /* Define to 1 if strerror_r returns char *. */ /* #undef STRERROR_R_CHAR_P */ -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - /* Define to 1 if your declares `struct tm'. */ /* #undef TM_IN_SYS_TIME */ /* Version number of package */ -#define VERSION "20201104" - -/* Enable large inode numbers on Mac OS X 10.5. */ -#ifndef _DARWIN_USE_64_BIT_INODE -# define _DARWIN_USE_64_BIT_INODE 1 -#endif +#define VERSION "20240221" /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff -Nru libfshfs-20201104/common/config.h.in libfshfs-20240221/common/config.h.in --- libfshfs-20201104/common/config.h.in 2020-11-04 11:56:30.000000000 +0000 +++ libfshfs-20240221/common/config.h.in 2024-02-21 06:04:25.000000000 +0000 @@ -7,11 +7,11 @@ /* Define to 1 if you have the `bindtextdomain' function. */ #undef HAVE_BINDTEXTDOMAIN -/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the - CoreFoundation framework. */ -#undef HAVE_CFLOCALECOPYCURRENT +/* Define to 1 if you have the Mac OS X function + CFLocaleCopyPreferredLanguages in the CoreFoundation framework. */ +#undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES -/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in +/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework. */ #undef HAVE_CFPREFERENCESCOPYAPPVALUE @@ -51,6 +51,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_ERRNO_H +/* Define to 1 if you have the `EVP_DigestInit_ex2' function". */ +#undef HAVE_EVP_DIGESTINIT_EX2 + /* Define to 1 if you have the `EVP_md5' function". */ #undef HAVE_EVP_MD5 @@ -111,15 +114,24 @@ /* Define to 1 if you have the `ftruncate' function. */ #undef HAVE_FTRUNCATE +/* Define to 1 if you have the header file. */ +#undef HAVE_FUSE_H + /* Define to 1 if you have the `fwrite' function. */ #undef HAVE_FWRITE /* Define to 1 if you have the `getcwd' function. */ #undef HAVE_GETCWD +/* Define to 1 if you have the `getegid' function. */ +#undef HAVE_GETEGID + /* Define to 1 if you have the `getenv' function. */ #undef HAVE_GETENV +/* Define to 1 if you have the `geteuid' function. */ +#undef HAVE_GETEUID + /* Define to 1 if you have the `getopt' function. */ #undef HAVE_GETOPT @@ -228,6 +240,15 @@ /* Define to 1 if you have the header file. */ #undef HAVE_LIBFGUID_H +/* Define to 1 if you have the `fmos' library (-lfmos). */ +#undef HAVE_LIBFMOS + +/* Define to 1 if you have the header file. */ +#undef HAVE_LIBFMOS_H + +/* Define to 1 if you have the 'fuse' library (-lfuse). */ +#undef HAVE_LIBFUSE + /* Define to 1 if you have the `hmac' library (-lhmac). */ #undef HAVE_LIBHMAC @@ -237,6 +258,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_LIBINTL_H +/* Define to 1 if you have the 'osxfuse' library (-losxfuse). */ +#undef HAVE_LIBOSXFUSE + /* Define to 1 if you have the `una' library (-luna). */ #undef HAVE_LIBUNA @@ -297,6 +321,9 @@ /* Define to 1 if the local version of libfguid is used. */ #undef HAVE_LOCAL_LIBFGUID +/* Define to 1 if the local version of libfmos is used. */ +#undef HAVE_LOCAL_LIBFMOS + /* Define to 1 if the local version of libhmac is used. */ #undef HAVE_LOCAL_LIBHMAC @@ -318,9 +345,6 @@ /* Define to 1 if you have the `memcpy' function. */ #undef HAVE_MEMCPY -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - /* Define to 1 if you have the `memrchr' function. */ #undef HAVE_MEMRCHR @@ -357,6 +381,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_OPENSSL_SHA_H +/* Define to 1 if you have the header file. */ +#undef HAVE_OSXFUSE_FUSE_H + /* Define to 1 if you have the posix_fadvise function. */ #undef HAVE_POSIX_FADVISE @@ -423,7 +450,7 @@ /* Define to 1 if you have the `strerror' function. */ #undef HAVE_STRERROR -/* Define to 1 if you have the `strerror_r' function. */ +/* Define if you have `strerror_r'. */ #undef HAVE_STRERROR_R /* Define to 1 if you have the header file. */ @@ -474,6 +501,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SYSLIMITS_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TIME_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H @@ -609,26 +639,20 @@ /* The size of `wchar_t', as computed by sizeof. */ #undef SIZEOF_WCHAR_T -/* Define to 1 if you have the ANSI C header files. */ +/* Define to 1 if all of the C90 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ #undef STDC_HEADERS /* Define to 1 if strerror_r returns char *. */ #undef STRERROR_R_CHAR_P -/* Define to 1 if you can safely include both and . */ -#undef TIME_WITH_SYS_TIME - /* Define to 1 if your declares `struct tm'. */ #undef TM_IN_SYS_TIME /* Version number of package */ #undef VERSION -/* Enable large inode numbers on Mac OS X 10.5. */ -#ifndef _DARWIN_USE_64_BIT_INODE -# define _DARWIN_USE_64_BIT_INODE 1 -#endif - /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS diff -Nru libfshfs-20201104/common/config_borlandc.h libfshfs-20240221/common/config_borlandc.h --- libfshfs-20201104/common/config_borlandc.h 2020-11-04 04:19:42.000000000 +0000 +++ libfshfs-20240221/common/config_borlandc.h 2024-02-21 05:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * Configuration for the Borland/CodeGear C++ Builder compiler * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/common/config_msc.h libfshfs-20240221/common/config_msc.h --- libfshfs-20201104/common/config_msc.h 2020-11-04 04:19:42.000000000 +0000 +++ libfshfs-20240221/common/config_msc.h 2024-02-21 05:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * Configuration for the Microsoft Visual Studio C++ compiler * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/common/config_winapi.h libfshfs-20240221/common/config_winapi.h --- libfshfs-20201104/common/config_winapi.h 2020-11-04 04:19:42.000000000 +0000 +++ libfshfs-20240221/common/config_winapi.h 2024-02-21 05:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * Configuration file for WINAPI * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -45,7 +45,10 @@ #endif /* Define the size of size_t for WINAPI + * Do not define when pyconfig.h has been included via python.h */ +#if !defined( HAVE_PYCONFIG_H ) + #if !defined( SIZEOF_SIZE_T ) #if __WORDSIZE == 64 #define SIZEOF_SIZE_T 8 @@ -54,6 +57,8 @@ #endif #endif +#endif /* !defined( HAVE_PYCONFIG_H ) */ + /* Define the size of the wide character for WINAPI */ #if !defined( SIZEOF_WCHAR_T ) diff -Nru libfshfs-20201104/common/file_stream.h libfshfs-20240221/common/file_stream.h --- libfshfs-20201104/common/file_stream.h 2020-11-04 04:19:42.000000000 +0000 +++ libfshfs-20240221/common/file_stream.h 2024-02-21 05:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * FILE stream functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/common/memory.h libfshfs-20240221/common/memory.h --- libfshfs-20201104/common/memory.h 2020-11-04 04:19:42.000000000 +0000 +++ libfshfs-20240221/common/memory.h 2024-02-21 05:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * Memory functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/common/narrow_string.h libfshfs-20240221/common/narrow_string.h --- libfshfs-20201104/common/narrow_string.h 2020-11-04 04:19:42.000000000 +0000 +++ libfshfs-20240221/common/narrow_string.h 2024-02-21 05:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * Narrow character string functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -122,8 +122,9 @@ (char *) memrchr( (void *) string, (int) character, size ) #elif defined( HAVE_STRRCHR ) || defined( WINAPI ) +/* (void)(size) is used to suppress unused variable warnings */ #define narrow_string_search_character_reverse( string, character, size ) \ - strrchr( string, (int) character ) + strrchr( string, (int) character ); (void)(size) #endif /* String sub-string search diff -Nru libfshfs-20201104/common/system_string.h libfshfs-20240221/common/system_string.h --- libfshfs-20201104/common/system_string.h 2020-11-04 04:19:42.000000000 +0000 +++ libfshfs-20240221/common/system_string.h 2024-02-21 05:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * System character string functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/common/types.h libfshfs-20240221/common/types.h --- libfshfs-20201104/common/types.h 2020-11-04 11:56:45.000000000 +0000 +++ libfshfs-20240221/common/types.h 2024-02-21 06:04:37.000000000 +0000 @@ -1,7 +1,7 @@ /* - * Type and type-support defintions + * Type and type-support definitions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -60,7 +60,10 @@ #endif /* defined( WINAPI ) && ( defined( _UNICODE ) || defined( UNICODE ) ) */ /* Fallback for systems without PRI definitions + * Do not define when pyconfig.h has been included via python.h */ +#if !defined( HAVE_PYCONFIG_H ) + #if !defined( PRId8 ) #define PRId8 "d" #endif @@ -216,6 +219,8 @@ #endif #endif /* !defined( PRIx64 ) */ +#endif /* !defined( HAVE_PYCONFIG_H ) */ + /* Fallback for systems without printf %jd definition */ #if defined( HAVE_PRINTF_JD ) @@ -305,6 +310,16 @@ #define UINT32_MAX (0xffffffffUL) #endif +/* The minimum signed 64-bit integer is -9223372036854775808 (0x8000000000000000) + */ +#if !defined( INT64_MIN ) +#if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 ) +#define INT64_MIN (0x8000000000000000UL) +#else +#define INT64_MIN (0x8000000000000000ULL) +#endif +#endif /* !defined( INT64_MIN ) */ + /* The maximum signed 64-bit integer is 9223372036854775807 (0x7fffffffffffffff) */ #if !defined( INT64_MAX ) diff -Nru libfshfs-20201104/common/types.h.in libfshfs-20240221/common/types.h.in --- libfshfs-20201104/common/types.h.in 2020-11-04 04:19:42.000000000 +0000 +++ libfshfs-20240221/common/types.h.in 2024-02-21 05:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* - * Type and type-support defintions + * Type and type-support definitions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -60,7 +60,10 @@ #endif /* defined( WINAPI ) && ( defined( _UNICODE ) || defined( UNICODE ) ) */ /* Fallback for systems without PRI definitions + * Do not define when pyconfig.h has been included via python.h */ +#if !defined( HAVE_PYCONFIG_H ) + #if !defined( PRId8 ) #define PRId8 "d" #endif @@ -216,6 +219,8 @@ #endif #endif /* !defined( PRIx64 ) */ +#endif /* !defined( HAVE_PYCONFIG_H ) */ + /* Fallback for systems without printf %jd definition */ #if defined( HAVE_PRINTF_JD ) @@ -305,6 +310,16 @@ #define UINT32_MAX (0xffffffffUL) #endif +/* The minimum signed 64-bit integer is -9223372036854775808 (0x8000000000000000) + */ +#if !defined( INT64_MIN ) +#if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 ) +#define INT64_MIN (0x8000000000000000UL) +#else +#define INT64_MIN (0x8000000000000000ULL) +#endif +#endif /* !defined( INT64_MIN ) */ + /* The maximum signed 64-bit integer is 9223372036854775807 (0x7fffffffffffffff) */ #if !defined( INT64_MAX ) diff -Nru libfshfs-20201104/common/wide_string.h libfshfs-20240221/common/wide_string.h --- libfshfs-20201104/common/wide_string.h 2020-11-04 04:19:42.000000000 +0000 +++ libfshfs-20240221/common/wide_string.h 2024-02-21 05:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * Wide character string functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -120,8 +120,9 @@ (wchar_t *) wmemrchr( (void *) string, (wchar_t) character, size ) #elif defined( HAVE_WCSRCHR ) || defined( WINAPI ) +/* (void)(size) is used to suppress unused variable warnings */ #define wide_string_search_character_reverse( string, character, size ) \ - wcsrchr( string, (wchar_t) character ) + wcsrchr( string, (wchar_t) character ); (void)(size) #endif /* String sub-string search diff -Nru libfshfs-20201104/compile libfshfs-20240221/compile --- libfshfs-20201104/compile 2020-11-04 11:56:30.000000000 +0000 +++ libfshfs-20240221/compile 2024-02-21 06:04:25.000000000 +0000 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2021 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify @@ -53,7 +53,7 @@ MINGW*) file_conv=mingw ;; - CYGWIN*) + CYGWIN* | MSYS*) file_conv=cygwin ;; *) @@ -67,7 +67,7 @@ mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; - cygwin/*) + cygwin/* | msys/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) diff -Nru libfshfs-20201104/config.guess libfshfs-20240221/config.guess --- libfshfs-20201104/config.guess 2020-11-04 11:56:30.000000000 +0000 +++ libfshfs-20240221/config.guess 2024-02-21 06:04:25.000000000 +0000 @@ -1,12 +1,14 @@ -#! /bin/sh +#!/usr/bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2018 Free Software Foundation, Inc. +# Copyright 1992-2023 Free Software Foundation, Inc. -timestamp='2018-08-29' +# shellcheck disable=SC2006,SC2268 # see below for rationale + +timestamp='2023-06-23' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or +# the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -27,17 +29,25 @@ # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: -# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess +# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess # # Please send patches to . +# The "shellcheck disable" line above the timestamp inhibits complaints +# about features and limitations of the classic Bourne shell that were +# superseded or lifted in POSIX. However, this script identifies a wide +# variety of pre-POSIX systems that do not have POSIX shells at all, and +# even some reasonably current systems (Solaris 10 as case-in-point) still +# have a pre-POSIX /bin/sh. + + me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] -Output the configuration name of the system \`$me' is run on. +Output the configuration name of the system '$me' is run on. Options: -h, --help print this help, then exit @@ -50,13 +60,13 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2018 Free Software Foundation, Inc. +Copyright 1992-2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" -Try \`$me --help' for more information." +Try '$me --help' for more information." # Parse command line while test $# -gt 0 ; do @@ -84,24 +94,28 @@ exit 1 fi +# Just in case it came from the environment. +GUESS= + # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. +# Historically, 'CC_FOR_BUILD' used to be named 'HOST_CC'. We still +# use 'HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. tmp= # shellcheck disable=SC2172 -trap 'test -z "$tmp" || rm -fr "$tmp"' 1 2 13 15 -trap 'exitcode=$?; test -z "$tmp" || rm -fr "$tmp"; exit $exitcode' 0 +trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 set_cc_for_build() { + # prevent multiple calls if $tmp is already set + test "$tmp" && return 0 : "${TMPDIR=/tmp}" - # shellcheck disable=SC2039 + # shellcheck disable=SC2039,SC3028 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || @@ -111,7 +125,7 @@ ,,) echo "int x;" > "$dummy.c" for driver in cc gcc c89 c99 ; do if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then - CC_FOR_BUILD="$driver" + CC_FOR_BUILD=$driver break fi done @@ -132,14 +146,12 @@ UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown -case "$UNAME_SYSTEM" in +case $UNAME_SYSTEM in Linux|GNU|GNU/*) - # If the system lacks a compiler, then just pick glibc. - # We could probably try harder. - LIBC=gnu + LIBC=unknown set_cc_for_build cat <<-EOF > "$dummy.c" @@ -148,24 +160,37 @@ LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc - #else + #elif defined(__GLIBC__) LIBC=gnu + #else + #include + /* First heuristic to detect musl libc. */ + #ifdef __DEFINED_va_list + LIBC=musl + #endif #endif EOF - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" + cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + eval "$cc_set_libc" - # If ldd exists, use it to detect musl libc. - if command -v ldd >/dev/null && \ - ldd --version 2>&1 | grep -q ^musl - then - LIBC=musl + # Second heuristic to detect musl libc. + if [ "$LIBC" = unknown ] && + command -v ldd >/dev/null && + ldd --version 2>&1 | grep -q ^musl; then + LIBC=musl + fi + + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + if [ "$LIBC" = unknown ]; then + LIBC=gnu fi ;; esac # Note: order is significant - the case branches are not exclusive. -case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in +case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, @@ -177,12 +202,12 @@ # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ - "/sbin/$sysctl" 2>/dev/null || \ - "/usr/sbin/$sysctl" 2>/dev/null || \ + /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ + /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ echo unknown)` - case "$UNAME_MACHINE_ARCH" in + case $UNAME_MACHINE_ARCH in + aarch64eb) machine=aarch64_be-unknown ;; armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; @@ -191,13 +216,13 @@ earmv*) arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` - machine="${arch}${endian}"-unknown + machine=${arch}${endian}-unknown ;; - *) machine="$UNAME_MACHINE_ARCH"-unknown ;; + *) machine=$UNAME_MACHINE_ARCH-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently (or will in the future) and ABI. - case "$UNAME_MACHINE_ARCH" in + case $UNAME_MACHINE_ARCH in earm*) os=netbsdelf ;; @@ -218,7 +243,7 @@ ;; esac # Determine ABI tags. - case "$UNAME_MACHINE_ARCH" in + case $UNAME_MACHINE_ARCH in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` @@ -229,7 +254,7 @@ # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. - case "$UNAME_VERSION" in + case $UNAME_VERSION in Debian*) release='-gnu' ;; @@ -240,45 +265,57 @@ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "$machine-${os}${release}${abi-}" - exit ;; + GUESS=$machine-${os}${release}${abi-} + ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` - echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE + ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE + ;; + *:SecBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'` + GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE + ;; *:LibertyBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` - echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE + ;; *:MidnightBSD:*:*) - echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE + ;; *:ekkoBSD:*:*) - echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE + ;; *:SolidBSD:*:*) - echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE + ;; + *:OS108:*:*) + GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE + ;; macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd"$UNAME_RELEASE" - exit ;; + GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE + ;; *:MirBSD:*:*) - echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE + ;; *:Sortix:*:*) - echo "$UNAME_MACHINE"-unknown-sortix - exit ;; + GUESS=$UNAME_MACHINE-unknown-sortix + ;; + *:Twizzler:*:*) + GUESS=$UNAME_MACHINE-unknown-twizzler + ;; *:Redox:*:*) - echo "$UNAME_MACHINE"-unknown-redox - exit ;; + GUESS=$UNAME_MACHINE-unknown-redox + ;; mips:OSF1:*.*) - echo mips-dec-osf1 - exit ;; + GUESS=mips-dec-osf1 + ;; alpha:OSF1:*:*) + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + trap '' 0 case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` @@ -292,7 +329,7 @@ # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in + case $ALPHA_CPU_TYPE in "EV4 (21064)") UNAME_MACHINE=alpha ;; "EV4.5 (21064)") @@ -329,112 +366,121 @@ # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" - # Reset EXIT trap before exiting to avoid spurious non-zero exit code. - exitcode=$? - trap '' 0 - exit $exitcode ;; + OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + GUESS=$UNAME_MACHINE-dec-osf$OSF_REL + ;; Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; + GUESS=m68k-unknown-sysv4 + ;; *:[Aa]miga[Oo][Ss]:*:*) - echo "$UNAME_MACHINE"-unknown-amigaos - exit ;; + GUESS=$UNAME_MACHINE-unknown-amigaos + ;; *:[Mm]orph[Oo][Ss]:*:*) - echo "$UNAME_MACHINE"-unknown-morphos - exit ;; + GUESS=$UNAME_MACHINE-unknown-morphos + ;; *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; + GUESS=i370-ibm-openedition + ;; *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; + GUESS=s390-ibm-zvmoe + ;; *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; + GUESS=powerpc-ibm-os400 + ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix"$UNAME_RELEASE" - exit ;; + GUESS=arm-acorn-riscix$UNAME_RELEASE + ;; arm*:riscos:*:*|arm*:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; + GUESS=arm-unknown-riscos + ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; + GUESS=hppa1.1-hitachi-hiuxmpp + ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; + case `(/bin/universe) 2>/dev/null` in + att) GUESS=pyramid-pyramid-sysv3 ;; + *) GUESS=pyramid-pyramid-bsd ;; + esac + ;; NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; + GUESS=pyramid-pyramid-svr4 + ;; DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; + GUESS=sparc-icl-nx6 + ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; + sparc) GUESS=sparc-icl-nx7 ;; + esac + ;; s390x:SunOS:*:*) - echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL + ;; sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=sparc-hal-solaris2$SUN_REL + ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=sparc-sun-solaris2$SUN_REL + ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux"$UNAME_RELEASE" - exit ;; + GUESS=i386-pc-auroraux$UNAME_RELEASE + ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - UNAME_REL="`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" - case `isainfo -b` in - 32) - echo i386-pc-solaris2"$UNAME_REL" - ;; - 64) - echo x86_64-pc-solaris2"$UNAME_REL" - ;; - esac - exit ;; + set_cc_for_build + SUN_ARCH=i386 + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if test "$CC_FOR_BUILD" != no_compiler_found; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH=x86_64 + fi + fi + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=$SUN_ARCH-pc-solaris2$SUN_REL + ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=sparc-sun-solaris3$SUN_REL + ;; sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in + case `/usr/bin/arch -k` in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" - exit ;; + # Japanese Language versions have a version number like '4.1.3-JL'. + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` + GUESS=sparc-sun-sunos$SUN_REL + ;; sun3*:SunOS:*:*) - echo m68k-sun-sunos"$UNAME_RELEASE" - exit ;; + GUESS=m68k-sun-sunos$UNAME_RELEASE + ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 - case "`/bin/arch`" in + case `/bin/arch` in sun3) - echo m68k-sun-sunos"$UNAME_RELEASE" + GUESS=m68k-sun-sunos$UNAME_RELEASE ;; sun4) - echo sparc-sun-sunos"$UNAME_RELEASE" + GUESS=sparc-sun-sunos$UNAME_RELEASE ;; esac - exit ;; + ;; aushp:SunOS:*:*) - echo sparc-auspex-sunos"$UNAME_RELEASE" - exit ;; + GUESS=sparc-auspex-sunos$UNAME_RELEASE + ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor @@ -444,41 +490,41 @@ # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-milan-mint$UNAME_RELEASE + ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-hades-mint$UNAME_RELEASE + ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-unknown-mint$UNAME_RELEASE + ;; m68k:machten:*:*) - echo m68k-apple-machten"$UNAME_RELEASE" - exit ;; + GUESS=m68k-apple-machten$UNAME_RELEASE + ;; powerpc:machten:*:*) - echo powerpc-apple-machten"$UNAME_RELEASE" - exit ;; + GUESS=powerpc-apple-machten$UNAME_RELEASE + ;; RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; + GUESS=mips-dec-mach_bsd4.3 + ;; RISC*:ULTRIX:*:*) - echo mips-dec-ultrix"$UNAME_RELEASE" - exit ;; + GUESS=mips-dec-ultrix$UNAME_RELEASE + ;; VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix"$UNAME_RELEASE" - exit ;; + GUESS=vax-dec-ultrix$UNAME_RELEASE + ;; 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix"$UNAME_RELEASE" - exit ;; + GUESS=clipper-intergraph-clix$UNAME_RELEASE + ;; mips:*:*:UMIPS | mips:*:*:RISCos) set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" @@ -506,75 +552,76 @@ dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`"$dummy" "$dummyarg"` && { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos"$UNAME_RELEASE" - exit ;; + GUESS=mips-mips-riscos$UNAME_RELEASE + ;; Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; + GUESS=powerpc-motorola-powermax + ;; Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; + GUESS=powerpc-harris-powermax + ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; + GUESS=powerpc-harris-powermax + ;; Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; + GUESS=powerpc-harris-powerunix + ;; m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; + GUESS=m88k-harris-cxux7 + ;; m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; + GUESS=m88k-motorola-sysv4 + ;; m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; + GUESS=m88k-motorola-sysv3 + ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] + if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 then - if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ - [ "$TARGET_BINARY_INTERFACE"x = x ] + if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ + test "$TARGET_BINARY_INTERFACE"x = x then - echo m88k-dg-dgux"$UNAME_RELEASE" + GUESS=m88k-dg-dgux$UNAME_RELEASE else - echo m88k-dg-dguxbcs"$UNAME_RELEASE" + GUESS=m88k-dg-dguxbcs$UNAME_RELEASE fi else - echo i586-dg-dgux"$UNAME_RELEASE" + GUESS=i586-dg-dgux$UNAME_RELEASE fi - exit ;; + ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; + GUESS=m88k-dolphin-sysv3 + ;; M88*:*:R3*:*) # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; + GUESS=m88k-motorola-sysv3 + ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; + GUESS=m88k-tektronix-sysv3 + ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; + GUESS=m68k-tektronix-bsd + ;; *:IRIX*:*:*) - echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" - exit ;; + IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'` + GUESS=mips-sgi-irix$IRIX_REL + ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id + ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; + GUESS=i386-ibm-aix + ;; ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then + if test -x /usr/bin/oslevel ; then IBM_REV=`/usr/bin/oslevel` else - IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + IBM_REV=$UNAME_VERSION.$UNAME_RELEASE fi - echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" - exit ;; + GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV + ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then set_cc_for_build @@ -591,16 +638,16 @@ EOF if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` then - echo "$SYSTEM_NAME" + GUESS=$SYSTEM_NAME else - echo rs6000-ibm-aix3.2.5 + GUESS=rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 + GUESS=rs6000-ibm-aix3.2.4 else - echo rs6000-ibm-aix3.2 + GUESS=rs6000-ibm-aix3.2 fi - exit ;; + ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then @@ -608,56 +655,56 @@ else IBM_ARCH=powerpc fi - if [ -x /usr/bin/lslpp ] ; then - IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | + if test -x /usr/bin/lslpp ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else - IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + IBM_REV=$UNAME_VERSION.$UNAME_RELEASE fi - echo "$IBM_ARCH"-ibm-aix"$IBM_REV" - exit ;; + GUESS=$IBM_ARCH-ibm-aix$IBM_REV + ;; *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; + GUESS=rs6000-ibm-aix + ;; ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) - echo romp-ibm-bsd4.4 - exit ;; + GUESS=romp-ibm-bsd4.4 + ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 + GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to + ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; + GUESS=rs6000-bull-bosx + ;; DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; + GUESS=m68k-bull-sysv3 + ;; 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; + GUESS=m68k-hp-bsd + ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; + GUESS=m68k-hp-bsd4.4 + ;; 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` - case "$UNAME_MACHINE" in + HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` + case $UNAME_MACHINE in 9000/31?) HP_ARCH=m68000 ;; 9000/[34]??) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then + if test -x /usr/bin/getconf; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "$sc_cpu_version" in + case $sc_cpu_version in 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 - case "$sc_kernel_bits" in + case $sc_kernel_bits in 32) HP_ARCH=hppa2.0n ;; 64) HP_ARCH=hppa2.0w ;; '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 esac ;; esac fi - if [ "$HP_ARCH" = "" ]; then + if test "$HP_ARCH" = ""; then set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" @@ -696,7 +743,7 @@ test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac - if [ "$HP_ARCH" = hppa2.0w ] + if test "$HP_ARCH" = hppa2.0w then set_cc_for_build @@ -717,12 +764,12 @@ HP_ARCH=hppa64 fi fi - echo "$HP_ARCH"-hp-hpux"$HPUX_REV" - exit ;; + GUESS=$HP_ARCH-hp-hpux$HPUX_REV + ;; ia64:HP-UX:*:*) - HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux"$HPUX_REV" - exit ;; + HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` + GUESS=ia64-hp-hpux$HPUX_REV + ;; 3050*:HI-UX:*:*) set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" @@ -752,36 +799,36 @@ EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; + GUESS=unknown-hitachi-hiuxwe2 + ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) - echo hppa1.1-hp-bsd - exit ;; + GUESS=hppa1.1-hp-bsd + ;; 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; + GUESS=hppa1.0-hp-bsd + ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; + GUESS=hppa1.0-hp-mpeix + ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) - echo hppa1.1-hp-osf - exit ;; + GUESS=hppa1.1-hp-osf + ;; hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; + GUESS=hppa1.0-hp-osf + ;; i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo "$UNAME_MACHINE"-unknown-osf1mk + if test -x /usr/sbin/sysversion ; then + GUESS=$UNAME_MACHINE-unknown-osf1mk else - echo "$UNAME_MACHINE"-unknown-osf1 + GUESS=$UNAME_MACHINE-unknown-osf1 fi - exit ;; + ;; parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; + GUESS=hppa1.1-hp-lites + ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; + GUESS=c1-convex-bsd + ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd @@ -789,17 +836,18 @@ fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; + GUESS=c34-convex-bsd + ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; + GUESS=c38-convex-bsd + ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; + GUESS=c4-convex-bsd + ;; CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=ymp-cray-unicos$CRAY_REL + ;; CRAY*[A-Z]90:*:*:*) echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ @@ -807,114 +855,135 @@ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) - echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=t90-cray-unicos$CRAY_REL + ;; CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=alphaev5-cray-unicosmk$CRAY_REL + ;; CRAY*SV1:*:*:*) - echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=sv1-cray-unicos$CRAY_REL + ;; *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=craynv-cray-unicosmp$CRAY_REL + ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} + ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} + ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE + ;; sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi"$UNAME_RELEASE" - exit ;; + GUESS=sparc-unknown-bsdi$UNAME_RELEASE + ;; *:BSD/OS:*:*) - echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE + ;; arm:FreeBSD:*:*) UNAME_PROCESSOR=`uname -p` set_cc_for_build if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi else - echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf fi - exit ;; + ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` - case "$UNAME_PROCESSOR" in + case $UNAME_PROCESSOR in amd64) UNAME_PROCESSOR=x86_64 ;; i386) UNAME_PROCESSOR=i586 ;; esac - echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" - exit ;; + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL + ;; i*:CYGWIN*:*) - echo "$UNAME_MACHINE"-pc-cygwin - exit ;; + GUESS=$UNAME_MACHINE-pc-cygwin + ;; *:MINGW64*:*) - echo "$UNAME_MACHINE"-pc-mingw64 - exit ;; + GUESS=$UNAME_MACHINE-pc-mingw64 + ;; *:MINGW*:*) - echo "$UNAME_MACHINE"-pc-mingw32 - exit ;; + GUESS=$UNAME_MACHINE-pc-mingw32 + ;; *:MSYS*:*) - echo "$UNAME_MACHINE"-pc-msys - exit ;; + GUESS=$UNAME_MACHINE-pc-msys + ;; i*:PW*:*) - echo "$UNAME_MACHINE"-pc-pw32 - exit ;; + GUESS=$UNAME_MACHINE-pc-pw32 + ;; + *:SerenityOS:*:*) + GUESS=$UNAME_MACHINE-pc-serenity + ;; *:Interix*:*) - case "$UNAME_MACHINE" in + case $UNAME_MACHINE in x86) - echo i586-pc-interix"$UNAME_RELEASE" - exit ;; + GUESS=i586-pc-interix$UNAME_RELEASE + ;; authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix"$UNAME_RELEASE" - exit ;; + GUESS=x86_64-unknown-interix$UNAME_RELEASE + ;; IA64) - echo ia64-unknown-interix"$UNAME_RELEASE" - exit ;; + GUESS=ia64-unknown-interix$UNAME_RELEASE + ;; esac ;; i*:UWIN*:*) - echo "$UNAME_MACHINE"-pc-uwin - exit ;; + GUESS=$UNAME_MACHINE-pc-uwin + ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; + GUESS=x86_64-pc-cygwin + ;; prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=powerpcle-unknown-solaris2$SUN_REL + ;; *:GNU:*:*) # the GNU system - echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" - exit ;; + GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'` + GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'` + GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL + ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" - exit ;; + GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"` + GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC + ;; + x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*) + GUESS="$UNAME_MACHINE-pc-managarm-mlibc" + ;; + *:[Mm]anagarm:*:*) + GUESS="$UNAME_MACHINE-unknown-managarm-mlibc" + ;; *:Minix:*:*) - echo "$UNAME_MACHINE"-unknown-minix - exit ;; + GUESS=$UNAME_MACHINE-unknown-minix + ;; aarch64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; @@ -925,183 +994,236 @@ esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - arc:Linux:*:* | arceb:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; arm*:Linux:*:*) set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi + GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi else - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf + GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf fi fi - exit ;; + ;; avr32*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; cris:Linux:*:*) - echo "$UNAME_MACHINE"-axis-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-axis-linux-$LIBC + ;; crisv32:Linux:*:*) - echo "$UNAME_MACHINE"-axis-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-axis-linux-$LIBC + ;; e2k:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; frv:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; hexagon:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; i*86:Linux:*:*) - echo "$UNAME_MACHINE"-pc-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-pc-linux-$LIBC + ;; ia64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; k1om:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + loongarch32:Linux:*:* | loongarch64:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; m32r*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; m68*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; mips:Linux:*:* | mips64:Linux:*:*) set_cc_for_build + IS_GLIBC=0 + test x"${LIBC}" = xgnu && IS_GLIBC=1 sed 's/^ //' << EOF > "$dummy.c" #undef CPU - #undef ${UNAME_MACHINE} - #undef ${UNAME_MACHINE}el + #undef mips + #undef mipsel + #undef mips64 + #undef mips64el + #if ${IS_GLIBC} && defined(_ABI64) + LIBCABI=gnuabi64 + #else + #if ${IS_GLIBC} && defined(_ABIN32) + LIBCABI=gnuabin32 + #else + LIBCABI=${LIBC} + #endif + #endif + + #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 + CPU=mipsisa64r6 + #else + #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 + CPU=mipsisa32r6 + #else + #if defined(__mips64) + CPU=mips64 + #else + CPU=mips + #endif + #endif + #endif + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=${UNAME_MACHINE}el + MIPS_ENDIAN=el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=${UNAME_MACHINE} + MIPS_ENDIAN= #else - CPU= + MIPS_ENDIAN= #endif #endif EOF - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`" - test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; } + cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'` + eval "$cc_set_vars" + test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } ;; mips64el:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; openrisc*:Linux:*:*) - echo or1k-unknown-linux-"$LIBC" - exit ;; + GUESS=or1k-unknown-linux-$LIBC + ;; or32:Linux:*:* | or1k*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; padre:Linux:*:*) - echo sparc-unknown-linux-"$LIBC" - exit ;; + GUESS=sparc-unknown-linux-$LIBC + ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-"$LIBC" - exit ;; + GUESS=hppa64-unknown-linux-$LIBC + ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; - PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; - *) echo hppa-unknown-linux-"$LIBC" ;; + PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;; + PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;; + *) GUESS=hppa-unknown-linux-$LIBC ;; esac - exit ;; + ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-"$LIBC" - exit ;; + GUESS=powerpc64-unknown-linux-$LIBC + ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-"$LIBC" - exit ;; + GUESS=powerpc-unknown-linux-$LIBC + ;; ppc64le:Linux:*:*) - echo powerpc64le-unknown-linux-"$LIBC" - exit ;; + GUESS=powerpc64le-unknown-linux-$LIBC + ;; ppcle:Linux:*:*) - echo powerpcle-unknown-linux-"$LIBC" - exit ;; - riscv32:Linux:*:* | riscv64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=powerpcle-unknown-linux-$LIBC + ;; + riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; s390:Linux:*:* | s390x:Linux:*:*) - echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-ibm-linux-$LIBC + ;; sh64*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; sh*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; tile*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; vax:Linux:*:*) - echo "$UNAME_MACHINE"-dec-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-dec-linux-$LIBC + ;; x86_64:Linux:*:*) - echo "$UNAME_MACHINE"-pc-linux-"$LIBC" - exit ;; + set_cc_for_build + CPU=$UNAME_MACHINE + LIBCABI=$LIBC + if test "$CC_FOR_BUILD" != no_compiler_found; then + ABI=64 + sed 's/^ //' << EOF > "$dummy.c" + #ifdef __i386__ + ABI=x86 + #else + #ifdef __ILP32__ + ABI=x32 + #endif + #endif +EOF + cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` + eval "$cc_set_abi" + case $ABI in + x86) CPU=i686 ;; + x32) LIBCABI=${LIBC}x32 ;; + esac + fi + GUESS=$CPU-pc-linux-$LIBCABI + ;; xtensa*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; + GUESS=i386-sequent-sysv4 + ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. - echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" - exit ;; + GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION + ;; i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility + # If we were able to find 'uname', then EMX Unix compatibility # is probably installed. - echo "$UNAME_MACHINE"-pc-os2-emx - exit ;; + GUESS=$UNAME_MACHINE-pc-os2-emx + ;; i*86:XTS-300:*:STOP) - echo "$UNAME_MACHINE"-unknown-stop - exit ;; + GUESS=$UNAME_MACHINE-unknown-stop + ;; i*86:atheos:*:*) - echo "$UNAME_MACHINE"-unknown-atheos - exit ;; + GUESS=$UNAME_MACHINE-unknown-atheos + ;; i*86:syllable:*:*) - echo "$UNAME_MACHINE"-pc-syllable - exit ;; + GUESS=$UNAME_MACHINE-pc-syllable + ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=i386-unknown-lynxos$UNAME_RELEASE + ;; i*86:*DOS:*:*) - echo "$UNAME_MACHINE"-pc-msdosdjgpp - exit ;; + GUESS=$UNAME_MACHINE-pc-msdosdjgpp + ;; i*86:*:4.*:*) UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" + GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL else - echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" + GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL fi - exit ;; + ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in @@ -1109,12 +1231,12 @@ *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac - echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}" - exit ;; + GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 @@ -1124,11 +1246,11 @@ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 - echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" + GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL else - echo "$UNAME_MACHINE"-pc-sysv32 + GUESS=$UNAME_MACHINE-pc-sysv32 fi - exit ;; + ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about @@ -1136,31 +1258,31 @@ # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; + GUESS=i586-pc-msdosdjgpp + ;; Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; + GUESS=i386-pc-mach3 + ;; paragon:*:*:*) - echo i860-intel-osf1 - exit ;; + GUESS=i860-intel-osf1 + ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 + GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 + GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4 fi - exit ;; + ;; mini*:CTIX:SYS*5:*) # "miniframe" - echo m68010-convergent-sysv - exit ;; + GUESS=m68010-convergent-sysv + ;; mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; + GUESS=m68k-convergent-sysv + ;; M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; + GUESS=m68k-diab-dnix + ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) @@ -1185,250 +1307,407 @@ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=m68k-unknown-lynxos$UNAME_RELEASE + ;; mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; + GUESS=m68k-atari-sysv4 + ;; TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=sparc-unknown-lynxos$UNAME_RELEASE + ;; rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=rs6000-unknown-lynxos$UNAME_RELEASE + ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=powerpc-unknown-lynxos$UNAME_RELEASE + ;; SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv"$UNAME_RELEASE" - exit ;; + GUESS=mips-dde-sysv$UNAME_RELEASE + ;; RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; + GUESS=mips-sni-sysv4 + ;; RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; + GUESS=mips-sni-sysv4 + ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo "$UNAME_MACHINE"-sni-sysv4 + GUESS=$UNAME_MACHINE-sni-sysv4 else - echo ns32k-sni-sysv + GUESS=ns32k-sni-sysv fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + ;; + PENTIUM:*:4.0*:*) # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort # says - echo i586-unisys-sysv4 - exit ;; + GUESS=i586-unisys-sysv4 + ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; + GUESS=hppa1.1-stratus-sysv4 + ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; + GUESS=i860-stratus-sysv4 + ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. - echo "$UNAME_MACHINE"-stratus-vos - exit ;; + GUESS=$UNAME_MACHINE-stratus-vos + ;; *:VOS:*:*) # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; + GUESS=hppa1.1-stratus-vos + ;; mc68*:A/UX:*:*) - echo m68k-apple-aux"$UNAME_RELEASE" - exit ;; + GUESS=m68k-apple-aux$UNAME_RELEASE + ;; news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; + GUESS=mips-sony-newsos6 + ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv"$UNAME_RELEASE" + if test -d /usr/nec; then + GUESS=mips-nec-sysv$UNAME_RELEASE else - echo mips-unknown-sysv"$UNAME_RELEASE" + GUESS=mips-unknown-sysv$UNAME_RELEASE fi - exit ;; + ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; + GUESS=powerpc-be-beos + ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; + GUESS=powerpc-apple-beos + ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; + GUESS=i586-pc-beos + ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; - x86_64:Haiku:*:*) - echo x86_64-unknown-haiku - exit ;; + GUESS=i586-pc-haiku + ;; + ppc:Haiku:*:*) # Haiku running on Apple PowerPC + GUESS=powerpc-apple-haiku + ;; + *:Haiku:*:*) # Haiku modern gcc (not bound by BeOS compat) + GUESS=$UNAME_MACHINE-unknown-haiku + ;; SX-4:SUPER-UX:*:*) - echo sx4-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx4-nec-superux$UNAME_RELEASE + ;; SX-5:SUPER-UX:*:*) - echo sx5-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx5-nec-superux$UNAME_RELEASE + ;; SX-6:SUPER-UX:*:*) - echo sx6-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx6-nec-superux$UNAME_RELEASE + ;; SX-7:SUPER-UX:*:*) - echo sx7-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx7-nec-superux$UNAME_RELEASE + ;; SX-8:SUPER-UX:*:*) - echo sx8-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx8-nec-superux$UNAME_RELEASE + ;; SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx8r-nec-superux$UNAME_RELEASE + ;; SX-ACE:SUPER-UX:*:*) - echo sxace-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sxace-nec-superux$UNAME_RELEASE + ;; Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody"$UNAME_RELEASE" - exit ;; + GUESS=powerpc-apple-rhapsody$UNAME_RELEASE + ;; *:Rhapsody:*:*) - echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE + ;; + arm64:Darwin:*:*) + GUESS=aarch64-apple-darwin$UNAME_RELEASE + ;; *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - set_cc_for_build - if test "$UNAME_PROCESSOR" = unknown ; then - UNAME_PROCESSOR=powerpc + UNAME_PROCESSOR=`uname -p` + case $UNAME_PROCESSOR in + unknown) UNAME_PROCESSOR=powerpc ;; + esac + if command -v xcode-select > /dev/null 2> /dev/null && \ + ! xcode-select --print-path > /dev/null 2> /dev/null ; then + # Avoid executing cc if there is no toolchain installed as + # cc will be a stub that puts up a graphical alert + # prompting the user to install developer tools. + CC_FOR_BUILD=no_compiler_found + else + set_cc_for_build fi - if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - case $UNAME_PROCESSOR in - i386) UNAME_PROCESSOR=x86_64 ;; - powerpc) UNAME_PROCESSOR=powerpc64 ;; - esac - fi - # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc - if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_PPC >/dev/null - then - UNAME_PROCESSOR=powerpc - fi + if test "$CC_FOR_BUILD" != no_compiler_found; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=powerpc fi elif test "$UNAME_PROCESSOR" = i386 ; then - # Avoid executing cc on OS X 10.9, as it ships with a stub - # that puts up a graphical alert prompting to install - # developer tools. Any system running Mac OS X 10.7 or - # later (Darwin 11 and later) is required to have a 64-bit - # processor. This is not true of the ARM version of Darwin - # that Apple uses in portable devices. - UNAME_PROCESSOR=x86_64 + # uname -m returns i386 or x86_64 + UNAME_PROCESSOR=$UNAME_MACHINE fi - echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE + ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi - echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE + ;; *:QNX:*:4*) - echo i386-pc-qnx - exit ;; + GUESS=i386-pc-qnx + ;; NEO-*:NONSTOP_KERNEL:*:*) - echo neo-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=neo-tandem-nsk$UNAME_RELEASE + ;; NSE-*:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=nse-tandem-nsk$UNAME_RELEASE + ;; NSR-*:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=nsr-tandem-nsk$UNAME_RELEASE + ;; NSV-*:NONSTOP_KERNEL:*:*) - echo nsv-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=nsv-tandem-nsk$UNAME_RELEASE + ;; NSX-*:NONSTOP_KERNEL:*:*) - echo nsx-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=nsx-tandem-nsk$UNAME_RELEASE + ;; *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; + GUESS=mips-compaq-nonstopux + ;; BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; + GUESS=bs2000-siemens-sysv + ;; DS/*:UNIX_System_V:*:*) - echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE + ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. - # shellcheck disable=SC2154 - if test "$cputype" = 386; then + if test "${cputype-}" = 386; then UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" + elif test "x${cputype-}" != x; then + UNAME_MACHINE=$cputype fi - echo "$UNAME_MACHINE"-unknown-plan9 - exit ;; + GUESS=$UNAME_MACHINE-unknown-plan9 + ;; *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; + GUESS=pdp10-unknown-tops10 + ;; *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; + GUESS=pdp10-unknown-tenex + ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; + GUESS=pdp10-dec-tops20 + ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; + GUESS=pdp10-xkl-tops20 + ;; *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; + GUESS=pdp10-unknown-tops20 + ;; *:ITS:*:*) - echo pdp10-unknown-its - exit ;; + GUESS=pdp10-unknown-its + ;; SEI:*:*:SEIUX) - echo mips-sei-seiux"$UNAME_RELEASE" - exit ;; + GUESS=mips-sei-seiux$UNAME_RELEASE + ;; *:DragonFly:*:*) - echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" - exit ;; + DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL + ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "$UNAME_MACHINE" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; + case $UNAME_MACHINE in + A*) GUESS=alpha-dec-vms ;; + I*) GUESS=ia64-dec-vms ;; + V*) GUESS=vax-dec-vms ;; esac ;; *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; + GUESS=i386-pc-xenix + ;; i*86:skyos:*:*) - echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" - exit ;; + SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'` + GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL + ;; i*86:rdos:*:*) - echo "$UNAME_MACHINE"-pc-rdos - exit ;; - i*86:AROS:*:*) - echo "$UNAME_MACHINE"-pc-aros - exit ;; + GUESS=$UNAME_MACHINE-pc-rdos + ;; + i*86:Fiwix:*:*) + GUESS=$UNAME_MACHINE-pc-fiwix + ;; + *:AROS:*:*) + GUESS=$UNAME_MACHINE-unknown-aros + ;; x86_64:VMkernel:*:*) - echo "$UNAME_MACHINE"-unknown-esx - exit ;; + GUESS=$UNAME_MACHINE-unknown-esx + ;; amd64:Isilon\ OneFS:*:*) - echo x86_64-unknown-onefs - exit ;; + GUESS=x86_64-unknown-onefs + ;; + *:Unleashed:*:*) + GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE + ;; esac +# Do we have a guess based on uname results? +if test "x$GUESS" != x; then + echo "$GUESS" + exit +fi + +# No uname command or uname output not recognized. +set_cc_for_build +cat > "$dummy.c" < +#include +#endif +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) +#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) +#include +#if defined(_SIZE_T_) || defined(SIGLOST) +#include +#endif +#endif +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); +#endif + +#if defined (vax) +#if !defined (ultrix) +#include +#if defined (BSD) +#if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +#else +#if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +#else + printf ("vax-dec-bsd\n"); exit (0); +#endif +#endif +#else + printf ("vax-dec-bsd\n"); exit (0); +#endif +#else +#if defined(_SIZE_T_) || defined(SIGLOST) + struct utsname un; + uname (&un); + printf ("vax-dec-ultrix%s\n", un.release); exit (0); +#else + printf ("vax-dec-ultrix\n"); exit (0); +#endif +#endif +#endif +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) +#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) +#if defined(_SIZE_T_) || defined(SIGLOST) + struct utsname *un; + uname (&un); + printf ("mips-dec-ultrix%s\n", un.release); exit (0); +#else + printf ("mips-dec-ultrix\n"); exit (0); +#endif +#endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. +test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } + echo "$0: unable to guess system type" >&2 -case "$UNAME_MACHINE:$UNAME_SYSTEM" in +case $UNAME_MACHINE:$UNAME_SYSTEM in mips:Linux | mips64:Linux) # If we got here on MIPS GNU/Linux, output extra information. cat >&2 <&2 <, 1996 # @@ -25,7 +25,7 @@ # known workaround is to choose shorter directory names for the build # directory and/or the installation directory. -# All known linkers require a `.a' archive for static linking (except MSVC, +# All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a shrext=.so @@ -57,13 +57,6 @@ aix*) wl='-Wl,' ;; - darwin*) - case $cc_basename in - xlc*) - wl='-Wl,' - ;; - esac - ;; mingw* | cygwin* | pw32* | os2* | cegcc*) ;; hpux9* | hpux10* | hpux11*) @@ -72,9 +65,7 @@ irix5* | irix6* | nonstopux*) wl='-Wl,' ;; - newsos6) - ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in ecc*) wl='-Wl,' @@ -85,17 +76,26 @@ lf95*) wl='-Wl,' ;; - pgcc | pgf77 | pgf90) + nagfor*) + wl='-Wl,-Wl,,' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) wl='-Wl,' ;; ccc*) wl='-Wl,' ;; + xl* | bgxl* | bgf* | mpixl*) + wl='-Wl,' + ;; como) wl='-lopt=' ;; *) case `$CC -V 2>&1 | sed 5q` in + *Sun\ F* | *Sun*Fortran*) + wl= + ;; *Sun\ C*) wl='-Wl,' ;; @@ -103,13 +103,24 @@ ;; esac ;; + newsos6) + ;; + *nto* | *qnx*) + ;; osf3* | osf4* | osf5*) wl='-Wl,' ;; rdos*) ;; solaris*) - wl='-Wl,' + case $cc_basename in + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + wl='-Qoption ld ' + ;; + *) + wl='-Wl,' + ;; + esac ;; sunos4*) wl='-Qoption ld ' @@ -171,15 +182,14 @@ fi ;; amigaos*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we cannot use - # them. - ld_shlibs=no + case "$host_cpu" in + powerpc) + ;; + m68k) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then @@ -198,11 +208,13 @@ ld_shlibs=no fi ;; + haiku*) + ;; interix[3-9]*) hardcode_direct=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; - gnu* | linux* | k*bsd*-gnu) + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else @@ -325,10 +337,14 @@ fi ;; amigaos*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - # see comment about different semantics on the GNU ld section - ld_shlibs=no + case "$host_cpu" in + powerpc) + ;; + m68k) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac ;; bsdi[45]*) ;; @@ -342,29 +358,16 @@ ;; darwin* | rhapsody*) hardcode_direct=no - if test "$GCC" = yes ; then + if { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; then : else - case $cc_basename in - xlc*) - ;; - *) - ld_shlibs=no - ;; - esac + ld_shlibs=no fi ;; dgux*) hardcode_libdir_flag_spec='-L$libdir' ;; - freebsd1*) - ld_shlibs=no - ;; - freebsd2.2*) - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - ;; - freebsd2*) + freebsd2.[01]*) hardcode_direct=yes hardcode_minus_L=yes ;; @@ -420,6 +423,8 @@ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; + *nto* | *qnx*) + ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes @@ -515,7 +520,12 @@ library_names_spec='$libname$shrext' ;; amigaos*) - library_names_spec='$libname.a' + case "$host_cpu" in + powerpc*) + library_names_spec='$libname$shrext' ;; + m68k) + library_names_spec='$libname.a' ;; + esac ;; beos*) library_names_spec='$libname$shrext' @@ -534,19 +544,18 @@ dgux*) library_names_spec='$libname$shrext' ;; - freebsd1*) + freebsd[23].*) + library_names_spec='$libname$shrext$versuffix' ;; freebsd* | dragonfly*) - case "$host_os" in - freebsd[123]*) - library_names_spec='$libname$shrext$versuffix' ;; - *) - library_names_spec='$libname$shrext' ;; - esac + library_names_spec='$libname$shrext' ;; gnu*) library_names_spec='$libname$shrext' ;; + haiku*) + library_names_spec='$libname$shrext' + ;; hpux9* | hpux10* | hpux11*) case $host_cpu in ia64*) @@ -582,7 +591,7 @@ ;; linux*oldld* | linux*aout* | linux*coff*) ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu) library_names_spec='$libname$shrext' ;; knetbsd*-gnu) @@ -594,7 +603,7 @@ newsos6) library_names_spec='$libname$shrext' ;; - nto-qnx*) + *nto* | *qnx*) library_names_spec='$libname$shrext' ;; openbsd*) @@ -625,6 +634,9 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) library_names_spec='$libname$shrext' ;; + tpf*) + library_names_spec='$libname$shrext' + ;; uts4*) library_names_spec='$libname$shrext' ;; diff -Nru libfshfs-20201104/config.sub libfshfs-20240221/config.sub --- libfshfs-20201104/config.sub 2020-11-04 11:56:30.000000000 +0000 +++ libfshfs-20240221/config.sub 2024-02-21 06:04:25.000000000 +0000 @@ -1,12 +1,14 @@ -#! /bin/sh +#!/usr/bin/sh # Configuration validation subroutine script. -# Copyright 1992-2018 Free Software Foundation, Inc. +# Copyright 1992-2023 Free Software Foundation, Inc. -timestamp='2018-08-29' +# shellcheck disable=SC2006,SC2268 # see below for rationale + +timestamp='2023-06-23' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or +# the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -33,7 +35,7 @@ # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: -# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub +# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases @@ -50,6 +52,13 @@ # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. +# The "shellcheck disable" line above the timestamp inhibits complaints +# about features and limitations of the classic Bourne shell that were +# superseded or lifted in POSIX. However, this script identifies a wide +# variety of pre-POSIX systems that do not have POSIX shells at all, and +# even some reasonably current systems (Solaris 10 as case-in-point) still +# have a pre-POSIX /bin/sh. + me=`echo "$0" | sed -e 's,.*/,,'` usage="\ @@ -67,13 +76,13 @@ version="\ GNU config.sub ($timestamp) -Copyright 1992-2018 Free Software Foundation, Inc. +Copyright 1992-2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" -Try \`$me --help' for more information." +Try '$me --help' for more information." # Parse command line while test $# -gt 0 ; do @@ -89,7 +98,7 @@ - ) # Use stdin as input. break ;; -* ) - echo "$me: invalid option $1$help" + echo "$me: invalid option $1$help" >&2 exit 1 ;; *local*) @@ -111,49 +120,51 @@ esac # Split fields of configuration type -IFS="-" read -r field1 field2 field3 field4 <&2 + echo "Invalid configuration '$1': more than four components" >&2 exit 1 ;; *-*-*-*) basic_machine=$field1-$field2 - os=$field3-$field4 + basic_os=$field3-$field4 ;; *-*-*) # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two # parts maybe_os=$field2-$field3 case $maybe_os in - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \ - | linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \ + nto-qnx* | linux-* | uclinux-uclibc* \ | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ - | storm-chaos* | os2-emx* | rtmk-nova*) + | storm-chaos* | os2-emx* | rtmk-nova* | managarm-*) basic_machine=$field1 - os=$maybe_os + basic_os=$maybe_os ;; android-linux) basic_machine=$field1-unknown - os=linux-android + basic_os=linux-android ;; *) basic_machine=$field1-$field2 - os=$field3 + basic_os=$field3 ;; esac ;; *-*) - # A lone config we happen to match not fitting any patern + # A lone config we happen to match not fitting any pattern case $field1-$field2 in decstation-3100) basic_machine=mips-dec - os= + basic_os= ;; *-*) # Second component is usually, but not always the OS @@ -161,7 +172,11 @@ # Prevent following clause from handling this valid os sun*os*) basic_machine=$field1 - os=$field2 + basic_os=$field2 + ;; + zephyr*) + basic_machine=$field1-unknown + basic_os=$field2 ;; # Manufacturers dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ @@ -174,11 +189,11 @@ | microblaze* | sim | cisco \ | oki | wec | wrs | winbond) basic_machine=$field1-$field2 - os= + basic_os= ;; *) basic_machine=$field1 - os=$field2 + basic_os=$field2 ;; esac ;; @@ -190,450 +205,451 @@ case $field1 in 386bsd) basic_machine=i386-pc - os=bsd + basic_os=bsd ;; a29khif) basic_machine=a29k-amd - os=udi + basic_os=udi ;; adobe68k) basic_machine=m68010-adobe - os=scout + basic_os=scout ;; alliant) basic_machine=fx80-alliant - os= + basic_os= ;; altos | altos3068) basic_machine=m68k-altos - os= + basic_os= ;; am29k) basic_machine=a29k-none - os=bsd + basic_os=bsd ;; amdahl) basic_machine=580-amdahl - os=sysv + basic_os=sysv ;; amiga) basic_machine=m68k-unknown - os= + basic_os= ;; amigaos | amigados) basic_machine=m68k-unknown - os=amigaos + basic_os=amigaos ;; amigaunix | amix) basic_machine=m68k-unknown - os=sysv4 + basic_os=sysv4 ;; apollo68) basic_machine=m68k-apollo - os=sysv + basic_os=sysv ;; apollo68bsd) basic_machine=m68k-apollo - os=bsd + basic_os=bsd ;; aros) basic_machine=i386-pc - os=aros + basic_os=aros ;; aux) basic_machine=m68k-apple - os=aux + basic_os=aux ;; balance) basic_machine=ns32k-sequent - os=dynix + basic_os=dynix ;; blackfin) basic_machine=bfin-unknown - os=linux + basic_os=linux ;; cegcc) basic_machine=arm-unknown - os=cegcc + basic_os=cegcc ;; convex-c1) basic_machine=c1-convex - os=bsd + basic_os=bsd ;; convex-c2) basic_machine=c2-convex - os=bsd + basic_os=bsd ;; convex-c32) basic_machine=c32-convex - os=bsd + basic_os=bsd ;; convex-c34) basic_machine=c34-convex - os=bsd + basic_os=bsd ;; convex-c38) basic_machine=c38-convex - os=bsd + basic_os=bsd ;; cray) basic_machine=j90-cray - os=unicos + basic_os=unicos ;; crds | unos) basic_machine=m68k-crds - os= + basic_os= ;; da30) basic_machine=m68k-da30 - os= + basic_os= ;; decstation | pmax | pmin | dec3100 | decstatn) basic_machine=mips-dec - os= + basic_os= ;; delta88) basic_machine=m88k-motorola - os=sysv3 + basic_os=sysv3 ;; dicos) basic_machine=i686-pc - os=dicos + basic_os=dicos ;; djgpp) basic_machine=i586-pc - os=msdosdjgpp + basic_os=msdosdjgpp ;; ebmon29k) basic_machine=a29k-amd - os=ebmon + basic_os=ebmon ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson - os=ose + basic_os=ose ;; gmicro) basic_machine=tron-gmicro - os=sysv + basic_os=sysv ;; go32) basic_machine=i386-pc - os=go32 + basic_os=go32 ;; h8300hms) basic_machine=h8300-hitachi - os=hms + basic_os=hms ;; h8300xray) basic_machine=h8300-hitachi - os=xray + basic_os=xray ;; h8500hms) basic_machine=h8500-hitachi - os=hms + basic_os=hms ;; harris) basic_machine=m88k-harris - os=sysv3 + basic_os=sysv3 ;; - hp300) + hp300 | hp300hpux) basic_machine=m68k-hp + basic_os=hpux ;; hp300bsd) basic_machine=m68k-hp - os=bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=hpux + basic_os=bsd ;; hppaosf) basic_machine=hppa1.1-hp - os=osf + basic_os=osf ;; hppro) basic_machine=hppa1.1-hp - os=proelf + basic_os=proelf ;; i386mach) basic_machine=i386-mach - os=mach - ;; - vsta) - basic_machine=i386-pc - os=vsta + basic_os=mach ;; isi68 | isi) basic_machine=m68k-isi - os=sysv + basic_os=sysv ;; m68knommu) basic_machine=m68k-unknown - os=linux + basic_os=linux ;; magnum | m3230) basic_machine=mips-mips - os=sysv + basic_os=sysv ;; merlin) basic_machine=ns32k-utek - os=sysv + basic_os=sysv ;; mingw64) basic_machine=x86_64-pc - os=mingw64 + basic_os=mingw64 ;; mingw32) basic_machine=i686-pc - os=mingw32 + basic_os=mingw32 ;; mingw32ce) basic_machine=arm-unknown - os=mingw32ce + basic_os=mingw32ce ;; monitor) basic_machine=m68k-rom68k - os=coff + basic_os=coff ;; morphos) basic_machine=powerpc-unknown - os=morphos + basic_os=morphos ;; moxiebox) basic_machine=moxie-unknown - os=moxiebox + basic_os=moxiebox ;; msdos) basic_machine=i386-pc - os=msdos + basic_os=msdos ;; msys) basic_machine=i686-pc - os=msys + basic_os=msys ;; mvs) basic_machine=i370-ibm - os=mvs + basic_os=mvs ;; nacl) basic_machine=le32-unknown - os=nacl + basic_os=nacl ;; ncr3000) basic_machine=i486-ncr - os=sysv4 + basic_os=sysv4 ;; netbsd386) basic_machine=i386-pc - os=netbsd + basic_os=netbsd ;; netwinder) basic_machine=armv4l-rebel - os=linux + basic_os=linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony - os=newsos + basic_os=newsos ;; news1000) basic_machine=m68030-sony - os=newsos + basic_os=newsos ;; necv70) basic_machine=v70-nec - os=sysv + basic_os=sysv ;; nh3000) basic_machine=m68k-harris - os=cxux + basic_os=cxux ;; nh[45]000) basic_machine=m88k-harris - os=cxux + basic_os=cxux ;; nindy960) basic_machine=i960-intel - os=nindy + basic_os=nindy ;; mon960) basic_machine=i960-intel - os=mon960 + basic_os=mon960 ;; nonstopux) basic_machine=mips-compaq - os=nonstopux + basic_os=nonstopux ;; os400) basic_machine=powerpc-ibm - os=os400 + basic_os=os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson - os=ose + basic_os=ose ;; os68k) basic_machine=m68k-none - os=os68k + basic_os=os68k ;; paragon) basic_machine=i860-intel - os=osf + basic_os=osf ;; parisc) basic_machine=hppa-unknown - os=linux + basic_os=linux + ;; + psp) + basic_machine=mipsallegrexel-sony + basic_os=psp ;; pw32) basic_machine=i586-unknown - os=pw32 + basic_os=pw32 ;; rdos | rdos64) basic_machine=x86_64-pc - os=rdos + basic_os=rdos ;; rdos32) basic_machine=i386-pc - os=rdos + basic_os=rdos ;; rom68k) basic_machine=m68k-rom68k - os=coff + basic_os=coff ;; sa29200) basic_machine=a29k-amd - os=udi + basic_os=udi ;; sei) basic_machine=mips-sei - os=seiux + basic_os=seiux ;; sequent) basic_machine=i386-sequent - os= + basic_os= ;; sps7) basic_machine=m68k-bull - os=sysv2 + basic_os=sysv2 ;; st2000) basic_machine=m68k-tandem - os= + basic_os= ;; stratus) basic_machine=i860-stratus - os=sysv4 + basic_os=sysv4 ;; sun2) basic_machine=m68000-sun - os= + basic_os= ;; sun2os3) basic_machine=m68000-sun - os=sunos3 + basic_os=sunos3 ;; sun2os4) basic_machine=m68000-sun - os=sunos4 + basic_os=sunos4 ;; sun3) basic_machine=m68k-sun - os= + basic_os= ;; sun3os3) basic_machine=m68k-sun - os=sunos3 + basic_os=sunos3 ;; sun3os4) basic_machine=m68k-sun - os=sunos4 + basic_os=sunos4 ;; sun4) basic_machine=sparc-sun - os= + basic_os= ;; sun4os3) basic_machine=sparc-sun - os=sunos3 + basic_os=sunos3 ;; sun4os4) basic_machine=sparc-sun - os=sunos4 + basic_os=sunos4 ;; sun4sol2) basic_machine=sparc-sun - os=solaris2 + basic_os=solaris2 ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun - os= + basic_os= ;; sv1) basic_machine=sv1-cray - os=unicos + basic_os=unicos ;; symmetry) basic_machine=i386-sequent - os=dynix + basic_os=dynix ;; t3e) basic_machine=alphaev5-cray - os=unicos + basic_os=unicos ;; t90) basic_machine=t90-cray - os=unicos + basic_os=unicos ;; toad1) basic_machine=pdp10-xkl - os=tops20 + basic_os=tops20 ;; tpf) basic_machine=s390x-ibm - os=tpf + basic_os=tpf ;; udi29k) basic_machine=a29k-amd - os=udi + basic_os=udi ;; ultra3) basic_machine=a29k-nyu - os=sym1 + basic_os=sym1 ;; v810 | necv810) basic_machine=v810-nec - os=none + basic_os=none ;; vaxv) basic_machine=vax-dec - os=sysv + basic_os=sysv ;; vms) basic_machine=vax-dec - os=vms + basic_os=vms + ;; + vsta) + basic_machine=i386-pc + basic_os=vsta ;; vxworks960) basic_machine=i960-wrs - os=vxworks + basic_os=vxworks ;; vxworks68) basic_machine=m68k-wrs - os=vxworks + basic_os=vxworks ;; vxworks29k) basic_machine=a29k-wrs - os=vxworks + basic_os=vxworks ;; xbox) basic_machine=i686-pc - os=mingw32 + basic_os=mingw32 ;; ymp) basic_machine=ymp-cray - os=unicos + basic_os=unicos ;; *) basic_machine=$1 - os= + basic_os= ;; esac ;; @@ -685,17 +701,17 @@ bluegene*) cpu=powerpc vendor=ibm - os=cnk + basic_os=cnk ;; decsystem10* | dec10*) cpu=pdp10 vendor=dec - os=tops10 + basic_os=tops10 ;; decsystem20* | dec20*) cpu=pdp10 vendor=dec - os=tops20 + basic_os=tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) @@ -705,7 +721,7 @@ dpx2*) cpu=m68k vendor=bull - os=sysv3 + basic_os=sysv3 ;; encore | umax | mmax) cpu=ns32k @@ -714,7 +730,7 @@ elxsi) cpu=elxsi vendor=elxsi - os=${os:-bsd} + basic_os=${basic_os:-bsd} ;; fx2800) cpu=i860 @@ -727,7 +743,7 @@ h3050r* | hiux*) cpu=hppa1.1 vendor=hitachi - os=hiuxwe2 + basic_os=hiuxwe2 ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) cpu=hppa1.0 @@ -770,36 +786,36 @@ i*86v32) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc - os=sysv32 + basic_os=sysv32 ;; i*86v4*) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc - os=sysv4 + basic_os=sysv4 ;; i*86v) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc - os=sysv + basic_os=sysv ;; i*86sol2) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc - os=solaris2 + basic_os=solaris2 ;; j90 | j90-cray) cpu=j90 vendor=cray - os=${os:-unicos} + basic_os=${basic_os:-unicos} ;; iris | iris4d) cpu=mips vendor=sgi - case $os in + case $basic_os in irix*) ;; *) - os=irix4 + basic_os=irix4 ;; esac ;; @@ -810,24 +826,26 @@ *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) cpu=m68k vendor=atari - os=mint + basic_os=mint ;; news-3600 | risc-news) cpu=mips vendor=sony - os=newsos + basic_os=newsos ;; next | m*-next) cpu=m68k vendor=next - case $os in - nextstep* ) + case $basic_os in + openstep*) + ;; + nextstep*) ;; ns2*) - os=nextstep2 + basic_os=nextstep2 ;; *) - os=nextstep3 + basic_os=nextstep3 ;; esac ;; @@ -838,12 +856,12 @@ op50n-* | op60c-*) cpu=hppa1.1 vendor=oki - os=proelf + basic_os=proelf ;; pa-hitachi) cpu=hppa1.1 vendor=hitachi - os=hiuxwe2 + basic_os=hiuxwe2 ;; pbd) cpu=sparc @@ -880,12 +898,12 @@ sde) cpu=mipsisa32 vendor=sde - os=${os:-elf} + basic_os=${basic_os:-elf} ;; simso-wrs) cpu=sparclite vendor=wrs - os=vxworks + basic_os=vxworks ;; tower | tower-32) cpu=m68k @@ -902,7 +920,7 @@ w89k-*) cpu=hppa1.1 vendor=winbond - os=proelf + basic_os=proelf ;; none) cpu=none @@ -918,11 +936,14 @@ ;; *-*) - IFS="-" read -r cpu vendor <&2 + echo "Invalid configuration '$1': machine '$cpu-$vendor' not recognized" 1>&2 exit 1 ;; esac @@ -1270,8 +1306,53 @@ # Decode manufacturer-specific aliases for certain operating systems. -if [ x$os != x ] +if test x$basic_os != x then + +# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just +# set os. +case $basic_os in + gnu/linux*) + kernel=linux + os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'` + ;; + os2-emx) + kernel=os2 + os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'` + ;; + nto-qnx*) + kernel=nto + os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'` + ;; + *-*) + # shellcheck disable=SC2162 + saved_IFS=$IFS + IFS="-" read kernel os <&2 - exit 1 + # No normalization, but not necessarily accepted, that comes below. ;; esac + else # Here we handle the default operating systems that come with various machines. @@ -1525,6 +1531,7 @@ # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. +kernel= case $cpu-$vendor in score-*) os=elf @@ -1536,7 +1543,8 @@ os=riscix1.2 ;; arm*-rebel) - os=linux + kernel=linux + os=gnu ;; arm*-semi) os=aout @@ -1702,84 +1710,193 @@ os=none ;; esac + fi +# Now, validate our (potentially fixed-up) OS. +case $os in + # Sometimes we do "kernel-libc", so those need to count as OSes. + musl* | newlib* | relibc* | uclibc*) + ;; + # Likewise for "kernel-abi" + eabi* | gnueabi*) + ;; + # VxWorks passes extra cpu info in the 4th filed. + simlinux | simwindows | spe) + ;; + # Now accept the basic system types. + # The portable systems comes first. + # Each alternative MUST end in a * to match a version number. + gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \ + | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \ + | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ + | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \ + | hiux* | abug | nacl* | netware* | windows* \ + | os9* | macos* | osx* | ios* \ + | mpw* | magic* | mmixware* | mon960* | lnews* \ + | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ + | aos* | aros* | cloudabi* | sortix* | twizzler* \ + | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ + | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ + | mirbsd* | netbsd* | dicos* | openedition* | ose* \ + | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \ + | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \ + | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ + | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ + | udi* | lites* | ieee* | go32* | aux* | hcos* \ + | chorusrdb* | cegcc* | glidix* | serenity* \ + | cygwin* | msys* | pe* | moss* | proelf* | rtems* \ + | midipix* | mingw32* | mingw64* | mint* \ + | uxpv* | beos* | mpeix* | udk* | moxiebox* \ + | interix* | uwin* | mks* | rhapsody* | darwin* \ + | openstep* | oskit* | conix* | pw32* | nonstopux* \ + | storm-chaos* | tops10* | tenex* | tops20* | its* \ + | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \ + | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \ + | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ + | skyos* | haiku* | rdos* | toppers* | drops* | es* \ + | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ + | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ + | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \ + | fiwix* | mlibc* ) + ;; + # This one is extra strict with allowed versions + sco3.2v2 | sco3.2v[4-9]* | sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + ;; + none) + ;; + kernel* ) + # Restricted further below + ;; + *) + echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2 + exit 1 + ;; +esac + +# As a final step for OS-related things, validate the OS-kernel combination +# (given a valid OS), if there is a kernel. +case $kernel-$os in + linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \ + | linux-musl* | linux-relibc* | linux-uclibc* | linux-mlibc* ) + ;; + uclinux-uclibc* ) + ;; + managarm-mlibc* | managarm-kernel* ) + ;; + -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* | -mlibc* ) + # These are just libc implementations, not actual OSes, and thus + # require a kernel. + echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2 + exit 1 + ;; + -kernel* ) + echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2 + exit 1 + ;; + *-kernel* ) + echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2 + exit 1 + ;; + kfreebsd*-gnu* | kopensolaris*-gnu*) + ;; + vxworks-simlinux | vxworks-simwindows | vxworks-spe) + ;; + nto-qnx*) + ;; + os2-emx) + ;; + *-eabi* | *-gnueabi*) + ;; + -*) + # Blank kernel with real OS is always fine. + ;; + *-*) + echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2 + exit 1 + ;; +esac + # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. case $vendor in unknown) - case $os in - riscix*) + case $cpu-$os in + *-riscix*) vendor=acorn ;; - sunos*) + *-sunos*) vendor=sun ;; - cnk*|-aix*) + *-cnk* | *-aix*) vendor=ibm ;; - beos*) + *-beos*) vendor=be ;; - hpux*) + *-hpux*) vendor=hp ;; - mpeix*) + *-mpeix*) vendor=hp ;; - hiux*) + *-hiux*) vendor=hitachi ;; - unos*) + *-unos*) vendor=crds ;; - dgux*) + *-dgux*) vendor=dg ;; - luna*) + *-luna*) vendor=omron ;; - genix*) + *-genix*) vendor=ns ;; - clix*) + *-clix*) vendor=intergraph ;; - mvs* | opened*) + *-mvs* | *-opened*) + vendor=ibm + ;; + *-os400*) vendor=ibm ;; - os400*) + s390-* | s390x-*) vendor=ibm ;; - ptx*) + *-ptx*) vendor=sequent ;; - tpf*) + *-tpf*) vendor=ibm ;; - vxsim* | vxworks* | windiss*) + *-vxsim* | *-vxworks* | *-windiss*) vendor=wrs ;; - aux*) + *-aux*) vendor=apple ;; - hms*) + *-hms*) vendor=hitachi ;; - mpw* | macos*) + *-mpw* | *-macos*) vendor=apple ;; - *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) + *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*) vendor=atari ;; - vos*) + *-vos*) vendor=stratus ;; esac ;; esac -echo "$cpu-$vendor-$os" +echo "$cpu-$vendor-${kernel:+$kernel-}$os" exit # Local variables: diff -Nru libfshfs-20201104/configure libfshfs-20240221/configure --- libfshfs-20201104/configure 2020-11-04 11:56:29.000000000 +0000 +++ libfshfs-20240221/configure 2024-02-21 06:04:24.000000000 +0000 @@ -1,11 +1,12 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for libfshfs 20201104. +# Generated by GNU Autoconf 2.71 for libfshfs 20240221. # # Report bugs to . # # -# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, +# Inc. # # # This configure script is free software; the Free Software Foundation @@ -16,14 +17,16 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : +as_nop=: +if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else +else $as_nop case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -33,46 +36,46 @@ fi + +# Reset variables that may have inherited troublesome values from +# the environment. + +# IFS needs to be set, to space, tab, and newline, in precisely that order. +# (If _AS_PATH_WALK were called with IFS unset, it would have the +# side effect of setting IFS to empty, thus disabling word splitting.) +# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi +IFS=" "" $as_nl" + +PS1='$ ' +PS2='> ' +PS4='+ ' + +# Ensure predictable behavior from utilities with locale-dependent output. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# We cannot yet rely on "unset" to work, but we need these variables +# to be unset--not just set to an empty or harmless value--now, to +# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct +# also avoids known problems related to "unset" and subshell syntax +# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). +for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH +do eval test \${$as_var+y} \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done + +# Ensure that fds 0, 1, and 2 are open. +if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi +if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then +if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -81,13 +84,6 @@ fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -96,8 +92,12 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS @@ -109,30 +109,10 @@ as_myself=$0 fi if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. @@ -154,20 +134,22 @@ exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -as_fn_exit 255 +printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + as_bourne_compatible="as_nop=: +if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST -else +else \$as_nop case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( @@ -187,18 +169,20 @@ as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : +if ( set x; as_fn_ret_success y && test x = \"\$1\" ) +then : -else +else \$as_nop exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 +blah=\$(echo \$(echo blah)) +test x\"\$blah\" = xblah || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' @@ -206,31 +190,40 @@ ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ - || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" - if (eval "$as_required") 2>/dev/null; then : + || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null +then : as_have_required=yes -else +else $as_nop as_have_required=no fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null +then : -else +else $as_nop as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base + as_shell=$as_dir$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null +then : CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null +then : break 2 fi fi @@ -238,14 +231,21 @@ esac as_found=false done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } IFS=$as_save_IFS +if $as_found +then : + +else $as_nop + if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null +then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi +fi - if test "x$CONFIG_SHELL" != x; then : + if test "x$CONFIG_SHELL" != x +then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also @@ -263,18 +263,19 @@ exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." + if test x$as_have_required = xno +then : + printf "%s\n" "$0: This script requires a shell more modern than all" + printf "%s\n" "$0: the shells that I found on your system." + if test ${ZSH_VERSION+y} ; then + printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" + printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." else - $as_echo "$0: Please tell bug-autoconf@gnu.org and + printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and $0: joachim.metz@gmail.com about your system, including any $0: error possibly output before this message. Then install $0: a modern shell, or manually run the script under such a @@ -302,6 +303,7 @@ } as_unset=as_fn_unset + # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -319,6 +321,14 @@ as_fn_set_status $1 exit $1 } # as_fn_exit +# as_fn_nop +# --------- +# Do nothing but, unlike ":", preserve the value of $?. +as_fn_nop () +{ + return $? +} +as_nop=as_fn_nop # as_fn_mkdir_p # ------------- @@ -333,7 +343,7 @@ as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -342,7 +352,7 @@ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | +printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -381,12 +391,13 @@ # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null +then : eval 'as_fn_append () { eval $1+=\$2 }' -else +else $as_nop as_fn_append () { eval $1=\$$1\$2 @@ -398,18 +409,27 @@ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null +then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else +else $as_nop as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith +# as_fn_nop +# --------- +# Do nothing but, unlike ":", preserve the value of $?. +as_fn_nop () +{ + return $? +} +as_nop=as_fn_nop # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- @@ -421,9 +441,9 @@ as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $2" >&2 + printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -450,7 +470,7 @@ $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | +printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -494,7 +514,7 @@ s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall @@ -508,6 +528,10 @@ exit } + +# Determine whether it's possible to make 'echo' print without a newline. +# These variables are no longer used directly by Autoconf, but are AC_SUBSTed +# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -521,6 +545,13 @@ ECHO_N='-n';; esac +# For backward compatibility with old third-party macros, we provide +# the shell variables $as_echo and $as_echo_n. New code should use +# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. +as_echo='printf %s\n' +as_echo_n='printf %s' + + rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -590,48 +621,44 @@ # Identity of this package. PACKAGE_NAME='libfshfs' PACKAGE_TARNAME='libfshfs' -PACKAGE_VERSION='20201104' -PACKAGE_STRING='libfshfs 20201104' +PACKAGE_VERSION='20240221' +PACKAGE_STRING='libfshfs 20240221' PACKAGE_BUGREPORT='joachim.metz@gmail.com' PACKAGE_URL='' ac_unique_file="include/libfshfs.h.in" # Factoring default headers for most tests. ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include +#include +#ifdef HAVE_STDIO_H +# include #endif -#ifdef STDC_HEADERS +#ifdef HAVE_STDLIB_H # include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif #endif #ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif # include #endif -#ifdef HAVE_STRINGS_H -# include -#endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif #ifdef HAVE_UNISTD_H # include #endif" +ac_header_c_list= gt_needs= ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE @@ -647,6 +674,14 @@ LIBFSHFS_DLL_IMPORT LIBFSHFS_DLL_EXPORT HAVE_DLLMAIN +ax_libfuse_spec_build_requires +ax_libfuse_spec_requires +ax_libfuse_pc_libs_private +LIBFUSE_LIBADD +LIBFUSE_CPPFLAGS +HAVE_LIBFUSE +fuse_LIBS +fuse_CFLAGS ax_libhmac_spec_build_requires ax_libhmac_spec_requires ax_libhmac_pc_libs_private @@ -669,36 +704,8 @@ libhmac_CFLAGS HAVE_PYTHON_TESTS_FALSE HAVE_PYTHON_TESTS_TRUE -HAVE_PYTHON3_FALSE -HAVE_PYTHON3_TRUE -HAVE_PYTHON2_FALSE -HAVE_PYTHON2_TRUE HAVE_PYTHON_FALSE HAVE_PYTHON_TRUE -PYTHON3_PACKAGE_DIR -PYTHON3_LIBRARY_DIR -pyexecdir3 -pythondir3 -PYTHON3_EXEC_PREFIX -PYTHON3_PREFIX -PYTHON3_LDFLAGS -PYTHON3_CPPFLAGS -PYTHON3_CONFIG -PYTHON3_PLATFORM -PYTHON3_VERSION -PYTHON3 -PYTHON2_PACKAGE_DIR -PYTHON2_LIBRARY_DIR -pyexecdir2 -pythondir2 -PYTHON2_EXEC_PREFIX -PYTHON2_PREFIX -PYTHON2_LDFLAGS -PYTHON2_CPPFLAGS -PYTHON2_CONFIG -PYTHON2_PLATFORM -PYTHON2_VERSION -PYTHON2 PYTHON_PACKAGE_DIR PYTHON_LIBRARY_DIR pyexecdir @@ -720,6 +727,17 @@ HAVE_ZLIB zlib_LIBS zlib_CFLAGS +ax_libfmos_spec_build_requires +ax_libfmos_spec_requires +ax_libfmos_pc_libs_private +LIBFMOS_LIBADD +LIBFMOS_CPPFLAGS +HAVE_LOCAL_LIBFMOS_FALSE +HAVE_LOCAL_LIBFMOS_TRUE +HAVE_LOCAL_LIBFMOS +HAVE_LIBFMOS +libfmos_LIBS +libfmos_CFLAGS ax_libfguid_spec_build_requires ax_libfguid_spec_requires ax_libfguid_pc_libs_private @@ -901,11 +919,11 @@ LIBICONV INTL_MACOSX_LIBS XGETTEXT_EXTRA_OPTIONS +MSGMERGE_FOR_MSGFMT_OPTION MSGMERGE XGETTEXT_015 XGETTEXT GMSGFMT_015 -MSGFMT_015 GMSGFMT MSGFMT GETTEXT_MACRO_VERSION @@ -913,6 +931,13 @@ PKGCONFIG LIBTOOL_DEPS CXXCPP +am__fastdepCXX_FALSE +am__fastdepCXX_TRUE +CXXDEPMODE +ac_ct_CXX +CXXFLAGS +CXX +CPP LT_SYS_LIBRARY_PATH OTOOL64 OTOOL @@ -923,23 +948,16 @@ RANLIB ac_ct_AR AR +FILECMD LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP -SED -LIBTOOL -am__fastdepCXX_FALSE -am__fastdepCXX_TRUE -CXXDEPMODE -ac_ct_CXX -CXXFLAGS -CXX EGREP GREP -CPP +SED am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE @@ -956,6 +974,7 @@ LDFLAGS CFLAGS CC +LIBTOOL OBJDUMP DLLTOOL AS @@ -971,6 +990,9 @@ AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V +CSCOPE +ETAGS +CTAGS am__untar am__tar AMTAR @@ -1013,6 +1035,7 @@ docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -1037,12 +1060,12 @@ ac_user_opts=' enable_option_checking enable_silent_rules -enable_dependency_tracking enable_shared enable_static with_pic enable_fast_install with_aix_soname +enable_dependency_tracking with_gnu_ld with_sysroot enable_libtool_lock @@ -1073,18 +1096,16 @@ with_libfdata with_libfdatetime with_libfguid +with_libfmos with_zlib with_pyprefix enable_python with_pythondir -enable_python2 -with_pythondir2 -enable_python3 -with_pythondir3 with_libhmac with_openssl enable_openssl_evp_cipher enable_openssl_evp_md +with_libfuse ' ac_precious_vars='build_alias host_alias @@ -1094,11 +1115,11 @@ LDFLAGS LIBS CPPFLAGS +LT_SYS_LIBRARY_PATH CPP CXX CXXFLAGS CCC -LT_SYS_LIBRARY_PATH CXXCPP PKG_CONFIG PKG_CONFIG_PATH @@ -1131,12 +1152,16 @@ libfdatetime_LIBS libfguid_CFLAGS libfguid_LIBS +libfmos_CFLAGS +libfmos_LIBS zlib_CFLAGS zlib_LIBS libhmac_CFLAGS libhmac_LIBS openssl_CFLAGS -openssl_LIBS' +openssl_LIBS +fuse_CFLAGS +fuse_LIBS' # Initialize some variables set by options. @@ -1175,6 +1200,7 @@ sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1204,8 +1230,6 @@ *) ac_optarg=yes ;; esac - # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; @@ -1246,9 +1270,9 @@ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -1272,9 +1296,9 @@ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -1427,6 +1451,15 @@ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1476,9 +1509,9 @@ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1492,9 +1525,9 @@ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1538,9 +1571,9 @@ *) # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; @@ -1556,7 +1589,7 @@ case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1564,7 +1597,7 @@ for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1620,7 +1653,7 @@ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | +printf "%s\n" X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1677,7 +1710,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libfshfs 20201104 to adapt to many kinds of systems. +\`configure' configures libfshfs 20240221 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1717,6 +1750,7 @@ --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1747,7 +1781,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libfshfs 20201104:";; + short | recursive ) echo "Configuration of libfshfs 20240221:";; esac cat <<\_ACEOF @@ -1757,14 +1791,14 @@ --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") - --enable-dependency-tracking - do not reject slow dependency extractors - --disable-dependency-tracking - speeds up one-time build --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] + --enable-dependency-tracking + do not reject slow dependency extractors + --disable-dependency-tracking + speeds up one-time build --disable-libtool-lock avoid locking (might break parallel builds) --disable-nls do not use Native Language Support --disable-rpath do not hardcode runtime library paths @@ -1781,8 +1815,6 @@ --enable-multi-threading-support enable multi-threading support [default=yes] --enable-python build Python bindings [default=no] - --enable-python2 build Python 2 bindings [default=no] - --enable-python3 build Python 3 bindings [default=no] --enable-openssl-evp-cipher enable OpenSSL EVP CIPHER support, or no to disable [default=auto-detect] @@ -1800,7 +1832,7 @@ --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified). - --with-gnu-ld assume the C compiler uses GNU ld default=no + --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib --without-libiconv-prefix don't search for libiconv in includedir and libdir --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib @@ -1852,6 +1884,9 @@ --with-libfguid[=DIR] search for libfguid in includedir and libdir or in the specified DIR, or no if to use local version [default=auto-detect] + --with-libfmos[=DIR] search for libfmos in includedir and libdir or in + the specified DIR, or no if to use local version + [default=auto-detect] --with-zlib[=DIR] search for zlib in includedir and libdir or in the specified DIR, or no if not to use zlib [default=auto-detect] @@ -1859,16 +1894,15 @@ of pythondir instead of --prefix [default=no] --with-pythondir[=no] use to specify the Python directory (pythondir) [default=no] - --with-pythondir2[=no] use to specify the Python 2 directory (pythondir2) - [default=no] - --with-pythondir3[=no] use to specify the Python 3 directory (pythondir3) - [default=no] --with-libhmac[=DIR] search for libhmac in includedir and libdir or in the specified DIR, or no if to use local version [default=auto-detect] --with-openssl[=DIR] search for OpenSSL in includedir and libdir or in the specified DIR, or no if not to use OpenSSL [default=auto-detect] + --with-libfuse[=DIR] search for libfuse in includedir and libdir or in + the specified DIR, or no if not to use libfuse + [default=auto-detect] Some influential environment variables: CC C compiler command @@ -1878,11 +1912,11 @@ LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory + LT_SYS_LIBRARY_PATH + User-defined run-time library search path. CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags - LT_SYS_LIBRARY_PATH - User-defined run-time library search path. CXXCPP C++ preprocessor PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH @@ -1944,6 +1978,10 @@ C compiler flags for libfguid, overriding pkg-config libfguid_LIBS linker flags for libfguid, overriding pkg-config + libfmos_CFLAGS + C compiler flags for libfmos, overriding pkg-config + libfmos_LIBS + linker flags for libfmos, overriding pkg-config zlib_CFLAGS C compiler flags for zlib, overriding pkg-config zlib_LIBS linker flags for zlib, overriding pkg-config libhmac_CFLAGS @@ -1954,6 +1992,8 @@ C compiler flags for openssl, overriding pkg-config openssl_LIBS linker flags for openssl, overriding pkg-config + fuse_CFLAGS C compiler flags for fuse, overriding pkg-config + fuse_LIBS linker flags for fuse, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -1974,9 +2014,9 @@ case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -2004,7 +2044,8 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. + # Check for configure.gnu first; this name is used for a wrapper for + # Metaconfig's "Configure" on case-insensitive file systems. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive @@ -2012,7 +2053,7 @@ echo && $SHELL "$ac_srcdir/configure" --help=recursive else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -2021,10 +2062,10 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libfshfs configure 20201104 -generated by GNU Autoconf 2.69 +libfshfs configure 20240221 +generated by GNU Autoconf 2.71 -Copyright (C) 2012 Free Software Foundation, Inc. +Copyright (C) 2021 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -2041,14 +2082,14 @@ ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext + rm -f conftest.$ac_objext conftest.beam if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -2056,14 +2097,15 @@ cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext; then : + } && test -s conftest.$ac_objext +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2073,95 +2115,20 @@ } # ac_fn_c_try_compile -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - -# ac_fn_cxx_try_compile LINENO -# ---------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_compile - # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext + rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -2169,17 +2136,18 @@ cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext - }; then : + } +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2201,83 +2169,44 @@ ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : eval "$3=yes" -else +else $as_nop eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_run - # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. @@ -2285,16 +2214,9 @@ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif + which can conflict with char $2 (); below. */ +#include #undef $2 /* Override any GCC internal prototype to avoid an error. @@ -2312,28 +2234,106 @@ #endif int -main () +main (void) { return $2 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : eval "$3=yes" -else +else $as_nop eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + } +then : + ac_retval=0 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_cxx_try_compile LINENO +# ---------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest.beam + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext +then : + ac_retval=0 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_cxx_try_compile + # ac_fn_cxx_try_cpp LINENO # ------------------------ # Try to preprocess conftest.$ac_ext, and return whether this succeeded. @@ -2346,7 +2346,7 @@ *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -2354,14 +2354,15 @@ cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err - }; then : + } +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2377,14 +2378,14 @@ ac_fn_cxx_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext + rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -2392,17 +2393,18 @@ cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext - }; then : + } +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2417,96 +2419,48 @@ } # ac_fn_cxx_try_link -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_c_check_header_mongrel () +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that +# executables *can* be run. +ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval \${$3+:} false; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.i conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } +then : + ac_retval=0 +else $as_nop + printf "%s\n" "$as_me: program exited with status $ac_status" >&5 + printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## ------------------------------------- ## -## Report this to joachim.metz@gmail.com ## -## ------------------------------------- ##" - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + ac_retval=$ac_status fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval -} # ac_fn_c_check_header_mongrel +} # ac_fn_c_try_run # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- @@ -2515,17 +2469,18 @@ ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main () +main (void) { if (sizeof ($2)) return 0; @@ -2533,12 +2488,13 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main () +main (void) { if (sizeof (($2))) return 0; @@ -2546,18 +2502,19 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : -else +else $as_nop eval "$3=yes" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type @@ -2576,7 +2533,7 @@ /* end confdefs.h. */ $4 int -main () +main (void) { static int test_array [1 - 2 * !(($2) >= 0)]; test_array [0] = 0; @@ -2586,14 +2543,15 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_lo=0 ac_mid=0 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main () +main (void) { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0; @@ -2603,9 +2561,10 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_hi=$ac_mid; break -else +else $as_nop as_fn_arith $ac_mid + 1 && ac_lo=$as_val if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= @@ -2613,14 +2572,14 @@ fi as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done -else +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main () +main (void) { static int test_array [1 - 2 * !(($2) < 0)]; test_array [0] = 0; @@ -2630,14 +2589,15 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_hi=-1 ac_mid=-1 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main () +main (void) { static int test_array [1 - 2 * !(($2) >= $ac_mid)]; test_array [0] = 0; @@ -2647,9 +2607,10 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_lo=$ac_mid; break -else +else $as_nop as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= @@ -2657,14 +2618,14 @@ fi as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done -else +else $as_nop ac_lo= ac_hi= fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val @@ -2672,7 +2633,7 @@ /* end confdefs.h. */ $4 int -main () +main (void) { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0; @@ -2682,12 +2643,13 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_hi=$ac_mid -else +else $as_nop as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done case $ac_lo in #(( ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; @@ -2697,12 +2659,12 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 -static long int longval () { return $2; } -static unsigned long int ulongval () { return $2; } +static long int longval (void) { return $2; } +static unsigned long int ulongval (void) { return $2; } #include #include int -main () +main (void) { FILE *f = fopen ("conftest.val", "w"); @@ -2730,9 +2692,10 @@ return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +if ac_fn_c_try_run "$LINENO" +then : echo >>conftest.val; read $3 &5 +printf %s "checking whether $as_decl_name is declared... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 -$as_echo_n "checking whether $as_decl_name is declared... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else + eval ac_save_FLAGS=\$$6 + as_fn_append $6 " $5" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main () +main (void) { #ifndef $as_decl_name #ifdef __cplusplus @@ -2777,27 +2743,50 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : eval "$3=yes" -else +else $as_nop eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + eval $6=\$ac_save_FLAGS + fi eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno -} # ac_fn_c_check_decl +} # ac_fn_check_decl +ac_configure_args_raw= +for ac_arg +do + case $ac_arg in + *\'*) + ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append ac_configure_args_raw " '$ac_arg'" +done + +case $ac_configure_args_raw in + *$as_nl*) + ac_safe_unquote= ;; + *) + ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. + ac_unsafe_a="$ac_unsafe_z#~" + ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" + ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; +esac + cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libfshfs $as_me 20201104, which was -generated by GNU Autoconf 2.69. Invocation command line was +It was created by libfshfs $as_me 20240221, which was +generated by GNU Autoconf 2.71. Invocation command line was - $ $0 $@ + $ $0$ac_configure_args_raw _ACEOF exec 5>>config.log @@ -2830,8 +2819,12 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + printf "%s\n" "PATH: $as_dir" done IFS=$as_save_IFS @@ -2866,7 +2859,7 @@ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; @@ -2901,11 +2894,13 @@ # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? + # Sanitize IFS. + IFS=" "" $as_nl" # Save into config.log some information that might help in debugging. { echo - $as_echo "## ---------------- ## + printf "%s\n" "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo @@ -2916,8 +2911,8 @@ case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -2941,7 +2936,7 @@ ) echo - $as_echo "## ----------------- ## + printf "%s\n" "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo @@ -2949,14 +2944,14 @@ do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - $as_echo "$ac_var='\''$ac_val'\''" + printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## + printf "%s\n" "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo @@ -2964,15 +2959,15 @@ do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - $as_echo "$ac_var='\''$ac_val'\''" + printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then - $as_echo "## ----------- ## + printf "%s\n" "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo @@ -2980,8 +2975,8 @@ echo fi test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" + printf "%s\n" "$as_me: caught signal $ac_signal" + printf "%s\n" "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && @@ -2995,63 +2990,48 @@ # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h -$as_echo "/* confdefs.h */" > confdefs.h +printf "%s\n" "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF +printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF +printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF +printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF +printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF +printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF +printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac + ac_site_files="$CONFIG_SITE" elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site + ac_site_files="$prefix/share/config.site $prefix/etc/config.site" else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site + ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" + +for ac_site_file in $ac_site_files do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} + case $ac_site_file in #( + */*) : + ;; #( + *) : + ac_site_file=./$ac_site_file ;; +esac + if test -f "$ac_site_file" && test -r "$ac_site_file"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi @@ -3061,20 +3041,651 @@ # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +printf "%s\n" "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +printf "%s\n" "$as_me: creating cache $cache_file" >&6;} >$cache_file fi +# Test code for whether the C compiler supports C89 (global declarations) +ac_c_conftest_c89_globals=' +/* Does the compiler advertise C89 conformance? + Do not test the value of __STDC__, because some compilers set it to 0 + while being otherwise adequately conformant. */ +#if !defined __STDC__ +# error "Compiler does not advertise C89 conformance" +#endif + +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ +struct buf { int x; }; +struct buf * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not \xHH hex character constants. + These do not provoke an error unfortunately, instead are silently treated + as an "x". The following induces an error, until -std is added to get + proper ANSI mode. Curiously \x00 != x always comes out true, for an + array size at least. It is necessary to write \x00 == 0 to get something + that is true only with -std. */ +int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) '\''x'\'' +int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int), + int, int);' + +# Test code for whether the C compiler supports C89 (body of main). +ac_c_conftest_c89_main=' +ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); +' + +# Test code for whether the C compiler supports C99 (global declarations) +ac_c_conftest_c99_globals=' +// Does the compiler advertise C99 conformance? +#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L +# error "Compiler does not advertise C99 conformance" +#endif + +#include +extern int puts (const char *); +extern int printf (const char *, ...); +extern int dprintf (int, const char *, ...); +extern void *malloc (size_t); + +// Check varargs macros. These examples are taken from C99 6.10.3.5. +// dprintf is used instead of fprintf to avoid needing to declare +// FILE and stderr. +#define debug(...) dprintf (2, __VA_ARGS__) +#define showlist(...) puts (#__VA_ARGS__) +#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) +static void +test_varargs_macros (void) +{ + int x = 1234; + int y = 5678; + debug ("Flag"); + debug ("X = %d\n", x); + showlist (The first, second, and third items.); + report (x>y, "x is %d but y is %d", x, y); +} + +// Check long long types. +#define BIG64 18446744073709551615ull +#define BIG32 4294967295ul +#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) +#if !BIG_OK + #error "your preprocessor is broken" +#endif +#if BIG_OK +#else + #error "your preprocessor is broken" +#endif +static long long int bignum = -9223372036854775807LL; +static unsigned long long int ubignum = BIG64; + +struct incomplete_array +{ + int datasize; + double data[]; +}; + +struct named_init { + int number; + const wchar_t *name; + double average; +}; + +typedef const char *ccp; + +static inline int +test_restrict (ccp restrict text) +{ + // See if C++-style comments work. + // Iterate through items via the restricted pointer. + // Also check for declarations in for loops. + for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) + continue; + return 0; +} + +// Check varargs and va_copy. +static bool +test_varargs (const char *format, ...) +{ + va_list args; + va_start (args, format); + va_list args_copy; + va_copy (args_copy, args); + + const char *str = ""; + int number = 0; + float fnumber = 0; + + while (*format) + { + switch (*format++) + { + case '\''s'\'': // string + str = va_arg (args_copy, const char *); + break; + case '\''d'\'': // int + number = va_arg (args_copy, int); + break; + case '\''f'\'': // float + fnumber = va_arg (args_copy, double); + break; + default: + break; + } + } + va_end (args_copy); + va_end (args); + + return *str && number && fnumber; +} +' + +# Test code for whether the C compiler supports C99 (body of main). +ac_c_conftest_c99_main=' + // Check bool. + _Bool success = false; + success |= (argc != 0); + + // Check restrict. + if (test_restrict ("String literal") == 0) + success = true; + char *restrict newvar = "Another string"; + + // Check varargs. + success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234); + test_varargs_macros (); + + // Check flexible array members. + struct incomplete_array *ia = + malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); + ia->datasize = 10; + for (int i = 0; i < ia->datasize; ++i) + ia->data[i] = i * 1.234; + + // Check named initializers. + struct named_init ni = { + .number = 34, + .name = L"Test wide string", + .average = 543.34343, + }; + + ni.number = 58; + + int dynamic_array[ni.number]; + dynamic_array[0] = argv[0][0]; + dynamic_array[ni.number - 1] = 543; + + // work around unused variable warnings + ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\'' + || dynamic_array[ni.number - 1] != 543); +' + +# Test code for whether the C compiler supports C11 (global declarations) +ac_c_conftest_c11_globals=' +// Does the compiler advertise C11 conformance? +#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L +# error "Compiler does not advertise C11 conformance" +#endif + +// Check _Alignas. +char _Alignas (double) aligned_as_double; +char _Alignas (0) no_special_alignment; +extern char aligned_as_int; +char _Alignas (0) _Alignas (int) aligned_as_int; + +// Check _Alignof. +enum +{ + int_alignment = _Alignof (int), + int_array_alignment = _Alignof (int[100]), + char_alignment = _Alignof (char) +}; +_Static_assert (0 < -_Alignof (int), "_Alignof is signed"); + +// Check _Noreturn. +int _Noreturn does_not_return (void) { for (;;) continue; } + +// Check _Static_assert. +struct test_static_assert +{ + int x; + _Static_assert (sizeof (int) <= sizeof (long int), + "_Static_assert does not work in struct"); + long int y; +}; + +// Check UTF-8 literals. +#define u8 syntax error! +char const utf8_literal[] = u8"happens to be ASCII" "another string"; + +// Check duplicate typedefs. +typedef long *long_ptr; +typedef long int *long_ptr; +typedef long_ptr long_ptr; + +// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. +struct anonymous +{ + union { + struct { int i; int j; }; + struct { int k; long int l; } w; + }; + int m; +} v1; +' + +# Test code for whether the C compiler supports C11 (body of main). +ac_c_conftest_c11_main=' + _Static_assert ((offsetof (struct anonymous, i) + == offsetof (struct anonymous, w.k)), + "Anonymous union alignment botch"); + v1.i = 2; + v1.w.k = 5; + ok |= v1.i != 5; +' + +# Test code for whether the C compiler supports C11 (complete). +ac_c_conftest_c11_program="${ac_c_conftest_c89_globals} +${ac_c_conftest_c99_globals} +${ac_c_conftest_c11_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_c_conftest_c89_main} + ${ac_c_conftest_c99_main} + ${ac_c_conftest_c11_main} + return ok; +} +" + +# Test code for whether the C compiler supports C99 (complete). +ac_c_conftest_c99_program="${ac_c_conftest_c89_globals} +${ac_c_conftest_c99_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_c_conftest_c89_main} + ${ac_c_conftest_c99_main} + return ok; +} +" + +# Test code for whether the C compiler supports C89 (complete). +ac_c_conftest_c89_program="${ac_c_conftest_c89_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_c_conftest_c89_main} + return ok; +} +" + +as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H" +as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H" +as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H" +as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H" +as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H" +as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H" +as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" +as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" +as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" +# Test code for whether the C++ compiler supports C++98 (global declarations) +ac_cxx_conftest_cxx98_globals=' +// Does the compiler advertise C++98 conformance? +#if !defined __cplusplus || __cplusplus < 199711L +# error "Compiler does not advertise C++98 conformance" +#endif + +// These inclusions are to reject old compilers that +// lack the unsuffixed header files. +#include +#include + +// and are *not* freestanding headers in C++98. +extern void assert (int); +namespace std { + extern int strcmp (const char *, const char *); +} + +// Namespaces, exceptions, and templates were all added after "C++ 2.0". +using std::exception; +using std::strcmp; + +namespace { + +void test_exception_syntax() +{ + try { + throw "test"; + } catch (const char *s) { + // Extra parentheses suppress a warning when building autoconf itself, + // due to lint rules shared with more typical C programs. + assert (!(strcmp) (s, "test")); + } +} + +template struct test_template +{ + T const val; + explicit test_template(T t) : val(t) {} + template T add(U u) { return static_cast(u) + val; } +}; + +} // anonymous namespace +' + +# Test code for whether the C++ compiler supports C++98 (body of main) +ac_cxx_conftest_cxx98_main=' + assert (argc); + assert (! argv[0]); +{ + test_exception_syntax (); + test_template tt (2.0); + assert (tt.add (4) == 6.0); + assert (true && !false); +} +' + +# Test code for whether the C++ compiler supports C++11 (global declarations) +ac_cxx_conftest_cxx11_globals=' +// Does the compiler advertise C++ 2011 conformance? +#if !defined __cplusplus || __cplusplus < 201103L +# error "Compiler does not advertise C++11 conformance" +#endif + +namespace cxx11test +{ + constexpr int get_val() { return 20; } + + struct testinit + { + int i; + double d; + }; + + class delegate + { + public: + delegate(int n) : n(n) {} + delegate(): delegate(2354) {} + + virtual int getval() { return this->n; }; + protected: + int n; + }; + + class overridden : public delegate + { + public: + overridden(int n): delegate(n) {} + virtual int getval() override final { return this->n * 2; } + }; + + class nocopy + { + public: + nocopy(int i): i(i) {} + nocopy() = default; + nocopy(const nocopy&) = delete; + nocopy & operator=(const nocopy&) = delete; + private: + int i; + }; + + // for testing lambda expressions + template Ret eval(Fn f, Ret v) + { + return f(v); + } + + // for testing variadic templates and trailing return types + template auto sum(V first) -> V + { + return first; + } + template auto sum(V first, Args... rest) -> V + { + return first + sum(rest...); + } +} +' + +# Test code for whether the C++ compiler supports C++11 (body of main) +ac_cxx_conftest_cxx11_main=' +{ + // Test auto and decltype + auto a1 = 6538; + auto a2 = 48573953.4; + auto a3 = "String literal"; + + int total = 0; + for (auto i = a3; *i; ++i) { total += *i; } + + decltype(a2) a4 = 34895.034; +} +{ + // Test constexpr + short sa[cxx11test::get_val()] = { 0 }; +} +{ + // Test initializer lists + cxx11test::testinit il = { 4323, 435234.23544 }; +} +{ + // Test range-based for + int array[] = {9, 7, 13, 15, 4, 18, 12, 10, 5, 3, + 14, 19, 17, 8, 6, 20, 16, 2, 11, 1}; + for (auto &x : array) { x += 23; } +} +{ + // Test lambda expressions + using cxx11test::eval; + assert (eval ([](int x) { return x*2; }, 21) == 42); + double d = 2.0; + assert (eval ([&](double x) { return d += x; }, 3.0) == 5.0); + assert (d == 5.0); + assert (eval ([=](double x) mutable { return d += x; }, 4.0) == 9.0); + assert (d == 5.0); +} +{ + // Test use of variadic templates + using cxx11test::sum; + auto a = sum(1); + auto b = sum(1, 2); + auto c = sum(1.0, 2.0, 3.0); +} +{ + // Test constructor delegation + cxx11test::delegate d1; + cxx11test::delegate d2(); + cxx11test::delegate d3(45); +} +{ + // Test override and final + cxx11test::overridden o1(55464); +} +{ + // Test nullptr + char *c = nullptr; +} +{ + // Test template brackets + test_template<::test_template> v(test_template(12)); +} +{ + // Unicode literals + char const *utf8 = u8"UTF-8 string \u2500"; + char16_t const *utf16 = u"UTF-8 string \u2500"; + char32_t const *utf32 = U"UTF-32 string \u2500"; +} +' + +# Test code for whether the C compiler supports C++11 (complete). +ac_cxx_conftest_cxx11_program="${ac_cxx_conftest_cxx98_globals} +${ac_cxx_conftest_cxx11_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_cxx_conftest_cxx98_main} + ${ac_cxx_conftest_cxx11_main} + return ok; +} +" + +# Test code for whether the C compiler supports C++98 (complete). +ac_cxx_conftest_cxx98_program="${ac_cxx_conftest_cxx98_globals} +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_cxx_conftest_cxx98_main} + return ok; +} +" + gt_needs="$gt_needs " + +# Auxiliary files required by this configure script. +ac_aux_files="config.rpath compile ltmain.sh config.guess config.sub missing install-sh" + +# Locations in which to look for auxiliary files. +ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.." + +# Search for a directory containing all of the required auxiliary files, +# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates. +# If we don't find one directory that contains all the files we need, +# we report the set of missing files from the *first* directory in +# $ac_aux_dir_candidates and give up. +ac_missing_aux_files="" +ac_first_candidate=: +printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in $ac_aux_dir_candidates +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + as_found=: + + printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5 + ac_aux_dir_found=yes + ac_install_sh= + for ac_aux in $ac_aux_files + do + # As a special case, if "install-sh" is required, that requirement + # can be satisfied by any of "install-sh", "install.sh", or "shtool", + # and $ac_install_sh is set appropriately for whichever one is found. + if test x"$ac_aux" = x"install-sh" + then + if test -f "${as_dir}install-sh"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5 + ac_install_sh="${as_dir}install-sh -c" + elif test -f "${as_dir}install.sh"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5 + ac_install_sh="${as_dir}install.sh -c" + elif test -f "${as_dir}shtool"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5 + ac_install_sh="${as_dir}shtool install -c" + else + ac_aux_dir_found=no + if $ac_first_candidate; then + ac_missing_aux_files="${ac_missing_aux_files} install-sh" + else + break + fi + fi + else + if test -f "${as_dir}${ac_aux}"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5 + else + ac_aux_dir_found=no + if $ac_first_candidate; then + ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}" + else + break + fi + fi + fi + done + if test "$ac_aux_dir_found" = yes; then + ac_aux_dir="$as_dir" + break + fi + ac_first_candidate=false + + as_found=false +done +IFS=$as_save_IFS +if $as_found +then : + +else $as_nop + as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 +fi + + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +if test -f "${ac_aux_dir}config.guess"; then + ac_config_guess="$SHELL ${ac_aux_dir}config.guess" +fi +if test -f "${ac_aux_dir}config.sub"; then + ac_config_sub="$SHELL ${ac_aux_dir}config.sub" +fi +if test -f "$ac_aux_dir/configure"; then + ac_configure="$SHELL ${ac_aux_dir}configure" +fi + # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false @@ -3085,12 +3696,12 @@ eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) @@ -3099,24 +3710,24 @@ ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -3126,11 +3737,12 @@ fi done if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file' + and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -3148,36 +3760,9 @@ am__api_version='1.16' -ac_aux_dir= -for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. -# Find a good install program. We prefer a C program (faster), + # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install @@ -3191,20 +3776,25 @@ # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +printf %s "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if ${ac_cv_path_install+:} false; then : - $as_echo_n "(cached) " >&6 -else +if test ${ac_cv_path_install+y} +then : + printf %s "(cached) " >&6 +else $as_nop as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in #(( - ./ | .// | /[cC]/* | \ + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + # Account for fact that we put trailing slashes in our PATH walk. +case $as_dir in #(( + ./ | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; @@ -3214,13 +3804,13 @@ # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else @@ -3228,12 +3818,12 @@ echo one > conftest.one echo two > conftest.two mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c" break 3 fi fi @@ -3249,7 +3839,7 @@ rm -rf conftest.one conftest.two conftest.dir fi - if test "${ac_cv_path_install+set}" = set; then + if test ${ac_cv_path_install+y}; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a @@ -3259,8 +3849,8 @@ INSTALL=$ac_install_sh fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +printf "%s\n" "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -3270,8 +3860,8 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 -$as_echo_n "checking whether build environment is sane... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +printf %s "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' @@ -3325,8 +3915,8 @@ as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= @@ -3345,26 +3935,23 @@ # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` +program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"` + # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac + + if test x"${MISSING+set}" != xset; then + MISSING="\${SHELL} '$am_aux_dir/missing'" fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 +printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != xset; then @@ -3384,11 +3971,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_STRIP+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else @@ -3396,11 +3984,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3411,11 +4003,11 @@ fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +printf "%s\n" "$STRIP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3424,11 +4016,12 @@ ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_STRIP+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else @@ -3436,11 +4029,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3451,11 +4048,11 @@ fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +printf "%s\n" "$ac_ct_STRIP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then @@ -3463,8 +4060,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP @@ -3476,25 +4073,31 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 -$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5 +printf %s "checking for a race-free mkdir -p... " >&6; } if test -z "$MKDIR_P"; then - if ${ac_cv_path_mkdir+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test ${ac_cv_path_mkdir+y} +then : + printf %s "(cached) " >&6 +else $as_nop as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do - as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ + as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue + case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir ('*'coreutils) '* | \ + 'BusyBox '* | \ 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext break 3;; esac done @@ -3505,7 +4108,7 @@ fi test -d ./--version && rmdir ./--version - if test "${ac_cv_path_mkdir+set}" = set; then + if test ${ac_cv_path_mkdir+y}; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a @@ -3515,18 +4118,19 @@ MKDIR_P="$ac_install_sh -d" fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 -$as_echo "$MKDIR_P" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +printf "%s\n" "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AWK+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_AWK+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else @@ -3534,11 +4138,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3549,24 +4157,25 @@ fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +printf "%s\n" "$AWK" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi test -n "$AWK" && break done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : - $as_echo_n "(cached) " >&6 -else +ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval test \${ac_cv_prog_make_${ac_make}_set+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @@ -3582,12 +4191,12 @@ rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } SET_MAKE= else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi @@ -3601,7 +4210,8 @@ rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. -if test "${enable_silent_rules+set}" = set; then : +if test ${enable_silent_rules+y} +then : enableval=$enable_silent_rules; fi @@ -3611,12 +4221,13 @@ *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 -$as_echo_n "checking whether $am_make supports nested variables... " >&6; } -if ${am_cv_make_support_nested_variables+:} false; then : - $as_echo_n "(cached) " >&6 -else - if $as_echo 'TRUE=$(BAR$(V)) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +printf %s "checking whether $am_make supports nested variables... " >&6; } +if test ${am_cv_make_support_nested_variables+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if printf "%s\n" 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 @@ -3628,8 +4239,8 @@ am_cv_make_support_nested_variables=no fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 -$as_echo "$am_cv_make_support_nested_variables" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +printf "%s\n" "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' @@ -3661,17 +4272,13 @@ # Define the identity of the package. PACKAGE='libfshfs' - VERSION='20201104' + VERSION='20240221' -cat >>confdefs.h <<_ACEOF -#define PACKAGE "$PACKAGE" -_ACEOF +printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define VERSION "$VERSION" -_ACEOF +printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h # Some tools Automake needs. @@ -3717,29 +4324,29 @@ # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UID '$am_uid' is supported by ustar format" >&5 -$as_echo_n "checking whether UID '$am_uid' is supported by ustar format... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UID '$am_uid' is supported by ustar format" >&5 +printf %s "checking whether UID '$am_uid' is supported by ustar format... " >&6; } if test $am_uid -le $am_max_uid; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } _am_tools=none fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GID '$am_gid' is supported by ustar format" >&5 -$as_echo_n "checking whether GID '$am_gid' is supported by ustar format... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether GID '$am_gid' is supported by ustar format" >&5 +printf %s "checking whether GID '$am_gid' is supported by ustar format... " >&6; } if test $am_gid -le $am_max_gid; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } _am_tools=none fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5 -$as_echo_n "checking how to create a ustar tar archive... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5 +printf %s "checking how to create a ustar tar archive... " >&6; } # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. @@ -3814,17 +4421,32 @@ done rm -rf conftest.dir - if ${am_cv_prog_tar_ustar+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test ${am_cv_prog_tar_ustar+y} +then : + printf %s "(cached) " >&6 +else $as_nop am_cv_prog_tar_ustar=$_am_tool fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5 -$as_echo "$am_cv_prog_tar_ustar" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5 +printf "%s\n" "$am_cv_prog_tar_ustar" >&6; } + + +# Variables for tags utilities; see am/tags.am +if test -z "$CTAGS"; then + CTAGS=ctags +fi + +if test -z "$ETAGS"; then + ETAGS=etags +fi + +if test -z "$CSCOPE"; then + CSCOPE=cscope +fi @@ -3873,26 +4495,30 @@ -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if ${ac_cv_build+:} false; then : - $as_echo_n "(cached) " >&6 -else + + + + # Make sure we can run config.sub. +$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +printf %s "checking build system type... " >&6; } +if test ${ac_cv_build+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_build_alias=$build_alias test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` + ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 +ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +printf "%s\n" "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; @@ -3911,21 +4537,22 @@ case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if ${ac_cv_host+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +printf %s "checking host system type... " >&6; } +if test ${ac_cv_host+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 + ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || + as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +printf "%s\n" "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; @@ -3945,302 +4572,98 @@ -enable_win32_dll=yes +case `pwd` in + *\ * | *\ *) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +printf "%s\n" "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; +esac -case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. -set dummy ${ac_tool_prefix}as; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AS+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AS"; then - ac_cv_prog_AS="$AS" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AS="${ac_tool_prefix}as" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS -fi -fi -AS=$ac_cv_prog_AS -if test -n "$AS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 -$as_echo "$AS" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi +macro_version='2.4.7' +macro_revision='2.4.7' -fi -if test -z "$ac_cv_prog_AS"; then - ac_ct_AS=$AS - # Extract the first word of "as", so it can be a program name with args. -set dummy as; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_AS+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AS"; then - ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_AS="as" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS -fi -fi -ac_ct_AS=$ac_cv_prog_ac_ct_AS -if test -n "$ac_ct_AS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 -$as_echo "$ac_ct_AS" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - if test "x$ac_ct_AS" = x; then - AS="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AS=$ac_ct_AS - fi -else - AS="$ac_cv_prog_AS" -fi - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DLLTOOL"; then - ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS -fi -fi -DLLTOOL=$ac_cv_prog_DLLTOOL -if test -n "$DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -$as_echo "$DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -fi -if test -z "$ac_cv_prog_DLLTOOL"; then - ac_ct_DLLTOOL=$DLLTOOL - # Extract the first word of "dlltool", so it can be a program name with args. -set dummy dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DLLTOOL"; then - ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DLLTOOL="dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS -fi -fi -ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -if test -n "$ac_ct_DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -$as_echo "$ac_ct_DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - if test "x$ac_ct_DLLTOOL" = x; then - DLLTOOL="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DLLTOOL=$ac_ct_DLLTOOL - fi -else - DLLTOOL="$ac_cv_prog_DLLTOOL" -fi - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS -fi -fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OBJDUMP="objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS -fi -fi -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi +ltmain=$ac_aux_dir/ltmain.sh - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OBJDUMP=$ac_ct_OBJDUMP - fi +# Backslashify metacharacters that are still active within +# double-quoted strings. +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 +printf %s "checking how to print strings... " >&6; } +# Test print first, because it will be a builtin if present. +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='printf %s\n' else - OBJDUMP="$ac_cv_prog_OBJDUMP" + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' fi - ;; +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "" +} + +case $ECHO in + printf*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: printf" >&5 +printf "%s\n" "printf" >&6; } ;; + print*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 +printf "%s\n" "print -r" >&6; } ;; + *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cat" >&5 +printf "%s\n" "cat" >&6; } ;; esac -test -z "$AS" && AS=as -test -z "$DLLTOOL" && DLLTOOL=dlltool -test -z "$OBJDUMP" && OBJDUMP=objdump @@ -4249,6 +4672,74 @@ + + + + +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 +printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; } +cat > confinc.mk << 'END' +am__doit: + @echo this is the am__doit target >confinc.out +.PHONY: am__doit +END +am__include="#" +am__quote= +# BSD make does it like this. +echo '.include "confinc.mk" # ignored' > confmf.BSD +# Other make implementations (GNU, Solaris 10, AIX) do it like this. +echo 'include confinc.mk # ignored' > confmf.GNU +_am_result=no +for s in GNU BSD; do + { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5 + (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + case $?:`cat confinc.out 2>/dev/null` in #( + '0:this is the am__doit target') : + case $s in #( + BSD) : + am__include='.include' am__quote='"' ;; #( + *) : + am__include='include' am__quote='' ;; +esac ;; #( + *) : + ;; +esac + if test "$am__include" != "#"; then + _am_result="yes ($s style)" + break + fi +done +rm -f confinc.* confmf.* +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 +printf "%s\n" "${_am_result}" >&6; } + +# Check whether --enable-dependency-tracking was given. +if test ${enable_dependency_tracking+y} +then : + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -4257,11 +4748,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -4269,11 +4761,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4284,11 +4780,11 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -4297,11 +4793,12 @@ ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -4309,11 +4806,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4324,11 +4825,11 @@ fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -4336,8 +4837,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -4350,11 +4851,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -4362,11 +4864,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4377,11 +4883,11 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -4390,11 +4896,12 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -4403,15 +4910,19 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4427,18 +4938,18 @@ # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -4449,11 +4960,12 @@ do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -4461,11 +4973,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4476,11 +4992,11 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -4493,11 +5009,12 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -4505,11 +5022,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4520,11 +5041,11 @@ fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -4536,34 +5057,138 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. +set dummy ${ac_tool_prefix}clang; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}clang" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "clang", so it can be a program name with args. +set dummy clang; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="clang" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi +else + CC="$ac_cv_prog_CC" fi fi -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 -for ac_option in --version -v -V -qversion; do +for ac_option in --version -v -V -qversion -version; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -4573,7 +5198,7 @@ cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done @@ -4581,7 +5206,7 @@ /* end confdefs.h. */ int -main () +main (void) { ; @@ -4593,9 +5218,9 @@ # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +printf %s "checking whether the C compiler works... " >&6; } +ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" @@ -4616,11 +5241,12 @@ *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, @@ -4637,7 +5263,7 @@ # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi @@ -4653,44 +5279,46 @@ done test "$ac_cv_exeext" = no && ac_cv_exeext= -else +else $as_nop ac_file='' fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 +if test -z "$ac_file" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +printf %s "checking for C compiler default output file name... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +printf "%s\n" "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +printf %s "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -4704,15 +5332,15 @@ * ) break;; esac done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +printf "%s\n" "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext @@ -4721,7 +5349,7 @@ /* end confdefs.h. */ #include int -main () +main (void) { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; @@ -4733,8 +5361,8 @@ ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +printf %s "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in @@ -4742,10 +5370,10 @@ *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in @@ -4753,39 +5381,40 @@ *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +printf "%s\n" "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if ${ac_cv_objext+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +printf %s "checking for suffix of object files... " >&6; } +if test ${ac_cv_objext+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; @@ -4799,11 +5428,12 @@ *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in @@ -4812,31 +5442,32 @@ break;; esac done -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +printf "%s\n" "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 +printf %s "checking whether the compiler supports GNU C... " >&6; } +if test ${ac_cv_c_compiler_gnu+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { #ifndef __GNUC__ choke me @@ -4846,29 +5477,33 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_compiler_gnu=yes -else +else $as_nop ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } +ac_compiler_gnu=$ac_cv_c_compiler_gnu + if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi -ac_test_CFLAGS=${CFLAGS+set} +ac_test_CFLAGS=${CFLAGS+y} ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +printf %s "checking whether $CC accepts -g... " >&6; } +if test ${ac_cv_prog_cc_g+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no @@ -4877,57 +5512,60 @@ /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_g=yes -else +else $as_nop CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : -else +else $as_nop ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +printf "%s\n" "$ac_cv_prog_cc_g" >&6; } +if test $ac_test_CFLAGS; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then @@ -4942,94 +5580,144 @@ CFLAGS= fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no +ac_prog_cc_stdc=no +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 +printf %s "checking for $CC option to enable C11 features... " >&6; } +if test ${ac_cv_prog_cc_c11+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c11=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; +$ac_c_conftest_c11_program +_ACEOF +for ac_arg in '' -std=gnu11 +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c11=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c11" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC +fi -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; +if test "x$ac_cv_prog_cc_c11" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c11" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 +printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } + CC="$CC $ac_cv_prog_cc_c11" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 + ac_prog_cc_stdc=c11 +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 +printf %s "checking for $CC option to enable C99 features... " >&6; } +if test ${ac_cv_prog_cc_c99+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c99=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c99_program +_ACEOF +for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c99=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c99" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC +fi -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} +if test "x$ac_cv_prog_cc_c99" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c99" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 +printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } + CC="$CC $ac_cv_prog_cc_c99" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 + ac_prog_cc_stdc=c99 +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 +printf %s "checking for $CC option to enable C89 features... " >&6; } +if test ${ac_cv_prog_cc_c89+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c89_program _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : + if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_c89=$ac_arg fi -rm -f core conftest.err conftest.$ac_objext +rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC - fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : +if test "x$ac_cv_prog_cc_c89" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c89" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } + CC="$CC $ac_cv_prog_cc_c89" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 + ac_prog_cc_stdc=c89 +fi fi ac_ext=c @@ -5038,21 +5726,23 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -ac_ext=c + + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 -$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } -if ${am_cv_prog_cc_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +printf %s "checking whether $CC understands -c and -o together... " >&6; } +if test ${am_cv_prog_cc_c_o+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; @@ -5080,8 +5770,8 @@ rm -f core conftest* unset am_i fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 -$as_echo "$am_cv_prog_cc_c_o" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +printf "%s\n" "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. @@ -5096,77 +5786,15 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -DEPDIR="${am__leading_dot}deps" - -ac_config_commands="$ac_config_commands depfiles" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 -$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; } -cat > confinc.mk << 'END' -am__doit: - @echo this is the am__doit target >confinc.out -.PHONY: am__doit -END -am__include="#" -am__quote= -# BSD make does it like this. -echo '.include "confinc.mk" # ignored' > confmf.BSD -# Other make implementations (GNU, Solaris 10, AIX) do it like this. -echo 'include confinc.mk # ignored' > confmf.GNU -_am_result=no -for s in GNU BSD; do - { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5 - (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - case $?:`cat confinc.out 2>/dev/null` in #( - '0:this is the am__doit target') : - case $s in #( - BSD) : - am__include='.include' am__quote='"' ;; #( - *) : - am__include='include' am__quote='' ;; -esac ;; #( - *) : - ;; -esac - if test "$am__include" != "#"; then - _am_result="yes ($s style)" - break - fi -done -rm -f confinc.* confmf.* -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 -$as_echo "${_am_result}" >&6; } - -# Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then : - enableval=$enable_dependency_tracking; -fi - -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' - am__nodep='_no' -fi - if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= - AMDEP_FALSE='#' -else - AMDEP_TRUE='#' - AMDEP_FALSE= -fi - - depcc="$CC" am_compiler_list= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if ${am_cv_CC_dependencies_compiler_type+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +printf %s "checking dependency style of $depcc... " >&6; } +if test ${am_cv_CC_dependencies_compiler_type+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For @@ -5273,8 +5901,8 @@ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if @@ -5288,150 +5916,100 @@ fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if ${ac_cv_prog_CPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +printf %s "checking for a sed that does not truncate output... " >&6; } +if test ${ac_cv_path_SED+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in sed gsed + do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_SED" || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + printf %s 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + printf "%s\n" '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + $ac_path_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi else - # Broken: fails on valid input. -continue + ac_cv_path_SED=$SED fi -rm -f conftest.err conftest.i conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break fi -rm -f conftest.err conftest.i conftest.$ac_ext +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +printf "%s\n" "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" - done - ac_cv_prog_CPP=$CPP -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if ${ac_cv_path_GREP+:} false; then : - $as_echo_n "(cached) " >&6 -else + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +printf %s "checking for grep that handles long lines and -e... " >&6; } +if test ${ac_cv_path_GREP+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST @@ -5439,10 +6017,15 @@ for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in grep ggrep + do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + ac_path_GREP="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP @@ -5451,13 +6034,13 @@ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 - $as_echo_n 0123456789 >"conftest.in" + printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" + printf "%s\n" 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val @@ -5485,16 +6068,17 @@ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +printf "%s\n" "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if ${ac_cv_path_EGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +printf %s "checking for egrep... " >&6; } +if test ${ac_cv_path_EGREP+y} +then : + printf %s "(cached) " >&6 +else $as_nop if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else @@ -5505,10 +6089,15 @@ for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in egrep + do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP @@ -5517,13 +6106,13 @@ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 - $as_echo_n 0123456789 >"conftest.in" + printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" + printf "%s\n" 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val @@ -5552,652 +6141,17 @@ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +printf "%s\n" "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" -if test $ac_cv_c_compiler_gnu = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5 -$as_echo_n "checking whether $CC needs -traditional... " >&6; } -if ${ac_cv_prog_gcc_traditional+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_pattern="Autoconf.*'x'" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -Autoconf TIOCGETP -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "$ac_pattern" >/dev/null 2>&1; then : - ac_cv_prog_gcc_traditional=yes -else - ac_cv_prog_gcc_traditional=no -fi -rm -f conftest* - - - if test $ac_cv_prog_gcc_traditional = no; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -Autoconf TCGETA -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "$ac_pattern" >/dev/null 2>&1; then : - ac_cv_prog_gcc_traditional=yes -fi -rm -f conftest* - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5 -$as_echo "$ac_cv_prog_gcc_traditional" >&6; } - if test $ac_cv_prog_gcc_traditional = yes; then - CC="$CC -traditional" - fi -fi - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CXX=$ac_cv_prog_CXX -if test -n "$CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 -$as_echo "$CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CXX" && break - done -fi -if test -z "$CXX"; then - ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CXX"; then - ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CXX="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CXX=$ac_cv_prog_ac_ct_CXX -if test -n "$ac_ct_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 -$as_echo "$ac_ct_CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CXX" && break -done - - if test "x$ac_ct_CXX" = x; then - CXX="g++" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CXX=$ac_ct_CXX - fi -fi - - fi -fi -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 -$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if ${ac_cv_cxx_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_cxx_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 -$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GXX=yes -else - GXX= -fi -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 -$as_echo_n "checking whether $CXX accepts -g... " >&6; } -if ${ac_cv_prog_cxx_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -else - CXXFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - -else - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 -$as_echo "$ac_cv_prog_cxx_g" >&6; } -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -depcc="$CXX" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if ${am_cv_CXX_dependencies_compiler_type+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named 'D' -- because '-MD' means "put the output - # in D". - rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CXX_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with - # Solaris 10 /bin/sh. - echo '/* dummy */' > sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with '-c' and '-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle '-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs. - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # After this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested. - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok '-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CXX_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CXX_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } -CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then - am__fastdepCXX_TRUE= - am__fastdepCXX_FALSE='#' -else - am__fastdepCXX_TRUE='#' - am__fastdepCXX_FALSE= -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - - - -case `pwd` in - *\ * | *\ *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; -esac - - - -macro_version='2.4.6' -macro_revision='2.4.6' - - - - - - - - - - - - - -ltmain=$ac_aux_dir/ltmain.sh - -# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 -$as_echo_n "checking how to print strings... " >&6; } -# Test print first, because it will be a builtin if present. -if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' -elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='printf %s\n' -else - # Use this function as a fallback that always works. - func_fallback_echo () - { - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' - } - ECHO='func_fallback_echo' -fi - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "" -} - -case $ECHO in - printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 -$as_echo "printf" >&6; } ;; - print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 -$as_echo "print -r" >&6; } ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 -$as_echo "cat" >&6; } ;; -esac - - - - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 -$as_echo_n "checking for a sed that does not truncate output... " >&6; } -if ${ac_cv_path_SED+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - { ac_script=; unset ac_script;} - if test -z "$SED"; then - ac_path_SED_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_SED" || continue -# Check for GNU ac_path_SED and select it if it is found. - # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in -*GNU*) - ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo '' >> "conftest.nl" - "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_SED_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_SED="$ac_path_SED" - ac_path_SED_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_SED_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_SED"; then - as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 - fi -else - ac_cv_path_SED=$SED -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -$as_echo "$ac_cv_path_SED" >&6; } - SED="$ac_cv_path_SED" - rm -f conftest.sed - -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 -$as_echo_n "checking for fgrep... " >&6; } -if ${ac_cv_path_FGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 +printf %s "checking for fgrep... " >&6; } +if test ${ac_cv_path_FGREP+y} +then : + printf %s "(cached) " >&6 +else $as_nop if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else @@ -6208,10 +6162,15 @@ for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in fgrep; do + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in fgrep + do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" + ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP @@ -6220,13 +6179,13 @@ ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 - $as_echo_n 0123456789 >"conftest.in" + printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - $as_echo 'FGREP' >> "conftest.nl" + printf "%s\n" 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val @@ -6255,8 +6214,8 @@ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 -$as_echo "$ac_cv_path_FGREP" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 +printf "%s\n" "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" @@ -6281,17 +6240,18 @@ # Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : +if test ${with_gnu_ld+y} +then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes -else +else $as_nop with_gnu_ld=no fi ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +printf %s "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw @@ -6320,15 +6280,16 @@ ;; esac elif test yes = "$with_gnu_ld"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +printf %s "checking for GNU ld... " >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +printf %s "checking for non-GNU ld... " >&6; } fi -if ${lt_cv_path_LD+:} false; then : - $as_echo_n "(cached) " >&6 -else +if test ${lt_cv_path_LD+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do @@ -6357,18 +6318,19 @@ LD=$lt_cv_path_LD if test -n "$LD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 -$as_echo "$LD" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +printf "%s\n" "$LD" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if ${lt_cv_prog_gnu_ld+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +printf %s "checking if the linker ($LD) is GNU ld... " >&6; } +if test ${lt_cv_prog_gnu_ld+y} +then : + printf %s "(cached) " >&6 +else $as_nop # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5 +printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld @@ -6391,11 +6353,12 @@ -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 -$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if ${lt_cv_path_NM+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 +printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; } +if test ${lt_cv_path_NM+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM @@ -6420,13 +6383,13 @@ mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac - case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in + case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 @@ -6445,8 +6408,8 @@ : ${lt_cv_path_NM=no} fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 -$as_echo "$lt_cv_path_NM" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 +printf "%s\n" "$lt_cv_path_NM" >&6; } if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else @@ -6459,11 +6422,12 @@ do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_DUMPBIN+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else @@ -6471,11 +6435,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6486,11 +6454,11 @@ fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 -$as_echo "$DUMPBIN" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 +printf "%s\n" "$DUMPBIN" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -6503,11 +6471,12 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_DUMPBIN+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else @@ -6515,11 +6484,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6530,11 +6503,11 @@ fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 -$as_echo "$ac_ct_DUMPBIN" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 +printf "%s\n" "$ac_ct_DUMPBIN" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -6546,15 +6519,15 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi - case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in + case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; @@ -6575,11 +6548,12 @@ -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 -$as_echo_n "checking the name lister ($NM) interface... " >&6; } -if ${lt_cv_nm_interface+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 +printf %s "checking the name lister ($NM) interface... " >&6; } +if test ${lt_cv_nm_interface+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) @@ -6595,26 +6569,27 @@ fi rm -f conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 -$as_echo "$lt_cv_nm_interface" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 +printf "%s\n" "$lt_cv_nm_interface" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +printf %s "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +printf "%s\n" "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 -$as_echo_n "checking the maximum length of command line arguments... " >&6; } -if ${lt_cv_sys_max_cmd_len+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 +printf %s "checking the maximum length of command line arguments... " >&6; } +if test ${lt_cv_sys_max_cmd_len+y} +then : + printf %s "(cached) " >&6 +else $as_nop i=0 teststring=ABCD @@ -6656,7 +6631,7 @@ lt_cv_sys_max_cmd_len=8192; ;; - bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) + bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` @@ -6699,7 +6674,7 @@ sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` + lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi @@ -6741,11 +6716,11 @@ fi if test -n "$lt_cv_sys_max_cmd_len"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 -$as_echo "$lt_cv_sys_max_cmd_len" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 +printf "%s\n" "$lt_cv_sys_max_cmd_len" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 -$as_echo "none" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5 +printf "%s\n" "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len @@ -6789,11 +6764,12 @@ -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 -$as_echo_n "checking how to convert $build file names to $host format... " >&6; } -if ${lt_cv_to_host_file_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 +printf %s "checking how to convert $build file names to $host format... " >&6; } +if test ${lt_cv_to_host_file_cmd+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $host in *-*-mingw* ) case $build in @@ -6829,18 +6805,19 @@ fi to_host_file_cmd=$lt_cv_to_host_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 -$as_echo "$lt_cv_to_host_file_cmd" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 +printf "%s\n" "$lt_cv_to_host_file_cmd" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 -$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } -if ${lt_cv_to_tool_file_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 +printf %s "checking how to convert $build file names to toolchain format... " >&6; } +if test ${lt_cv_to_tool_file_cmd+y} +then : + printf %s "(cached) " >&6 +else $as_nop #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in @@ -6856,22 +6833,23 @@ fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 -$as_echo "$lt_cv_to_tool_file_cmd" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 +printf "%s\n" "$lt_cv_to_tool_file_cmd" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 -$as_echo_n "checking for $LD option to reload object files... " >&6; } -if ${lt_cv_ld_reload_flag+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 +printf %s "checking for $LD option to reload object files... " >&6; } +if test ${lt_cv_ld_reload_flag+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_ld_reload_flag='-r' fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 -$as_echo "$lt_cv_ld_reload_flag" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 +printf "%s\n" "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; @@ -6902,13 +6880,122 @@ if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}file", so it can be a program name with args. +set dummy ${ac_tool_prefix}file; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_FILECMD+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$FILECMD"; then + ac_cv_prog_FILECMD="$FILECMD" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_FILECMD="${ac_tool_prefix}file" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +FILECMD=$ac_cv_prog_FILECMD +if test -n "$FILECMD"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FILECMD" >&5 +printf "%s\n" "$FILECMD" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_FILECMD"; then + ac_ct_FILECMD=$FILECMD + # Extract the first word of "file", so it can be a program name with args. +set dummy file; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_FILECMD+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_FILECMD"; then + ac_cv_prog_ac_ct_FILECMD="$ac_ct_FILECMD" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_FILECMD="file" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_FILECMD=$ac_cv_prog_ac_ct_FILECMD +if test -n "$ac_ct_FILECMD"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FILECMD" >&5 +printf "%s\n" "$ac_ct_FILECMD" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + if test "x$ac_ct_FILECMD" = x; then + FILECMD=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + FILECMD=$ac_ct_FILECMD + fi +else + FILECMD="$ac_cv_prog_FILECMD" +fi + + + + + + + +if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_OBJDUMP+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else @@ -6916,11 +7003,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6931,11 +7022,11 @@ fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +printf "%s\n" "$OBJDUMP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -6944,11 +7035,12 @@ ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_OBJDUMP+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else @@ -6956,11 +7048,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6971,11 +7067,11 @@ fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +printf "%s\n" "$ac_ct_OBJDUMP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then @@ -6983,8 +7079,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP @@ -7000,11 +7096,12 @@ -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 -$as_echo_n "checking how to recognize dependent libraries... " >&6; } -if ${lt_cv_deplibs_check_method+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 +printf %s "checking how to recognize dependent libraries... " >&6; } +if test ${lt_cv_deplibs_check_method+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' @@ -7030,7 +7127,7 @@ bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_cmd='$FILECMD -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; @@ -7064,14 +7161,14 @@ lt_cv_deplibs_check_method=pass_all ;; -freebsd* | dragonfly*) +freebsd* | dragonfly* | midnightbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_cmd=$FILECMD lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac @@ -7085,7 +7182,7 @@ ;; hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_cmd=$FILECMD case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' @@ -7132,7 +7229,7 @@ newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_cmd=$FILECMD lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; @@ -7200,8 +7297,8 @@ esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 -$as_echo "$lt_cv_deplibs_check_method" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 +printf "%s\n" "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no @@ -7245,11 +7342,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_DLLTOOL+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else @@ -7257,11 +7355,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7272,11 +7374,11 @@ fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -$as_echo "$DLLTOOL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +printf "%s\n" "$DLLTOOL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -7285,11 +7387,12 @@ ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_DLLTOOL+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else @@ -7297,11 +7400,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7312,11 +7419,11 @@ fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -$as_echo "$ac_ct_DLLTOOL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +printf "%s\n" "$ac_ct_DLLTOOL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then @@ -7324,8 +7431,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL @@ -7342,11 +7449,12 @@ -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 -$as_echo_n "checking how to associate runtime and link libraries... " >&6; } -if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 +printf %s "checking how to associate runtime and link libraries... " >&6; } +if test ${lt_cv_sharedlib_from_linklib_cmd+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in @@ -7369,8 +7477,8 @@ esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 -$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 +printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO @@ -7380,16 +7488,18 @@ + if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_AR+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else @@ -7397,11 +7507,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7412,11 +7526,11 @@ fi AR=$ac_cv_prog_AR if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +printf "%s\n" "$AR" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -7429,11 +7543,12 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_AR+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else @@ -7441,11 +7556,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7456,11 +7575,11 @@ fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +printf "%s\n" "$ac_ct_AR" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -7472,8 +7591,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR @@ -7481,42 +7600,60 @@ fi : ${AR=ar} -: ${AR_FLAGS=cru} +# Use ARFLAGS variable as AR's operation code to sync the variable naming with +# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have +# higher priority because thats what people were doing historically (setting +# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS +# variable obsoleted/removed. +test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} +lt_ar_flags=$AR_FLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 -$as_echo_n "checking for archiver @FILE support... " >&6; } -if ${lt_cv_ar_at_file+:} false; then : - $as_echo_n "(cached) " >&6 -else + + +# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override +# by AR_FLAGS because that was never working and AR_FLAGS is about to die. + + + + + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 +printf %s "checking for archiver @FILE support... " >&6; } +if test ${lt_cv_ar_at_file+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. @@ -7524,7 +7661,7 @@ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ @@ -7533,11 +7670,11 @@ rm -f conftest.* libconftest.a fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 -$as_echo "$lt_cv_ar_at_file" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 +printf "%s\n" "$lt_cv_ar_at_file" >&6; } if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= @@ -7554,11 +7691,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_STRIP+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else @@ -7566,11 +7704,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7581,11 +7723,11 @@ fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +printf "%s\n" "$STRIP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -7594,11 +7736,12 @@ ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_STRIP+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else @@ -7606,11 +7749,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7621,11 +7768,11 @@ fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +printf "%s\n" "$ac_ct_STRIP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then @@ -7633,8 +7780,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP @@ -7653,11 +7800,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_RANLIB+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else @@ -7665,11 +7813,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7680,11 +7832,11 @@ fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +printf "%s\n" "$RANLIB" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -7693,11 +7845,12 @@ ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_RANLIB+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else @@ -7705,11 +7858,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7720,11 +7877,11 @@ fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +printf "%s\n" "$ac_ct_RANLIB" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then @@ -7732,8 +7889,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB @@ -7822,11 +7979,12 @@ # Check for command to grab the raw symbol name followed by C symbol from nm. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 -$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if ${lt_cv_sys_global_symbol_pipe+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 +printf %s "checking command to parse $NM output from $compiler object... " >&6; } +if test ${lt_cv_sys_global_symbol_pipe+y} +then : + printf %s "(cached) " >&6 +else $as_nop # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] @@ -7881,7 +8039,7 @@ if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. - lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" + lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" @@ -7899,20 +8057,20 @@ # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n"\ +lt_cv_sys_global_symbol_to_cdecl="$SED -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ +lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ @@ -7936,7 +8094,7 @@ if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. - # Also find C++ and __fastcall symbols from MSVC++, + # Also find C++ and __fastcall symbols from MSVC++ or ICC, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ @@ -7954,9 +8112,9 @@ " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no @@ -7978,14 +8136,14 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then @@ -8054,7 +8212,7 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then pipe_works=yes fi @@ -8089,11 +8247,11 @@ lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -$as_echo "failed" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5 +printf "%s\n" "failed" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +printf "%s\n" "ok" >&6; } fi # Response file support. @@ -8139,13 +8297,14 @@ -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 -$as_echo_n "checking for sysroot... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 +printf %s "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. -if test "${with_sysroot+set}" = set; then : +if test ${with_sysroot+y} +then : withval=$with_sysroot; -else +else $as_nop with_sysroot=no fi @@ -8158,29 +8317,30 @@ fi ;; #( /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 -$as_echo "$with_sysroot" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 +printf "%s\n" "$with_sysroot" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 -$as_echo "${lt_sysroot:-no}" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 +printf "%s\n" "${lt_sysroot:-no}" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 -$as_echo_n "checking for a working dd... " >&6; } -if ${ac_cv_path_lt_DD+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 +printf %s "checking for a working dd... " >&6; } +if test ${ac_cv_path_lt_DD+y} +then : + printf %s "(cached) " >&6 +else $as_nop printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} @@ -8191,10 +8351,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in dd; do + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in dd + do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" + ac_path_lt_DD="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_lt_DD" || continue if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ @@ -8214,15 +8379,16 @@ rm -f conftest.i conftest2.i conftest.out fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 -$as_echo "$ac_cv_path_lt_DD" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 +printf "%s\n" "$ac_cv_path_lt_DD" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 -$as_echo_n "checking how to truncate binary pipes... " >&6; } -if ${lt_cv_truncate_bin+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 +printf %s "checking how to truncate binary pipes... " >&6; } +if test ${lt_cv_truncate_bin+y} +then : + printf %s "(cached) " >&6 +else $as_nop printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= @@ -8233,8 +8399,8 @@ rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 -$as_echo "$lt_cv_truncate_bin" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 +printf "%s\n" "$lt_cv_truncate_bin" >&6; } @@ -8257,7 +8423,8 @@ } # Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then : +if test ${enable_libtool_lock+y} +then : enableval=$enable_libtool_lock; fi @@ -8273,9 +8440,9 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; @@ -8293,10 +8460,10 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test yes = "$lt_cv_prog_gnu_ld"; then - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; @@ -8308,7 +8475,7 @@ ;; esac else - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; @@ -8331,10 +8498,10 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then emul=elf - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; @@ -8342,7 +8509,7 @@ emul="${emul}64" ;; esac - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; @@ -8350,7 +8517,7 @@ emul="${emul}ltsmip" ;; esac - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; @@ -8372,16 +8539,16 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in + case `$FILECMD conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) - case `/usr/bin/file conftest.o` in + case `$FILECMD conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; @@ -8435,11 +8602,12 @@ # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 -$as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if ${lt_cv_cc_needs_belf+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 +printf %s "checking whether the C compiler needs -belf... " >&6; } +if test ${lt_cv_cc_needs_belf+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -8450,19 +8618,20 @@ /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : lt_cv_cc_needs_belf=yes -else +else $as_nop lt_cv_cc_needs_belf=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -8471,8 +8640,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 -$as_echo "$lt_cv_cc_needs_belf" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 +printf "%s\n" "$lt_cv_cc_needs_belf" >&6; } if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS @@ -8485,9 +8654,9 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in + case `$FILECMD conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) @@ -8522,11 +8691,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_MANIFEST_TOOL+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else @@ -8534,11 +8704,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8549,11 +8723,11 @@ fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 -$as_echo "$MANIFEST_TOOL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 +printf "%s\n" "$MANIFEST_TOOL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -8562,11 +8736,12 @@ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else @@ -8574,11 +8749,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8589,11 +8768,11 @@ fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 -$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 +printf "%s\n" "$ac_ct_MANIFEST_TOOL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then @@ -8601,8 +8780,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL @@ -8612,11 +8791,12 @@ fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 -$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -if ${lt_cv_path_mainfest_tool+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 +printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } +if test ${lt_cv_path_mainfest_tool+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out @@ -8626,8 +8806,8 @@ fi rm -f conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 -$as_echo "$lt_cv_path_mainfest_tool" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 +printf "%s\n" "$lt_cv_path_mainfest_tool" >&6; } if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi @@ -8642,11 +8822,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DSYMUTIL+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_DSYMUTIL+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else @@ -8654,11 +8835,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8669,11 +8854,11 @@ fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 -$as_echo "$DSYMUTIL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 +printf "%s\n" "$DSYMUTIL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -8682,11 +8867,12 @@ ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_DSYMUTIL+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else @@ -8694,11 +8880,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8709,11 +8899,11 @@ fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 -$as_echo "$ac_ct_DSYMUTIL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 +printf "%s\n" "$ac_ct_DSYMUTIL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then @@ -8721,8 +8911,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL @@ -8734,11 +8924,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_NMEDIT+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_NMEDIT+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else @@ -8746,11 +8937,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8761,11 +8956,11 @@ fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 -$as_echo "$NMEDIT" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 +printf "%s\n" "$NMEDIT" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -8774,11 +8969,12 @@ ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_NMEDIT+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else @@ -8786,11 +8982,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8801,11 +9001,11 @@ fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 -$as_echo "$ac_ct_NMEDIT" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 +printf "%s\n" "$ac_ct_NMEDIT" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then @@ -8813,8 +9013,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT @@ -8826,11 +9026,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_LIPO+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_LIPO+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else @@ -8838,11 +9039,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8853,11 +9058,11 @@ fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 -$as_echo "$LIPO" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 +printf "%s\n" "$LIPO" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -8866,11 +9071,12 @@ ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_LIPO+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_LIPO+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else @@ -8878,11 +9084,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8893,11 +9103,11 @@ fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 -$as_echo "$ac_ct_LIPO" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 +printf "%s\n" "$ac_ct_LIPO" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then @@ -8905,8 +9115,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO @@ -8918,11 +9128,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_OTOOL+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else @@ -8930,11 +9141,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8945,11 +9160,11 @@ fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 -$as_echo "$OTOOL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 +printf "%s\n" "$OTOOL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -8958,11 +9173,12 @@ ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_OTOOL+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else @@ -8970,11 +9186,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8985,11 +9205,11 @@ fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 -$as_echo "$ac_ct_OTOOL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 +printf "%s\n" "$ac_ct_OTOOL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then @@ -8997,8 +9217,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL @@ -9010,11 +9230,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OTOOL64+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_OTOOL64+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else @@ -9022,11 +9243,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9037,11 +9262,11 @@ fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 -$as_echo "$OTOOL64" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 +printf "%s\n" "$OTOOL64" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -9050,11 +9275,12 @@ ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_OTOOL64+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else @@ -9062,11 +9288,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9077,11 +9307,11 @@ fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 -$as_echo "$ac_ct_OTOOL64" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 +printf "%s\n" "$ac_ct_OTOOL64" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then @@ -9089,8 +9319,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 @@ -9125,11 +9355,12 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 -$as_echo_n "checking for -single_module linker flag... " >&6; } -if ${lt_cv_apple_cc_single_mod+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 +printf %s "checking for -single_module linker flag... " >&6; } +if test ${lt_cv_apple_cc_single_mod+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override @@ -9158,14 +9389,15 @@ rm -f conftest.* fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 -$as_echo "$lt_cv_apple_cc_single_mod" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 +printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 -$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if ${lt_cv_ld_exported_symbols_list+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 +printf %s "checking for -exported_symbols_list linker flag... " >&6; } +if test ${lt_cv_ld_exported_symbols_list+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym @@ -9174,39 +9406,41 @@ /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : lt_cv_ld_exported_symbols_list=yes -else +else $as_nop lt_cv_ld_exported_symbols_list=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 -$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 +printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 -$as_echo_n "checking for -force_load linker flag... " >&6; } -if ${lt_cv_ld_force_load+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 +printf %s "checking for -force_load linker flag... " >&6; } +if test ${lt_cv_ld_force_load+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 + echo "$AR $AR_FLAGS libconftest.a conftest.o" >&5 + $AR $AR_FLAGS libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF @@ -9226,24 +9460,19 @@ rm -rf conftest.dSYM fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 -$as_echo "$lt_cv_ld_force_load" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 +printf "%s\n" "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - 10.[012][,.]*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + darwin*) + case $MACOSX_DEPLOYMENT_TARGET,$host in + 10.[012],*|,*powerpc*-darwin[5-8]*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + *) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac @@ -9298,164 +9527,378 @@ esac } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include +ac_header= ac_cache= +for ac_item in $ac_header_c_list +do + if test $ac_cache; then + ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" + if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then + printf "%s\n" "#define $ac_item 1" >> confdefs.h + fi + ac_header= ac_cache= + elif test $ac_header; then + ac_cache=$ac_item + else + ac_header=$ac_item + fi +done -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no + + + + + + +if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes +then : + +printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h + fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default +" +if test "x$ac_cv_header_dlfcn_h" = xyes +then : + printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include +fi -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : + + + +# Set options +enable_win32_dll=yes + +case $host in +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. +set dummy ${ac_tool_prefix}as; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_AS+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$AS"; then + ac_cv_prog_AS="$AS" # Let the user override the test. else - ac_cv_header_stdc=no -fi -rm -f conftest* +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_AS="${ac_tool_prefix}as" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS fi +fi +AS=$ac_cv_prog_AS +if test -n "$AS"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 +printf "%s\n" "$AS" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : +fi +if test -z "$ac_cv_prog_AS"; then + ac_ct_AS=$AS + # Extract the first word of "as", so it can be a program name with args. +set dummy as; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_AS+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_AS"; then + ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AS="as" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS +fi +fi +ac_ct_AS=$ac_cv_prog_ac_ct_AS +if test -n "$ac_ct_AS"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 +printf "%s\n" "$ac_ct_AS" >&6; } else - ac_cv_header_stdc=no + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f conftest* + if test "x$ac_ct_AS" = x; then + AS="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AS=$ac_ct_AS + fi +else + AS="$ac_cv_prog_AS" fi -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_DLLTOOL+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +printf "%s\n" "$DLLTOOL" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_DLLTOOL+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +printf "%s\n" "$ac_ct_DLLTOOL" >&6; } else - ac_cv_header_stdc=no + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" fi + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_OBJDUMP+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi fi +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +printf "%s\n" "$OBJDUMP" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then -$as_echo "#define STDC_HEADERS 1" >>confdefs.h fi +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_OBJDUMP+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OBJDUMP="objdump" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +fi +fi +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +printf "%s\n" "$ac_ct_OBJDUMP" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OBJDUMP=$ac_ct_OBJDUMP + fi +else + OBJDUMP="$ac_cv_prog_OBJDUMP" fi -done + ;; +esac +test -z "$AS" && AS=as -for ac_header in dlfcn.h -do : - ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default -" -if test "x$ac_cv_header_dlfcn_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DLFCN_H 1 -_ACEOF -fi -done +test -z "$DLLTOOL" && DLLTOOL=dlltool + -func_stripname_cnf () -{ - case $2 in - .*) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%\\\\$2\$%%"`;; - *) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%$2\$%%"`;; - esac -} # func_stripname_cnf +test -z "$OBJDUMP" && OBJDUMP=objdump + -# Set options @@ -9464,7 +9907,8 @@ # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then : +if test ${enable_shared+y} +then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; @@ -9482,7 +9926,7 @@ IFS=$lt_save_ifs ;; esac -else +else $as_nop enable_shared=yes fi @@ -9495,7 +9939,8 @@ # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then : +if test ${enable_static+y} +then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; @@ -9513,7 +9958,7 @@ IFS=$lt_save_ifs ;; esac -else +else $as_nop enable_static=yes fi @@ -9527,7 +9972,8 @@ # Check whether --with-pic was given. -if test "${with_pic+set}" = set; then : +if test ${with_pic+y} +then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; @@ -9544,7 +9990,7 @@ IFS=$lt_save_ifs ;; esac -else +else $as_nop pic_mode=default fi @@ -9556,7 +10002,8 @@ # Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then : +if test ${enable_fast_install+y} +then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; @@ -9574,7 +10021,7 @@ IFS=$lt_save_ifs ;; esac -else +else $as_nop enable_fast_install=yes fi @@ -9588,11 +10035,12 @@ shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[5-9]*,yes) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 -$as_echo_n "checking which variant of shared library versioning to provide... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 +printf %s "checking which variant of shared library versioning to provide... " >&6; } # Check whether --with-aix-soname was given. -if test "${with_aix_soname+set}" = set; then : +if test ${with_aix_soname+y} +then : withval=$with_aix_soname; case $withval in aix|svr4|both) ;; @@ -9601,18 +10049,19 @@ ;; esac lt_cv_with_aix_soname=$with_aix_soname -else - if ${lt_cv_with_aix_soname+:} false; then : - $as_echo_n "(cached) " >&6 -else +else $as_nop + if test ${lt_cv_with_aix_soname+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_with_aix_soname=aix fi with_aix_soname=$lt_cv_with_aix_soname fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 -$as_echo "$with_aix_soname" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 +printf "%s\n" "$with_aix_soname" >&6; } if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', @@ -9694,11 +10143,12 @@ setopt NO_GLOB_SUBST fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 -$as_echo_n "checking for objdir... " >&6; } -if ${lt_cv_objdir+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 +printf %s "checking for objdir... " >&6; } +if test ${lt_cv_objdir+y} +then : + printf %s "(cached) " >&6 +else $as_nop rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then @@ -9709,17 +10159,15 @@ fi rmdir .libs 2>/dev/null fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 -$as_echo "$lt_cv_objdir" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 +printf "%s\n" "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir -cat >>confdefs.h <<_ACEOF -#define LT_OBJDIR "$lt_cv_objdir/" -_ACEOF +printf "%s\n" "#define LT_OBJDIR \"$lt_cv_objdir/\"" >>confdefs.h @@ -9740,8 +10188,8 @@ ofile=libtool can_build_shared=yes -# All known linkers require a '.a' archive for static linking (except MSVC, -# which needs '.lib'). +# All known linkers require a '.a' archive for static linking (except MSVC and +# ICC, which need '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld @@ -9765,11 +10213,12 @@ case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 -$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if ${lt_cv_path_MAGIC_CMD+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 +printf %s "checking for ${ac_tool_prefix}file... " >&6; } +if test ${lt_cv_path_MAGIC_CMD+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. @@ -9818,11 +10267,11 @@ MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +printf "%s\n" "$MAGIC_CMD" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -9831,11 +10280,12 @@ if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 -$as_echo_n "checking for file... " >&6; } -if ${lt_cv_path_MAGIC_CMD+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for file" >&5 +printf %s "checking for file... " >&6; } +if test ${lt_cv_path_MAGIC_CMD+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. @@ -9884,11 +10334,11 @@ MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +printf "%s\n" "$MAGIC_CMD" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -9973,11 +10423,12 @@ lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } +if test ${lt_cv_prog_compiler_rtti_exceptions+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext @@ -10008,8 +10459,8 @@ $RM conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" @@ -10250,7 +10701,7 @@ lt_prog_compiler_static='-qstaticlink' ;; *) - case `$CC -V 2>&1 | sed 5q` in + case `$CC -V 2>&1 | $SED 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' @@ -10366,26 +10817,28 @@ ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -if ${lt_cv_prog_compiler_pic+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +printf %s "checking for $compiler option to produce PIC... " >&6; } +if test ${lt_cv_prog_compiler_pic+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 -$as_echo "$lt_cv_prog_compiler_pic" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 +printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if ${lt_cv_prog_compiler_pic_works+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } +if test ${lt_cv_prog_compiler_pic_works+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext @@ -10416,8 +10869,8 @@ $RM conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 +printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; } if test yes = "$lt_cv_prog_compiler_pic_works"; then case $lt_prog_compiler_pic in @@ -10445,11 +10898,12 @@ # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if ${lt_cv_prog_compiler_static_works+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if test ${lt_cv_prog_compiler_static_works+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_prog_compiler_static_works=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" @@ -10473,8 +10927,8 @@ LDFLAGS=$save_LDFLAGS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 -$as_echo "$lt_cv_prog_compiler_static_works" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 +printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; } if test yes = "$lt_cv_prog_compiler_static_works"; then : @@ -10488,11 +10942,12 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if test ${lt_cv_prog_compiler_c_o+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest @@ -10535,19 +10990,20 @@ $RM conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if test ${lt_cv_prog_compiler_c_o+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest @@ -10590,8 +11046,8 @@ $RM conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } @@ -10599,19 +11055,19 @@ hard_links=nottested if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +printf %s "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +printf "%s\n" "$hard_links" >&6; } if test no = "$hard_links"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 +printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else @@ -10623,8 +11079,8 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= @@ -10668,15 +11124,15 @@ case $host_os in cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time + # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. + # Microsoft Visual C++ or Intel C++ Compiler. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) + # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) with_gnu_ld=yes ;; openbsd* | bitrig*) @@ -10728,7 +11184,7 @@ whole_archive_flag_spec= fi supports_anon_versioning=no - case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in + case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... @@ -10840,6 +11296,7 @@ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes + file_list_spec='@' ;; interix[3-9]*) @@ -10854,7 +11311,7 @@ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) @@ -10897,7 +11354,7 @@ compiler_needs_object=yes ;; esac - case `$CC -V 2>&1 | sed 5q` in + case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes @@ -10909,7 +11366,7 @@ if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi @@ -10925,7 +11382,7 @@ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi @@ -11057,7 +11514,7 @@ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else - export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' + export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no @@ -11179,21 +11636,23 @@ if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else - if ${lt_cv_aix_libpath_+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test ${lt_cv_aix_libpath_+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -11208,7 +11667,7 @@ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib @@ -11232,21 +11691,23 @@ if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else - if ${lt_cv_aix_libpath_+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test ${lt_cv_aix_libpath_+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -11261,7 +11722,7 @@ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib @@ -11324,12 +11785,12 @@ cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. + # Microsoft Visual C++ or Intel C++ Compiler. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in - cl*) - # Native MSVC + cl* | icl*) + # Native MSVC or ICC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes @@ -11370,7 +11831,7 @@ fi' ;; *) - # Assume MSVC wrapper + # Assume MSVC and ICC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. @@ -11411,8 +11872,8 @@ output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" + archive_expsym_cmds="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + module_expsym_cmds="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" else ld_shlibs=no @@ -11446,7 +11907,7 @@ ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) + freebsd* | dragonfly* | midnightbsd*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes @@ -11512,11 +11973,12 @@ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 -$as_echo_n "checking if $CC understands -b... " >&6; } -if ${lt_cv_prog_compiler__b+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 +printf %s "checking if $CC understands -b... " >&6; } +if test ${lt_cv_prog_compiler__b+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_prog_compiler__b=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -b" @@ -11540,8 +12002,8 @@ LDFLAGS=$save_LDFLAGS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 -$as_echo "$lt_cv_prog_compiler__b" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 +printf "%s\n" "$lt_cv_prog_compiler__b" >&6; } if test yes = "$lt_cv_prog_compiler__b"; then archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' @@ -11581,28 +12043,30 @@ # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -if ${lt_cv_irix_exported_symbol+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if test ${lt_cv_irix_exported_symbol+y} +then : + printf %s "(cached) " >&6 +else $as_nop save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : lt_cv_irix_exported_symbol=yes -else +else $as_nop lt_cv_irix_exported_symbol=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -$as_echo "$lt_cv_irix_exported_symbol" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } if test yes = "$lt_cv_irix_exported_symbol"; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi @@ -11694,6 +12158,7 @@ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes + file_list_spec='@' ;; osf3*) @@ -11882,8 +12347,8 @@ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 -$as_echo "$ld_shlibs" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 +printf "%s\n" "$ld_shlibs" >&6; } test no = "$ld_shlibs" && can_build_shared=no with_gnu_ld=$with_gnu_ld @@ -11919,18 +12384,19 @@ # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } -if ${lt_cv_archive_cmds_need_lc+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +printf %s "checking whether -lc should be explicitly linked in... " >&6; } +if test ${lt_cv_archive_cmds_need_lc+y} +then : + printf %s "(cached) " >&6 +else $as_nop $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest @@ -11948,7 +12414,7 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no @@ -11962,8 +12428,8 @@ $RM conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 -$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 +printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac @@ -12122,8 +12588,8 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +printf %s "checking dynamic linker characteristics... " >&6; } if test yes = "$GCC"; then case $host_os in @@ -12385,7 +12851,7 @@ case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; @@ -12395,14 +12861,14 @@ ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; - *,cl*) - # Native MSVC + *,cl* | *,icl*) + # Native MSVC or ICC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' @@ -12421,7 +12887,7 @@ done IFS=$lt_save_ifs # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form @@ -12458,7 +12924,7 @@ ;; *) - # Assume MSVC wrapper + # Assume MSVC and ICC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; @@ -12491,7 +12957,7 @@ shlibpath_var=LD_LIBRARY_PATH ;; -freebsd* | dragonfly*) +freebsd* | dragonfly* | midnightbsd*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then @@ -12684,9 +13150,10 @@ shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH - if ${lt_cv_shlibpath_overrides_runpath+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test ${lt_cv_shlibpath_overrides_runpath+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir @@ -12696,19 +13163,21 @@ /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : +if ac_fn_c_try_link "$LINENO" +then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null +then : lt_cv_shlibpath_overrides_runpath=yes fi fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir @@ -12943,8 +13412,8 @@ dynamic_linker=no ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +printf "%s\n" "$dynamic_linker" >&6; } test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" @@ -13065,8 +13534,8 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +printf %s "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || @@ -13090,8 +13559,8 @@ # directories. hardcode_action=unsupported fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 -$as_echo "$hardcode_action" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 +printf "%s\n" "$hardcode_action" >&6; } if test relink = "$hardcode_action" || test yes = "$inherit_rpath"; then @@ -13135,11 +13604,12 @@ darwin*) # if libdl is installed we need to link against it - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +printf %s "checking for dlopen in -ldl... " >&6; } +if test ${ac_cv_lib_dl_dlopen+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13148,32 +13618,31 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char dlopen (); int -main () +main (void) { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_dl_dlopen=yes -else +else $as_nop ac_cv_lib_dl_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes +then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl -else +else $as_nop lt_cv_dlopen=dyld lt_cv_dlopen_libs= @@ -13193,14 +13662,16 @@ *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = xyes; then : +if test "x$ac_cv_func_shl_load" = xyes +then : lt_cv_dlopen=shl_load -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 -$as_echo_n "checking for shl_load in -ldld... " >&6; } -if ${ac_cv_lib_dld_shl_load+:} false; then : - $as_echo_n "(cached) " >&6 -else +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 +printf %s "checking for shl_load in -ldld... " >&6; } +if test ${ac_cv_lib_dld_shl_load+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13209,41 +13680,42 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char shl_load (); int -main () +main (void) { return shl_load (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_dld_shl_load=yes -else +else $as_nop ac_cv_lib_dld_shl_load=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 -$as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 +printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = xyes +then : lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld -else +else $as_nop ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = xyes; then : +if test "x$ac_cv_func_dlopen" = xyes +then : lt_cv_dlopen=dlopen -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +printf %s "checking for dlopen in -ldl... " >&6; } +if test ${ac_cv_lib_dl_dlopen+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13252,37 +13724,37 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char dlopen (); int -main () +main (void) { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_dl_dlopen=yes -else +else $as_nop ac_cv_lib_dl_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes +then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 -$as_echo_n "checking for dlopen in -lsvld... " >&6; } -if ${ac_cv_lib_svld_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 +printf %s "checking for dlopen in -lsvld... " >&6; } +if test ${ac_cv_lib_svld_dlopen+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13291,37 +13763,37 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char dlopen (); int -main () +main (void) { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_svld_dlopen=yes -else +else $as_nop ac_cv_lib_svld_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 -$as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 +printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; } +if test "x$ac_cv_lib_svld_dlopen" = xyes +then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 -$as_echo_n "checking for dld_link in -ldld... " >&6; } -if ${ac_cv_lib_dld_dld_link+:} false; then : - $as_echo_n "(cached) " >&6 -else +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 +printf %s "checking for dld_link in -ldld... " >&6; } +if test ${ac_cv_lib_dld_dld_link+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13330,30 +13802,29 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char dld_link (); int -main () +main (void) { return dld_link (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_dld_dld_link=yes -else +else $as_nop ac_cv_lib_dld_dld_link=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 -$as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 +printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; } +if test "x$ac_cv_lib_dld_dld_link" = xyes +then : lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld fi @@ -13392,11 +13863,12 @@ save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 -$as_echo_n "checking whether a program can dlopen itself... " >&6; } -if ${lt_cv_dlopen_self+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 +printf %s "checking whether a program can dlopen itself... " >&6; } +if test ${lt_cv_dlopen_self+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test yes = "$cross_compiling"; then : lt_cv_dlopen_self=cross else @@ -13475,7 +13947,7 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? @@ -13493,16 +13965,17 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 -$as_echo "$lt_cv_dlopen_self" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 +printf "%s\n" "$lt_cv_dlopen_self" >&6; } if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 -$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if ${lt_cv_dlopen_self_static+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 +printf %s "checking whether a statically linked program can dlopen itself... " >&6; } +if test ${lt_cv_dlopen_self_static+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test yes = "$cross_compiling"; then : lt_cv_dlopen_self_static=cross else @@ -13581,7 +14054,7 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? @@ -13599,8 +14072,8 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 -$as_echo "$lt_cv_dlopen_self_static" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 +printf "%s\n" "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS=$save_CPPFLAGS @@ -13638,32 +14111,43 @@ striplib= old_striplib= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 -$as_echo_n "checking whether stripping libraries is possible... " >&6; } -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP"; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 +printf %s "checking whether stripping libraries is possible... " >&6; } +if test -z "$STRIP"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +else + if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + old_striplib="$STRIP --strip-debug" + striplib="$STRIP --strip-unneeded" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + else + case $host_os in + darwin*) + # FIXME - insert some real tests, host_os isn't really good enough striplib="$STRIP -x" old_striplib="$STRIP -S" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - esac + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + ;; + freebsd*) + if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then + old_striplib="$STRIP --strip-debug" + striplib="$STRIP --strip-unneeded" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + fi + ;; + *) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; + esac + fi fi @@ -13678,13 +14162,13 @@ # Report what library types will actually be built - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 -$as_echo_n "checking if libtool supports shared libraries... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 -$as_echo "$can_build_shared" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 +printf %s "checking if libtool supports shared libraries... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 +printf "%s\n" "$can_build_shared" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 -$as_echo_n "checking whether to build shared libraries... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 +printf %s "checking whether to build shared libraries... " >&6; } test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and @@ -13708,15 +14192,15 @@ fi ;; esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -$as_echo "$enable_shared" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 +printf "%s\n" "$enable_shared" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 -$as_echo_n "checking whether to build static libraries... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 +printf %s "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -$as_echo "$enable_static" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 +printf "%s\n" "$enable_static" >&6; } @@ -13730,6 +14214,1642 @@ CC=$lt_save_CC + + + + + + + + + + + + + + + ac_config_commands="$ac_config_commands libtool" + + + + +# Only expand once: + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. +set dummy ${ac_tool_prefix}clang; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}clang" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "clang", so it can be a program name with args. +set dummy clang; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="clang" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +fi + + +test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } + +# Provide some information about the compiler. +printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion -version; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 +printf %s "checking whether the compiler supports GNU C... " >&6; } +if test ${ac_cv_c_compiler_gnu+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_compiler_gnu=yes +else $as_nop + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+y} +ac_save_CFLAGS=$CFLAGS +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +printf %s "checking whether $CC accepts -g... " >&6; } +if test ${ac_cv_prog_cc_g+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_g=yes +else $as_nop + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + +else $as_nop + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +printf "%s\n" "$ac_cv_prog_cc_g" >&6; } +if test $ac_test_CFLAGS; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +ac_prog_cc_stdc=no +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 +printf %s "checking for $CC option to enable C11 features... " >&6; } +if test ${ac_cv_prog_cc_c11+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c11=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c11_program +_ACEOF +for ac_arg in '' -std=gnu11 +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c11=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c11" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC +fi + +if test "x$ac_cv_prog_cc_c11" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c11" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 +printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } + CC="$CC $ac_cv_prog_cc_c11" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 + ac_prog_cc_stdc=c11 +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 +printf %s "checking for $CC option to enable C99 features... " >&6; } +if test ${ac_cv_prog_cc_c99+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c99=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c99_program +_ACEOF +for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c99=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c99" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC +fi + +if test "x$ac_cv_prog_cc_c99" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c99" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 +printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } + CC="$CC $ac_cv_prog_cc_c99" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 + ac_prog_cc_stdc=c99 +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 +printf %s "checking for $CC option to enable C89 features... " >&6; } +if test ${ac_cv_prog_cc_c89+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c89_program +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC +fi + +if test "x$ac_cv_prog_cc_c89" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c89" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } + CC="$CC $ac_cv_prog_cc_c89" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 + ac_prog_cc_stdc=c89 +fi +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +printf %s "checking whether $CC understands -c and -o together... " >&6; } +if test ${am_cv_prog_cc_c_o+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +printf "%s\n" "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +depcc="$CC" am_compiler_list= + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +printf %s "checking dependency style of $depcc... " >&6; } +if test ${am_cv_CC_dependencies_compiler_type+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +printf %s "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test ${ac_cv_prog_CPP+y} +then : + printf %s "(cached) " >&6 +else $as_nop + # Double quotes because $CC needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO" +then : + +else $as_nop + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO" +then : + # Broken: success on invalid input. +continue +else $as_nop + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok +then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +printf "%s\n" "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO" +then : + +else $as_nop + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO" +then : + # Broken: success on invalid input. +continue +else $as_nop + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok +then : + +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +if test $ac_cv_c_compiler_gnu = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5 +printf %s "checking whether $CC needs -traditional... " >&6; } +if test ${ac_cv_prog_gcc_traditional+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_pattern="Autoconf.*'x'" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +Autoconf TIOCGETP +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "$ac_pattern" >/dev/null 2>&1 +then : + ac_cv_prog_gcc_traditional=yes +else $as_nop + ac_cv_prog_gcc_traditional=no +fi +rm -rf conftest* + + + if test $ac_cv_prog_gcc_traditional = no; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +Autoconf TCGETA +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "$ac_pattern" >/dev/null 2>&1 +then : + ac_cv_prog_gcc_traditional=yes +fi +rm -rf conftest* + + fi +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5 +printf "%s\n" "$ac_cv_prog_gcc_traditional" >&6; } + if test $ac_cv_prog_gcc_traditional = yes; then + CC="$CC -traditional" + fi +fi + + + + + + + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + if test -n "$ac_tool_prefix"; then + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++ + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CXX+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 +printf "%s\n" "$CXX" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + test -n "$CXX" && break + done +fi +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++ +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CXX+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CXX="$ac_prog" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 +printf "%s\n" "$ac_ct_CXX" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + test -n "$ac_ct_CXX" && break +done + + if test "x$ac_ct_CXX" = x; then + CXX="g++" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CXX=$ac_ct_CXX + fi +fi + + fi +fi +# Provide some information about the compiler. +printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C++" >&5 +printf %s "checking whether the compiler supports GNU C++... " >&6; } +if test ${ac_cv_cxx_compiler_gnu+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" +then : + ac_compiler_gnu=yes +else $as_nop + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 +printf "%s\n" "$ac_cv_cxx_compiler_gnu" >&6; } +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +if test $ac_compiler_gnu = yes; then + GXX=yes +else + GXX= +fi +ac_test_CXXFLAGS=${CXXFLAGS+y} +ac_save_CXXFLAGS=$CXXFLAGS +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 +printf %s "checking whether $CXX accepts -g... " >&6; } +if test ${ac_cv_prog_cxx_g+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_save_cxx_werror_flag=$ac_cxx_werror_flag + ac_cxx_werror_flag=yes + ac_cv_prog_cxx_g=no + CXXFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" +then : + ac_cv_prog_cxx_g=yes +else $as_nop + CXXFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" +then : + +else $as_nop + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" +then : + ac_cv_prog_cxx_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ac_cxx_werror_flag=$ac_save_cxx_werror_flag +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 +printf "%s\n" "$ac_cv_prog_cxx_g" >&6; } +if test $ac_test_CXXFLAGS; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +ac_prog_cxx_stdcxx=no +if test x$ac_prog_cxx_stdcxx = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++11 features" >&5 +printf %s "checking for $CXX option to enable C++11 features... " >&6; } +if test ${ac_cv_prog_cxx_cxx11+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cxx_cxx11=no +ac_save_CXX=$CXX +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_cxx_conftest_cxx11_program +_ACEOF +for ac_arg in '' -std=gnu++11 -std=gnu++0x -std=c++11 -std=c++0x -qlanglvl=extended0x -AA +do + CXX="$ac_save_CXX $ac_arg" + if ac_fn_cxx_try_compile "$LINENO" +then : + ac_cv_prog_cxx_cxx11=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cxx_cxx11" != "xno" && break +done +rm -f conftest.$ac_ext +CXX=$ac_save_CXX +fi + +if test "x$ac_cv_prog_cxx_cxx11" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cxx_cxx11" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx11" >&5 +printf "%s\n" "$ac_cv_prog_cxx_cxx11" >&6; } + CXX="$CXX $ac_cv_prog_cxx_cxx11" +fi + ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx11 + ac_prog_cxx_stdcxx=cxx11 +fi +fi +if test x$ac_prog_cxx_stdcxx = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++98 features" >&5 +printf %s "checking for $CXX option to enable C++98 features... " >&6; } +if test ${ac_cv_prog_cxx_cxx98+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cxx_cxx98=no +ac_save_CXX=$CXX +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_cxx_conftest_cxx98_program +_ACEOF +for ac_arg in '' -std=gnu++98 -std=c++98 -qlanglvl=extended -AA +do + CXX="$ac_save_CXX $ac_arg" + if ac_fn_cxx_try_compile "$LINENO" +then : + ac_cv_prog_cxx_cxx98=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cxx_cxx98" != "xno" && break +done +rm -f conftest.$ac_ext +CXX=$ac_save_CXX +fi + +if test "x$ac_cv_prog_cxx_cxx98" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cxx_cxx98" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx98" >&5 +printf "%s\n" "$ac_cv_prog_cxx_cxx98" >&6; } + CXX="$CXX $ac_cv_prog_cxx_cxx98" +fi + ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx98 + ac_prog_cxx_stdcxx=cxx98 +fi +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +depcc="$CXX" am_compiler_list= + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +printf %s "checking dependency style of $depcc... " >&6; } +if test ${am_cv_CXX_dependencies_compiler_type+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CXX_dependencies_compiler_type=none +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 +printf "%s\n" "$am_cv_CXX_dependencies_compiler_type" >&6; } +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +fi + + + + +func_stripname_cnf () +{ + case $2 in + .*) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%\\\\$2\$%%"`;; + *) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%$2\$%%"`;; + esac +} # func_stripname_cnf + if test -n "$CXX" && ( test no != "$CXX" && ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || (test g++ != "$CXX"))); then @@ -13738,36 +15858,32 @@ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 -$as_echo_n "checking how to run the C++ preprocessor... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 +printf %s "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then - if ${ac_cv_prog_CXXCPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CXXCPP needs to be expanded - for CXXCPP in "$CXX -E" "/lib/cpp" + if test ${ac_cv_prog_CXXCPP+y} +then : + printf %s "(cached) " >&6 +else $as_nop + # Double quotes because $CXX needs to be expanded + for CXXCPP in "$CXX -E" cpp /lib/cpp do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif +#include Syntax error _ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : +if ac_fn_cxx_try_cpp "$LINENO" +then : -else +else $as_nop # Broken: fails on valid input. continue fi @@ -13779,10 +15895,11 @@ /* end confdefs.h. */ #include _ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : +if ac_fn_cxx_try_cpp "$LINENO" +then : # Broken: success on invalid input. continue -else +else $as_nop # Passes both tests. ac_preproc_ok=: break @@ -13792,7 +15909,8 @@ done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : +if $ac_preproc_ok +then : break fi @@ -13804,29 +15922,24 @@ else ac_cv_prog_CXXCPP=$CXXCPP fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 -$as_echo "$CXXCPP" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 +printf "%s\n" "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif +#include Syntax error _ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : +if ac_fn_cxx_try_cpp "$LINENO" +then : -else +else $as_nop # Broken: fails on valid input. continue fi @@ -13838,10 +15951,11 @@ /* end confdefs.h. */ #include _ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : +if ac_fn_cxx_try_cpp "$LINENO" +then : # Broken: success on invalid input. continue -else +else $as_nop # Passes both tests. ac_preproc_ok=: break @@ -13851,11 +15965,12 @@ done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : +if $ac_preproc_ok +then : -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi @@ -13991,17 +16106,18 @@ # Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : +if test ${with_gnu_ld+y} +then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes -else +else $as_nop with_gnu_ld=no fi ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +printf %s "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw @@ -14030,15 +16146,16 @@ ;; esac elif test yes = "$with_gnu_ld"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +printf %s "checking for GNU ld... " >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +printf %s "checking for non-GNU ld... " >&6; } fi -if ${lt_cv_path_LD+:} false; then : - $as_echo_n "(cached) " >&6 -else +if test ${lt_cv_path_LD+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do @@ -14067,18 +16184,19 @@ LD=$lt_cv_path_LD if test -n "$LD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 -$as_echo "$LD" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +printf "%s\n" "$LD" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if ${lt_cv_prog_gnu_ld+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +printf %s "checking if the linker ($LD) is GNU ld... " >&6; } +if test ${lt_cv_prog_gnu_ld+y} +then : + printf %s "(cached) " >&6 +else $as_nop # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5 +printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld @@ -14144,8 +16262,8 @@ fi # PORTME: fill in a description of your system's C++ link characteristics - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) @@ -14283,21 +16401,23 @@ if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else - if ${lt_cv_aix_libpath__CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test ${lt_cv_aix_libpath__CXX+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : +if ac_fn_cxx_try_link "$LINENO" +then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -14312,7 +16432,7 @@ lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=/usr/lib:/lib @@ -14337,21 +16457,23 @@ if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else - if ${lt_cv_aix_libpath__CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test ${lt_cv_aix_libpath__CXX+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : +if ac_fn_cxx_try_link "$LINENO" +then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -14366,7 +16488,7 @@ lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=/usr/lib:/lib @@ -14431,8 +16553,8 @@ cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in - ,cl* | no,cl*) - # Native MSVC + ,cl* | no,cl* | ,icl* | no,icl*) + # Native MSVC or ICC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_CXX=' ' @@ -14523,11 +16645,11 @@ output_verbose_link_cmd=func_echo_all archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - module_expsym_cmds_CXX="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" + archive_expsym_cmds_CXX="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + module_expsym_cmds_CXX="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" if test yes != "$lt_cv_apple_cc_single_mod"; then archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" - archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" + archive_expsym_cmds_CXX="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi else @@ -14562,6 +16684,7 @@ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds_CXX='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes_CXX=yes + file_list_spec_CXX='@' ;; dgux*) @@ -14592,7 +16715,7 @@ archive_cmds_need_lc_CXX=no ;; - freebsd* | dragonfly*) + freebsd* | dragonfly* | midnightbsd*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes @@ -14729,7 +16852,7 @@ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_CXX='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_CXX='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in @@ -14869,13 +16992,13 @@ archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi ;; *) - case `$CC -V 2>&1 | sed 5q` in + case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' @@ -15217,8 +17340,8 @@ ;; esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 -$as_echo "$ld_shlibs_CXX" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 +printf "%s\n" "$ld_shlibs_CXX" >&6; } test no = "$ld_shlibs_CXX" && can_build_shared=no GCC_CXX=$GXX @@ -15256,7 +17379,7 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. @@ -15532,7 +17655,7 @@ ;; esac ;; - freebsd* | dragonfly*) + freebsd* | dragonfly* | midnightbsd*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) @@ -15615,7 +17738,7 @@ lt_prog_compiler_static_CXX='-qstaticlink' ;; *) - case `$CC -V 2>&1 | sed 5q` in + case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C++ 5.9 lt_prog_compiler_pic_CXX='-KPIC' @@ -15737,26 +17860,28 @@ ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -if ${lt_cv_prog_compiler_pic_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +printf %s "checking for $compiler option to produce PIC... " >&6; } +if test ${lt_cv_prog_compiler_pic_CXX+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 +printf "%s\n" "$lt_cv_prog_compiler_pic_CXX" >&6; } lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } -if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 +printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } +if test ${lt_cv_prog_compiler_pic_works_CXX+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext @@ -15787,8 +17912,8 @@ $RM conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 +printf "%s\n" "$lt_cv_prog_compiler_pic_works_CXX" >&6; } if test yes = "$lt_cv_prog_compiler_pic_works_CXX"; then case $lt_prog_compiler_pic_CXX in @@ -15810,11 +17935,12 @@ # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if test ${lt_cv_prog_compiler_static_works_CXX+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_prog_compiler_static_works_CXX=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" @@ -15838,8 +17964,8 @@ LDFLAGS=$save_LDFLAGS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 +printf "%s\n" "$lt_cv_prog_compiler_static_works_CXX" >&6; } if test yes = "$lt_cv_prog_compiler_static_works_CXX"; then : @@ -15850,11 +17976,12 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if test ${lt_cv_prog_compiler_c_o_CXX+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest @@ -15897,16 +18024,17 @@ $RM conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +printf "%s\n" "$lt_cv_prog_compiler_c_o_CXX" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if test ${lt_cv_prog_compiler_c_o_CXX+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest @@ -15949,8 +18077,8 @@ $RM conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +printf "%s\n" "$lt_cv_prog_compiler_c_o_CXX" >&6; } @@ -15958,19 +18086,19 @@ hard_links=nottested if test no = "$lt_cv_prog_compiler_c_o_CXX" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +printf %s "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +printf "%s\n" "$hard_links" >&6; } if test no = "$hard_links"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 +printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else @@ -15979,8 +18107,8 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' @@ -15997,7 +18125,7 @@ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else - export_symbols_cmds_CXX='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' + export_symbols_cmds_CXX='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) @@ -16005,7 +18133,7 @@ ;; cygwin* | mingw* | cegcc*) case $cc_basename in - cl*) + cl* | icl*) exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) @@ -16019,8 +18147,8 @@ ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 -$as_echo "$ld_shlibs_CXX" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 +printf "%s\n" "$ld_shlibs_CXX" >&6; } test no = "$ld_shlibs_CXX" && can_build_shared=no with_gnu_ld_CXX=$with_gnu_ld @@ -16047,18 +18175,19 @@ # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } -if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +printf %s "checking whether -lc should be explicitly linked in... " >&6; } +if test ${lt_cv_archive_cmds_need_lc_CXX+y} +then : + printf %s "(cached) " >&6 +else $as_nop $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest @@ -16076,7 +18205,7 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc_CXX=no @@ -16090,8 +18219,8 @@ $RM conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 -$as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 +printf "%s\n" "$lt_cv_archive_cmds_need_lc_CXX" >&6; } archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX ;; esac @@ -16160,8 +18289,8 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +printf %s "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' @@ -16352,7 +18481,7 @@ case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; mingw* | cegcc*) @@ -16361,14 +18490,14 @@ ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; - *,cl*) - # Native MSVC + *,cl* | *,icl*) + # Native MSVC or ICC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' @@ -16387,7 +18516,7 @@ done IFS=$lt_save_ifs # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form @@ -16424,7 +18553,7 @@ ;; *) - # Assume MSVC wrapper + # Assume MSVC and ICC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; @@ -16456,7 +18585,7 @@ shlibpath_var=LD_LIBRARY_PATH ;; -freebsd* | dragonfly*) +freebsd* | dragonfly* | midnightbsd*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then @@ -16649,9 +18778,10 @@ shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH - if ${lt_cv_shlibpath_overrides_runpath+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test ${lt_cv_shlibpath_overrides_runpath+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir @@ -16661,19 +18791,21 @@ /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : +if ac_fn_cxx_try_link "$LINENO" +then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null +then : lt_cv_shlibpath_overrides_runpath=yes fi fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir @@ -16908,8 +19040,8 @@ dynamic_linker=no ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +printf "%s\n" "$dynamic_linker" >&6; } test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" @@ -16973,8 +19105,8 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +printf %s "checking how to hardcode library paths into programs... " >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || test -n "$runpath_var_CXX" || @@ -16998,8 +19130,8 @@ # directories. hardcode_action_CXX=unsupported fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 -$as_echo "$hardcode_action_CXX" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 +printf "%s\n" "$hardcode_action_CXX" >&6; } if test relink = "$hardcode_action_CXX" || test yes = "$inherit_rpath_CXX"; then @@ -17038,36 +19170,50 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval test \${ac_cv_prog_make_${ac_make}_set+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + SET_MAKE= +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi - - - - - - - - - ac_config_commands="$ac_config_commands libtool" - - - - -# Only expand once: - - - - # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PKGCONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_PKGCONFIG+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $PKGCONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path. @@ -17077,11 +19223,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_PKGCONFIG="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -17093,39 +19243,33 @@ fi PKGCONFIG=$ac_cv_path_PKGCONFIG if test -n "$PKGCONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5 -$as_echo "$PKGCONFIG" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5 +printf "%s\n" "$PKGCONFIG" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -mkdir_p="$MKDIR_P" -case $mkdir_p in - [\\/$]* | ?:[\\/]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 -$as_echo_n "checking whether NLS is requested... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 +printf %s "checking whether NLS is requested... " >&6; } # Check whether --enable-nls was given. -if test "${enable_nls+set}" = set; then : +if test ${enable_nls+y} +then : enableval=$enable_nls; USE_NLS=$enableval -else +else $as_nop USE_NLS=yes fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 -$as_echo "$USE_NLS" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 +printf "%s\n" "$USE_NLS" >&6; } - GETTEXT_MACRO_VERSION=0.18 + GETTEXT_MACRO_VERSION=0.20 @@ -17133,15 +19277,14 @@ # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh + # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which + # contains only /bin. Note that ksh looks also at the FPATH variable, + # so we have to set that as well for the test. + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + || PATH_SEPARATOR=';' + } fi # Find out how to test for executable files. Don't use a zero-byte file, @@ -17160,11 +19303,12 @@ # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_MSGFMT+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_MSGFMT+y} +then : + printf %s "(cached) " >&6 +else $as_nop case "$MSGFMT" in [\\/]* | ?:[\\/]*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. @@ -17192,20 +19336,21 @@ fi MSGFMT="$ac_cv_path_MSGFMT" if test "$MSGFMT" != ":"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 -$as_echo "$MSGFMT" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 +printf "%s\n" "$MSGFMT" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_GMSGFMT+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_GMSGFMT+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $GMSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. @@ -17215,11 +19360,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_GMSGFMT="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -17232,21 +19381,16 @@ fi GMSGFMT=$ac_cv_path_GMSGFMT if test -n "$GMSGFMT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 -$as_echo "$GMSGFMT" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 +printf "%s\n" "$GMSGFMT" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi - case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in - '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; - *) MSGFMT_015=$MSGFMT ;; - esac - - case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; *) GMSGFMT_015=$GMSGFMT ;; esac @@ -17256,15 +19400,14 @@ # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh + # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which + # contains only /bin. Note that ksh looks also at the FPATH variable, + # so we have to set that as well for the test. + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + || PATH_SEPARATOR=';' + } fi # Find out how to test for executable files. Don't use a zero-byte file, @@ -17283,11 +19426,12 @@ # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_XGETTEXT+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_XGETTEXT+y} +then : + printf %s "(cached) " >&6 +else $as_nop case "$XGETTEXT" in [\\/]* | ?:[\\/]*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. @@ -17315,11 +19459,11 @@ fi XGETTEXT="$ac_cv_path_XGETTEXT" if test "$XGETTEXT" != ":"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 -$as_echo "$XGETTEXT" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 +printf "%s\n" "$XGETTEXT" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi rm -f messages.po @@ -17334,15 +19478,14 @@ # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh + # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which + # contains only /bin. Note that ksh looks also at the FPATH variable, + # so we have to set that as well for the test. + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + || PATH_SEPARATOR=';' + } fi # Find out how to test for executable files. Don't use a zero-byte file, @@ -17361,11 +19504,12 @@ # Extract the first word of "msgmerge", so it can be a program name with args. set dummy msgmerge; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_MSGMERGE+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_MSGMERGE+y} +then : + printf %s "(cached) " >&6 +else $as_nop case "$MSGMERGE" in [\\/]* | ?:[\\/]*) ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. @@ -17392,15 +19536,23 @@ fi MSGMERGE="$ac_cv_path_MSGMERGE" if test "$MSGMERGE" != ":"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5 -$as_echo "$MSGMERGE" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5 +printf "%s\n" "$MSGMERGE" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi - test -n "$localedir" || localedir='${datadir}/locale' + if LC_ALL=C $MSGMERGE --help | grep ' --for-msgfmt ' >/dev/null; then + MSGMERGE_FOR_MSGFMT_OPTION='--for-msgfmt' + else + if LC_ALL=C $MSGMERGE --help | grep ' --no-fuzzy-matching ' >/dev/null; then + MSGMERGE_FOR_MSGFMT_OPTION='--no-fuzzy-matching --no-location --quiet' + else + MSGMERGE_FOR_MSGFMT_OPTION='--no-location --quiet' + fi + fi test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= @@ -17426,125 +19578,197 @@ prefix="$acl_save_prefix" + # Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : +if test ${with_gnu_ld+y} +then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else +else $as_nop with_gnu_ld=no fi # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh + # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which + # contains only /bin. Note that ksh looks also at the FPATH variable, + # so we have to set that as well for the test. + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + || PATH_SEPARATOR=';' + } fi -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 -$as_echo_n "checking for ld used by GCC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | [A-Za-z]:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the path of ld - ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac + +if test -n "$LD"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld" >&5 +printf %s "checking for ld... " >&6; } +elif test "$GCC" = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +printf %s "checking for ld used by $CC... " >&6; } elif test "$with_gnu_ld" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +printf %s "checking for GNU ld... " >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +printf %s "checking for non-GNU ld... " >&6; } fi -if ${acl_cv_path_LD+:} false; then : - $as_echo_n "(cached) " >&6 +if test -n "$LD"; then + # Let the user override the test with a path. + : else - if test -z "$LD"; then - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - acl_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in - *GNU* | *'with BFD'*) - test "$with_gnu_ld" != no && break ;; - *) - test "$with_gnu_ld" != yes && break ;; + if test ${acl_cv_path_LD+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + acl_cv_path_LD= # Final result of this test + ac_prog=ld # Program to search in $PATH + if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + acl_output=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $acl_output in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'` + while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do + acl_output=`echo $acl_output | sed "s%$re_direlt%/%"` + done + # Got the pathname. No search in PATH is needed. + acl_cv_path_LD="$acl_output" + ac_prog= + ;; + "") + # If it fails, then pretend we aren't using GCC. + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; esac fi - done - IFS="$ac_save_ifs" -else - acl_cv_path_LD="$LD" # Let the user override the test with a path. + if test -n "$ac_prog"; then + # Search for $ac_prog in $PATH. + acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$acl_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + acl_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$acl_cv_path_LD" -v 2>&1 conftest.$ac_ext +/* end confdefs.h. */ +#if defined __powerpc64__ || defined _ARCH_PPC64 + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + # The compiler produces 64-bit code. Add option '-b64' so that the + # linker groks 64-bit object files. + case "$acl_cv_path_LD " in + *" -b64 "*) ;; + *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;; + esac + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ;; + sparc64-*-netbsd*) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined __sparcv9 || defined __arch64__ + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + +else $as_nop + # The compiler produces 32-bit code. Add option '-m elf32_sparc' + # so that the linker groks 32-bit object files. + case "$acl_cv_path_LD " in + *" -m elf32_sparc "*) ;; + *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;; + esac + fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ;; + esac + fi -LD="$acl_cv_path_LD" -if test -n "$LD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + LD="$acl_cv_path_LD" fi -test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if ${acl_cv_prog_gnu_ld+:} false; then : - $as_echo_n "(cached) " >&6 +if test -n "$LD"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +printf "%s\n" "$LD" >&6; } else - # I'd rather use --version here, but apparently some GNU ld's only accept -v. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +printf %s "checking if the linker ($LD) is GNU ld... " >&6; } +if test ${acl_cv_prog_gnu_ld+y} +then : + printf %s "(cached) " >&6 +else $as_nop + # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 -$as_echo "$acl_cv_prog_gnu_ld" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 +printf "%s\n" "$acl_cv_prog_gnu_ld" >&6; } with_gnu_ld=$acl_cv_prog_gnu_ld - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 -$as_echo_n "checking for shared library run path origin... " >&6; } -if ${acl_cv_rpath+:} false; then : - $as_echo_n "(cached) " >&6 -else + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 +printf %s "checking for shared library run path origin... " >&6; } +if test ${acl_cv_rpath+y} +then : + printf %s "(cached) " >&6 +else $as_nop CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh @@ -17553,8 +19777,8 @@ acl_cv_rpath=done fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 -$as_echo "$acl_cv_rpath" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 +printf "%s\n" "$acl_cv_rpath" >&6; } wl="$acl_cv_wl" acl_libext="$acl_cv_libext" acl_shlibext="$acl_cv_shlibext" @@ -17565,76 +19789,435 @@ acl_hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" # Check whether --enable-rpath was given. -if test "${enable_rpath+set}" = set; then : +if test ${enable_rpath+y} +then : enableval=$enable_rpath; : -else +else $as_nop enable_rpath=yes fi - acl_libdirstem=lib - acl_libdirstem2= - case "$host_os" in - solaris*) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5 -$as_echo_n "checking for 64-bit host... " >&6; } -if ${gl_cv_solaris_64bit+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking 32-bit host C ABI" >&5 +printf %s "checking 32-bit host C ABI... " >&6; } +if test ${gl_cv_host_cpu_c_abi_32bit+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$gl_cv_host_cpu_c_abi"; then + case "$gl_cv_host_cpu_c_abi" in + i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc) + gl_cv_host_cpu_c_abi_32bit=yes ;; + x86_64 | alpha | arm64 | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 ) + gl_cv_host_cpu_c_abi_32bit=no ;; + *) + gl_cv_host_cpu_c_abi_32bit=unknown ;; + esac + else + case "$host_cpu" in + + # CPUs that only support a 32-bit ABI. + arc \ + | bfin \ + | cris* \ + | csky \ + | epiphany \ + | ft32 \ + | h8300 \ + | m68k \ + | microblaze | microblazeel \ + | nds32 | nds32le | nds32be \ + | nios2 | nios2eb | nios2el \ + | or1k* \ + | or32 \ + | sh | sh1234 | sh1234elb \ + | tic6x \ + | xtensa* ) + gl_cv_host_cpu_c_abi_32bit=yes + ;; + + # CPUs that only support a 64-bit ABI. + alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \ + | mmix ) + gl_cv_host_cpu_c_abi_32bit=no + ;; + + i[34567]86 ) + gl_cv_host_cpu_c_abi_32bit=yes + ;; + + x86_64 ) + # On x86_64 systems, the C compiler may be generating code in one of + # these ABIs: + # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64. + # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64 + # with native Windows (mingw, MSVC). + # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32. + # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if (defined __x86_64__ || defined __amd64__ \ + || defined _M_X64 || defined _M_AMD64) \ + && !(defined __ILP32__ || defined _ILP32) + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_host_cpu_c_abi_32bit=no +else $as_nop + gl_cv_host_cpu_c_abi_32bit=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ;; + + arm* | aarch64 ) + # Assume arm with EABI. + # On arm64 systems, the C compiler may be generating code in one of + # these ABIs: + # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64. + # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32. + # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined __aarch64__ && !(defined __ILP32__ || defined _ILP32) + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_host_cpu_c_abi_32bit=no +else $as_nop + gl_cv_host_cpu_c_abi_32bit=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ;; + + hppa1.0 | hppa1.1 | hppa2.0* | hppa64 ) + # On hppa, the C compiler may be generating 32-bit code or 64-bit + # code. In the latter case, it defines _LP64 and __LP64__. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __LP64__ + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_host_cpu_c_abi_32bit=no +else $as_nop + gl_cv_host_cpu_c_abi_32bit=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ;; + + ia64* ) + # On ia64 on HP-UX, the C compiler may be generating 64-bit code or + # 32-bit code. In the latter case, it defines _ILP32. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef _ILP32 + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_host_cpu_c_abi_32bit=yes +else $as_nop + gl_cv_host_cpu_c_abi_32bit=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ;; + + mips* ) + # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this + # at 32. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64) + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_host_cpu_c_abi_32bit=no +else $as_nop + gl_cv_host_cpu_c_abi_32bit=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ;; + + powerpc* ) + # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD. + # No need to distinguish them here; the caller may distinguish + # them based on the OS. + # On powerpc64 systems, the C compiler may still be generating + # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may + # be generating 64-bit code. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined __powerpc64__ || defined _ARCH_PPC64 + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_host_cpu_c_abi_32bit=no +else $as_nop + gl_cv_host_cpu_c_abi_32bit=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ;; + + rs6000 ) + gl_cv_host_cpu_c_abi_32bit=yes + ;; + + riscv32 | riscv64 ) + # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d. + # Size of 'long' and 'void *': + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined __LP64__ + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_host_cpu_c_abi_32bit=no +else $as_nop + gl_cv_host_cpu_c_abi_32bit=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ;; + + s390* ) + # On s390x, the C compiler may be generating 64-bit (= s390x) code + # or 31-bit (= s390) code. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined __LP64__ || defined __s390x__ + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_host_cpu_c_abi_32bit=no +else $as_nop + gl_cv_host_cpu_c_abi_32bit=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ;; + + sparc | sparc64 ) + # UltraSPARCs running Linux have `uname -m` = "sparc64", but the + # C compiler still generates 32-bit code. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined __sparcv9 || defined __arch64__ + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_host_cpu_c_abi_32bit=no +else $as_nop + gl_cv_host_cpu_c_abi_32bit=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ;; + + *) + gl_cv_host_cpu_c_abi_32bit=unknown + ;; + esac + fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi_32bit" >&5 +printf "%s\n" "$gl_cv_host_cpu_c_abi_32bit" >&6; } + + HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit" + + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ELF binary format" >&5 +printf %s "checking for ELF binary format... " >&6; } +if test ${gl_cv_elf+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -#ifdef _LP64 -sixtyfour bits -#endif +#ifdef __ELF__ + Extensible Linking Format + #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "sixtyfour bits" >/dev/null 2>&1; then : - gl_cv_solaris_64bit=yes -else - gl_cv_solaris_64bit=no + $EGREP "Extensible Linking Format" >/dev/null 2>&1 +then : + gl_cv_elf=yes +else $as_nop + gl_cv_elf=no fi -rm -f conftest* +rm -rf conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5 -$as_echo "$gl_cv_solaris_64bit" >&6; } - if test $gl_cv_solaris_64bit = yes; then - acl_libdirstem=lib/64 - case "$host_cpu" in - sparc*) acl_libdirstem2=lib/sparcv9 ;; - i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; - esac - fi - ;; - *) - searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` - if test -n "$searchpath"; then - acl_save_IFS="${IFS= }"; IFS=":" - for searchdir in $searchpath; do - if test -d "$searchdir"; then - case "$searchdir" in - */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; - */../ | */.. ) - # Better ignore directories of this form. They are misleading. - ;; - *) searchdir=`cd "$searchdir" && pwd` - case "$searchdir" in - */lib64 ) acl_libdirstem=lib64 ;; - esac ;; - esac - fi - done - IFS="$acl_save_IFS" - fi - ;; - esac - test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_elf" >&5 +printf "%s\n" "$gl_cv_elf" >&6; } + if test $gl_cv_elf; then + # Extract the ELF class of a file (5th byte) in decimal. + # Cf. https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header + if od -A x < /dev/null >/dev/null 2>/dev/null; then + # Use POSIX od. + func_elfclass () + { + od -A n -t d1 -j 4 -N 1 + } + else + # Use BSD hexdump. + func_elfclass () + { + dd bs=1 count=1 skip=4 2>/dev/null | hexdump -e '1/1 "%3d "' + echo + } + fi + case $HOST_CPU_C_ABI_32BIT in + yes) + # 32-bit ABI. + acl_is_expected_elfclass () + { + test "`func_elfclass | sed -e 's/[ ]//g'`" = 1 + } + ;; + no) + # 64-bit ABI. + acl_is_expected_elfclass () + { + test "`func_elfclass | sed -e 's/[ ]//g'`" = 2 + } + ;; + *) + # Unknown. + acl_is_expected_elfclass () + { + : + } + ;; + esac + else + acl_is_expected_elfclass () + { + : + } + fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5 +printf %s "checking for the common suffixes of directories in the library search path... " >&6; } +if test ${acl_cv_libdirstems+y} +then : + printf %s "(cached) " >&6 +else $as_nop + acl_libdirstem=lib + acl_libdirstem2= + acl_libdirstem3= + case "$host_os" in + solaris*) + if test $HOST_CPU_C_ABI_32BIT = no; then + acl_libdirstem2=lib/64 + case "$host_cpu" in + sparc*) acl_libdirstem3=lib/sparcv9 ;; + i*86 | x86_64) acl_libdirstem3=lib/amd64 ;; + esac + fi + ;; + *) + searchpath=`(LC_ALL=C $CC $CPPFLAGS $CFLAGS -print-search-dirs) 2>/dev/null \ + | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test $HOST_CPU_C_ABI_32BIT != no; then + # 32-bit or unknown ABI. + if test -d /usr/lib32; then + acl_libdirstem2=lib32 + fi + fi + if test $HOST_CPU_C_ABI_32BIT != yes; then + # 64-bit or unknown ABI. + if test -d /usr/lib64; then + acl_libdirstem3=lib64 + fi + fi + if test -n "$searchpath"; then + acl_save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib32/ | */lib32 ) acl_libdirstem2=lib32 ;; + */lib64/ | */lib64 ) acl_libdirstem3=lib64 ;; + */../ | */.. ) + # Better ignore directories of this form. They are misleading. + ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib32 ) acl_libdirstem2=lib32 ;; + */lib64 ) acl_libdirstem3=lib64 ;; + esac ;; + esac + fi + done + IFS="$acl_save_IFS" + if test $HOST_CPU_C_ABI_32BIT = yes; then + # 32-bit ABI. + acl_libdirstem3= + fi + if test $HOST_CPU_C_ABI_32BIT = no; then + # 64-bit ABI. + acl_libdirstem2= + fi + fi + ;; + esac + test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" + test -n "$acl_libdirstem3" || acl_libdirstem3="$acl_libdirstem" + acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2,$acl_libdirstem3" +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5 +printf "%s\n" "$acl_cv_libdirstems" >&6; } + acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'` + acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,//' -e 's/,.*//'` + acl_libdirstem3=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,[^,]*,//' -e 's/,.*//'` @@ -17655,13 +20238,16 @@ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" + eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" + eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libiconv-prefix was given. -if test "${with_libiconv_prefix+set}" = set; then : +if test ${with_libiconv_prefix+y} +then : withval=$with_libiconv_prefix; if test "X$withval" = "Xno"; then use_additional=no @@ -17675,6 +20261,8 @@ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" + eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" + eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" @@ -17682,15 +20270,19 @@ else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" - if test "$acl_libdirstem2" != "$acl_libdirstem" \ - && ! test -d "$withval/$acl_libdirstem"; then - additional_libdir="$withval/$acl_libdirstem2" - fi + additional_libdir2="$withval/$acl_libdirstem2" + additional_libdir3="$withval/$acl_libdirstem3" fi fi fi + if test "X$additional_libdir2" = "X$additional_libdir"; then + additional_libdir2= + fi + if test "X$additional_libdir3" = "X$additional_libdir"; then + additional_libdir3= + fi LIBICONV= LTLIBICONV= INCICONV= @@ -17713,7 +20305,7 @@ done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" - uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then @@ -17736,45 +20328,51 @@ shrext= fi if test $use_additional = yes; then - dir="$additional_libdir" - if test -n "$acl_shlibext"; then - if test -f "$dir/$libname$shrext"; then - found_dir="$dir" - found_so="$dir/$libname$shrext" - else - if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then - ver=`(cd "$dir" && \ - for f in "$libname$shrext".*; do echo "$f"; done \ - | sed -e "s,^$libname$shrext\\\\.,," \ - | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ - | sed 1q ) 2>/dev/null` - if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then - found_dir="$dir" - found_so="$dir/$libname$shrext.$ver" + for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do + if test "X$found_dir" = "X"; then + eval dir=\$$additional_libdir_variable + if test -n "$dir"; then + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi fi - else - eval library_names=\"$acl_library_names_spec\" - for f in $library_names; do - if test -f "$dir/$f"; then + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then found_dir="$dir" - found_so="$dir/$f" - break + found_a="$dir/$libname.$acl_libext" fi - done + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi fi fi - fi - if test "X$found_dir" = "X"; then - if test -f "$dir/$libname.$acl_libext"; then - found_dir="$dir" - found_a="$dir/$libname.$acl_libext" - fi - fi - if test "X$found_dir" != "X"; then - if test -f "$dir/$libname.la"; then - found_la="$dir/$libname.la" - fi - fi + done fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBICONV; do @@ -17791,7 +20389,7 @@ -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$acl_shlibext"; then - if test -f "$dir/$libname$shrext"; then + if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else @@ -17801,14 +20399,14 @@ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` - if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do - if test -f "$dir/$f"; then + if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break @@ -17818,7 +20416,7 @@ fi fi if test "X$found_dir" = "X"; then - if test -f "$dir/$libname.$acl_libext"; then + if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi @@ -17840,7 +20438,8 @@ if test "X$found_so" != "X"; then if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ - || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then + || test "X$found_dir" = "X/usr/$acl_libdirstem2" \ + || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else haveit= @@ -17919,6 +20518,13 @@ fi additional_includedir="$basedir/include" ;; + */$acl_libdirstem3 | */$acl_libdirstem3/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'` + if test "$name" = 'iconv'; then + LIBICONV_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then @@ -17964,12 +20570,14 @@ for dep in $dependency_libs; do case "$dep" in -L*) - additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` - if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ - && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then + dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \ + && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \ + && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then haveit= - if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ - || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then + if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \ + || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \ + || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; @@ -17988,14 +20596,14 @@ exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" - if test "X$x" = "X-L$additional_libdir"; then + if test "X$x" = "X-L$dependency_libdir"; then haveit=yes break fi done if test -z "$haveit"; then - if test -d "$additional_libdir"; then - LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" + if test -d "$dependency_libdir"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$dependency_libdir" fi fi haveit= @@ -18009,14 +20617,14 @@ exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" - if test "X$x" = "X-L$additional_libdir"; then + if test "X$x" = "X-L$dependency_libdir"; then haveit=yes break fi done if test -z "$haveit"; then - if test -d "$additional_libdir"; then - LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" + if test -d "$dependency_libdir"; then + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$dependency_libdir" fi fi fi @@ -18123,78 +20731,81 @@ - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 -$as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; } -if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 +printf %s "checking for CFPreferencesCopyAppValue... " >&6; } +if test ${gt_cv_func_CFPreferencesCopyAppValue+y} +then : + printf %s "(cached) " >&6 +else $as_nop gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main () +main (void) { CFPreferencesCopyAppValue(NULL, NULL) ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : gt_cv_func_CFPreferencesCopyAppValue=yes -else +else $as_nop gt_cv_func_CFPreferencesCopyAppValue=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$gt_save_LIBS" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 -$as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 +printf "%s\n" "$gt_cv_func_CFPreferencesCopyAppValue" >&6; } if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then -$as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h +printf "%s\n" "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5 -$as_echo_n "checking for CFLocaleCopyCurrent... " >&6; } -if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyPreferredLanguages" >&5 +printf %s "checking for CFLocaleCopyPreferredLanguages... " >&6; } +if test ${gt_cv_func_CFLocaleCopyPreferredLanguages+y} +then : + printf %s "(cached) " >&6 +else $as_nop gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main () +main (void) { -CFLocaleCopyCurrent(); +CFLocaleCopyPreferredLanguages(); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - gt_cv_func_CFLocaleCopyCurrent=yes -else - gt_cv_func_CFLocaleCopyCurrent=no +if ac_fn_c_try_link "$LINENO" +then : + gt_cv_func_CFLocaleCopyPreferredLanguages=yes +else $as_nop + gt_cv_func_CFLocaleCopyPreferredLanguages=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$gt_save_LIBS" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5 -$as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; } - if test $gt_cv_func_CFLocaleCopyCurrent = yes; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyPreferredLanguages" >&5 +printf "%s\n" "$gt_cv_func_CFLocaleCopyPreferredLanguages" >&6; } + if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then -$as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h +printf "%s\n" "#define HAVE_CFLOCALECOPYPREFERREDLANGUAGES 1" >>confdefs.h fi INTL_MACOSX_LIBS= - if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then + if test $gt_cv_func_CFPreferencesCopyAppValue = yes \ + || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" fi @@ -18235,37 +20846,48 @@ gt_expression_test_code= fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5 -$as_echo_n "checking for GNU gettext in libc... " >&6; } -if eval \${$gt_func_gnugettext_libc+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5 +printf %s "checking for GNU gettext in libc... " >&6; } +if eval test \${$gt_func_gnugettext_libc+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + #include -$gt_revision_test_code +#ifndef __GNU_GETTEXT_SUPPORTED_REVISION extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings; +#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings) +#else +#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 +#endif +$gt_revision_test_code + int -main () +main (void) { + bindtextdomain ("", ""); -return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings +return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION + ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : eval "$gt_func_gnugettext_libc=yes" -else +else $as_nop eval "$gt_func_gnugettext_libc=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$gt_func_gnugettext_libc - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then @@ -18298,103 +20920,122 @@ done - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 -$as_echo_n "checking for iconv... " >&6; } -if ${am_cv_func_iconv+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 +printf %s "checking for iconv... " >&6; } +if test ${am_cv_func_iconv+y} +then : + printf %s "(cached) " >&6 +else $as_nop am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + #include #include + int -main () +main (void) { iconv_t cd = iconv_open("",""); - iconv(cd,NULL,NULL,NULL,NULL); - iconv_close(cd); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : am_cv_func_iconv=yes fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + #include #include + int -main () +main (void) { iconv_t cd = iconv_open("",""); - iconv(cd,NULL,NULL,NULL,NULL); - iconv_close(cd); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : am_cv_lib_iconv=yes am_cv_func_iconv=yes fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$am_save_LIBS" fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 -$as_echo "$am_cv_func_iconv" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 +printf "%s\n" "$am_cv_func_iconv" >&6; } if test "$am_cv_func_iconv" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 -$as_echo_n "checking for working iconv... " >&6; } -if ${am_cv_func_iconv_works+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 +printf %s "checking for working iconv... " >&6; } +if test ${am_cv_func_iconv_works+y} +then : + printf %s "(cached) " >&6 +else $as_nop - am_save_LIBS="$LIBS" + am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi - if test "$cross_compiling" = yes; then : + am_cv_func_iconv_works=no + for ac_iconv_const in '' 'const'; do + if test "$cross_compiling" = yes +then : case "$host_os" in - aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; - *) am_cv_func_iconv_works="guessing yes" ;; - esac -else + aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; + *) am_cv_func_iconv_works="guessing yes" ;; + esac +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include -int main () + +#ifndef ICONV_CONST +# define ICONV_CONST $ac_iconv_const +#endif + +int +main (void) { +int result = 0; /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { - static const char input[] = "\342\202\254"; /* EURO SIGN */ + static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; - const char *inptr = input; + ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, - (char **) &inptr, &inbytesleft, + &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) - return 1; + result |= 1; + iconv_close (cd_utf8_to_88591); } } /* Test against Solaris 10 bug: Failures are not distinguishable from @@ -18403,17 +21044,37 @@ iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); if (cd_ascii_to_88591 != (iconv_t)(-1)) { - static const char input[] = "\263"; + static ICONV_CONST char input[] = "\263"; char buf[10]; - const char *inptr = input; + ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_ascii_to_88591, - (char **) &inptr, &inbytesleft, + &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) - return 1; + result |= 2; + iconv_close (cd_ascii_to_88591); + } + } + /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ + { + iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); + if (cd_88591_to_utf8 != (iconv_t)(-1)) + { + static ICONV_CONST char input[] = "\304"; + static char buf[2] = { (char)0xDE, (char)0xAD }; + ICONV_CONST char *inptr = input; + size_t inbytesleft = 1; + char *outptr = buf; + size_t outbytesleft = 1; + size_t res = iconv (cd_88591_to_utf8, + &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) + result |= 4; + iconv_close (cd_88591_to_utf8); } } #if 0 /* This bug could be worked around by the caller. */ @@ -18422,48 +21083,65 @@ iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { - static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; + static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; - const char *inptr = input; + ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, - (char **) &inptr, &inbytesleft, + &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) - return 1; + result |= 8; + iconv_close (cd_88591_to_utf8); } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ - if (/* Try standardized names. */ - iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) - /* Try IRIX, OSF/1 names. */ - && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) - /* Try AIX names. */ - && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) - /* Try HP-UX names. */ - && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) - return 1; + { + /* Try standardized names. */ + iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP"); + /* Try IRIX, OSF/1 names. */ + iconv_t cd2 = iconv_open ("UTF-8", "eucJP"); + /* Try AIX names. */ + iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP"); + /* Try HP-UX names. */ + iconv_t cd4 = iconv_open ("utf8", "eucJP"); + if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1) + && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1)) + result |= 16; + if (cd1 != (iconv_t)(-1)) + iconv_close (cd1); + if (cd2 != (iconv_t)(-1)) + iconv_close (cd2); + if (cd3 != (iconv_t)(-1)) + iconv_close (cd3); + if (cd4 != (iconv_t)(-1)) + iconv_close (cd4); + } + return result; + + ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +if ac_fn_c_try_run "$LINENO" +then : am_cv_func_iconv_works=yes -else - am_cv_func_iconv_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi + test "$am_cv_func_iconv_works" = no || break + done LIBS="$am_save_LIBS" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 -$as_echo "$am_cv_func_iconv_works" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 +printf "%s\n" "$am_cv_func_iconv_works" >&6; } case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; @@ -18473,14 +21151,14 @@ fi if test "$am_func_iconv" = yes; then -$as_echo "#define HAVE_ICONV 1" >>confdefs.h +printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h fi if test "$am_cv_lib_iconv" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 -$as_echo_n "checking how to link with libiconv... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 -$as_echo "$LIBICONV" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 +printf %s "checking how to link with libiconv... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 +printf "%s\n" "$LIBICONV" >&6; } else CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= @@ -18496,7 +21174,6 @@ - use_additional=yes acl_save_prefix="$prefix" @@ -18506,13 +21183,16 @@ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" + eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" + eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libintl-prefix was given. -if test "${with_libintl_prefix+set}" = set; then : +if test ${with_libintl_prefix+y} +then : withval=$with_libintl_prefix; if test "X$withval" = "Xno"; then use_additional=no @@ -18526,6 +21206,8 @@ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" + eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" + eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" @@ -18533,15 +21215,19 @@ else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" - if test "$acl_libdirstem2" != "$acl_libdirstem" \ - && ! test -d "$withval/$acl_libdirstem"; then - additional_libdir="$withval/$acl_libdirstem2" - fi + additional_libdir2="$withval/$acl_libdirstem2" + additional_libdir3="$withval/$acl_libdirstem3" fi fi fi + if test "X$additional_libdir2" = "X$additional_libdir"; then + additional_libdir2= + fi + if test "X$additional_libdir3" = "X$additional_libdir"; then + additional_libdir3= + fi LIBINTL= LTLIBINTL= INCINTL= @@ -18564,7 +21250,7 @@ done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" - uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then @@ -18587,45 +21273,51 @@ shrext= fi if test $use_additional = yes; then - dir="$additional_libdir" - if test -n "$acl_shlibext"; then - if test -f "$dir/$libname$shrext"; then - found_dir="$dir" - found_so="$dir/$libname$shrext" - else - if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then - ver=`(cd "$dir" && \ - for f in "$libname$shrext".*; do echo "$f"; done \ - | sed -e "s,^$libname$shrext\\\\.,," \ - | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ - | sed 1q ) 2>/dev/null` - if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then - found_dir="$dir" - found_so="$dir/$libname$shrext.$ver" + for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do + if test "X$found_dir" = "X"; then + eval dir=\$$additional_libdir_variable + if test -n "$dir"; then + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi fi - else - eval library_names=\"$acl_library_names_spec\" - for f in $library_names; do - if test -f "$dir/$f"; then + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then found_dir="$dir" - found_so="$dir/$f" - break + found_a="$dir/$libname.$acl_libext" fi - done + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi fi fi - fi - if test "X$found_dir" = "X"; then - if test -f "$dir/$libname.$acl_libext"; then - found_dir="$dir" - found_a="$dir/$libname.$acl_libext" - fi - fi - if test "X$found_dir" != "X"; then - if test -f "$dir/$libname.la"; then - found_la="$dir/$libname.la" - fi - fi + done fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBINTL; do @@ -18642,7 +21334,7 @@ -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$acl_shlibext"; then - if test -f "$dir/$libname$shrext"; then + if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else @@ -18652,14 +21344,14 @@ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` - if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do - if test -f "$dir/$f"; then + if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break @@ -18669,7 +21361,7 @@ fi fi if test "X$found_dir" = "X"; then - if test -f "$dir/$libname.$acl_libext"; then + if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi @@ -18691,7 +21383,8 @@ if test "X$found_so" != "X"; then if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ - || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then + || test "X$found_dir" = "X/usr/$acl_libdirstem2" \ + || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else haveit= @@ -18770,6 +21463,13 @@ fi additional_includedir="$basedir/include" ;; + */$acl_libdirstem3 | */$acl_libdirstem3/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'` + if test "$name" = 'intl'; then + LIBINTL_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then @@ -18815,12 +21515,14 @@ for dep in $dependency_libs; do case "$dep" in -L*) - additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` - if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ - && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then + dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \ + && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \ + && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then haveit= - if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ - || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then + if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \ + || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \ + || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; @@ -18839,14 +21541,14 @@ exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" - if test "X$x" = "X-L$additional_libdir"; then + if test "X$x" = "X-L$dependency_libdir"; then haveit=yes break fi done if test -z "$haveit"; then - if test -d "$additional_libdir"; then - LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir" + if test -d "$dependency_libdir"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }-L$dependency_libdir" fi fi haveit= @@ -18860,14 +21562,14 @@ exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" - if test "X$x" = "X-L$additional_libdir"; then + if test "X$x" = "X-L$dependency_libdir"; then haveit=yes break fi done if test -z "$haveit"; then - if test -d "$additional_libdir"; then - LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir" + if test -d "$dependency_libdir"; then + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$dependency_libdir" fi fi fi @@ -18950,78 +21652,98 @@ - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 -$as_echo_n "checking for GNU gettext in libintl... " >&6; } -if eval \${$gt_func_gnugettext_libintl+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 +printf %s "checking for GNU gettext in libintl... " >&6; } +if eval test \${$gt_func_gnugettext_libintl+y} +then : + printf %s "(cached) " >&6 +else $as_nop gt_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $INCINTL" gt_save_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + #include -$gt_revision_test_code +#ifndef __GNU_GETTEXT_SUPPORTED_REVISION extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *); +#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias ("")) +#else +#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 +#endif +$gt_revision_test_code + int -main () +main (void) { + bindtextdomain ("", ""); -return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") +return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION + ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : eval "$gt_func_gnugettext_libintl=yes" -else +else $as_nop eval "$gt_func_gnugettext_libintl=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + #include -$gt_revision_test_code +#ifndef __GNU_GETTEXT_SUPPORTED_REVISION extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *); +#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias ("")) +#else +#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 +#endif +$gt_revision_test_code + int -main () +main (void) { + bindtextdomain ("", ""); -return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") +return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION + ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : LIBINTL="$LIBINTL $LIBICONV" - LTLIBINTL="$LTLIBINTL $LTLIBICONV" - eval "$gt_func_gnugettext_libintl=yes" + LTLIBINTL="$LTLIBINTL $LTLIBICONV" + eval "$gt_func_gnugettext_libintl=yes" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS" fi eval ac_res=\$$gt_func_gnugettext_libintl - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } fi if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ @@ -19048,20 +21770,20 @@ if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then -$as_echo "#define ENABLE_NLS 1" >>confdefs.h +printf "%s\n" "#define ENABLE_NLS 1" >>confdefs.h else USE_NLS=no fi fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5 -$as_echo_n "checking whether to use NLS... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 -$as_echo "$USE_NLS" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5 +printf %s "checking whether to use NLS... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 +printf "%s\n" "$USE_NLS" >&6; } if test "$USE_NLS" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5 -$as_echo_n "checking where the gettext function comes from... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5 +printf %s "checking where the gettext function comes from... " >&6; } if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then gt_source="external libintl" @@ -19071,18 +21793,18 @@ else gt_source="included intl directory" fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5 -$as_echo "$gt_source" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5 +printf "%s\n" "$gt_source" >&6; } fi if test "$USE_NLS" = "yes"; then if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5 -$as_echo_n "checking how to link with libintl... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5 -$as_echo "$LIBINTL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5 +printf %s "checking how to link with libintl... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5 +printf "%s\n" "$LIBINTL" >&6; } for element in $INCINTL; do haveit= @@ -19109,10 +21831,10 @@ fi -$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h +printf "%s\n" "#define HAVE_GETTEXT 1" >>confdefs.h -$as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h +printf "%s\n" "#define HAVE_DCGETTEXT 1" >>confdefs.h fi @@ -19130,16 +21852,17 @@ -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 -$as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if ${ac_cv_c_const+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 +printf %s "checking for an ANSI C-conforming const... " >&6; } +if test ${ac_cv_c_const+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { #ifndef __cplusplus @@ -19152,7 +21875,7 @@ /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. + /* IBM XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ @@ -19180,7 +21903,7 @@ iptr p = 0; ++p; } - { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying + { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; @@ -19196,31 +21919,33 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_c_const=yes -else +else $as_nop ac_cv_c_const=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 -$as_echo "$ac_cv_c_const" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 +printf "%s\n" "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then -$as_echo "#define const /**/" >>confdefs.h +printf "%s\n" "#define const /**/" >>confdefs.h fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5 -$as_echo_n "checking for working volatile... " >&6; } -if ${ac_cv_c_volatile+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5 +printf %s "checking for working volatile... " >&6; } +if test ${ac_cv_c_volatile+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { volatile int x; @@ -19230,34 +21955,37 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_c_volatile=yes -else +else $as_nop ac_cv_c_volatile=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5 -$as_echo "$ac_cv_c_volatile" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5 +printf "%s\n" "$ac_cv_c_volatile" >&6; } if test $ac_cv_c_volatile = no; then -$as_echo "#define volatile /**/" >>confdefs.h +printf "%s\n" "#define volatile /**/" >>confdefs.h fi # Check whether --enable-largefile was given. -if test "${enable_largefile+set}" = set; then : +if test ${enable_largefile+y} +then : enableval=$enable_largefile; fi if test "$enable_largefile" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 -$as_echo_n "checking for special C compiler options needed for large files... " >&6; } -if ${ac_cv_sys_largefile_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 +printf %s "checking for special C compiler options needed for large files... " >&6; } +if test ${ac_cv_sys_largefile_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_sys_largefile_CC=no if test "$GCC" != yes; then ac_save_CC=$CC @@ -19271,44 +21999,47 @@ We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int -main () +main (void) { ; return 0; } _ACEOF - if ac_fn_c_try_compile "$LINENO"; then : + if ac_fn_c_try_compile "$LINENO" +then : break fi -rm -f core conftest.err conftest.$ac_objext +rm -f core conftest.err conftest.$ac_objext conftest.beam CC="$CC -n32" - if ac_fn_c_try_compile "$LINENO"; then : + if ac_fn_c_try_compile "$LINENO" +then : ac_cv_sys_largefile_CC=' -n32'; break fi -rm -f core conftest.err conftest.$ac_objext +rm -f core conftest.err conftest.$ac_objext conftest.beam break done CC=$ac_save_CC rm -f conftest.$ac_ext fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 -$as_echo "$ac_cv_sys_largefile_CC" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 +printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; } if test "$ac_cv_sys_largefile_CC" != no; then CC=$CC$ac_cv_sys_largefile_CC fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 -$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } -if ${ac_cv_sys_file_offset_bits+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 +printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } +if test ${ac_cv_sys_file_offset_bits+y} +then : + printf %s "(cached) " >&6 +else $as_nop while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -19317,22 +22048,23 @@ We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_sys_file_offset_bits=no; break fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _FILE_OFFSET_BITS 64 @@ -19341,43 +22073,43 @@ We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_sys_file_offset_bits=64; break fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_sys_file_offset_bits=unknown break done fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 -$as_echo "$ac_cv_sys_file_offset_bits" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 +printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; } case $ac_cv_sys_file_offset_bits in #( no | unknown) ;; *) -cat >>confdefs.h <<_ACEOF -#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits -_ACEOF +printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h ;; esac rm -rf conftest* if test $ac_cv_sys_file_offset_bits = unknown; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 -$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } -if ${ac_cv_sys_large_files+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 +printf %s "checking for _LARGE_FILES value needed for large files... " >&6; } +if test ${ac_cv_sys_large_files+y} +then : + printf %s "(cached) " >&6 +else $as_nop while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -19386,22 +22118,23 @@ We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_sys_large_files=no; break fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _LARGE_FILES 1 @@ -19410,83 +22143,85 @@ We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_sys_large_files=1; break fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_sys_large_files=unknown break done fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 -$as_echo "$ac_cv_sys_large_files" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 +printf "%s\n" "$ac_cv_sys_large_files" >&6; } case $ac_cv_sys_large_files in #( no | unknown) ;; *) -cat >>confdefs.h <<_ACEOF -#define _LARGE_FILES $ac_cv_sys_large_files -_ACEOF +printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h ;; esac rm -rf conftest* fi - - fi # Check whether --enable-shared-libs was given. -if test "${enable_shared_libs+set}" = set; then : +if test ${enable_shared_libs+y} +then : enableval=$enable_shared_libs; ac_cv_enable_shared_libs=$enableval -else +else $as_nop ac_cv_enable_shared_libs="yes" fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to disable disable shared library support" >&5 -$as_echo_n "checking whether to disable disable shared library support... " >&6; } -if ${ac_cv_enable_shared_libs+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to disable disable shared library support" >&5 +printf %s "checking whether to disable disable shared library support... " >&6; } +if test ${ac_cv_enable_shared_libs+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_enable_shared_libs="yes" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_shared_libs" >&5 -$as_echo "$ac_cv_enable_shared_libs" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_shared_libs" >&5 +printf "%s\n" "$ac_cv_enable_shared_libs" >&6; } # Check whether --enable-static-executables was given. -if test "${enable_static_executables+set}" = set; then : +if test ${enable_static_executables+y} +then : enableval=$enable_static_executables; ac_cv_enable_static_executables=$enableval -else +else $as_nop ac_cv_enable_static_executables=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable build static executables (binaries)" >&5 -$as_echo_n "checking whether to enable build static executables (binaries)... " >&6; } -if ${ac_cv_enable_static_executables+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable build static executables (binaries)" >&5 +printf %s "checking whether to enable build static executables (binaries)... " >&6; } +if test ${ac_cv_enable_static_executables+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_enable_static_executables=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_static_executables" >&5 -$as_echo "$ac_cv_enable_static_executables" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_static_executables" >&5 +printf "%s\n" "$ac_cv_enable_static_executables" >&6; } - if test "x$ac_cv_enable_static_executables" != xno; then : + if test "x$ac_cv_enable_static_executables" != xno +then : STATIC_LDFLAGS="-all-static"; @@ -19499,37 +22234,41 @@ # Check whether --enable-winapi was given. -if test "${enable_winapi+set}" = set; then : +if test ${enable_winapi+y} +then : enableval=$enable_winapi; ac_cv_enable_winapi=$enableval -else +else $as_nop ac_cv_enable_winapi=auto-detect fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable enable WINAPI support for cross-compilation" >&5 -$as_echo_n "checking whether to enable enable WINAPI support for cross-compilation... " >&6; } -if ${ac_cv_enable_winapi+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable enable WINAPI support for cross-compilation" >&5 +printf %s "checking whether to enable enable WINAPI support for cross-compilation... " >&6; } +if test ${ac_cv_enable_winapi+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_enable_winapi=auto-detect fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_winapi" >&5 -$as_echo "$ac_cv_enable_winapi" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_winapi" >&5 +printf "%s\n" "$ac_cv_enable_winapi" >&6; } - if test "x$ac_cv_enable_winapi" = xauto-detect; then : + if test "x$ac_cv_enable_winapi" = xauto-detect +then : ac_common_check_winapi_target_string="$target" - if test "x$ac_common_check_winapi_target_string" = x; then : + if test "x$ac_common_check_winapi_target_string" = x +then : ac_common_check_winapi_target_string="$host" fi case $ac_common_check_winapi_target_string in #( *mingw*) : - { $as_echo "$as_me:${as_lineno-$LINENO}: detected MinGW enabling WINAPI support for cross-compilation" >&5 -$as_echo "$as_me: detected MinGW enabling WINAPI support for cross-compilation" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: detected MinGW enabling WINAPI support for cross-compilation" >&5 +printf "%s\n" "$as_me: detected MinGW enabling WINAPI support for cross-compilation" >&6;} ac_cv_enable_winapi=yes ;; #( *msys*) : - { $as_echo "$as_me:${as_lineno-$LINENO}: detected MSYS enabling WINAPI support for cross-compilation" >&5 -$as_echo "$as_me: detected MSYS enabling WINAPI support for cross-compilation" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: detected MSYS enabling WINAPI support for cross-compilation" >&5 +printf "%s\n" "$as_me: detected MSYS enabling WINAPI support for cross-compilation" >&6;} ac_cv_enable_winapi=yes ;; #( *) : ac_cv_enable_winapi=no ;; #( @@ -19543,45 +22282,50 @@ # Check whether --enable-wide-character-type was given. -if test "${enable_wide_character_type+set}" = set; then : +if test ${enable_wide_character_type+y} +then : enableval=$enable_wide_character_type; ac_cv_enable_wide_character_type=$enableval -else +else $as_nop ac_cv_enable_wide_character_type=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable enable wide character type support" >&5 -$as_echo_n "checking whether to enable enable wide character type support... " >&6; } -if ${ac_cv_enable_wide_character_type+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable enable wide character type support" >&5 +printf %s "checking whether to enable enable wide character type support... " >&6; } +if test ${ac_cv_enable_wide_character_type+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_enable_wide_character_type=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_wide_character_type" >&5 -$as_echo "$ac_cv_enable_wide_character_type" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_wide_character_type" >&5 +printf "%s\n" "$ac_cv_enable_wide_character_type" >&6; } # Check whether --enable-verbose-output was given. -if test "${enable_verbose_output+set}" = set; then : +if test ${enable_verbose_output+y} +then : enableval=$enable_verbose_output; ac_cv_enable_verbose_output=$enableval -else +else $as_nop ac_cv_enable_verbose_output=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable enable verbose output" >&5 -$as_echo_n "checking whether to enable enable verbose output... " >&6; } -if ${ac_cv_enable_verbose_output+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable enable verbose output" >&5 +printf %s "checking whether to enable enable verbose output... " >&6; } +if test ${ac_cv_enable_verbose_output+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_enable_verbose_output=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_verbose_output" >&5 -$as_echo "$ac_cv_enable_verbose_output" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_verbose_output" >&5 +printf "%s\n" "$ac_cv_enable_verbose_output" >&6; } - if test "x$ac_cv_enable_verbose_output" != xno ; then : + if test "x$ac_cv_enable_verbose_output" != xno +then : -$as_echo "#define HAVE_VERBOSE_OUTPUT 1" >>confdefs.h +printf "%s\n" "#define HAVE_VERBOSE_OUTPUT 1" >>confdefs.h ac_cv_enable_verbose_output=yes @@ -19591,136 +22335,155 @@ # Check whether --enable-debug-output was given. -if test "${enable_debug_output+set}" = set; then : +if test ${enable_debug_output+y} +then : enableval=$enable_debug_output; ac_cv_enable_debug_output=$enableval -else +else $as_nop ac_cv_enable_debug_output=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable enable debug output" >&5 -$as_echo_n "checking whether to enable enable debug output... " >&6; } -if ${ac_cv_enable_debug_output+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable enable debug output" >&5 +printf %s "checking whether to enable enable debug output... " >&6; } +if test ${ac_cv_enable_debug_output+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_enable_debug_output=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_debug_output" >&5 -$as_echo "$ac_cv_enable_debug_output" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_debug_output" >&5 +printf "%s\n" "$ac_cv_enable_debug_output" >&6; } - if test "x$ac_cv_enable_debug_output" != xno ; then : + if test "x$ac_cv_enable_debug_output" != xno +then : -$as_echo "#define HAVE_DEBUG_OUTPUT 1" >>confdefs.h +printf "%s\n" "#define HAVE_DEBUG_OUTPUT 1" >>confdefs.h ac_cv_enable_debug_output=yes fi -if test "x$ac_cv_enable_winapi" = xyes; then : +if test "x$ac_cv_enable_winapi" = xyes +then : ac_cv_enable_wide_character_type=yes fi - if test "x$ac_cv_enable_wide_character_type" = xyes; then : + if test "x$ac_cv_enable_wide_character_type" = xyes +then : -$as_echo "#define HAVE_WIDE_CHARACTER_TYPE 1" >>confdefs.h +printf "%s\n" "#define HAVE_WIDE_CHARACTER_TYPE 1" >>confdefs.h HAVE_WIDE_CHARACTER_TYPE=1 -else +else $as_nop HAVE_WIDE_CHARACTER_TYPE=0 fi - for ac_header in sys/types.h inttypes.h stdint.h wchar.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF + ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_types_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h fi +ac_fn_c_check_header_compile "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default" +if test "x$ac_cv_header_inttypes_h" = xyes +then : + printf "%s\n" "#define HAVE_INTTYPES_H 1" >>confdefs.h -done +fi +ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" +if test "x$ac_cv_header_stdint_h" = xyes +then : + printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default" +if test "x$ac_cv_header_wchar_h" = xyes +then : + printf "%s\n" "#define HAVE_WCHAR_H 1" >>confdefs.h + +fi - if test "x$ac_cv_header_sys_types_h" = xyes; then : + if test "x$ac_cv_header_sys_types_h" = xyes +then : HAVE_SYS_TYPES_H=1 -else +else $as_nop HAVE_SYS_TYPES_H=0 fi - if test "x$ac_cv_header_inttypes_h" = xyes; then : + if test "x$ac_cv_header_inttypes_h" = xyes +then : HAVE_INTTYPES_H=1 -else +else $as_nop HAVE_INTTYPES_H=0 fi - if test "x$ac_cv_header_stdint_h" = xyes; then : + if test "x$ac_cv_header_stdint_h" = xyes +then : HAVE_STDINT_H=1 -else +else $as_nop HAVE_STDINT_H=0 fi - if test "x$ac_cv_header_wchar_h" = xyes; then : + if test "x$ac_cv_header_wchar_h" = xyes +then : HAVE_WCHAR_H=1 -else +else $as_nop HAVE_WCHAR_H=0 fi ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" -if test "x$ac_cv_type_mode_t" = xyes; then : +if test "x$ac_cv_type_mode_t" = xyes +then : -else +else $as_nop -cat >>confdefs.h <<_ACEOF -#define mode_t int -_ACEOF +printf "%s\n" "#define mode_t int" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" -if test "x$ac_cv_type_off_t" = xyes; then : +if test "x$ac_cv_type_off_t" = xyes +then : -else +else $as_nop -cat >>confdefs.h <<_ACEOF -#define off_t long int -_ACEOF +printf "%s\n" "#define off_t long int" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = xyes; then : +if test "x$ac_cv_type_size_t" = xyes +then : -else +else $as_nop -cat >>confdefs.h <<_ACEOF -#define size_t unsigned int -_ACEOF +printf "%s\n" "#define size_t unsigned int" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "size32_t" "ac_cv_type_size32_t" "$ac_includes_default" -if test "x$ac_cv_type_size32_t" = xyes; then : +if test "x$ac_cv_type_size32_t" = xyes +then : HAVE_SIZE32_T=1 -else +else $as_nop HAVE_SIZE32_T=0 @@ -19728,10 +22491,11 @@ ac_fn_c_check_type "$LINENO" "ssize32_t" "ac_cv_type_ssize32_t" "$ac_includes_default" -if test "x$ac_cv_type_ssize32_t" = xyes; then : +if test "x$ac_cv_type_ssize32_t" = xyes +then : HAVE_SSIZE32_T=1 -else +else $as_nop HAVE_SSIZE32_T=0 @@ -19739,10 +22503,11 @@ ac_fn_c_check_type "$LINENO" "size64_t" "ac_cv_type_size64_t" "$ac_includes_default" -if test "x$ac_cv_type_size64_t" = xyes; then : +if test "x$ac_cv_type_size64_t" = xyes +then : HAVE_SIZE64_T=1 -else +else $as_nop HAVE_SIZE64_T=0 @@ -19750,10 +22515,11 @@ ac_fn_c_check_type "$LINENO" "ssize64_t" "ac_cv_type_ssize64_t" "$ac_includes_default" -if test "x$ac_cv_type_ssize64_t" = xyes; then : +if test "x$ac_cv_type_ssize64_t" = xyes +then : HAVE_SSIZE64_T=1 -else +else $as_nop HAVE_SSIZE64_T=0 @@ -19761,10 +22527,11 @@ ac_fn_c_check_type "$LINENO" "off64_t" "ac_cv_type_off64_t" "$ac_includes_default" -if test "x$ac_cv_type_off64_t" = xyes; then : +if test "x$ac_cv_type_off64_t" = xyes +then : HAVE_OFF64_T=1 -else +else $as_nop HAVE_OFF64_T=0 @@ -19772,12 +22539,14 @@ ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" -if test "x$ac_cv_type_ssize_t" = xyes; then : +if test "x$ac_cv_type_ssize_t" = xyes +then : fi ac_fn_c_check_type "$LINENO" "u64" "ac_cv_type_u64" "$ac_includes_default" -if test "x$ac_cv_type_u64" = xyes; then : +if test "x$ac_cv_type_u64" = xyes +then : fi @@ -19786,17 +22555,19 @@ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 -$as_echo_n "checking size of int... " >&6; } -if ${ac_cv_sizeof_int+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 +printf %s "checking size of int... " >&6; } +if test ${ac_cv_sizeof_int+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default" +then : -else +else $as_nop if test "$ac_cv_type_int" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (int) See \`config.log' for more details" "$LINENO" 5; } else @@ -19805,31 +22576,31 @@ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 -$as_echo "$ac_cv_sizeof_int" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 +printf "%s\n" "$ac_cv_sizeof_int" >&6; } -cat >>confdefs.h <<_ACEOF -#define SIZEOF_INT $ac_cv_sizeof_int -_ACEOF +printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 -$as_echo_n "checking size of long... " >&6; } -if ${ac_cv_sizeof_long+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 +printf %s "checking size of long... " >&6; } +if test ${ac_cv_sizeof_long+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default" +then : -else +else $as_nop if test "$ac_cv_type_long" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long) See \`config.log' for more details" "$LINENO" 5; } else @@ -19838,31 +22609,31 @@ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 -$as_echo "$ac_cv_sizeof_long" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 +printf "%s\n" "$ac_cv_sizeof_long" >&6; } -cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG $ac_cv_sizeof_long -_ACEOF +printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5 -$as_echo_n "checking size of off_t... " >&6; } -if ${ac_cv_sizeof_off_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5 +printf %s "checking size of off_t... " >&6; } +if test ${ac_cv_sizeof_off_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default" +then : -else +else $as_nop if test "$ac_cv_type_off_t" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (off_t) See \`config.log' for more details" "$LINENO" 5; } else @@ -19871,31 +22642,31 @@ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5 -$as_echo "$ac_cv_sizeof_off_t" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5 +printf "%s\n" "$ac_cv_sizeof_off_t" >&6; } -cat >>confdefs.h <<_ACEOF -#define SIZEOF_OFF_T $ac_cv_sizeof_off_t -_ACEOF +printf "%s\n" "#define SIZEOF_OFF_T $ac_cv_sizeof_off_t" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5 -$as_echo_n "checking size of size_t... " >&6; } -if ${ac_cv_sizeof_size_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5 +printf %s "checking size of size_t... " >&6; } +if test ${ac_cv_sizeof_size_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default" +then : -else +else $as_nop if test "$ac_cv_type_size_t" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (size_t) See \`config.log' for more details" "$LINENO" 5; } else @@ -19904,33 +22675,34 @@ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5 -$as_echo "$ac_cv_sizeof_size_t" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5 +printf "%s\n" "$ac_cv_sizeof_size_t" >&6; } -cat >>confdefs.h <<_ACEOF -#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t -_ACEOF +printf "%s\n" "#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t" >>confdefs.h - if test "x$ac_cv_header_wchar_h" = xyes; then : + if test "x$ac_cv_header_wchar_h" = xyes +then : # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5 -$as_echo_n "checking size of wchar_t... " >&6; } -if ${ac_cv_sizeof_wchar_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "$ac_includes_default"; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5 +printf %s "checking size of wchar_t... " >&6; } +if test ${ac_cv_sizeof_wchar_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "$ac_includes_default" +then : -else +else $as_nop if test "$ac_cv_type_wchar_t" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (wchar_t) See \`config.log' for more details" "$LINENO" 5; } else @@ -19939,37 +22711,112 @@ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5 -$as_echo "$ac_cv_sizeof_wchar_t" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5 +printf "%s\n" "$ac_cv_sizeof_wchar_t" >&6; } -cat >>confdefs.h <<_ACEOF -#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t -_ACEOF +printf "%s\n" "#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t" >>confdefs.h fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5 +printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; } +if test ${ac_cv_c_undeclared_builtin_options+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_save_CFLAGS=$CFLAGS + ac_cv_c_undeclared_builtin_options='cannot detect' + for ac_arg in '' -fno-builtin; do + CFLAGS="$ac_save_CFLAGS $ac_arg" + # This test program should *not* compile successfully. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - if test "x$ac_cv_enable_winapi" = xyes; then : - for ac_header in windows.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default" -if test "x$ac_cv_header_windows_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_WINDOWS_H 1 +int +main (void) +{ +(void) strchr; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + +else $as_nop + # This test program should compile successfully. + # No library function is consistently available on + # freestanding implementations, so test against a dummy + # declaration. Include always-available headers on the + # off chance that they somehow elicit warnings. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include +extern void ac_decl (int, char *); + +int +main (void) +{ +(void) ac_decl (0, (char *) 0); + (void) ac_decl; + + ; + return 0; +} _ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + if test x"$ac_arg" = x +then : + ac_cv_c_undeclared_builtin_options='none needed' +else $as_nop + ac_cv_c_undeclared_builtin_options=$ac_arg +fi + break +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + done + CFLAGS=$ac_save_CFLAGS fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5 +printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; } + case $ac_cv_c_undeclared_builtin_options in #( + 'cannot detect') : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot make $CC report undeclared builtins +See \`config.log' for more details" "$LINENO" 5; } ;; #( + 'none needed') : + ac_c_undeclared_builtin_options='' ;; #( + *) : + ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;; +esac -done + + if test "x$ac_cv_enable_winapi" = xyes +then : + ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default" +if test "x$ac_cv_header_windows_h" = xyes +then : + printf "%s\n" "#define HAVE_WINDOWS_H 1" >>confdefs.h + +fi - if test "x$ac_cv_header_windows_h" = xno; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_header_windows_h" = xno +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing header: windows.h header is required to compile with winapi support See \`config.log' for more details" "$LINENO" 5; } @@ -19977,156 +22824,196 @@ fi - if test "x$ac_cv_enable_winapi" = xno; then : - for ac_header in libintl.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default" -if test "x$ac_cv_header_libintl_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBINTL_H 1 -_ACEOF + if test "x$ac_cv_enable_winapi" = xno +then : + ac_fn_c_check_header_compile "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default" +if test "x$ac_cv_header_libintl_h" = xyes +then : + printf "%s\n" "#define HAVE_LIBINTL_H 1" >>confdefs.h fi -done +fi + + ac_fn_c_check_header_compile "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default" +if test "x$ac_cv_header_limits_h" = xyes +then : + printf "%s\n" "#define HAVE_LIMITS_H 1" >>confdefs.h fi - for ac_header in limits.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default" -if test "x$ac_cv_header_limits_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIMITS_H 1 -_ACEOF + + ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" +if test "x$ac_cv_header_stdlib_h" = xyes +then : + printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h fi +ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" +if test "x$ac_cv_header_string_h" = xyes +then : + printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h -done +fi - for ac_header in stdlib.h string.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF + ac_fn_c_check_header_compile "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default" +if test "x$ac_cv_header_wchar_h" = xyes +then : + printf "%s\n" "#define HAVE_WCHAR_H 1" >>confdefs.h fi +ac_fn_c_check_header_compile "$LINENO" "wctype.h" "ac_cv_header_wctype_h" "$ac_includes_default" +if test "x$ac_cv_header_wctype_h" = xyes +then : + printf "%s\n" "#define HAVE_WCTYPE_H 1" >>confdefs.h -done +fi - for ac_header in wchar.h wctype.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF + ac_fn_c_check_func "$LINENO" "fclose" "ac_cv_func_fclose" +if test "x$ac_cv_func_fclose" = xyes +then : + printf "%s\n" "#define HAVE_FCLOSE 1" >>confdefs.h fi +ac_fn_c_check_func "$LINENO" "feof" "ac_cv_func_feof" +if test "x$ac_cv_func_feof" = xyes +then : + printf "%s\n" "#define HAVE_FEOF 1" >>confdefs.h -done +fi +ac_fn_c_check_func "$LINENO" "fgets" "ac_cv_func_fgets" +if test "x$ac_cv_func_fgets" = xyes +then : + printf "%s\n" "#define HAVE_FGETS 1" >>confdefs.h +fi +ac_fn_c_check_func "$LINENO" "fopen" "ac_cv_func_fopen" +if test "x$ac_cv_func_fopen" = xyes +then : + printf "%s\n" "#define HAVE_FOPEN 1" >>confdefs.h - for ac_func in fclose feof fgets fopen fread fseeko fseeko64 fwrite vfprintf -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF +fi +ac_fn_c_check_func "$LINENO" "fread" "ac_cv_func_fread" +if test "x$ac_cv_func_fread" = xyes +then : + printf "%s\n" "#define HAVE_FREAD 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko" +if test "x$ac_cv_func_fseeko" = xyes +then : + printf "%s\n" "#define HAVE_FSEEKO 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "fseeko64" "ac_cv_func_fseeko64" +if test "x$ac_cv_func_fseeko64" = xyes +then : + printf "%s\n" "#define HAVE_FSEEKO64 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "fwrite" "ac_cv_func_fwrite" +if test "x$ac_cv_func_fwrite" = xyes +then : + printf "%s\n" "#define HAVE_FWRITE 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "vfprintf" "ac_cv_func_vfprintf" +if test "x$ac_cv_func_vfprintf" = xyes +then : + printf "%s\n" "#define HAVE_VFPRINTF 1" >>confdefs.h fi -done - if test "x$ac_cv_func_fclose" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_fclose" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: fclose See \`config.log' for more details" "$LINENO" 5; } fi - if test "x$ac_cv_func_feof" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_feof" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: feof See \`config.log' for more details" "$LINENO" 5; } fi - if test "x$ac_cv_func_fgets" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_fgets" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: fgets See \`config.log' for more details" "$LINENO" 5; } fi - if test "x$ac_cv_func_fopen" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_fopen" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: fopen See \`config.log' for more details" "$LINENO" 5; } fi - if test "x$ac_cv_func_fread" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_fread" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: fread See \`config.log' for more details" "$LINENO" 5; } fi - if test "x$ac_cv_func_fseeko" != xyes && test "x$ac_cv_func_fseeko64" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_fseeko" != xyes && test "x$ac_cv_func_fseeko64" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: fseeko and fseeko64 See \`config.log' for more details" "$LINENO" 5; } fi - if test "x$ac_cv_func_fwrite" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_fwrite" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: fwrite See \`config.log' for more details" "$LINENO" 5; } fi - if test "x$ac_cv_func_vfprintf" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_vfprintf" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: vfprintf See \`config.log' for more details" "$LINENO" 5; } fi - if test "x$ac_cv_enable_wide_character_type" != xno; then : - for ac_func in fgetws -do : + if test "x$ac_cv_enable_wide_character_type" != xno +then : ac_fn_c_check_func "$LINENO" "fgetws" "ac_cv_func_fgetws" -if test "x$ac_cv_func_fgetws" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_FGETWS 1 -_ACEOF +if test "x$ac_cv_func_fgetws" = xyes +then : + printf "%s\n" "#define HAVE_FGETWS 1" >>confdefs.h fi -done - if test "x$ac_cv_func_fgetws" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_fgetws" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: fgetws See \`config.log' for more details" "$LINENO" 5; } @@ -20134,252 +23021,454 @@ fi - for ac_func in free malloc memcmp memcpy memset realloc -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF + ac_fn_c_check_func "$LINENO" "free" "ac_cv_func_free" +if test "x$ac_cv_func_free" = xyes +then : + printf "%s\n" "#define HAVE_FREE 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "malloc" "ac_cv_func_malloc" +if test "x$ac_cv_func_malloc" = xyes +then : + printf "%s\n" "#define HAVE_MALLOC 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "memcmp" "ac_cv_func_memcmp" +if test "x$ac_cv_func_memcmp" = xyes +then : + printf "%s\n" "#define HAVE_MEMCMP 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "memcpy" "ac_cv_func_memcpy" +if test "x$ac_cv_func_memcpy" = xyes +then : + printf "%s\n" "#define HAVE_MEMCPY 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset" +if test "x$ac_cv_func_memset" = xyes +then : + printf "%s\n" "#define HAVE_MEMSET 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "realloc" "ac_cv_func_realloc" +if test "x$ac_cv_func_realloc" = xyes +then : + printf "%s\n" "#define HAVE_REALLOC 1" >>confdefs.h fi -done - if test "x$ac_cv_func_free" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_free" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: free See \`config.log' for more details" "$LINENO" 5; } fi - if test "x$ac_cv_func_malloc" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_malloc" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: malloc See \`config.log' for more details" "$LINENO" 5; } fi - if test "x$ac_cv_func_memcmp" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_memcmp" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: memcmp See \`config.log' for more details" "$LINENO" 5; } fi - if test "x$ac_cv_func_memcpy" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_memcpy" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: memcpy See \`config.log' for more details" "$LINENO" 5; } fi - if test "x$ac_cv_func_memset" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_memset" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: memset See \`config.log' for more details" "$LINENO" 5; } fi - if test "x$ac_cv_func_realloc" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_realloc" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: realloc See \`config.log' for more details" "$LINENO" 5; } fi - for ac_func in memchr memrchr snprintf sscanf strcasecmp strchr strlen strncasecmp strncmp strncpy strnicmp strrchr strstr vsnprintf -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF + ac_fn_c_check_func "$LINENO" "memchr" "ac_cv_func_memchr" +if test "x$ac_cv_func_memchr" = xyes +then : + printf "%s\n" "#define HAVE_MEMCHR 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr" +if test "x$ac_cv_func_memrchr" = xyes +then : + printf "%s\n" "#define HAVE_MEMRCHR 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf" +if test "x$ac_cv_func_snprintf" = xyes +then : + printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "sscanf" "ac_cv_func_sscanf" +if test "x$ac_cv_func_sscanf" = xyes +then : + printf "%s\n" "#define HAVE_SSCANF 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp" +if test "x$ac_cv_func_strcasecmp" = xyes +then : + printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "strchr" "ac_cv_func_strchr" +if test "x$ac_cv_func_strchr" = xyes +then : + printf "%s\n" "#define HAVE_STRCHR 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "strlen" "ac_cv_func_strlen" +if test "x$ac_cv_func_strlen" = xyes +then : + printf "%s\n" "#define HAVE_STRLEN 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp" +if test "x$ac_cv_func_strncasecmp" = xyes +then : + printf "%s\n" "#define HAVE_STRNCASECMP 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "strncmp" "ac_cv_func_strncmp" +if test "x$ac_cv_func_strncmp" = xyes +then : + printf "%s\n" "#define HAVE_STRNCMP 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "strncpy" "ac_cv_func_strncpy" +if test "x$ac_cv_func_strncpy" = xyes +then : + printf "%s\n" "#define HAVE_STRNCPY 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "strnicmp" "ac_cv_func_strnicmp" +if test "x$ac_cv_func_strnicmp" = xyes +then : + printf "%s\n" "#define HAVE_STRNICMP 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "strrchr" "ac_cv_func_strrchr" +if test "x$ac_cv_func_strrchr" = xyes +then : + printf "%s\n" "#define HAVE_STRRCHR 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "strstr" "ac_cv_func_strstr" +if test "x$ac_cv_func_strstr" = xyes +then : + printf "%s\n" "#define HAVE_STRSTR 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf" +if test "x$ac_cv_func_vsnprintf" = xyes +then : + printf "%s\n" "#define HAVE_VSNPRINTF 1" >>confdefs.h fi -done - if test "x$ac_cv_func_memchr" != xyes && test "x$ac_cv_func_strchr" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_memchr" != xyes && test "x$ac_cv_func_strchr" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing functions: memchr and strchr See \`config.log' for more details" "$LINENO" 5; } fi - if test "x$ac_cv_func_memcmp" != xyes && test "x$ac_cv_func_strncmp" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_memcmp" != xyes && test "x$ac_cv_func_strncmp" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing functions: memcmp and strncmp See \`config.log' for more details" "$LINENO" 5; } fi - if test "x$ac_cv_func_memcpy" != xyes && test "x$ac_cv_func_strncpy" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_memcpy" != xyes && test "x$ac_cv_func_strncpy" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing functions: memcpy and strncpy See \`config.log' for more details" "$LINENO" 5; } fi - if test "x$ac_cv_func_memrchr" = xyes; then : - ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default" -if test "x$ac_cv_have_decl_memrchr" = xyes; then : + if test "x$ac_cv_func_memrchr" = xyes +then : + ac_fn_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_memrchr" = xyes +then : ac_have_decl=1 -else +else $as_nop ac_have_decl=0 fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_MEMRCHR $ac_have_decl -_ACEOF +printf "%s\n" "#define HAVE_DECL_MEMRCHR $ac_have_decl" >>confdefs.h - if test "x$ac_cv_decl_memrchr" != xyes; then : + if test "x$ac_cv_decl_memrchr" != xyes +then : ac_cv_func_memrchr=no fi fi - if test "x$ac_cv_func_memrchr" != xyes && test "x$ac_cv_func_strrchr" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_memrchr" != xyes && test "x$ac_cv_func_strrchr" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing functions: strrchr and memrchr See \`config.log' for more details" "$LINENO" 5; } fi - if test "x$ac_cv_func_snprintf" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_snprintf" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: snprintf See \`config.log' for more details" "$LINENO" 5; } fi - if test "x$ac_cv_func_sscanf" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_sscanf" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: sscanf See \`config.log' for more details" "$LINENO" 5; } fi - if test "x$ac_cv_func_strlen" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_strlen" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: strlen See \`config.log' for more details" "$LINENO" 5; } fi - if test "x$ac_cv_func_strcasecmp" != xyes && test "x$ac_cv_func_strncasecmp" != xyes && test "x$ac_cv_func_strnicmp" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_strcasecmp" != xyes && test "x$ac_cv_func_strncasecmp" != xyes && test "x$ac_cv_func_strnicmp" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing functions: strncasecmp, strcasecmp and strnicmp See \`config.log' for more details" "$LINENO" 5; } fi - if test "x$ac_cv_func_strstr" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_strstr" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: strstr See \`config.log' for more details" "$LINENO" 5; } fi - if test "x$ac_cv_func_vsnprintf" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_vsnprintf" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: vsnprintf See \`config.log' for more details" "$LINENO" 5; } fi - if test "x$ac_cv_enable_wide_character_type" != xno; then : - for ac_func in swprintf towlower wcscasecmp wcschr wcslen wcsncasecmp wcsncmp wcsncpy wcsnicmp wcsrchr wcsstr wmemchr wmemcmp wmemcpy wmemrchr -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF + if test "x$ac_cv_enable_wide_character_type" != xno +then : + ac_fn_c_check_func "$LINENO" "swprintf" "ac_cv_func_swprintf" +if test "x$ac_cv_func_swprintf" = xyes +then : + printf "%s\n" "#define HAVE_SWPRINTF 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower" +if test "x$ac_cv_func_towlower" = xyes +then : + printf "%s\n" "#define HAVE_TOWLOWER 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "wcscasecmp" "ac_cv_func_wcscasecmp" +if test "x$ac_cv_func_wcscasecmp" = xyes +then : + printf "%s\n" "#define HAVE_WCSCASECMP 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "wcschr" "ac_cv_func_wcschr" +if test "x$ac_cv_func_wcschr" = xyes +then : + printf "%s\n" "#define HAVE_WCSCHR 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "wcslen" "ac_cv_func_wcslen" +if test "x$ac_cv_func_wcslen" = xyes +then : + printf "%s\n" "#define HAVE_WCSLEN 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "wcsncasecmp" "ac_cv_func_wcsncasecmp" +if test "x$ac_cv_func_wcsncasecmp" = xyes +then : + printf "%s\n" "#define HAVE_WCSNCASECMP 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "wcsncmp" "ac_cv_func_wcsncmp" +if test "x$ac_cv_func_wcsncmp" = xyes +then : + printf "%s\n" "#define HAVE_WCSNCMP 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "wcsncpy" "ac_cv_func_wcsncpy" +if test "x$ac_cv_func_wcsncpy" = xyes +then : + printf "%s\n" "#define HAVE_WCSNCPY 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "wcsnicmp" "ac_cv_func_wcsnicmp" +if test "x$ac_cv_func_wcsnicmp" = xyes +then : + printf "%s\n" "#define HAVE_WCSNICMP 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "wcsrchr" "ac_cv_func_wcsrchr" +if test "x$ac_cv_func_wcsrchr" = xyes +then : + printf "%s\n" "#define HAVE_WCSRCHR 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "wcsstr" "ac_cv_func_wcsstr" +if test "x$ac_cv_func_wcsstr" = xyes +then : + printf "%s\n" "#define HAVE_WCSSTR 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "wmemchr" "ac_cv_func_wmemchr" +if test "x$ac_cv_func_wmemchr" = xyes +then : + printf "%s\n" "#define HAVE_WMEMCHR 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "wmemcmp" "ac_cv_func_wmemcmp" +if test "x$ac_cv_func_wmemcmp" = xyes +then : + printf "%s\n" "#define HAVE_WMEMCMP 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "wmemcpy" "ac_cv_func_wmemcpy" +if test "x$ac_cv_func_wmemcpy" = xyes +then : + printf "%s\n" "#define HAVE_WMEMCPY 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "wmemrchr" "ac_cv_func_wmemrchr" +if test "x$ac_cv_func_wmemrchr" = xyes +then : + printf "%s\n" "#define HAVE_WMEMRCHR 1" >>confdefs.h fi -done - if test "x$ac_cv_func_swprintf" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_swprintf" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: swprintf See \`config.log' for more details" "$LINENO" 5; } fi - if test "x$ac_cv_func_wmemchr" != xyes && test "x$ac_cv_func_wcschr" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_wmemchr" != xyes && test "x$ac_cv_func_wcschr" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing functions: wmemchr and wcschr See \`config.log' for more details" "$LINENO" 5; } fi - if test "x$ac_cv_func_wmemcmp" != xyes && test "x$ac_cv_func_wcsncmp" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_wmemcmp" != xyes && test "x$ac_cv_func_wcsncmp" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing functions: wmemcmp and wcsncmp See \`config.log' for more details" "$LINENO" 5; } fi - if test "x$ac_cv_func_wmemcpy" != xyes && test "x$ac_cv_func_wcsncpy" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_wmemcpy" != xyes && test "x$ac_cv_func_wcsncpy" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing functions: wmemcpy and wcsncpy See \`config.log' for more details" "$LINENO" 5; } fi - if test "x$ac_cv_func_wmemrchr" != xyes && test "x$ac_cv_func_wcsrchr" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_wmemrchr" != xyes && test "x$ac_cv_func_wcsrchr" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing functions: wmemrchr and wcsrchr See \`config.log' for more details" "$LINENO" 5; } fi - if test "x$ac_cv_func_wcslen" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_wcslen" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: wcslen See \`config.log' for more details" "$LINENO" 5; } fi - if test "x$ac_cv_func_wcsncasecmp" != xyes && test "x$ac_cv_func_wcscasecmp" != xyes && test "x$ac_cv_func_wcsnicmp" != xyes && test "x$ac_cv_func_towlower" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_wcsncasecmp" != xyes && test "x$ac_cv_func_wcscasecmp" != xyes && test "x$ac_cv_func_wcsnicmp" != xyes && test "x$ac_cv_func_towlower" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing functions: wcsncasecmp, wcscasecmp, wcsnicmp and towlower See \`config.log' for more details" "$LINENO" 5; } fi - if test "x$ac_cv_func_wcsstr" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_wcsstr" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: wcsstr See \`config.log' for more details" "$LINENO" 5; } @@ -20388,8 +23477,8 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the conversion specifier \"%jd\"" >&5 -$as_echo_n "checking whether printf supports the conversion specifier \"%jd\"... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the conversion specifier \"%jd\"" >&5 +printf %s "checking whether printf supports the conversion specifier \"%jd\"... " >&6; } SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wall -Werror" @@ -20404,54 +23493,59 @@ /* end confdefs.h. */ #include int -main () +main (void) { printf( "%jd" ); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_cv_have_printf_jd=no -else +else $as_nop ac_cv_cv_have_printf_jd=yes fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - if test "x$ac_cv_cv_have_printf_jd" = xyes; then : + if test "x$ac_cv_cv_have_printf_jd" = xyes +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int -main () +main (void) { printf( "%jd", (off_t) 10 ); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_cv_have_printf_jd=yes -else +else $as_nop ac_cv_cv_have_printf_jd=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi - if test "x$ac_cv_cv_have_printf_jd" = xyes; then : - if test "$cross_compiling" = yes; then : + if test "x$ac_cv_cv_have_printf_jd" = xyes +then : + if test "$cross_compiling" = yes +then : ac_cv_cv_have_printf_jd=undetermined -else +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int -main () +main (void) { char string[ 3 ]; if( snprintf( string, 3, "%jd", (off_t) 10 ) < 0 ) return( 1 ); @@ -20460,9 +23554,10 @@ return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +if ac_fn_c_try_run "$LINENO" +then : ac_cv_cv_have_printf_jd=yes -else +else $as_nop ac_cv_cv_have_printf_jd=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -20480,21 +23575,22 @@ CFLAGS="$SAVE_CFLAGS" - if test "x$ac_cv_cv_have_printf_jd" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + if test "x$ac_cv_cv_have_printf_jd" = xyes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -$as_echo "#define HAVE_PRINTF_JD 1" >>confdefs.h +printf "%s\n" "#define HAVE_PRINTF_JD 1" >>confdefs.h -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cv_have_printf_jd" >&5 -$as_echo "$ac_cv_cv_have_printf_jd" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cv_have_printf_jd" >&5 +printf "%s\n" "$ac_cv_cv_have_printf_jd" >&6; } fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the conversion specifier \"%zd\"" >&5 -$as_echo_n "checking whether printf supports the conversion specifier \"%zd\"... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the conversion specifier \"%zd\"" >&5 +printf %s "checking whether printf supports the conversion specifier \"%zd\"... " >&6; } SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wall -Werror" @@ -20509,54 +23605,59 @@ /* end confdefs.h. */ #include int -main () +main (void) { printf( "%zd" ); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_cv_have_printf_zd=no -else +else $as_nop ac_cv_cv_have_printf_zd=yes fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - if test "x$ac_cv_cv_have_printf_zd" = xyes; then : + if test "x$ac_cv_cv_have_printf_zd" = xyes +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int -main () +main (void) { printf( "%zd", (size_t) 10 ); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_cv_have_printf_zd=yes -else +else $as_nop ac_cv_cv_have_printf_zd=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi - if test "x$ac_cv_cv_have_printf_zd" = xyes; then : - if test "$cross_compiling" = yes; then : + if test "x$ac_cv_cv_have_printf_zd" = xyes +then : + if test "$cross_compiling" = yes +then : ac_cv_cv_have_printf_zd=undetermined -else +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int -main () +main (void) { char string[ 3 ]; if( snprintf( string, 3, "%zd", (size_t) 10 ) < 0 ) return( 1 ); @@ -20565,9 +23666,10 @@ return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +if ac_fn_c_try_run "$LINENO" +then : ac_cv_cv_have_printf_zd=yes -else +else $as_nop ac_cv_cv_have_printf_zd=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -20585,15 +23687,16 @@ CFLAGS="$SAVE_CFLAGS" - if test "x$ac_cv_cv_have_printf_zd" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_PRINTF_ZD 1" >>confdefs.h - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cv_have_printf_zd" >&5 -$as_echo "$ac_cv_cv_have_printf_zd" >&6; } + if test "x$ac_cv_cv_have_printf_zd" = xyes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + +printf "%s\n" "#define HAVE_PRINTF_ZD 1" >>confdefs.h + +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cv_have_printf_zd" >&5 +printf "%s\n" "$ac_cv_cv_have_printf_zd" >&6; } fi @@ -20610,11 +23713,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_PKG_CONFIG+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. @@ -20624,11 +23728,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -20640,11 +23748,11 @@ fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +printf "%s\n" "$PKG_CONFIG" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -20653,11 +23761,12 @@ ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_ac_pt_PKG_CONFIG+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. @@ -20667,11 +23776,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -20683,11 +23796,11 @@ fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 -$as_echo "$ac_pt_PKG_CONFIG" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 +printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then @@ -20695,8 +23808,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG @@ -20708,67 +23821,82 @@ fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 -$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 +printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } PKG_CONFIG="" fi fi +ac_fn_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_strerror_r" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_STRERROR_R $ac_have_decl" >>confdefs.h + # Check whether --with-libcerror was given. -if test "${with_libcerror+set}" = set; then : +if test ${with_libcerror+y} +then : withval=$with_libcerror; ac_cv_with_libcerror=$withval -else +else $as_nop ac_cv_with_libcerror=auto-detect fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libcerror in includedir and libdir or in the specified DIR, or no if to use local version" >&5 -$as_echo_n "checking whether to use search for libcerror in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } -if ${ac_cv_with_libcerror+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use search for libcerror in includedir and libdir or in the specified DIR, or no if to use local version" >&5 +printf %s "checking whether to use search for libcerror in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } +if test ${ac_cv_with_libcerror+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_with_libcerror=auto-detect fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libcerror" >&5 -$as_echo "$ac_cv_with_libcerror" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libcerror" >&5 +printf "%s\n" "$ac_cv_with_libcerror" >&6; } - if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libcerror" = xno; then : + if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libcerror" = xno +then : ac_cv_libcerror=no -else +else $as_nop ac_cv_libcerror=check - if test "x$ac_cv_with_libcerror" != x && test "x$ac_cv_with_libcerror" != xauto-detect; then : - if test -d "$ac_cv_with_libcerror"; then : + if test "x$ac_cv_with_libcerror" != x && test "x$ac_cv_with_libcerror" != xauto-detect +then : + if test -d "$ac_cv_with_libcerror" +then : CFLAGS="$CFLAGS -I${ac_cv_with_libcerror}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libcerror}/lib" -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "no such directory: $ac_cv_with_libcerror See \`config.log' for more details" "$LINENO" 5; } fi -else - if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : +else $as_nop + if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x" +then : pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcerror" >&5 -$as_echo_n "checking for libcerror... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcerror >= 20120425" >&5 +printf %s "checking for libcerror >= 20120425... " >&6; } if test -n "$libcerror_CFLAGS"; then pkg_cv_libcerror_CFLAGS="$libcerror_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcerror >= 20120425\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcerror >= 20120425\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcerror >= 20120425") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libcerror_CFLAGS=`$PKG_CONFIG --cflags "libcerror >= 20120425" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -20782,10 +23910,10 @@ pkg_cv_libcerror_LIBS="$libcerror_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcerror >= 20120425\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcerror >= 20120425\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcerror >= 20120425") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libcerror_LIBS=`$PKG_CONFIG --libs "libcerror >= 20120425" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -20799,8 +23927,8 @@ if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -20808,58 +23936,57 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - libcerror_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libcerror >= 20120425" 2>&1` + libcerror_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libcerror >= 20120425" 2>&1` else - libcerror_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libcerror >= 20120425" 2>&1` + libcerror_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libcerror >= 20120425" 2>&1` fi - # Put the nasty error message in config.log where it belongs - echo "$libcerror_PKG_ERRORS" >&5 + # Put the nasty error message in config.log where it belongs + echo "$libcerror_PKG_ERRORS" >&5 - ac_cv_libcerror=check + ac_cv_libcerror=check elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ac_cv_libcerror=check + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ac_cv_libcerror=check else - libcerror_CFLAGS=$pkg_cv_libcerror_CFLAGS - libcerror_LIBS=$pkg_cv_libcerror_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ac_cv_libcerror=yes + libcerror_CFLAGS=$pkg_cv_libcerror_CFLAGS + libcerror_LIBS=$pkg_cv_libcerror_LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + ac_cv_libcerror=yes fi fi - if test "x$ac_cv_libcerror" = xyes; then : + if test "x$ac_cv_libcerror" = xyes +then : ac_cv_libcerror_CPPFLAGS="$pkg_cv_libcerror_CFLAGS" ac_cv_libcerror_LIBADD="$pkg_cv_libcerror_LIBS" fi fi - if test "x$ac_cv_libcerror" = xcheck; then : - for ac_header in libcerror.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "libcerror.h" "ac_cv_header_libcerror_h" "$ac_includes_default" -if test "x$ac_cv_header_libcerror_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBCERROR_H 1 -_ACEOF + if test "x$ac_cv_libcerror" = xcheck +then : + ac_fn_c_check_header_compile "$LINENO" "libcerror.h" "ac_cv_header_libcerror_h" "$ac_includes_default" +if test "x$ac_cv_header_libcerror_h" = xyes +then : + printf "%s\n" "#define HAVE_LIBCERROR_H 1" >>confdefs.h fi -done - - if test "x$ac_cv_header_libcerror_h" = xno; then : + if test "x$ac_cv_header_libcerror_h" = xno +then : ac_cv_libcerror=no -else +else $as_nop ac_cv_libcerror=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcerror_get_version in -lcerror" >&5 -$as_echo_n "checking for libcerror_get_version in -lcerror... " >&6; } -if ${ac_cv_lib_cerror_libcerror_get_version+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcerror_get_version in -lcerror" >&5 +printf %s "checking for libcerror_get_version in -lcerror... " >&6; } +if test ${ac_cv_lib_cerror_libcerror_get_version+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcerror $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -20868,41 +23995,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcerror_get_version (); int -main () +main (void) { return libcerror_get_version (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cerror_libcerror_get_version=yes -else +else $as_nop ac_cv_lib_cerror_libcerror_get_version=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cerror_libcerror_get_version" >&5 -$as_echo "$ac_cv_lib_cerror_libcerror_get_version" >&6; } -if test "x$ac_cv_lib_cerror_libcerror_get_version" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cerror_libcerror_get_version" >&5 +printf "%s\n" "$ac_cv_lib_cerror_libcerror_get_version" >&6; } +if test "x$ac_cv_lib_cerror_libcerror_get_version" = xyes +then : ac_cv_libcerror_dummy=yes -else +else $as_nop ac_cv_libcerror=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcerror_error_free in -lcerror" >&5 -$as_echo_n "checking for libcerror_error_free in -lcerror... " >&6; } -if ${ac_cv_lib_cerror_libcerror_error_free+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcerror_error_free in -lcerror" >&5 +printf %s "checking for libcerror_error_free in -lcerror... " >&6; } +if test ${ac_cv_lib_cerror_libcerror_error_free+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcerror $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -20911,40 +24038,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcerror_error_free (); int -main () +main (void) { return libcerror_error_free (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cerror_libcerror_error_free=yes -else +else $as_nop ac_cv_lib_cerror_libcerror_error_free=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cerror_libcerror_error_free" >&5 -$as_echo "$ac_cv_lib_cerror_libcerror_error_free" >&6; } -if test "x$ac_cv_lib_cerror_libcerror_error_free" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cerror_libcerror_error_free" >&5 +printf "%s\n" "$ac_cv_lib_cerror_libcerror_error_free" >&6; } +if test "x$ac_cv_lib_cerror_libcerror_error_free" = xyes +then : ac_cv_libcerror_dummy=yes -else +else $as_nop ac_cv_libcerror=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcerror_error_set in -lcerror" >&5 -$as_echo_n "checking for libcerror_error_set in -lcerror... " >&6; } -if ${ac_cv_lib_cerror_libcerror_error_set+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcerror_error_set in -lcerror" >&5 +printf %s "checking for libcerror_error_set in -lcerror... " >&6; } +if test ${ac_cv_lib_cerror_libcerror_error_set+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcerror $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -20953,40 +24080,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcerror_error_set (); int -main () +main (void) { return libcerror_error_set (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cerror_libcerror_error_set=yes -else +else $as_nop ac_cv_lib_cerror_libcerror_error_set=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cerror_libcerror_error_set" >&5 -$as_echo "$ac_cv_lib_cerror_libcerror_error_set" >&6; } -if test "x$ac_cv_lib_cerror_libcerror_error_set" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cerror_libcerror_error_set" >&5 +printf "%s\n" "$ac_cv_lib_cerror_libcerror_error_set" >&6; } +if test "x$ac_cv_lib_cerror_libcerror_error_set" = xyes +then : ac_cv_libcerror_dummy=yes -else +else $as_nop ac_cv_libcerror=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcerror_error_matches in -lcerror" >&5 -$as_echo_n "checking for libcerror_error_matches in -lcerror... " >&6; } -if ${ac_cv_lib_cerror_libcerror_error_matches+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcerror_error_matches in -lcerror" >&5 +printf %s "checking for libcerror_error_matches in -lcerror... " >&6; } +if test ${ac_cv_lib_cerror_libcerror_error_matches+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcerror $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -20995,40 +24122,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcerror_error_matches (); int -main () +main (void) { return libcerror_error_matches (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cerror_libcerror_error_matches=yes -else +else $as_nop ac_cv_lib_cerror_libcerror_error_matches=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cerror_libcerror_error_matches" >&5 -$as_echo "$ac_cv_lib_cerror_libcerror_error_matches" >&6; } -if test "x$ac_cv_lib_cerror_libcerror_error_matches" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cerror_libcerror_error_matches" >&5 +printf "%s\n" "$ac_cv_lib_cerror_libcerror_error_matches" >&6; } +if test "x$ac_cv_lib_cerror_libcerror_error_matches" = xyes +then : ac_cv_libcerror_dummy=yes -else +else $as_nop ac_cv_libcerror=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcerror_error_fprint in -lcerror" >&5 -$as_echo_n "checking for libcerror_error_fprint in -lcerror... " >&6; } -if ${ac_cv_lib_cerror_libcerror_error_fprint+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcerror_error_fprint in -lcerror" >&5 +printf %s "checking for libcerror_error_fprint in -lcerror... " >&6; } +if test ${ac_cv_lib_cerror_libcerror_error_fprint+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcerror $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -21037,40 +24164,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcerror_error_fprint (); int -main () +main (void) { return libcerror_error_fprint (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cerror_libcerror_error_fprint=yes -else +else $as_nop ac_cv_lib_cerror_libcerror_error_fprint=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cerror_libcerror_error_fprint" >&5 -$as_echo "$ac_cv_lib_cerror_libcerror_error_fprint" >&6; } -if test "x$ac_cv_lib_cerror_libcerror_error_fprint" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cerror_libcerror_error_fprint" >&5 +printf "%s\n" "$ac_cv_lib_cerror_libcerror_error_fprint" >&6; } +if test "x$ac_cv_lib_cerror_libcerror_error_fprint" = xyes +then : ac_cv_libcerror_dummy=yes -else +else $as_nop ac_cv_libcerror=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcerror_error_sprint in -lcerror" >&5 -$as_echo_n "checking for libcerror_error_sprint in -lcerror... " >&6; } -if ${ac_cv_lib_cerror_libcerror_error_sprint+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcerror_error_sprint in -lcerror" >&5 +printf %s "checking for libcerror_error_sprint in -lcerror... " >&6; } +if test ${ac_cv_lib_cerror_libcerror_error_sprint+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcerror $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -21079,40 +24206,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcerror_error_sprint (); int -main () +main (void) { return libcerror_error_sprint (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cerror_libcerror_error_sprint=yes -else +else $as_nop ac_cv_lib_cerror_libcerror_error_sprint=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cerror_libcerror_error_sprint" >&5 -$as_echo "$ac_cv_lib_cerror_libcerror_error_sprint" >&6; } -if test "x$ac_cv_lib_cerror_libcerror_error_sprint" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cerror_libcerror_error_sprint" >&5 +printf "%s\n" "$ac_cv_lib_cerror_libcerror_error_sprint" >&6; } +if test "x$ac_cv_lib_cerror_libcerror_error_sprint" = xyes +then : ac_cv_libcerror_dummy=yes -else +else $as_nop ac_cv_libcerror=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcerror_error_backtrace_fprint in -lcerror" >&5 -$as_echo_n "checking for libcerror_error_backtrace_fprint in -lcerror... " >&6; } -if ${ac_cv_lib_cerror_libcerror_error_backtrace_fprint+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcerror_error_backtrace_fprint in -lcerror" >&5 +printf %s "checking for libcerror_error_backtrace_fprint in -lcerror... " >&6; } +if test ${ac_cv_lib_cerror_libcerror_error_backtrace_fprint+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcerror $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -21121,40 +24248,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcerror_error_backtrace_fprint (); int -main () +main (void) { return libcerror_error_backtrace_fprint (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cerror_libcerror_error_backtrace_fprint=yes -else +else $as_nop ac_cv_lib_cerror_libcerror_error_backtrace_fprint=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cerror_libcerror_error_backtrace_fprint" >&5 -$as_echo "$ac_cv_lib_cerror_libcerror_error_backtrace_fprint" >&6; } -if test "x$ac_cv_lib_cerror_libcerror_error_backtrace_fprint" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cerror_libcerror_error_backtrace_fprint" >&5 +printf "%s\n" "$ac_cv_lib_cerror_libcerror_error_backtrace_fprint" >&6; } +if test "x$ac_cv_lib_cerror_libcerror_error_backtrace_fprint" = xyes +then : ac_cv_libcerror_dummy=yes -else +else $as_nop ac_cv_libcerror=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcerror_error_backtrace_sprint in -lcerror" >&5 -$as_echo_n "checking for libcerror_error_backtrace_sprint in -lcerror... " >&6; } -if ${ac_cv_lib_cerror_libcerror_error_backtrace_sprint+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcerror_error_backtrace_sprint in -lcerror" >&5 +printf %s "checking for libcerror_error_backtrace_sprint in -lcerror... " >&6; } +if test ${ac_cv_lib_cerror_libcerror_error_backtrace_sprint+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcerror $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -21163,41 +24290,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcerror_error_backtrace_sprint (); int -main () +main (void) { return libcerror_error_backtrace_sprint (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cerror_libcerror_error_backtrace_sprint=yes -else +else $as_nop ac_cv_lib_cerror_libcerror_error_backtrace_sprint=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cerror_libcerror_error_backtrace_sprint" >&5 -$as_echo "$ac_cv_lib_cerror_libcerror_error_backtrace_sprint" >&6; } -if test "x$ac_cv_lib_cerror_libcerror_error_backtrace_sprint" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cerror_libcerror_error_backtrace_sprint" >&5 +printf "%s\n" "$ac_cv_lib_cerror_libcerror_error_backtrace_sprint" >&6; } +if test "x$ac_cv_lib_cerror_libcerror_error_backtrace_sprint" = xyes +then : ac_cv_libcerror_dummy=yes -else +else $as_nop ac_cv_libcerror=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcerror_system_set_error in -lcerror" >&5 -$as_echo_n "checking for libcerror_system_set_error in -lcerror... " >&6; } -if ${ac_cv_lib_cerror_libcerror_system_set_error+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcerror_system_set_error in -lcerror" >&5 +printf %s "checking for libcerror_system_set_error in -lcerror... " >&6; } +if test ${ac_cv_lib_cerror_libcerror_system_set_error+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcerror $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -21206,32 +24333,31 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcerror_system_set_error (); int -main () +main (void) { return libcerror_system_set_error (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cerror_libcerror_system_set_error=yes -else +else $as_nop ac_cv_lib_cerror_libcerror_system_set_error=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cerror_libcerror_system_set_error" >&5 -$as_echo "$ac_cv_lib_cerror_libcerror_system_set_error" >&6; } -if test "x$ac_cv_lib_cerror_libcerror_system_set_error" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cerror_libcerror_system_set_error" >&5 +printf "%s\n" "$ac_cv_lib_cerror_libcerror_system_set_error" >&6; } +if test "x$ac_cv_lib_cerror_libcerror_system_set_error" = xyes +then : ac_cv_libcerror_dummy=yes -else +else $as_nop ac_cv_libcerror=no fi @@ -21240,9 +24366,10 @@ fi fi - if test "x$ac_cv_with_libcerror" != x && test "x$ac_cv_with_libcerror" != xauto-detect && test "x$ac_cv_libcerror" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_with_libcerror" != x && test "x$ac_cv_with_libcerror" != xauto-detect && test "x$ac_cv_libcerror" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "unable to find supported libcerror in directory: $ac_cv_with_libcerror See \`config.log' for more details" "$LINENO" 5; } @@ -21250,62 +24377,64 @@ fi - if test "x$ac_cv_libcerror" = xyes; then : + if test "x$ac_cv_libcerror" = xyes +then : -$as_echo "#define HAVE_LIBCERROR 1" >>confdefs.h +printf "%s\n" "#define HAVE_LIBCERROR 1" >>confdefs.h fi - if test "x$ac_cv_libcerror" = xyes; then : + if test "x$ac_cv_libcerror" = xyes +then : HAVE_LIBCERROR=1 -else +else $as_nop HAVE_LIBCERROR=0 fi - if test "x$ac_cv_libcerror" != xyes; then : - for ac_header in stdarg.h varargs.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF + if test "x$ac_cv_libcerror" != xyes +then : + ac_fn_c_check_header_compile "$LINENO" "stdarg.h" "ac_cv_header_stdarg_h" "$ac_includes_default" +if test "x$ac_cv_header_stdarg_h" = xyes +then : + printf "%s\n" "#define HAVE_STDARG_H 1" >>confdefs.h fi +ac_fn_c_check_header_compile "$LINENO" "varargs.h" "ac_cv_header_varargs_h" "$ac_includes_default" +if test "x$ac_cv_header_varargs_h" = xyes +then : + printf "%s\n" "#define HAVE_VARARGS_H 1" >>confdefs.h -done +fi - if test "x$ac_cv_header_stdarg_h" != xyes && test "x$ac_cv_header_varargs_h" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_header_stdarg_h" != xyes && test "x$ac_cv_header_varargs_h" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing headers: stdarg.h and varargs.h See \`config.log' for more details" "$LINENO" 5; } fi - if test "x$ac_cv_enable_wide_character_type" != xno; then : - for ac_func in wcstombs -do : + if test "x$ac_cv_enable_wide_character_type" != xno +then : ac_fn_c_check_func "$LINENO" "wcstombs" "ac_cv_func_wcstombs" -if test "x$ac_cv_func_wcstombs" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_WCSTOMBS 1 -_ACEOF +if test "x$ac_cv_func_wcstombs" = xyes +then : + printf "%s\n" "#define HAVE_WCSTOMBS 1" >>confdefs.h fi -done - if test "x$ac_cv_func_wcstombs" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_wcstombs" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: wcstombs See \`config.log' for more details" "$LINENO" 5; } @@ -21313,41 +24442,30 @@ fi - ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default" -if test "x$ac_cv_have_decl_strerror_r" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_STRERROR_R $ac_have_decl -_ACEOF +if test $ac_cv_have_decl_strerror_r = yes; then + # For backward compatibility's sake, define HAVE_STRERROR_R. + # (We used to run AC_CHECK_FUNCS_ONCE for strerror_r, as well + # as AC_CHECK_DECLS_ONCE.) -for ac_func in strerror_r -do : - ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r" -if test "x$ac_cv_func_strerror_r" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STRERROR_R 1 -_ACEOF +printf "%s\n" "#define HAVE_STRERROR_R 1" >>confdefs.h fi -done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5 -$as_echo_n "checking whether strerror_r returns char *... " >&6; } -if ${ac_cv_func_strerror_r_char_p+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5 +printf %s "checking whether strerror_r returns char *... " >&6; } +if test ${ac_cv_func_strerror_r_char_p+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_func_strerror_r_char_p=no if test $ac_cv_have_decl_strerror_r = yes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default +#include int -main () +main (void) { char buf[100]; @@ -21359,69 +24477,38 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_func_strerror_r_char_p=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - else - # strerror_r is not declared. Choose between - # systems that have relatively inaccessible declarations for the - # function. BeOS and DEC UNIX 4.0 fall in this category, but the - # former has a strerror_r that returns char*, while the latter - # has a strerror_r that returns `int'. - # This test should segfault on the DEC system. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default - extern char *strerror_r (); -int -main () -{ -char buf[100]; - char x = *strerror_r (0, buf, sizeof buf); - return ! isalpha (x); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_func_strerror_r_char_p=yes fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5 -$as_echo "$ac_cv_func_strerror_r_char_p" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5 +printf "%s\n" "$ac_cv_func_strerror_r_char_p" >&6; } if test $ac_cv_func_strerror_r_char_p = yes; then -$as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h +printf "%s\n" "#define STRERROR_R_CHAR_P 1" >>confdefs.h fi - if test "x$ac_cv_have_decl_strerror_r" != xyes; then : - for ac_func in strerror -do : + if test "x$ac_cv_have_decl_strerror_r" != xyes +then : ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror" -if test "x$ac_cv_func_strerror" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STRERROR 1 -_ACEOF +if test "x$ac_cv_func_strerror" = xyes +then : + printf "%s\n" "#define HAVE_STRERROR 1" >>confdefs.h fi -done - if test "x$ac_cv_func_strerror" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_strerror" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing functions: strerror_r and strerror See \`config.log' for more details" "$LINENO" 5; } @@ -21436,7 +24523,7 @@ -$as_echo "#define HAVE_LOCAL_LIBCERROR 1" >>confdefs.h +printf "%s\n" "#define HAVE_LOCAL_LIBCERROR 1" >>confdefs.h HAVE_LOCAL_LIBCERROR=1 @@ -21451,24 +24538,28 @@ HAVE_LOCAL_LIBCERROR_FALSE= fi - if test "x$ac_cv_libcerror_CPPFLAGS" != "x"; then : + if test "x$ac_cv_libcerror_CPPFLAGS" != "x" +then : LIBCERROR_CPPFLAGS=$ac_cv_libcerror_CPPFLAGS fi - if test "x$ac_cv_libcerror_LIBADD" != "x"; then : + if test "x$ac_cv_libcerror_LIBADD" != "x" +then : LIBCERROR_LIBADD=$ac_cv_libcerror_LIBADD fi - if test "x$ac_cv_libcerror" = xyes; then : + if test "x$ac_cv_libcerror" = xyes +then : ax_libcerror_pc_libs_private=-lcerror fi - if test "x$ac_cv_libcerror" = xyes; then : + if test "x$ac_cv_libcerror" = xyes +then : ax_libcerror_spec_requires=libcerror ax_libcerror_spec_build_requires=libcerror-devel @@ -21479,75 +24570,84 @@ # Check whether --enable-multi-threading-support was given. -if test "${enable_multi_threading_support+set}" = set; then : +if test ${enable_multi_threading_support+y} +then : enableval=$enable_multi_threading_support; ac_cv_enable_multi_threading_support=$enableval -else +else $as_nop ac_cv_enable_multi_threading_support=yes fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable enable multi-threading support" >&5 -$as_echo_n "checking whether to enable enable multi-threading support... " >&6; } -if ${ac_cv_enable_multi_threading_support+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable enable multi-threading support" >&5 +printf %s "checking whether to enable enable multi-threading support... " >&6; } +if test ${ac_cv_enable_multi_threading_support+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_enable_multi_threading_support=yes fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_multi_threading_support" >&5 -$as_echo "$ac_cv_enable_multi_threading_support" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_multi_threading_support" >&5 +printf "%s\n" "$ac_cv_enable_multi_threading_support" >&6; } # Check whether --with-libcthreads was given. -if test "${with_libcthreads+set}" = set; then : +if test ${with_libcthreads+y} +then : withval=$with_libcthreads; ac_cv_with_libcthreads=$withval -else +else $as_nop ac_cv_with_libcthreads=auto-detect fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libcthreads in includedir and libdir or in the specified DIR, or no if to use local version" >&5 -$as_echo_n "checking whether to use search for libcthreads in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } -if ${ac_cv_with_libcthreads+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use search for libcthreads in includedir and libdir or in the specified DIR, or no if to use local version" >&5 +printf %s "checking whether to use search for libcthreads in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } +if test ${ac_cv_with_libcthreads+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_with_libcthreads=auto-detect fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libcthreads" >&5 -$as_echo "$ac_cv_with_libcthreads" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libcthreads" >&5 +printf "%s\n" "$ac_cv_with_libcthreads" >&6; } - if test "x$ac_cv_enable_multi_threading_support" = xno; then : + if test "x$ac_cv_enable_multi_threading_support" = xno +then : ac_cv_libcthreads="no" ac_cv_libcthreads_multi_threading="no" -else - if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libcthreads" = xno; then : +else $as_nop + if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libcthreads" = xno +then : ac_cv_libcthreads=no -else +else $as_nop ac_cv_libcthreads=check - if test "x$ac_cv_with_libcthreads" != x && test "x$ac_cv_with_libcthreads" != xauto-detect; then : - if test -d "$ac_cv_with_libcthreads"; then : + if test "x$ac_cv_with_libcthreads" != x && test "x$ac_cv_with_libcthreads" != xauto-detect +then : + if test -d "$ac_cv_with_libcthreads" +then : CFLAGS="$CFLAGS -I${ac_cv_with_libcthreads}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libcthreads}/lib" -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "no such directory: $ac_cv_with_libcthreads See \`config.log' for more details" "$LINENO" 5; } fi -else - if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : +else $as_nop + if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x" +then : pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads" >&5 -$as_echo_n "checking for libcthreads... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads >= 20160404" >&5 +printf %s "checking for libcthreads >= 20160404... " >&6; } if test -n "$libcthreads_CFLAGS"; then pkg_cv_libcthreads_CFLAGS="$libcthreads_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcthreads >= 20160404\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcthreads >= 20160404\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcthreads >= 20160404") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libcthreads_CFLAGS=`$PKG_CONFIG --cflags "libcthreads >= 20160404" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -21561,10 +24661,10 @@ pkg_cv_libcthreads_LIBS="$libcthreads_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcthreads >= 20160404\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcthreads >= 20160404\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcthreads >= 20160404") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libcthreads_LIBS=`$PKG_CONFIG --libs "libcthreads >= 20160404" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -21578,8 +24678,8 @@ if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -21587,58 +24687,57 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - libcthreads_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libcthreads >= 20160404" 2>&1` + libcthreads_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libcthreads >= 20160404" 2>&1` else - libcthreads_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libcthreads >= 20160404" 2>&1` + libcthreads_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libcthreads >= 20160404" 2>&1` fi - # Put the nasty error message in config.log where it belongs - echo "$libcthreads_PKG_ERRORS" >&5 + # Put the nasty error message in config.log where it belongs + echo "$libcthreads_PKG_ERRORS" >&5 - ac_cv_libcthreads=check + ac_cv_libcthreads=check elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ac_cv_libcthreads=check + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ac_cv_libcthreads=check else - libcthreads_CFLAGS=$pkg_cv_libcthreads_CFLAGS - libcthreads_LIBS=$pkg_cv_libcthreads_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ac_cv_libcthreads=yes + libcthreads_CFLAGS=$pkg_cv_libcthreads_CFLAGS + libcthreads_LIBS=$pkg_cv_libcthreads_LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + ac_cv_libcthreads=yes fi fi - if test "x$ac_cv_libcthreads" = xyes; then : + if test "x$ac_cv_libcthreads" = xyes +then : ac_cv_libcthreads_CPPFLAGS="$pkg_cv_libcthreads_CFLAGS" ac_cv_libcthreads_LIBADD="$pkg_cv_libcthreads_LIBS" fi fi - if test "x$ac_cv_libcthreads" = xcheck; then : - for ac_header in libcthreads.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "libcthreads.h" "ac_cv_header_libcthreads_h" "$ac_includes_default" -if test "x$ac_cv_header_libcthreads_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBCTHREADS_H 1 -_ACEOF + if test "x$ac_cv_libcthreads" = xcheck +then : + ac_fn_c_check_header_compile "$LINENO" "libcthreads.h" "ac_cv_header_libcthreads_h" "$ac_includes_default" +if test "x$ac_cv_header_libcthreads_h" = xyes +then : + printf "%s\n" "#define HAVE_LIBCTHREADS_H 1" >>confdefs.h fi -done - - if test "x$ac_cv_header_libcthreads_h" = xno; then : + if test "x$ac_cv_header_libcthreads_h" = xno +then : ac_cv_libcthreads=no -else +else $as_nop ac_cv_libcthreads=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_get_version in -lcthreads" >&5 -$as_echo_n "checking for libcthreads_get_version in -lcthreads... " >&6; } -if ${ac_cv_lib_cthreads_libcthreads_get_version+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_get_version in -lcthreads" >&5 +printf %s "checking for libcthreads_get_version in -lcthreads... " >&6; } +if test ${ac_cv_lib_cthreads_libcthreads_get_version+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -21647,41 +24746,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcthreads_get_version (); int -main () +main (void) { return libcthreads_get_version (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cthreads_libcthreads_get_version=yes -else +else $as_nop ac_cv_lib_cthreads_libcthreads_get_version=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_get_version" >&5 -$as_echo "$ac_cv_lib_cthreads_libcthreads_get_version" >&6; } -if test "x$ac_cv_lib_cthreads_libcthreads_get_version" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_get_version" >&5 +printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_get_version" >&6; } +if test "x$ac_cv_lib_cthreads_libcthreads_get_version" = xyes +then : ac_cv_libcthreads_dummy=yes -else +else $as_nop ac_cv_libcthreads=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_thread_create in -lcthreads" >&5 -$as_echo_n "checking for libcthreads_thread_create in -lcthreads... " >&6; } -if ${ac_cv_lib_cthreads_libcthreads_thread_create+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_thread_create in -lcthreads" >&5 +printf %s "checking for libcthreads_thread_create in -lcthreads... " >&6; } +if test ${ac_cv_lib_cthreads_libcthreads_thread_create+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -21690,40 +24789,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcthreads_thread_create (); int -main () +main (void) { return libcthreads_thread_create (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cthreads_libcthreads_thread_create=yes -else +else $as_nop ac_cv_lib_cthreads_libcthreads_thread_create=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_thread_create" >&5 -$as_echo "$ac_cv_lib_cthreads_libcthreads_thread_create" >&6; } -if test "x$ac_cv_lib_cthreads_libcthreads_thread_create" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_thread_create" >&5 +printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_thread_create" >&6; } +if test "x$ac_cv_lib_cthreads_libcthreads_thread_create" = xyes +then : ac_cv_libcthreads_dummy=yes -else +else $as_nop ac_cv_libcthreads=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_thread_join in -lcthreads" >&5 -$as_echo_n "checking for libcthreads_thread_join in -lcthreads... " >&6; } -if ${ac_cv_lib_cthreads_libcthreads_thread_join+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_thread_join in -lcthreads" >&5 +printf %s "checking for libcthreads_thread_join in -lcthreads... " >&6; } +if test ${ac_cv_lib_cthreads_libcthreads_thread_join+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -21732,41 +24831,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcthreads_thread_join (); int -main () +main (void) { return libcthreads_thread_join (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cthreads_libcthreads_thread_join=yes -else +else $as_nop ac_cv_lib_cthreads_libcthreads_thread_join=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_thread_join" >&5 -$as_echo "$ac_cv_lib_cthreads_libcthreads_thread_join" >&6; } -if test "x$ac_cv_lib_cthreads_libcthreads_thread_join" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_thread_join" >&5 +printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_thread_join" >&6; } +if test "x$ac_cv_lib_cthreads_libcthreads_thread_join" = xyes +then : ac_cv_libcthreads_dummy=yes -else +else $as_nop ac_cv_libcthreads=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_thread_attributes_initialize in -lcthreads" >&5 -$as_echo_n "checking for libcthreads_thread_attributes_initialize in -lcthreads... " >&6; } -if ${ac_cv_lib_cthreads_libcthreads_thread_attributes_initialize+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_thread_attributes_initialize in -lcthreads" >&5 +printf %s "checking for libcthreads_thread_attributes_initialize in -lcthreads... " >&6; } +if test ${ac_cv_lib_cthreads_libcthreads_thread_attributes_initialize+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -21775,40 +24874,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcthreads_thread_attributes_initialize (); int -main () +main (void) { return libcthreads_thread_attributes_initialize (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cthreads_libcthreads_thread_attributes_initialize=yes -else +else $as_nop ac_cv_lib_cthreads_libcthreads_thread_attributes_initialize=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_thread_attributes_initialize" >&5 -$as_echo "$ac_cv_lib_cthreads_libcthreads_thread_attributes_initialize" >&6; } -if test "x$ac_cv_lib_cthreads_libcthreads_thread_attributes_initialize" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_thread_attributes_initialize" >&5 +printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_thread_attributes_initialize" >&6; } +if test "x$ac_cv_lib_cthreads_libcthreads_thread_attributes_initialize" = xyes +then : ac_cv_libcthreads_dummy=yes -else +else $as_nop ac_cv_libcthreads=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_thread_attributes_free in -lcthreads" >&5 -$as_echo_n "checking for libcthreads_thread_attributes_free in -lcthreads... " >&6; } -if ${ac_cv_lib_cthreads_libcthreads_thread_attributes_free+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_thread_attributes_free in -lcthreads" >&5 +printf %s "checking for libcthreads_thread_attributes_free in -lcthreads... " >&6; } +if test ${ac_cv_lib_cthreads_libcthreads_thread_attributes_free+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -21817,41 +24916,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcthreads_thread_attributes_free (); int -main () +main (void) { return libcthreads_thread_attributes_free (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cthreads_libcthreads_thread_attributes_free=yes -else +else $as_nop ac_cv_lib_cthreads_libcthreads_thread_attributes_free=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_thread_attributes_free" >&5 -$as_echo "$ac_cv_lib_cthreads_libcthreads_thread_attributes_free" >&6; } -if test "x$ac_cv_lib_cthreads_libcthreads_thread_attributes_free" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_thread_attributes_free" >&5 +printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_thread_attributes_free" >&6; } +if test "x$ac_cv_lib_cthreads_libcthreads_thread_attributes_free" = xyes +then : ac_cv_libcthreads_dummy=yes -else +else $as_nop ac_cv_libcthreads=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_condition_initialize in -lcthreads" >&5 -$as_echo_n "checking for libcthreads_condition_initialize in -lcthreads... " >&6; } -if ${ac_cv_lib_cthreads_libcthreads_condition_initialize+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_condition_initialize in -lcthreads" >&5 +printf %s "checking for libcthreads_condition_initialize in -lcthreads... " >&6; } +if test ${ac_cv_lib_cthreads_libcthreads_condition_initialize+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -21860,40 +24959,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcthreads_condition_initialize (); int -main () +main (void) { return libcthreads_condition_initialize (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cthreads_libcthreads_condition_initialize=yes -else +else $as_nop ac_cv_lib_cthreads_libcthreads_condition_initialize=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_condition_initialize" >&5 -$as_echo "$ac_cv_lib_cthreads_libcthreads_condition_initialize" >&6; } -if test "x$ac_cv_lib_cthreads_libcthreads_condition_initialize" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_condition_initialize" >&5 +printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_condition_initialize" >&6; } +if test "x$ac_cv_lib_cthreads_libcthreads_condition_initialize" = xyes +then : ac_cv_libcthreads_dummy=yes -else +else $as_nop ac_cv_libcthreads=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_condition_free in -lcthreads" >&5 -$as_echo_n "checking for libcthreads_condition_free in -lcthreads... " >&6; } -if ${ac_cv_lib_cthreads_libcthreads_condition_free+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_condition_free in -lcthreads" >&5 +printf %s "checking for libcthreads_condition_free in -lcthreads... " >&6; } +if test ${ac_cv_lib_cthreads_libcthreads_condition_free+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -21902,40 +25001,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcthreads_condition_free (); int -main () +main (void) { return libcthreads_condition_free (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cthreads_libcthreads_condition_free=yes -else +else $as_nop ac_cv_lib_cthreads_libcthreads_condition_free=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_condition_free" >&5 -$as_echo "$ac_cv_lib_cthreads_libcthreads_condition_free" >&6; } -if test "x$ac_cv_lib_cthreads_libcthreads_condition_free" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_condition_free" >&5 +printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_condition_free" >&6; } +if test "x$ac_cv_lib_cthreads_libcthreads_condition_free" = xyes +then : ac_cv_libcthreads_dummy=yes -else +else $as_nop ac_cv_libcthreads=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_condition_broadcast in -lcthreads" >&5 -$as_echo_n "checking for libcthreads_condition_broadcast in -lcthreads... " >&6; } -if ${ac_cv_lib_cthreads_libcthreads_condition_broadcast+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_condition_broadcast in -lcthreads" >&5 +printf %s "checking for libcthreads_condition_broadcast in -lcthreads... " >&6; } +if test ${ac_cv_lib_cthreads_libcthreads_condition_broadcast+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -21944,40 +25043,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcthreads_condition_broadcast (); int -main () +main (void) { return libcthreads_condition_broadcast (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cthreads_libcthreads_condition_broadcast=yes -else +else $as_nop ac_cv_lib_cthreads_libcthreads_condition_broadcast=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_condition_broadcast" >&5 -$as_echo "$ac_cv_lib_cthreads_libcthreads_condition_broadcast" >&6; } -if test "x$ac_cv_lib_cthreads_libcthreads_condition_broadcast" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_condition_broadcast" >&5 +printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_condition_broadcast" >&6; } +if test "x$ac_cv_lib_cthreads_libcthreads_condition_broadcast" = xyes +then : ac_cv_libcthreads_dummy=yes -else +else $as_nop ac_cv_libcthreads=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_condition_signal in -lcthreads" >&5 -$as_echo_n "checking for libcthreads_condition_signal in -lcthreads... " >&6; } -if ${ac_cv_lib_cthreads_libcthreads_condition_signal+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_condition_signal in -lcthreads" >&5 +printf %s "checking for libcthreads_condition_signal in -lcthreads... " >&6; } +if test ${ac_cv_lib_cthreads_libcthreads_condition_signal+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -21986,40 +25085,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcthreads_condition_signal (); int -main () +main (void) { return libcthreads_condition_signal (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cthreads_libcthreads_condition_signal=yes -else +else $as_nop ac_cv_lib_cthreads_libcthreads_condition_signal=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_condition_signal" >&5 -$as_echo "$ac_cv_lib_cthreads_libcthreads_condition_signal" >&6; } -if test "x$ac_cv_lib_cthreads_libcthreads_condition_signal" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_condition_signal" >&5 +printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_condition_signal" >&6; } +if test "x$ac_cv_lib_cthreads_libcthreads_condition_signal" = xyes +then : ac_cv_libcthreads_dummy=yes -else +else $as_nop ac_cv_libcthreads=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_condition_wait in -lcthreads" >&5 -$as_echo_n "checking for libcthreads_condition_wait in -lcthreads... " >&6; } -if ${ac_cv_lib_cthreads_libcthreads_condition_wait+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_condition_wait in -lcthreads" >&5 +printf %s "checking for libcthreads_condition_wait in -lcthreads... " >&6; } +if test ${ac_cv_lib_cthreads_libcthreads_condition_wait+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22028,41 +25127,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcthreads_condition_wait (); int -main () +main (void) { return libcthreads_condition_wait (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cthreads_libcthreads_condition_wait=yes -else +else $as_nop ac_cv_lib_cthreads_libcthreads_condition_wait=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_condition_wait" >&5 -$as_echo "$ac_cv_lib_cthreads_libcthreads_condition_wait" >&6; } -if test "x$ac_cv_lib_cthreads_libcthreads_condition_wait" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_condition_wait" >&5 +printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_condition_wait" >&6; } +if test "x$ac_cv_lib_cthreads_libcthreads_condition_wait" = xyes +then : ac_cv_libcthreads_dummy=yes -else +else $as_nop ac_cv_libcthreads=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_lock_initialize in -lcthreads" >&5 -$as_echo_n "checking for libcthreads_lock_initialize in -lcthreads... " >&6; } -if ${ac_cv_lib_cthreads_libcthreads_lock_initialize+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_lock_initialize in -lcthreads" >&5 +printf %s "checking for libcthreads_lock_initialize in -lcthreads... " >&6; } +if test ${ac_cv_lib_cthreads_libcthreads_lock_initialize+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22071,40 +25170,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcthreads_lock_initialize (); int -main () +main (void) { return libcthreads_lock_initialize (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cthreads_libcthreads_lock_initialize=yes -else +else $as_nop ac_cv_lib_cthreads_libcthreads_lock_initialize=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_lock_initialize" >&5 -$as_echo "$ac_cv_lib_cthreads_libcthreads_lock_initialize" >&6; } -if test "x$ac_cv_lib_cthreads_libcthreads_lock_initialize" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_lock_initialize" >&5 +printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_lock_initialize" >&6; } +if test "x$ac_cv_lib_cthreads_libcthreads_lock_initialize" = xyes +then : ac_cv_libcthreads_dummy=yes -else +else $as_nop ac_cv_libcthreads=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_lock_free in -lcthreads" >&5 -$as_echo_n "checking for libcthreads_lock_free in -lcthreads... " >&6; } -if ${ac_cv_lib_cthreads_libcthreads_lock_free+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_lock_free in -lcthreads" >&5 +printf %s "checking for libcthreads_lock_free in -lcthreads... " >&6; } +if test ${ac_cv_lib_cthreads_libcthreads_lock_free+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22113,40 +25212,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcthreads_lock_free (); int -main () +main (void) { return libcthreads_lock_free (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cthreads_libcthreads_lock_free=yes -else +else $as_nop ac_cv_lib_cthreads_libcthreads_lock_free=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_lock_free" >&5 -$as_echo "$ac_cv_lib_cthreads_libcthreads_lock_free" >&6; } -if test "x$ac_cv_lib_cthreads_libcthreads_lock_free" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_lock_free" >&5 +printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_lock_free" >&6; } +if test "x$ac_cv_lib_cthreads_libcthreads_lock_free" = xyes +then : ac_cv_libcthreads_dummy=yes -else +else $as_nop ac_cv_libcthreads=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_lock_grab in -lcthreads" >&5 -$as_echo_n "checking for libcthreads_lock_grab in -lcthreads... " >&6; } -if ${ac_cv_lib_cthreads_libcthreads_lock_grab+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_lock_grab in -lcthreads" >&5 +printf %s "checking for libcthreads_lock_grab in -lcthreads... " >&6; } +if test ${ac_cv_lib_cthreads_libcthreads_lock_grab+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22155,40 +25254,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcthreads_lock_grab (); int -main () +main (void) { return libcthreads_lock_grab (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cthreads_libcthreads_lock_grab=yes -else +else $as_nop ac_cv_lib_cthreads_libcthreads_lock_grab=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_lock_grab" >&5 -$as_echo "$ac_cv_lib_cthreads_libcthreads_lock_grab" >&6; } -if test "x$ac_cv_lib_cthreads_libcthreads_lock_grab" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_lock_grab" >&5 +printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_lock_grab" >&6; } +if test "x$ac_cv_lib_cthreads_libcthreads_lock_grab" = xyes +then : ac_cv_libcthreads_dummy=yes -else +else $as_nop ac_cv_libcthreads=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_lock_release in -lcthreads" >&5 -$as_echo_n "checking for libcthreads_lock_release in -lcthreads... " >&6; } -if ${ac_cv_lib_cthreads_libcthreads_lock_release+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_lock_release in -lcthreads" >&5 +printf %s "checking for libcthreads_lock_release in -lcthreads... " >&6; } +if test ${ac_cv_lib_cthreads_libcthreads_lock_release+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22197,41 +25296,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcthreads_lock_release (); int -main () +main (void) { return libcthreads_lock_release (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cthreads_libcthreads_lock_release=yes -else +else $as_nop ac_cv_lib_cthreads_libcthreads_lock_release=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_lock_release" >&5 -$as_echo "$ac_cv_lib_cthreads_libcthreads_lock_release" >&6; } -if test "x$ac_cv_lib_cthreads_libcthreads_lock_release" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_lock_release" >&5 +printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_lock_release" >&6; } +if test "x$ac_cv_lib_cthreads_libcthreads_lock_release" = xyes +then : ac_cv_libcthreads_dummy=yes -else +else $as_nop ac_cv_libcthreads=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_mutex_initialize in -lcthreads" >&5 -$as_echo_n "checking for libcthreads_mutex_initialize in -lcthreads... " >&6; } -if ${ac_cv_lib_cthreads_libcthreads_mutex_initialize+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_mutex_initialize in -lcthreads" >&5 +printf %s "checking for libcthreads_mutex_initialize in -lcthreads... " >&6; } +if test ${ac_cv_lib_cthreads_libcthreads_mutex_initialize+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22240,40 +25339,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcthreads_mutex_initialize (); int -main () +main (void) { return libcthreads_mutex_initialize (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cthreads_libcthreads_mutex_initialize=yes -else +else $as_nop ac_cv_lib_cthreads_libcthreads_mutex_initialize=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_mutex_initialize" >&5 -$as_echo "$ac_cv_lib_cthreads_libcthreads_mutex_initialize" >&6; } -if test "x$ac_cv_lib_cthreads_libcthreads_mutex_initialize" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_mutex_initialize" >&5 +printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_mutex_initialize" >&6; } +if test "x$ac_cv_lib_cthreads_libcthreads_mutex_initialize" = xyes +then : ac_cv_libcthreads_dummy=yes -else +else $as_nop ac_cv_libcthreads=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_mutex_free in -lcthreads" >&5 -$as_echo_n "checking for libcthreads_mutex_free in -lcthreads... " >&6; } -if ${ac_cv_lib_cthreads_libcthreads_mutex_free+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_mutex_free in -lcthreads" >&5 +printf %s "checking for libcthreads_mutex_free in -lcthreads... " >&6; } +if test ${ac_cv_lib_cthreads_libcthreads_mutex_free+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22282,40 +25381,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcthreads_mutex_free (); int -main () +main (void) { return libcthreads_mutex_free (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cthreads_libcthreads_mutex_free=yes -else +else $as_nop ac_cv_lib_cthreads_libcthreads_mutex_free=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_mutex_free" >&5 -$as_echo "$ac_cv_lib_cthreads_libcthreads_mutex_free" >&6; } -if test "x$ac_cv_lib_cthreads_libcthreads_mutex_free" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_mutex_free" >&5 +printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_mutex_free" >&6; } +if test "x$ac_cv_lib_cthreads_libcthreads_mutex_free" = xyes +then : ac_cv_libcthreads_dummy=yes -else +else $as_nop ac_cv_libcthreads=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_mutex_grab in -lcthreads" >&5 -$as_echo_n "checking for libcthreads_mutex_grab in -lcthreads... " >&6; } -if ${ac_cv_lib_cthreads_libcthreads_mutex_grab+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_mutex_grab in -lcthreads" >&5 +printf %s "checking for libcthreads_mutex_grab in -lcthreads... " >&6; } +if test ${ac_cv_lib_cthreads_libcthreads_mutex_grab+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22324,40 +25423,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcthreads_mutex_grab (); int -main () +main (void) { return libcthreads_mutex_grab (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cthreads_libcthreads_mutex_grab=yes -else +else $as_nop ac_cv_lib_cthreads_libcthreads_mutex_grab=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_mutex_grab" >&5 -$as_echo "$ac_cv_lib_cthreads_libcthreads_mutex_grab" >&6; } -if test "x$ac_cv_lib_cthreads_libcthreads_mutex_grab" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_mutex_grab" >&5 +printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_mutex_grab" >&6; } +if test "x$ac_cv_lib_cthreads_libcthreads_mutex_grab" = xyes +then : ac_cv_libcthreads_dummy=yes -else +else $as_nop ac_cv_libcthreads=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_mutex_try_grab in -lcthreads" >&5 -$as_echo_n "checking for libcthreads_mutex_try_grab in -lcthreads... " >&6; } -if ${ac_cv_lib_cthreads_libcthreads_mutex_try_grab+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_mutex_try_grab in -lcthreads" >&5 +printf %s "checking for libcthreads_mutex_try_grab in -lcthreads... " >&6; } +if test ${ac_cv_lib_cthreads_libcthreads_mutex_try_grab+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22366,40 +25465,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcthreads_mutex_try_grab (); int -main () +main (void) { return libcthreads_mutex_try_grab (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cthreads_libcthreads_mutex_try_grab=yes -else +else $as_nop ac_cv_lib_cthreads_libcthreads_mutex_try_grab=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_mutex_try_grab" >&5 -$as_echo "$ac_cv_lib_cthreads_libcthreads_mutex_try_grab" >&6; } -if test "x$ac_cv_lib_cthreads_libcthreads_mutex_try_grab" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_mutex_try_grab" >&5 +printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_mutex_try_grab" >&6; } +if test "x$ac_cv_lib_cthreads_libcthreads_mutex_try_grab" = xyes +then : ac_cv_libcthreads_dummy=yes -else +else $as_nop ac_cv_libcthreads=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_mutex_release in -lcthreads" >&5 -$as_echo_n "checking for libcthreads_mutex_release in -lcthreads... " >&6; } -if ${ac_cv_lib_cthreads_libcthreads_mutex_release+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_mutex_release in -lcthreads" >&5 +printf %s "checking for libcthreads_mutex_release in -lcthreads... " >&6; } +if test ${ac_cv_lib_cthreads_libcthreads_mutex_release+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22408,41 +25507,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcthreads_mutex_release (); int -main () +main (void) { return libcthreads_mutex_release (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cthreads_libcthreads_mutex_release=yes -else +else $as_nop ac_cv_lib_cthreads_libcthreads_mutex_release=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_mutex_release" >&5 -$as_echo "$ac_cv_lib_cthreads_libcthreads_mutex_release" >&6; } -if test "x$ac_cv_lib_cthreads_libcthreads_mutex_release" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_mutex_release" >&5 +printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_mutex_release" >&6; } +if test "x$ac_cv_lib_cthreads_libcthreads_mutex_release" = xyes +then : ac_cv_libcthreads_dummy=yes -else +else $as_nop ac_cv_libcthreads=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_read_write_lock_initialize in -lcthreads" >&5 -$as_echo_n "checking for libcthreads_read_write_lock_initialize in -lcthreads... " >&6; } -if ${ac_cv_lib_cthreads_libcthreads_read_write_lock_initialize+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_read_write_lock_initialize in -lcthreads" >&5 +printf %s "checking for libcthreads_read_write_lock_initialize in -lcthreads... " >&6; } +if test ${ac_cv_lib_cthreads_libcthreads_read_write_lock_initialize+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22451,40 +25550,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcthreads_read_write_lock_initialize (); int -main () +main (void) { return libcthreads_read_write_lock_initialize (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cthreads_libcthreads_read_write_lock_initialize=yes -else +else $as_nop ac_cv_lib_cthreads_libcthreads_read_write_lock_initialize=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_read_write_lock_initialize" >&5 -$as_echo "$ac_cv_lib_cthreads_libcthreads_read_write_lock_initialize" >&6; } -if test "x$ac_cv_lib_cthreads_libcthreads_read_write_lock_initialize" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_read_write_lock_initialize" >&5 +printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_read_write_lock_initialize" >&6; } +if test "x$ac_cv_lib_cthreads_libcthreads_read_write_lock_initialize" = xyes +then : ac_cv_libcthreads_dummy=yes -else +else $as_nop ac_cv_libcthreads=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_read_write_lock_free in -lcthreads" >&5 -$as_echo_n "checking for libcthreads_read_write_lock_free in -lcthreads... " >&6; } -if ${ac_cv_lib_cthreads_libcthreads_read_write_lock_free+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_read_write_lock_free in -lcthreads" >&5 +printf %s "checking for libcthreads_read_write_lock_free in -lcthreads... " >&6; } +if test ${ac_cv_lib_cthreads_libcthreads_read_write_lock_free+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22493,40 +25592,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcthreads_read_write_lock_free (); int -main () +main (void) { return libcthreads_read_write_lock_free (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cthreads_libcthreads_read_write_lock_free=yes -else +else $as_nop ac_cv_lib_cthreads_libcthreads_read_write_lock_free=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_read_write_lock_free" >&5 -$as_echo "$ac_cv_lib_cthreads_libcthreads_read_write_lock_free" >&6; } -if test "x$ac_cv_lib_cthreads_libcthreads_read_write_lock_free" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_read_write_lock_free" >&5 +printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_read_write_lock_free" >&6; } +if test "x$ac_cv_lib_cthreads_libcthreads_read_write_lock_free" = xyes +then : ac_cv_libcthreads_dummy=yes -else +else $as_nop ac_cv_libcthreads=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_read_write_lock_grab_for_read in -lcthreads" >&5 -$as_echo_n "checking for libcthreads_read_write_lock_grab_for_read in -lcthreads... " >&6; } -if ${ac_cv_lib_cthreads_libcthreads_read_write_lock_grab_for_read+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_read_write_lock_grab_for_read in -lcthreads" >&5 +printf %s "checking for libcthreads_read_write_lock_grab_for_read in -lcthreads... " >&6; } +if test ${ac_cv_lib_cthreads_libcthreads_read_write_lock_grab_for_read+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22535,40 +25634,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcthreads_read_write_lock_grab_for_read (); int -main () +main (void) { return libcthreads_read_write_lock_grab_for_read (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cthreads_libcthreads_read_write_lock_grab_for_read=yes -else +else $as_nop ac_cv_lib_cthreads_libcthreads_read_write_lock_grab_for_read=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_read_write_lock_grab_for_read" >&5 -$as_echo "$ac_cv_lib_cthreads_libcthreads_read_write_lock_grab_for_read" >&6; } -if test "x$ac_cv_lib_cthreads_libcthreads_read_write_lock_grab_for_read" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_read_write_lock_grab_for_read" >&5 +printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_read_write_lock_grab_for_read" >&6; } +if test "x$ac_cv_lib_cthreads_libcthreads_read_write_lock_grab_for_read" = xyes +then : ac_cv_libcthreads_dummy=yes -else +else $as_nop ac_cv_libcthreads=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_read_write_lock_grab_for_write in -lcthreads" >&5 -$as_echo_n "checking for libcthreads_read_write_lock_grab_for_write in -lcthreads... " >&6; } -if ${ac_cv_lib_cthreads_libcthreads_read_write_lock_grab_for_write+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_read_write_lock_grab_for_write in -lcthreads" >&5 +printf %s "checking for libcthreads_read_write_lock_grab_for_write in -lcthreads... " >&6; } +if test ${ac_cv_lib_cthreads_libcthreads_read_write_lock_grab_for_write+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22577,40 +25676,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcthreads_read_write_lock_grab_for_write (); int -main () +main (void) { return libcthreads_read_write_lock_grab_for_write (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cthreads_libcthreads_read_write_lock_grab_for_write=yes -else +else $as_nop ac_cv_lib_cthreads_libcthreads_read_write_lock_grab_for_write=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_read_write_lock_grab_for_write" >&5 -$as_echo "$ac_cv_lib_cthreads_libcthreads_read_write_lock_grab_for_write" >&6; } -if test "x$ac_cv_lib_cthreads_libcthreads_read_write_lock_grab_for_write" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_read_write_lock_grab_for_write" >&5 +printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_read_write_lock_grab_for_write" >&6; } +if test "x$ac_cv_lib_cthreads_libcthreads_read_write_lock_grab_for_write" = xyes +then : ac_cv_libcthreads_dummy=yes -else +else $as_nop ac_cv_libcthreads=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_read_write_lock_release_for_read in -lcthreads" >&5 -$as_echo_n "checking for libcthreads_read_write_lock_release_for_read in -lcthreads... " >&6; } -if ${ac_cv_lib_cthreads_libcthreads_read_write_lock_release_for_read+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_read_write_lock_release_for_read in -lcthreads" >&5 +printf %s "checking for libcthreads_read_write_lock_release_for_read in -lcthreads... " >&6; } +if test ${ac_cv_lib_cthreads_libcthreads_read_write_lock_release_for_read+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22619,40 +25718,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcthreads_read_write_lock_release_for_read (); int -main () +main (void) { return libcthreads_read_write_lock_release_for_read (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cthreads_libcthreads_read_write_lock_release_for_read=yes -else +else $as_nop ac_cv_lib_cthreads_libcthreads_read_write_lock_release_for_read=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_read_write_lock_release_for_read" >&5 -$as_echo "$ac_cv_lib_cthreads_libcthreads_read_write_lock_release_for_read" >&6; } -if test "x$ac_cv_lib_cthreads_libcthreads_read_write_lock_release_for_read" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_read_write_lock_release_for_read" >&5 +printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_read_write_lock_release_for_read" >&6; } +if test "x$ac_cv_lib_cthreads_libcthreads_read_write_lock_release_for_read" = xyes +then : ac_cv_libcthreads_dummy=yes -else +else $as_nop ac_cv_libcthreads=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_read_write_lock_release_for_write in -lcthreads" >&5 -$as_echo_n "checking for libcthreads_read_write_lock_release_for_write in -lcthreads... " >&6; } -if ${ac_cv_lib_cthreads_libcthreads_read_write_lock_release_for_write+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_read_write_lock_release_for_write in -lcthreads" >&5 +printf %s "checking for libcthreads_read_write_lock_release_for_write in -lcthreads... " >&6; } +if test ${ac_cv_lib_cthreads_libcthreads_read_write_lock_release_for_write+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22661,41 +25760,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcthreads_read_write_lock_release_for_write (); int -main () +main (void) { return libcthreads_read_write_lock_release_for_write (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cthreads_libcthreads_read_write_lock_release_for_write=yes -else +else $as_nop ac_cv_lib_cthreads_libcthreads_read_write_lock_release_for_write=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_read_write_lock_release_for_write" >&5 -$as_echo "$ac_cv_lib_cthreads_libcthreads_read_write_lock_release_for_write" >&6; } -if test "x$ac_cv_lib_cthreads_libcthreads_read_write_lock_release_for_write" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_read_write_lock_release_for_write" >&5 +printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_read_write_lock_release_for_write" >&6; } +if test "x$ac_cv_lib_cthreads_libcthreads_read_write_lock_release_for_write" = xyes +then : ac_cv_libcthreads_dummy=yes -else +else $as_nop ac_cv_libcthreads=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_queue_initialize in -lcthreads" >&5 -$as_echo_n "checking for libcthreads_queue_initialize in -lcthreads... " >&6; } -if ${ac_cv_lib_cthreads_libcthreads_queue_initialize+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_queue_initialize in -lcthreads" >&5 +printf %s "checking for libcthreads_queue_initialize in -lcthreads... " >&6; } +if test ${ac_cv_lib_cthreads_libcthreads_queue_initialize+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22704,40 +25803,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcthreads_queue_initialize (); int -main () +main (void) { return libcthreads_queue_initialize (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cthreads_libcthreads_queue_initialize=yes -else +else $as_nop ac_cv_lib_cthreads_libcthreads_queue_initialize=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_queue_initialize" >&5 -$as_echo "$ac_cv_lib_cthreads_libcthreads_queue_initialize" >&6; } -if test "x$ac_cv_lib_cthreads_libcthreads_queue_initialize" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_queue_initialize" >&5 +printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_queue_initialize" >&6; } +if test "x$ac_cv_lib_cthreads_libcthreads_queue_initialize" = xyes +then : ac_cv_libcthreads_dummy=yes -else +else $as_nop ac_cv_libcthreads=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_queue_free in -lcthreads" >&5 -$as_echo_n "checking for libcthreads_queue_free in -lcthreads... " >&6; } -if ${ac_cv_lib_cthreads_libcthreads_queue_free+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_queue_free in -lcthreads" >&5 +printf %s "checking for libcthreads_queue_free in -lcthreads... " >&6; } +if test ${ac_cv_lib_cthreads_libcthreads_queue_free+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22746,40 +25845,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcthreads_queue_free (); int -main () +main (void) { return libcthreads_queue_free (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cthreads_libcthreads_queue_free=yes -else +else $as_nop ac_cv_lib_cthreads_libcthreads_queue_free=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_queue_free" >&5 -$as_echo "$ac_cv_lib_cthreads_libcthreads_queue_free" >&6; } -if test "x$ac_cv_lib_cthreads_libcthreads_queue_free" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_queue_free" >&5 +printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_queue_free" >&6; } +if test "x$ac_cv_lib_cthreads_libcthreads_queue_free" = xyes +then : ac_cv_libcthreads_dummy=yes -else +else $as_nop ac_cv_libcthreads=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_queue_type_pop in -lcthreads" >&5 -$as_echo_n "checking for libcthreads_queue_type_pop in -lcthreads... " >&6; } -if ${ac_cv_lib_cthreads_libcthreads_queue_type_pop+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_queue_type_pop in -lcthreads" >&5 +printf %s "checking for libcthreads_queue_type_pop in -lcthreads... " >&6; } +if test ${ac_cv_lib_cthreads_libcthreads_queue_type_pop+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22788,40 +25887,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcthreads_queue_type_pop (); int -main () +main (void) { return libcthreads_queue_type_pop (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cthreads_libcthreads_queue_type_pop=yes -else +else $as_nop ac_cv_lib_cthreads_libcthreads_queue_type_pop=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_queue_type_pop" >&5 -$as_echo "$ac_cv_lib_cthreads_libcthreads_queue_type_pop" >&6; } -if test "x$ac_cv_lib_cthreads_libcthreads_queue_type_pop" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_queue_type_pop" >&5 +printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_queue_type_pop" >&6; } +if test "x$ac_cv_lib_cthreads_libcthreads_queue_type_pop" = xyes +then : ac_cv_libcthreads_dummy=yes -else +else $as_nop ac_cv_libcthreads=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_queue_pop in -lcthreads" >&5 -$as_echo_n "checking for libcthreads_queue_pop in -lcthreads... " >&6; } -if ${ac_cv_lib_cthreads_libcthreads_queue_pop+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_queue_pop in -lcthreads" >&5 +printf %s "checking for libcthreads_queue_pop in -lcthreads... " >&6; } +if test ${ac_cv_lib_cthreads_libcthreads_queue_pop+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22830,40 +25929,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcthreads_queue_pop (); int -main () +main (void) { return libcthreads_queue_pop (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cthreads_libcthreads_queue_pop=yes -else +else $as_nop ac_cv_lib_cthreads_libcthreads_queue_pop=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_queue_pop" >&5 -$as_echo "$ac_cv_lib_cthreads_libcthreads_queue_pop" >&6; } -if test "x$ac_cv_lib_cthreads_libcthreads_queue_pop" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_queue_pop" >&5 +printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_queue_pop" >&6; } +if test "x$ac_cv_lib_cthreads_libcthreads_queue_pop" = xyes +then : ac_cv_libcthreads_dummy=yes -else +else $as_nop ac_cv_libcthreads=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_queue_try_push in -lcthreads" >&5 -$as_echo_n "checking for libcthreads_queue_try_push in -lcthreads... " >&6; } -if ${ac_cv_lib_cthreads_libcthreads_queue_try_push+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_queue_try_push in -lcthreads" >&5 +printf %s "checking for libcthreads_queue_try_push in -lcthreads... " >&6; } +if test ${ac_cv_lib_cthreads_libcthreads_queue_try_push+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22872,40 +25971,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcthreads_queue_try_push (); int -main () +main (void) { return libcthreads_queue_try_push (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cthreads_libcthreads_queue_try_push=yes -else +else $as_nop ac_cv_lib_cthreads_libcthreads_queue_try_push=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_queue_try_push" >&5 -$as_echo "$ac_cv_lib_cthreads_libcthreads_queue_try_push" >&6; } -if test "x$ac_cv_lib_cthreads_libcthreads_queue_try_push" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_queue_try_push" >&5 +printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_queue_try_push" >&6; } +if test "x$ac_cv_lib_cthreads_libcthreads_queue_try_push" = xyes +then : ac_cv_libcthreads_dummy=yes -else +else $as_nop ac_cv_libcthreads=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_queue_push in -lcthreads" >&5 -$as_echo_n "checking for libcthreads_queue_push in -lcthreads... " >&6; } -if ${ac_cv_lib_cthreads_libcthreads_queue_push+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_queue_push in -lcthreads" >&5 +printf %s "checking for libcthreads_queue_push in -lcthreads... " >&6; } +if test ${ac_cv_lib_cthreads_libcthreads_queue_push+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22914,40 +26013,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcthreads_queue_push (); int -main () +main (void) { return libcthreads_queue_push (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cthreads_libcthreads_queue_push=yes -else +else $as_nop ac_cv_lib_cthreads_libcthreads_queue_push=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_queue_push" >&5 -$as_echo "$ac_cv_lib_cthreads_libcthreads_queue_push" >&6; } -if test "x$ac_cv_lib_cthreads_libcthreads_queue_push" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_queue_push" >&5 +printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_queue_push" >&6; } +if test "x$ac_cv_lib_cthreads_libcthreads_queue_push" = xyes +then : ac_cv_libcthreads_dummy=yes -else +else $as_nop ac_cv_libcthreads=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_queue_push_sorted in -lcthreads" >&5 -$as_echo_n "checking for libcthreads_queue_push_sorted in -lcthreads... " >&6; } -if ${ac_cv_lib_cthreads_libcthreads_queue_push_sorted+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_queue_push_sorted in -lcthreads" >&5 +printf %s "checking for libcthreads_queue_push_sorted in -lcthreads... " >&6; } +if test ${ac_cv_lib_cthreads_libcthreads_queue_push_sorted+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22956,41 +26055,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcthreads_queue_push_sorted (); int -main () +main (void) { return libcthreads_queue_push_sorted (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cthreads_libcthreads_queue_push_sorted=yes -else +else $as_nop ac_cv_lib_cthreads_libcthreads_queue_push_sorted=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_queue_push_sorted" >&5 -$as_echo "$ac_cv_lib_cthreads_libcthreads_queue_push_sorted" >&6; } -if test "x$ac_cv_lib_cthreads_libcthreads_queue_push_sorted" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_queue_push_sorted" >&5 +printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_queue_push_sorted" >&6; } +if test "x$ac_cv_lib_cthreads_libcthreads_queue_push_sorted" = xyes +then : ac_cv_libcthreads_dummy=yes -else +else $as_nop ac_cv_libcthreads=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_thread_pool_create in -lcthreads" >&5 -$as_echo_n "checking for libcthreads_thread_pool_create in -lcthreads... " >&6; } -if ${ac_cv_lib_cthreads_libcthreads_thread_pool_create+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_thread_pool_create in -lcthreads" >&5 +printf %s "checking for libcthreads_thread_pool_create in -lcthreads... " >&6; } +if test ${ac_cv_lib_cthreads_libcthreads_thread_pool_create+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22999,40 +26098,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcthreads_thread_pool_create (); int -main () +main (void) { return libcthreads_thread_pool_create (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cthreads_libcthreads_thread_pool_create=yes -else +else $as_nop ac_cv_lib_cthreads_libcthreads_thread_pool_create=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_thread_pool_create" >&5 -$as_echo "$ac_cv_lib_cthreads_libcthreads_thread_pool_create" >&6; } -if test "x$ac_cv_lib_cthreads_libcthreads_thread_pool_create" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_thread_pool_create" >&5 +printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_thread_pool_create" >&6; } +if test "x$ac_cv_lib_cthreads_libcthreads_thread_pool_create" = xyes +then : ac_cv_libcthreads_dummy=yes -else +else $as_nop ac_cv_libcthreads=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_thread_pool_push in -lcthreads" >&5 -$as_echo_n "checking for libcthreads_thread_pool_push in -lcthreads... " >&6; } -if ${ac_cv_lib_cthreads_libcthreads_thread_pool_push+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_thread_pool_push in -lcthreads" >&5 +printf %s "checking for libcthreads_thread_pool_push in -lcthreads... " >&6; } +if test ${ac_cv_lib_cthreads_libcthreads_thread_pool_push+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -23041,40 +26140,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcthreads_thread_pool_push (); int -main () +main (void) { return libcthreads_thread_pool_push (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cthreads_libcthreads_thread_pool_push=yes -else +else $as_nop ac_cv_lib_cthreads_libcthreads_thread_pool_push=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_thread_pool_push" >&5 -$as_echo "$ac_cv_lib_cthreads_libcthreads_thread_pool_push" >&6; } -if test "x$ac_cv_lib_cthreads_libcthreads_thread_pool_push" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_thread_pool_push" >&5 +printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_thread_pool_push" >&6; } +if test "x$ac_cv_lib_cthreads_libcthreads_thread_pool_push" = xyes +then : ac_cv_libcthreads_dummy=yes -else +else $as_nop ac_cv_libcthreads=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_thread_pool_push_sorted in -lcthreads" >&5 -$as_echo_n "checking for libcthreads_thread_pool_push_sorted in -lcthreads... " >&6; } -if ${ac_cv_lib_cthreads_libcthreads_thread_pool_push_sorted+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_thread_pool_push_sorted in -lcthreads" >&5 +printf %s "checking for libcthreads_thread_pool_push_sorted in -lcthreads... " >&6; } +if test ${ac_cv_lib_cthreads_libcthreads_thread_pool_push_sorted+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -23083,40 +26182,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcthreads_thread_pool_push_sorted (); int -main () +main (void) { return libcthreads_thread_pool_push_sorted (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cthreads_libcthreads_thread_pool_push_sorted=yes -else +else $as_nop ac_cv_lib_cthreads_libcthreads_thread_pool_push_sorted=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_thread_pool_push_sorted" >&5 -$as_echo "$ac_cv_lib_cthreads_libcthreads_thread_pool_push_sorted" >&6; } -if test "x$ac_cv_lib_cthreads_libcthreads_thread_pool_push_sorted" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_thread_pool_push_sorted" >&5 +printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_thread_pool_push_sorted" >&6; } +if test "x$ac_cv_lib_cthreads_libcthreads_thread_pool_push_sorted" = xyes +then : ac_cv_libcthreads_dummy=yes -else +else $as_nop ac_cv_libcthreads=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_thread_pool_join in -lcthreads" >&5 -$as_echo_n "checking for libcthreads_thread_pool_join in -lcthreads... " >&6; } -if ${ac_cv_lib_cthreads_libcthreads_thread_pool_join+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_thread_pool_join in -lcthreads" >&5 +printf %s "checking for libcthreads_thread_pool_join in -lcthreads... " >&6; } +if test ${ac_cv_lib_cthreads_libcthreads_thread_pool_join+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -23125,32 +26224,31 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcthreads_thread_pool_join (); int -main () +main (void) { return libcthreads_thread_pool_join (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cthreads_libcthreads_thread_pool_join=yes -else +else $as_nop ac_cv_lib_cthreads_libcthreads_thread_pool_join=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_thread_pool_join" >&5 -$as_echo "$ac_cv_lib_cthreads_libcthreads_thread_pool_join" >&6; } -if test "x$ac_cv_lib_cthreads_libcthreads_thread_pool_join" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_thread_pool_join" >&5 +printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_thread_pool_join" >&6; } +if test "x$ac_cv_lib_cthreads_libcthreads_thread_pool_join" = xyes +then : ac_cv_libcthreads_dummy=yes -else +else $as_nop ac_cv_libcthreads=no fi @@ -23160,9 +26258,10 @@ fi - if test "x$ac_cv_with_libcthreads" != x && test "x$ac_cv_with_libcthreads" != xauto-detect && test "x$ac_cv_libcthreads" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_with_libcthreads" != x && test "x$ac_cv_with_libcthreads" != xauto-detect && test "x$ac_cv_libcthreads" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "unable to find supported libcthreads in directory: $ac_cv_with_libcthreads See \`config.log' for more details" "$LINENO" 5; } @@ -23170,88 +26269,95 @@ fi - if test "x$ac_cv_libcthreads" = xyes; then : + if test "x$ac_cv_libcthreads" = xyes +then : -$as_echo "#define HAVE_LIBCTHREADS 1" >>confdefs.h +printf "%s\n" "#define HAVE_LIBCTHREADS 1" >>confdefs.h fi - if test "x$ac_cv_libcthreads" = xyes; then : + if test "x$ac_cv_libcthreads" = xyes +then : ac_cv_libcthreads_multi_threading=libcthreads -else +else $as_nop ac_cv_libcthreads_multi_threading=no fi - if test "x$ac_cv_libcthreads" = xyes; then : + if test "x$ac_cv_libcthreads" = xyes +then : HAVE_LIBCTHREADS=1 -else +else $as_nop HAVE_LIBCTHREADS=0 fi - if test "x$ac_cv_libcthreads" != xyes; then : - if test "x$ac_cv_enable_winapi" = xno; then : + if test "x$ac_cv_libcthreads" != xyes +then : + if test "x$ac_cv_enable_winapi" = xno +then : # Check whether --with-pthread was given. -if test "${with_pthread+set}" = set; then : +if test ${with_pthread+y} +then : withval=$with_pthread; ac_cv_with_pthread=$withval -else +else $as_nop ac_cv_with_pthread=auto-detect fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for pthread in includedir and libdir or in the specified DIR, or no if not to use pthread" >&5 -$as_echo_n "checking whether to use search for pthread in includedir and libdir or in the specified DIR, or no if not to use pthread... " >&6; } -if ${ac_cv_with_pthread+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use search for pthread in includedir and libdir or in the specified DIR, or no if not to use pthread" >&5 +printf %s "checking whether to use search for pthread in includedir and libdir or in the specified DIR, or no if not to use pthread... " >&6; } +if test ${ac_cv_with_pthread+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_with_pthread=auto-detect fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_pthread" >&5 -$as_echo "$ac_cv_with_pthread" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_pthread" >&5 +printf "%s\n" "$ac_cv_with_pthread" >&6; } - if test "x$ac_cv_with_pthread" != x && test "x$ac_cv_with_pthread" != xno && test "x$ac_cv_with_pthread" != xauto-detect; then : - if test -d "$ac_cv_with_pthread"; then : + if test "x$ac_cv_with_pthread" != x && test "x$ac_cv_with_pthread" != xno && test "x$ac_cv_with_pthread" != xauto-detect +then : + if test -d "$ac_cv_with_pthread" +then : CFLAGS="$CFLAGS -I${ac_cv_with_pthread}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_pthread}/lib" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no such directory: $ac_cv_with_pthread" >&5 -$as_echo "$as_me: WARNING: no such directory: $ac_cv_with_pthread" >&2;} +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: no such directory: $ac_cv_with_pthread" >&5 +printf "%s\n" "$as_me: WARNING: no such directory: $ac_cv_with_pthread" >&2;} fi fi - if test "x$ac_cv_with_pthread" = xno; then : + if test "x$ac_cv_with_pthread" = xno +then : ac_cv_pthread=no -else - for ac_header in pthread.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" -if test "x$ac_cv_header_pthread_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PTHREAD_H 1 -_ACEOF +else $as_nop + ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" +if test "x$ac_cv_header_pthread_h" = xyes +then : + printf "%s\n" "#define HAVE_PTHREAD_H 1" >>confdefs.h fi -done - - if test "x$ac_cv_header_pthread_h" = xno; then : + if test "x$ac_cv_header_pthread_h" = xno +then : ac_cv_pthread=no -else +else $as_nop ac_cv_pthread=pthread - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 -$as_echo_n "checking for pthread_create in -lpthread... " >&6; } -if ${ac_cv_lib_pthread_pthread_create+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 +printf %s "checking for pthread_create in -lpthread... " >&6; } +if test ${ac_cv_lib_pthread_pthread_create+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -23260,40 +26366,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char pthread_create (); int -main () +main (void) { return pthread_create (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_pthread_pthread_create=yes -else +else $as_nop ac_cv_lib_pthread_pthread_create=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5 -$as_echo "$ac_cv_lib_pthread_pthread_create" >&6; } -if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5 +printf "%s\n" "$ac_cv_lib_pthread_pthread_create" >&6; } +if test "x$ac_cv_lib_pthread_pthread_create" = xyes +then : ac_pthread_dummy=yes -else +else $as_nop ac_cv_pthread=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_exit in -lpthread" >&5 -$as_echo_n "checking for pthread_exit in -lpthread... " >&6; } -if ${ac_cv_lib_pthread_pthread_exit+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_exit in -lpthread" >&5 +printf %s "checking for pthread_exit in -lpthread... " >&6; } +if test ${ac_cv_lib_pthread_pthread_exit+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -23302,40 +26408,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char pthread_exit (); int -main () +main (void) { return pthread_exit (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_pthread_pthread_exit=yes -else +else $as_nop ac_cv_lib_pthread_pthread_exit=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_exit" >&5 -$as_echo "$ac_cv_lib_pthread_pthread_exit" >&6; } -if test "x$ac_cv_lib_pthread_pthread_exit" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_exit" >&5 +printf "%s\n" "$ac_cv_lib_pthread_pthread_exit" >&6; } +if test "x$ac_cv_lib_pthread_pthread_exit" = xyes +then : ac_pthread_dummy=yes -else +else $as_nop ac_cv_pthread=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in -lpthread" >&5 -$as_echo_n "checking for pthread_join in -lpthread... " >&6; } -if ${ac_cv_lib_pthread_pthread_join+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_join in -lpthread" >&5 +printf %s "checking for pthread_join in -lpthread... " >&6; } +if test ${ac_cv_lib_pthread_pthread_join+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -23344,41 +26450,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char pthread_join (); int -main () +main (void) { return pthread_join (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_pthread_pthread_join=yes -else +else $as_nop ac_cv_lib_pthread_pthread_join=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_join" >&5 -$as_echo "$ac_cv_lib_pthread_pthread_join" >&6; } -if test "x$ac_cv_lib_pthread_pthread_join" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_join" >&5 +printf "%s\n" "$ac_cv_lib_pthread_pthread_join" >&6; } +if test "x$ac_cv_lib_pthread_pthread_join" = xyes +then : ac_pthread_dummy=yes -else +else $as_nop ac_cv_pthread=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_cond_init in -lpthread" >&5 -$as_echo_n "checking for pthread_cond_init in -lpthread... " >&6; } -if ${ac_cv_lib_pthread_pthread_cond_init+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_cond_init in -lpthread" >&5 +printf %s "checking for pthread_cond_init in -lpthread... " >&6; } +if test ${ac_cv_lib_pthread_pthread_cond_init+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -23387,40 +26493,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char pthread_cond_init (); int -main () +main (void) { return pthread_cond_init (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_pthread_pthread_cond_init=yes -else +else $as_nop ac_cv_lib_pthread_pthread_cond_init=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_cond_init" >&5 -$as_echo "$ac_cv_lib_pthread_pthread_cond_init" >&6; } -if test "x$ac_cv_lib_pthread_pthread_cond_init" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_cond_init" >&5 +printf "%s\n" "$ac_cv_lib_pthread_pthread_cond_init" >&6; } +if test "x$ac_cv_lib_pthread_pthread_cond_init" = xyes +then : ac_pthread_dummy=yes -else +else $as_nop ac_cv_pthread=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_cond_destroy in -lpthread" >&5 -$as_echo_n "checking for pthread_cond_destroy in -lpthread... " >&6; } -if ${ac_cv_lib_pthread_pthread_cond_destroy+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_cond_destroy in -lpthread" >&5 +printf %s "checking for pthread_cond_destroy in -lpthread... " >&6; } +if test ${ac_cv_lib_pthread_pthread_cond_destroy+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -23429,40 +26535,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char pthread_cond_destroy (); int -main () +main (void) { return pthread_cond_destroy (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_pthread_pthread_cond_destroy=yes -else +else $as_nop ac_cv_lib_pthread_pthread_cond_destroy=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_cond_destroy" >&5 -$as_echo "$ac_cv_lib_pthread_pthread_cond_destroy" >&6; } -if test "x$ac_cv_lib_pthread_pthread_cond_destroy" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_cond_destroy" >&5 +printf "%s\n" "$ac_cv_lib_pthread_pthread_cond_destroy" >&6; } +if test "x$ac_cv_lib_pthread_pthread_cond_destroy" = xyes +then : ac_pthread_dummy=yes -else +else $as_nop ac_cv_pthread=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_cond_broadcast in -lpthread" >&5 -$as_echo_n "checking for pthread_cond_broadcast in -lpthread... " >&6; } -if ${ac_cv_lib_pthread_pthread_cond_broadcast+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_cond_broadcast in -lpthread" >&5 +printf %s "checking for pthread_cond_broadcast in -lpthread... " >&6; } +if test ${ac_cv_lib_pthread_pthread_cond_broadcast+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -23471,40 +26577,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char pthread_cond_broadcast (); int -main () +main (void) { return pthread_cond_broadcast (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_pthread_pthread_cond_broadcast=yes -else +else $as_nop ac_cv_lib_pthread_pthread_cond_broadcast=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_cond_broadcast" >&5 -$as_echo "$ac_cv_lib_pthread_pthread_cond_broadcast" >&6; } -if test "x$ac_cv_lib_pthread_pthread_cond_broadcast" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_cond_broadcast" >&5 +printf "%s\n" "$ac_cv_lib_pthread_pthread_cond_broadcast" >&6; } +if test "x$ac_cv_lib_pthread_pthread_cond_broadcast" = xyes +then : ac_pthread_dummy=yes -else +else $as_nop ac_cv_pthread=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_cond_signal in -lpthread" >&5 -$as_echo_n "checking for pthread_cond_signal in -lpthread... " >&6; } -if ${ac_cv_lib_pthread_pthread_cond_signal+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_cond_signal in -lpthread" >&5 +printf %s "checking for pthread_cond_signal in -lpthread... " >&6; } +if test ${ac_cv_lib_pthread_pthread_cond_signal+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -23513,40 +26619,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char pthread_cond_signal (); int -main () +main (void) { return pthread_cond_signal (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_pthread_pthread_cond_signal=yes -else +else $as_nop ac_cv_lib_pthread_pthread_cond_signal=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_cond_signal" >&5 -$as_echo "$ac_cv_lib_pthread_pthread_cond_signal" >&6; } -if test "x$ac_cv_lib_pthread_pthread_cond_signal" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_cond_signal" >&5 +printf "%s\n" "$ac_cv_lib_pthread_pthread_cond_signal" >&6; } +if test "x$ac_cv_lib_pthread_pthread_cond_signal" = xyes +then : ac_pthread_dummy=yes -else +else $as_nop ac_cv_pthread=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_cond_wait in -lpthread" >&5 -$as_echo_n "checking for pthread_cond_wait in -lpthread... " >&6; } -if ${ac_cv_lib_pthread_pthread_cond_wait+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_cond_wait in -lpthread" >&5 +printf %s "checking for pthread_cond_wait in -lpthread... " >&6; } +if test ${ac_cv_lib_pthread_pthread_cond_wait+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -23555,41 +26661,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char pthread_cond_wait (); int -main () +main (void) { return pthread_cond_wait (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_pthread_pthread_cond_wait=yes -else +else $as_nop ac_cv_lib_pthread_pthread_cond_wait=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_cond_wait" >&5 -$as_echo "$ac_cv_lib_pthread_pthread_cond_wait" >&6; } -if test "x$ac_cv_lib_pthread_pthread_cond_wait" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_cond_wait" >&5 +printf "%s\n" "$ac_cv_lib_pthread_pthread_cond_wait" >&6; } +if test "x$ac_cv_lib_pthread_pthread_cond_wait" = xyes +then : ac_pthread_dummy=yes -else +else $as_nop ac_cv_pthread=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthread" >&5 -$as_echo_n "checking for pthread_mutex_init in -lpthread... " >&6; } -if ${ac_cv_lib_pthread_pthread_mutex_init+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthread" >&5 +printf %s "checking for pthread_mutex_init in -lpthread... " >&6; } +if test ${ac_cv_lib_pthread_pthread_mutex_init+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -23598,40 +26704,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char pthread_mutex_init (); int -main () +main (void) { return pthread_mutex_init (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_pthread_pthread_mutex_init=yes -else +else $as_nop ac_cv_lib_pthread_pthread_mutex_init=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 -$as_echo "$ac_cv_lib_pthread_pthread_mutex_init" >&6; } -if test "x$ac_cv_lib_pthread_pthread_mutex_init" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 +printf "%s\n" "$ac_cv_lib_pthread_pthread_mutex_init" >&6; } +if test "x$ac_cv_lib_pthread_pthread_mutex_init" = xyes +then : ac_pthread_dummy=yes -else +else $as_nop ac_cv_pthread=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_destroy in -lpthread" >&5 -$as_echo_n "checking for pthread_mutex_destroy in -lpthread... " >&6; } -if ${ac_cv_lib_pthread_pthread_mutex_destroy+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_destroy in -lpthread" >&5 +printf %s "checking for pthread_mutex_destroy in -lpthread... " >&6; } +if test ${ac_cv_lib_pthread_pthread_mutex_destroy+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -23640,40 +26746,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char pthread_mutex_destroy (); int -main () +main (void) { return pthread_mutex_destroy (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_pthread_pthread_mutex_destroy=yes -else +else $as_nop ac_cv_lib_pthread_pthread_mutex_destroy=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_destroy" >&5 -$as_echo "$ac_cv_lib_pthread_pthread_mutex_destroy" >&6; } -if test "x$ac_cv_lib_pthread_pthread_mutex_destroy" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_destroy" >&5 +printf "%s\n" "$ac_cv_lib_pthread_pthread_mutex_destroy" >&6; } +if test "x$ac_cv_lib_pthread_pthread_mutex_destroy" = xyes +then : ac_pthread_dummy=yes -else +else $as_nop ac_cv_pthread=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_lock in -lpthread" >&5 -$as_echo_n "checking for pthread_mutex_lock in -lpthread... " >&6; } -if ${ac_cv_lib_pthread_pthread_mutex_lock+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_lock in -lpthread" >&5 +printf %s "checking for pthread_mutex_lock in -lpthread... " >&6; } +if test ${ac_cv_lib_pthread_pthread_mutex_lock+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -23682,40 +26788,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char pthread_mutex_lock (); int -main () +main (void) { return pthread_mutex_lock (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_pthread_pthread_mutex_lock=yes -else +else $as_nop ac_cv_lib_pthread_pthread_mutex_lock=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_lock" >&5 -$as_echo "$ac_cv_lib_pthread_pthread_mutex_lock" >&6; } -if test "x$ac_cv_lib_pthread_pthread_mutex_lock" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_lock" >&5 +printf "%s\n" "$ac_cv_lib_pthread_pthread_mutex_lock" >&6; } +if test "x$ac_cv_lib_pthread_pthread_mutex_lock" = xyes +then : ac_pthread_dummy=yes -else +else $as_nop ac_cv_pthread=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_trylock in -lpthread" >&5 -$as_echo_n "checking for pthread_mutex_trylock in -lpthread... " >&6; } -if ${ac_cv_lib_pthread_pthread_mutex_trylock+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_trylock in -lpthread" >&5 +printf %s "checking for pthread_mutex_trylock in -lpthread... " >&6; } +if test ${ac_cv_lib_pthread_pthread_mutex_trylock+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -23724,40 +26830,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char pthread_mutex_trylock (); int -main () +main (void) { return pthread_mutex_trylock (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_pthread_pthread_mutex_trylock=yes -else +else $as_nop ac_cv_lib_pthread_pthread_mutex_trylock=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_trylock" >&5 -$as_echo "$ac_cv_lib_pthread_pthread_mutex_trylock" >&6; } -if test "x$ac_cv_lib_pthread_pthread_mutex_trylock" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_trylock" >&5 +printf "%s\n" "$ac_cv_lib_pthread_pthread_mutex_trylock" >&6; } +if test "x$ac_cv_lib_pthread_pthread_mutex_trylock" = xyes +then : ac_pthread_dummy=yes -else +else $as_nop ac_cv_pthread=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_unlock in -lpthread" >&5 -$as_echo_n "checking for pthread_mutex_unlock in -lpthread... " >&6; } -if ${ac_cv_lib_pthread_pthread_mutex_unlock+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_unlock in -lpthread" >&5 +printf %s "checking for pthread_mutex_unlock in -lpthread... " >&6; } +if test ${ac_cv_lib_pthread_pthread_mutex_unlock+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -23766,41 +26872,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char pthread_mutex_unlock (); int -main () +main (void) { return pthread_mutex_unlock (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_pthread_pthread_mutex_unlock=yes -else +else $as_nop ac_cv_lib_pthread_pthread_mutex_unlock=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_unlock" >&5 -$as_echo "$ac_cv_lib_pthread_pthread_mutex_unlock" >&6; } -if test "x$ac_cv_lib_pthread_pthread_mutex_unlock" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_unlock" >&5 +printf "%s\n" "$ac_cv_lib_pthread_pthread_mutex_unlock" >&6; } +if test "x$ac_cv_lib_pthread_pthread_mutex_unlock" = xyes +then : ac_pthread_dummy=yes -else +else $as_nop ac_cv_pthread=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_init in -lpthread" >&5 -$as_echo_n "checking for pthread_rwlock_init in -lpthread... " >&6; } -if ${ac_cv_lib_pthread_pthread_rwlock_init+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_init in -lpthread" >&5 +printf %s "checking for pthread_rwlock_init in -lpthread... " >&6; } +if test ${ac_cv_lib_pthread_pthread_rwlock_init+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -23809,40 +26915,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char pthread_rwlock_init (); int -main () +main (void) { return pthread_rwlock_init (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_pthread_pthread_rwlock_init=yes -else +else $as_nop ac_cv_lib_pthread_pthread_rwlock_init=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_rwlock_init" >&5 -$as_echo "$ac_cv_lib_pthread_pthread_rwlock_init" >&6; } -if test "x$ac_cv_lib_pthread_pthread_rwlock_init" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_rwlock_init" >&5 +printf "%s\n" "$ac_cv_lib_pthread_pthread_rwlock_init" >&6; } +if test "x$ac_cv_lib_pthread_pthread_rwlock_init" = xyes +then : ac_pthread_dummy=yes -else +else $as_nop ac_cv_pthread=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_destroy in -lpthread" >&5 -$as_echo_n "checking for pthread_rwlock_destroy in -lpthread... " >&6; } -if ${ac_cv_lib_pthread_pthread_rwlock_destroy+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_destroy in -lpthread" >&5 +printf %s "checking for pthread_rwlock_destroy in -lpthread... " >&6; } +if test ${ac_cv_lib_pthread_pthread_rwlock_destroy+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -23851,40 +26957,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char pthread_rwlock_destroy (); int -main () +main (void) { return pthread_rwlock_destroy (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_pthread_pthread_rwlock_destroy=yes -else +else $as_nop ac_cv_lib_pthread_pthread_rwlock_destroy=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_rwlock_destroy" >&5 -$as_echo "$ac_cv_lib_pthread_pthread_rwlock_destroy" >&6; } -if test "x$ac_cv_lib_pthread_pthread_rwlock_destroy" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_rwlock_destroy" >&5 +printf "%s\n" "$ac_cv_lib_pthread_pthread_rwlock_destroy" >&6; } +if test "x$ac_cv_lib_pthread_pthread_rwlock_destroy" = xyes +then : ac_pthread_dummy=yes -else +else $as_nop ac_cv_pthread=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_rdlock in -lpthread" >&5 -$as_echo_n "checking for pthread_rwlock_rdlock in -lpthread... " >&6; } -if ${ac_cv_lib_pthread_pthread_rwlock_rdlock+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_rdlock in -lpthread" >&5 +printf %s "checking for pthread_rwlock_rdlock in -lpthread... " >&6; } +if test ${ac_cv_lib_pthread_pthread_rwlock_rdlock+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -23893,40 +26999,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char pthread_rwlock_rdlock (); int -main () +main (void) { return pthread_rwlock_rdlock (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_pthread_pthread_rwlock_rdlock=yes -else +else $as_nop ac_cv_lib_pthread_pthread_rwlock_rdlock=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_rwlock_rdlock" >&5 -$as_echo "$ac_cv_lib_pthread_pthread_rwlock_rdlock" >&6; } -if test "x$ac_cv_lib_pthread_pthread_rwlock_rdlock" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_rwlock_rdlock" >&5 +printf "%s\n" "$ac_cv_lib_pthread_pthread_rwlock_rdlock" >&6; } +if test "x$ac_cv_lib_pthread_pthread_rwlock_rdlock" = xyes +then : ac_pthread_dummy=yes -else +else $as_nop ac_cv_pthread=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_wrlock in -lpthread" >&5 -$as_echo_n "checking for pthread_rwlock_wrlock in -lpthread... " >&6; } -if ${ac_cv_lib_pthread_pthread_rwlock_wrlock+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_wrlock in -lpthread" >&5 +printf %s "checking for pthread_rwlock_wrlock in -lpthread... " >&6; } +if test ${ac_cv_lib_pthread_pthread_rwlock_wrlock+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -23935,40 +27041,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char pthread_rwlock_wrlock (); int -main () +main (void) { return pthread_rwlock_wrlock (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_pthread_pthread_rwlock_wrlock=yes -else +else $as_nop ac_cv_lib_pthread_pthread_rwlock_wrlock=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_rwlock_wrlock" >&5 -$as_echo "$ac_cv_lib_pthread_pthread_rwlock_wrlock" >&6; } -if test "x$ac_cv_lib_pthread_pthread_rwlock_wrlock" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_rwlock_wrlock" >&5 +printf "%s\n" "$ac_cv_lib_pthread_pthread_rwlock_wrlock" >&6; } +if test "x$ac_cv_lib_pthread_pthread_rwlock_wrlock" = xyes +then : ac_pthread_dummy=yes -else +else $as_nop ac_cv_pthread=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_unlock in -lpthread" >&5 -$as_echo_n "checking for pthread_rwlock_unlock in -lpthread... " >&6; } -if ${ac_cv_lib_pthread_pthread_rwlock_unlock+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_unlock in -lpthread" >&5 +printf %s "checking for pthread_rwlock_unlock in -lpthread... " >&6; } +if test ${ac_cv_lib_pthread_pthread_rwlock_unlock+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -23977,32 +27083,31 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char pthread_rwlock_unlock (); int -main () +main (void) { return pthread_rwlock_unlock (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_pthread_pthread_rwlock_unlock=yes -else +else $as_nop ac_cv_lib_pthread_pthread_rwlock_unlock=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_rwlock_unlock" >&5 -$as_echo "$ac_cv_lib_pthread_pthread_rwlock_unlock" >&6; } -if test "x$ac_cv_lib_pthread_pthread_rwlock_unlock" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_rwlock_unlock" >&5 +printf "%s\n" "$ac_cv_lib_pthread_pthread_rwlock_unlock" >&6; } +if test "x$ac_cv_lib_pthread_pthread_rwlock_unlock" = xyes +then : ac_pthread_dummy=yes -else +else $as_nop ac_cv_pthread=no fi @@ -24013,57 +27118,63 @@ fi - if test "x$ac_cv_pthread" = xpthread; then : + if test "x$ac_cv_pthread" = xpthread +then : -$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h +printf "%s\n" "#define HAVE_PTHREAD 1" >>confdefs.h fi - if test "x$ac_cv_pthread" != xno; then : + if test "x$ac_cv_pthread" != xno +then : HAVE_PTHREAD=1 -else +else $as_nop HAVE_PTHREAD=0 fi - if test "x$ac_cv_pthread_CPPFLAGS" != "x"; then : + if test "x$ac_cv_pthread_CPPFLAGS" != "x" +then : PTHREAD_CPPFLAGS=$ac_cv_pthread_CPPFLAGS fi - if test "x$ac_cv_pthread_LIBADD" != "x"; then : + if test "x$ac_cv_pthread_LIBADD" != "x" +then : PTHREAD_LIBADD=$ac_cv_pthread_LIBADD fi - if test "x$ac_cv_pthread" = xpthread; then : + if test "x$ac_cv_pthread" = xpthread +then : ax_pthread_pc_libs_private=-lpthread fi ac_cv_libcthreads_multi_threading=$ac_cv_pthread -else +else $as_nop ac_cv_libcthreads_multi_threading="winapi" fi - if test "x$ac_cv_libcthreads_multi_threading" != xno; then : + if test "x$ac_cv_libcthreads_multi_threading" != xno +then : ac_cv_libcthreads_CPPFLAGS="-I../libcthreads"; ac_cv_libcthreads_LIBADD="../libcthreads/libcthreads.la"; ac_cv_libcthreads=local -else +else $as_nop ac_cv_libcthreads=no fi -$as_echo "#define HAVE_LOCAL_LIBCTHREADS 1" >>confdefs.h +printf "%s\n" "#define HAVE_LOCAL_LIBCTHREADS 1" >>confdefs.h HAVE_LOCAL_LIBCTHREADS=1 @@ -24080,36 +27191,41 @@ HAVE_LOCAL_LIBCTHREADS_FALSE= fi - if test "x$ac_cv_libcthreads_CPPFLAGS" != "x"; then : + if test "x$ac_cv_libcthreads_CPPFLAGS" != "x" +then : LIBCTHREADS_CPPFLAGS=$ac_cv_libcthreads_CPPFLAGS fi - if test "x$ac_cv_libcthreads_LIBADD" != "x"; then : + if test "x$ac_cv_libcthreads_LIBADD" != "x" +then : LIBCTHREADS_LIBADD=$ac_cv_libcthreads_LIBADD fi - if test "x$ac_cv_libcthreads" != xno; then : + if test "x$ac_cv_libcthreads" != xno +then : -$as_echo "#define HAVE_MULTI_THREAD_SUPPORT 1" >>confdefs.h +printf "%s\n" "#define HAVE_MULTI_THREAD_SUPPORT 1" >>confdefs.h HAVE_MULTI_THREAD_SUPPORT=1 -else +else $as_nop HAVE_MULTI_THREAD_SUPPORT=0 fi - if test "x$ac_cv_libcthreads" = xyes; then : + if test "x$ac_cv_libcthreads" = xyes +then : ax_libcthreads_pc_libs_private=-lcthreads fi - if test "x$ac_cv_libcthreads" = xyes; then : + if test "x$ac_cv_libcthreads" = xyes +then : ax_libcthreads_spec_requires=libcthreads ax_libcthreads_spec_build_requires=libcthreads-devel @@ -24121,55 +27237,61 @@ # Check whether --with-libcdata was given. -if test "${with_libcdata+set}" = set; then : +if test ${with_libcdata+y} +then : withval=$with_libcdata; ac_cv_with_libcdata=$withval -else +else $as_nop ac_cv_with_libcdata=auto-detect fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libcdata in includedir and libdir or in the specified DIR, or no if to use local version" >&5 -$as_echo_n "checking whether to use search for libcdata in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } -if ${ac_cv_with_libcdata+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use search for libcdata in includedir and libdir or in the specified DIR, or no if to use local version" >&5 +printf %s "checking whether to use search for libcdata in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } +if test ${ac_cv_with_libcdata+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_with_libcdata=auto-detect fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libcdata" >&5 -$as_echo "$ac_cv_with_libcdata" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libcdata" >&5 +printf "%s\n" "$ac_cv_with_libcdata" >&6; } - if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libcdata" = xno; then : + if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libcdata" = xno +then : ac_cv_libcdata=no -else +else $as_nop ac_cv_libcdata=check - if test "x$ac_cv_with_libcdata" != x && test "x$ac_cv_with_libcdata" != xauto-detect; then : - if test -d "$ac_cv_with_libcdata"; then : + if test "x$ac_cv_with_libcdata" != x && test "x$ac_cv_with_libcdata" != xauto-detect +then : + if test -d "$ac_cv_with_libcdata" +then : CFLAGS="$CFLAGS -I${ac_cv_with_libcdata}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libcdata}/lib" -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "no such directory: $ac_cv_with_libcdata See \`config.log' for more details" "$LINENO" 5; } fi -else - if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : +else $as_nop + if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x" +then : pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata" >&5 -$as_echo_n "checking for libcdata... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata >= 20230108" >&5 +printf %s "checking for libcdata >= 20230108... " >&6; } if test -n "$libcdata_CFLAGS"; then pkg_cv_libcdata_CFLAGS="$libcdata_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcdata >= 20190112\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libcdata >= 20190112") 2>&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcdata >= 20230108\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libcdata >= 20230108") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_libcdata_CFLAGS=`$PKG_CONFIG --cflags "libcdata >= 20190112" 2>/dev/null` + pkg_cv_libcdata_CFLAGS=`$PKG_CONFIG --cflags "libcdata >= 20230108" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -24181,12 +27303,12 @@ pkg_cv_libcdata_LIBS="$libcdata_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcdata >= 20190112\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libcdata >= 20190112") 2>&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcdata >= 20230108\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libcdata >= 20230108") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_libcdata_LIBS=`$PKG_CONFIG --libs "libcdata >= 20190112" 2>/dev/null` + pkg_cv_libcdata_LIBS=`$PKG_CONFIG --libs "libcdata >= 20230108" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -24198,8 +27320,8 @@ if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -24207,58 +27329,57 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - libcdata_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libcdata >= 20190112" 2>&1` + libcdata_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libcdata >= 20230108" 2>&1` else - libcdata_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libcdata >= 20190112" 2>&1` + libcdata_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libcdata >= 20230108" 2>&1` fi - # Put the nasty error message in config.log where it belongs - echo "$libcdata_PKG_ERRORS" >&5 + # Put the nasty error message in config.log where it belongs + echo "$libcdata_PKG_ERRORS" >&5 - ac_cv_libcdata=check + ac_cv_libcdata=check elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ac_cv_libcdata=check + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ac_cv_libcdata=check else - libcdata_CFLAGS=$pkg_cv_libcdata_CFLAGS - libcdata_LIBS=$pkg_cv_libcdata_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ac_cv_libcdata=yes + libcdata_CFLAGS=$pkg_cv_libcdata_CFLAGS + libcdata_LIBS=$pkg_cv_libcdata_LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + ac_cv_libcdata=yes fi fi - if test "x$ac_cv_libcdata" = xyes; then : + if test "x$ac_cv_libcdata" = xyes +then : ac_cv_libcdata_CPPFLAGS="$pkg_cv_libcdata_CFLAGS" ac_cv_libcdata_LIBADD="$pkg_cv_libcdata_LIBS" fi fi - if test "x$ac_cv_libcdata" = xcheck; then : - for ac_header in libcdata.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "libcdata.h" "ac_cv_header_libcdata_h" "$ac_includes_default" -if test "x$ac_cv_header_libcdata_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBCDATA_H 1 -_ACEOF + if test "x$ac_cv_libcdata" = xcheck +then : + ac_fn_c_check_header_compile "$LINENO" "libcdata.h" "ac_cv_header_libcdata_h" "$ac_includes_default" +if test "x$ac_cv_header_libcdata_h" = xyes +then : + printf "%s\n" "#define HAVE_LIBCDATA_H 1" >>confdefs.h fi -done - - if test "x$ac_cv_header_libcdata_h" = xno; then : + if test "x$ac_cv_header_libcdata_h" = xno +then : ac_cv_libcdata=no -else +else $as_nop ac_cv_libcdata=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_get_version in -lcdata" >&5 -$as_echo_n "checking for libcdata_get_version in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_get_version+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_get_version in -lcdata" >&5 +printf %s "checking for libcdata_get_version in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_get_version+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24267,41 +27388,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_get_version (); int -main () +main (void) { return libcdata_get_version (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_get_version=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_get_version=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_get_version" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_get_version" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_get_version" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_get_version" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_get_version" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_get_version" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_initialize in -lcdata" >&5 -$as_echo_n "checking for libcdata_array_initialize in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_array_initialize+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_initialize in -lcdata" >&5 +printf %s "checking for libcdata_array_initialize in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_array_initialize+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24310,40 +27431,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_array_initialize (); int -main () +main (void) { return libcdata_array_initialize (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_array_initialize=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_array_initialize=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_initialize" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_array_initialize" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_array_initialize" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_initialize" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_array_initialize" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_array_initialize" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_free in -lcdata" >&5 -$as_echo_n "checking for libcdata_array_free in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_array_free+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_free in -lcdata" >&5 +printf %s "checking for libcdata_array_free in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_array_free+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24352,40 +27473,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_array_free (); int -main () +main (void) { return libcdata_array_free (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_array_free=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_array_free=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_free" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_array_free" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_array_free" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_free" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_array_free" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_array_free" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_empty in -lcdata" >&5 -$as_echo_n "checking for libcdata_array_empty in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_array_empty+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_empty in -lcdata" >&5 +printf %s "checking for libcdata_array_empty in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_array_empty+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24394,40 +27515,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_array_empty (); int -main () +main (void) { return libcdata_array_empty (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_array_empty=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_array_empty=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_empty" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_array_empty" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_array_empty" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_empty" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_array_empty" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_array_empty" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_clone in -lcdata" >&5 -$as_echo_n "checking for libcdata_array_clone in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_array_clone+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_clone in -lcdata" >&5 +printf %s "checking for libcdata_array_clone in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_array_clone+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24436,40 +27557,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_array_clone (); int -main () +main (void) { return libcdata_array_clone (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_array_clone=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_array_clone=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_clone" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_array_clone" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_array_clone" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_clone" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_array_clone" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_array_clone" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_resize in -lcdata" >&5 -$as_echo_n "checking for libcdata_array_resize in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_array_resize+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_resize in -lcdata" >&5 +printf %s "checking for libcdata_array_resize in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_array_resize+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24478,40 +27599,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_array_resize (); int -main () +main (void) { return libcdata_array_resize (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_array_resize=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_array_resize=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_resize" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_array_resize" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_array_resize" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_resize" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_array_resize" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_array_resize" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_reverse in -lcdata" >&5 -$as_echo_n "checking for libcdata_array_reverse in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_array_reverse+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_reverse in -lcdata" >&5 +printf %s "checking for libcdata_array_reverse in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_array_reverse+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24520,40 +27641,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_array_reverse (); int -main () +main (void) { return libcdata_array_reverse (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_array_reverse=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_array_reverse=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_reverse" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_array_reverse" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_array_reverse" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_reverse" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_array_reverse" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_array_reverse" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_get_number_of_entries in -lcdata" >&5 -$as_echo_n "checking for libcdata_array_get_number_of_entries in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_array_get_number_of_entries+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_get_number_of_entries in -lcdata" >&5 +printf %s "checking for libcdata_array_get_number_of_entries in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_array_get_number_of_entries+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24562,40 +27683,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_array_get_number_of_entries (); int -main () +main (void) { return libcdata_array_get_number_of_entries (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_array_get_number_of_entries=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_array_get_number_of_entries=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_get_number_of_entries" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_array_get_number_of_entries" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_array_get_number_of_entries" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_get_number_of_entries" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_array_get_number_of_entries" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_array_get_number_of_entries" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_get_entry_by_index in -lcdata" >&5 -$as_echo_n "checking for libcdata_array_get_entry_by_index in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_array_get_entry_by_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_get_entry_by_index in -lcdata" >&5 +printf %s "checking for libcdata_array_get_entry_by_index in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_array_get_entry_by_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24604,40 +27725,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_array_get_entry_by_index (); int -main () +main (void) { return libcdata_array_get_entry_by_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_array_get_entry_by_index=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_array_get_entry_by_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_get_entry_by_index" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_array_get_entry_by_index" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_array_get_entry_by_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_get_entry_by_index" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_array_get_entry_by_index" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_array_get_entry_by_index" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_get_entry_by_value in -lcdata" >&5 -$as_echo_n "checking for libcdata_array_get_entry_by_value in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_array_get_entry_by_value+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_get_entry_by_value in -lcdata" >&5 +printf %s "checking for libcdata_array_get_entry_by_value in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_array_get_entry_by_value+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24646,40 +27767,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_array_get_entry_by_value (); int -main () +main (void) { return libcdata_array_get_entry_by_value (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_array_get_entry_by_value=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_array_get_entry_by_value=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_get_entry_by_value" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_array_get_entry_by_value" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_array_get_entry_by_value" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_get_entry_by_value" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_array_get_entry_by_value" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_array_get_entry_by_value" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_set_entry_by_index in -lcdata" >&5 -$as_echo_n "checking for libcdata_array_set_entry_by_index in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_array_set_entry_by_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_set_entry_by_index in -lcdata" >&5 +printf %s "checking for libcdata_array_set_entry_by_index in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_array_set_entry_by_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24688,40 +27809,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_array_set_entry_by_index (); int -main () +main (void) { return libcdata_array_set_entry_by_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_array_set_entry_by_index=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_array_set_entry_by_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_set_entry_by_index" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_array_set_entry_by_index" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_array_set_entry_by_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_set_entry_by_index" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_array_set_entry_by_index" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_array_set_entry_by_index" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_prepend_entry in -lcdata" >&5 -$as_echo_n "checking for libcdata_array_prepend_entry in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_array_prepend_entry+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_prepend_entry in -lcdata" >&5 +printf %s "checking for libcdata_array_prepend_entry in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_array_prepend_entry+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24730,40 +27851,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_array_prepend_entry (); int -main () +main (void) { return libcdata_array_prepend_entry (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_array_prepend_entry=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_array_prepend_entry=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_prepend_entry" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_array_prepend_entry" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_array_prepend_entry" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_prepend_entry" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_array_prepend_entry" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_array_prepend_entry" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_append_entry in -lcdata" >&5 -$as_echo_n "checking for libcdata_array_append_entry in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_array_append_entry+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_append_entry in -lcdata" >&5 +printf %s "checking for libcdata_array_append_entry in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_array_append_entry+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24772,40 +27893,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_array_append_entry (); int -main () +main (void) { return libcdata_array_append_entry (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_array_append_entry=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_array_append_entry=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_append_entry" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_array_append_entry" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_array_append_entry" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_append_entry" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_array_append_entry" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_array_append_entry" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_insert_entry in -lcdata" >&5 -$as_echo_n "checking for libcdata_array_insert_entry in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_array_insert_entry+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_insert_entry in -lcdata" >&5 +printf %s "checking for libcdata_array_insert_entry in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_array_insert_entry+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24814,40 +27935,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_array_insert_entry (); int -main () +main (void) { return libcdata_array_insert_entry (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_array_insert_entry=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_array_insert_entry=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_insert_entry" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_array_insert_entry" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_array_insert_entry" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_insert_entry" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_array_insert_entry" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_array_insert_entry" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_remove_entry in -lcdata" >&5 -$as_echo_n "checking for libcdata_array_remove_entry in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_array_remove_entry+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_remove_entry in -lcdata" >&5 +printf %s "checking for libcdata_array_remove_entry in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_array_remove_entry+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24856,41 +27977,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_array_remove_entry (); int -main () +main (void) { return libcdata_array_remove_entry (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_array_remove_entry=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_array_remove_entry=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_remove_entry" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_array_remove_entry" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_array_remove_entry" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_remove_entry" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_array_remove_entry" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_array_remove_entry" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_btree_initialize in -lcdata" >&5 -$as_echo_n "checking for libfdata_btree_initialize in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libfdata_btree_initialize+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_btree_initialize in -lcdata" >&5 +printf %s "checking for libcdata_btree_initialize in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_btree_initialize+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24899,40 +28020,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char libfdata_btree_initialize (); +char libcdata_btree_initialize (); int -main () +main (void) { -return libfdata_btree_initialize (); +return libcdata_btree_initialize (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_cdata_libfdata_btree_initialize=yes -else - ac_cv_lib_cdata_libfdata_btree_initialize=no +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_cdata_libcdata_btree_initialize=yes +else $as_nop + ac_cv_lib_cdata_libcdata_btree_initialize=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libfdata_btree_initialize" >&5 -$as_echo "$ac_cv_lib_cdata_libfdata_btree_initialize" >&6; } -if test "x$ac_cv_lib_cdata_libfdata_btree_initialize" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_btree_initialize" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_btree_initialize" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_btree_initialize" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_btree_free in -lcdata" >&5 -$as_echo_n "checking for libcdata_btree_free in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_btree_free+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_btree_free in -lcdata" >&5 +printf %s "checking for libcdata_btree_free in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_btree_free+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24941,40 +28062,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_btree_free (); int -main () +main (void) { return libcdata_btree_free (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_btree_free=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_btree_free=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_btree_free" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_btree_free" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_btree_free" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_btree_free" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_btree_free" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_btree_free" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_btree_get_number_of_values in -lcdata" >&5 -$as_echo_n "checking for libcdata_btree_get_number_of_values in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_btree_get_number_of_values+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_btree_get_number_of_values in -lcdata" >&5 +printf %s "checking for libcdata_btree_get_number_of_values in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_btree_get_number_of_values+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24983,40 +28104,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_btree_get_number_of_values (); int -main () +main (void) { return libcdata_btree_get_number_of_values (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_btree_get_number_of_values=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_btree_get_number_of_values=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_btree_get_number_of_values" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_btree_get_number_of_values" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_btree_get_number_of_values" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_btree_get_number_of_values" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_btree_get_number_of_values" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_btree_get_number_of_values" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_btree_get_value_by_index in -lcdata" >&5 -$as_echo_n "checking for libcdata_btree_get_value_by_index in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_btree_get_value_by_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_btree_get_value_by_index in -lcdata" >&5 +printf %s "checking for libcdata_btree_get_value_by_index in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_btree_get_value_by_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -25025,40 +28146,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_btree_get_value_by_index (); int -main () +main (void) { return libcdata_btree_get_value_by_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_btree_get_value_by_index=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_btree_get_value_by_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_btree_get_value_by_index" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_btree_get_value_by_index" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_btree_get_value_by_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_btree_get_value_by_index" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_btree_get_value_by_index" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_btree_get_value_by_index" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_btree_get_value_by_value in -lcdata" >&5 -$as_echo_n "checking for libcdata_btree_get_value_by_value in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_btree_get_value_by_value+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_btree_get_value_by_value in -lcdata" >&5 +printf %s "checking for libcdata_btree_get_value_by_value in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_btree_get_value_by_value+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -25067,40 +28188,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_btree_get_value_by_value (); int -main () +main (void) { return libcdata_btree_get_value_by_value (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_btree_get_value_by_value=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_btree_get_value_by_value=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_btree_get_value_by_value" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_btree_get_value_by_value" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_btree_get_value_by_value" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_btree_get_value_by_value" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_btree_get_value_by_value" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_btree_get_value_by_value" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_btree_insert_value in -lcdata" >&5 -$as_echo_n "checking for libcdata_btree_insert_value in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_btree_insert_value+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_btree_insert_value in -lcdata" >&5 +printf %s "checking for libcdata_btree_insert_value in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_btree_insert_value+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -25109,40 +28230,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_btree_insert_value (); int -main () +main (void) { return libcdata_btree_insert_value (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_btree_insert_value=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_btree_insert_value=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_btree_insert_value" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_btree_insert_value" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_btree_insert_value" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_btree_insert_value" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_btree_insert_value" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_btree_insert_value" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_btree_replace_value in -lcdata" >&5 -$as_echo_n "checking for libcdata_btree_replace_value in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_btree_replace_value+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_btree_replace_value in -lcdata" >&5 +printf %s "checking for libcdata_btree_replace_value in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_btree_replace_value+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -25151,40 +28272,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_btree_replace_value (); int -main () +main (void) { return libcdata_btree_replace_value (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_btree_replace_value=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_btree_replace_value=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_btree_replace_value" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_btree_replace_value" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_btree_replace_value" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_btree_replace_value" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_btree_replace_value" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_btree_replace_value" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_btree_remove_value in -lcdata" >&5 -$as_echo_n "checking for libcdata_btree_remove_value in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_btree_remove_value+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_btree_remove_value in -lcdata" >&5 +printf %s "checking for libcdata_btree_remove_value in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_btree_remove_value+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -25193,41 +28314,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_btree_remove_value (); int -main () +main (void) { return libcdata_btree_remove_value (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_btree_remove_value=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_btree_remove_value=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_btree_remove_value" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_btree_remove_value" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_btree_remove_value" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_btree_remove_value" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_btree_remove_value" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_btree_remove_value" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_initialize in -lcdata" >&5 -$as_echo_n "checking for libcdata_list_initialize in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_list_initialize+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_initialize in -lcdata" >&5 +printf %s "checking for libcdata_list_initialize in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_list_initialize+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -25236,40 +28357,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_list_initialize (); int -main () +main (void) { return libcdata_list_initialize (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_list_initialize=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_list_initialize=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_initialize" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_list_initialize" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_list_initialize" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_initialize" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_initialize" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_list_initialize" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_free in -lcdata" >&5 -$as_echo_n "checking for libcdata_list_free in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_list_free+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_free in -lcdata" >&5 +printf %s "checking for libcdata_list_free in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_list_free+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -25278,40 +28399,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_list_free (); int -main () +main (void) { return libcdata_list_free (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_list_free=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_list_free=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_free" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_list_free" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_list_free" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_free" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_free" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_list_free" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_empty in -lcdata" >&5 -$as_echo_n "checking for libcdata_list_empty in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_list_empty+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_empty in -lcdata" >&5 +printf %s "checking for libcdata_list_empty in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_list_empty+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -25320,40 +28441,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_list_empty (); int -main () +main (void) { return libcdata_list_empty (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_list_empty=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_list_empty=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_empty" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_list_empty" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_list_empty" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_empty" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_empty" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_list_empty" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_clone in -lcdata" >&5 -$as_echo_n "checking for libcdata_list_clone in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_list_clone+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_clone in -lcdata" >&5 +printf %s "checking for libcdata_list_clone in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_list_clone+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -25362,40 +28483,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_list_clone (); int -main () +main (void) { return libcdata_list_clone (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_list_clone=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_list_clone=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_clone" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_list_clone" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_list_clone" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_clone" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_clone" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_list_clone" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_get_number_of_elements in -lcdata" >&5 -$as_echo_n "checking for libcdata_list_get_number_of_elements in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_list_get_number_of_elements+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_get_number_of_elements in -lcdata" >&5 +printf %s "checking for libcdata_list_get_number_of_elements in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_list_get_number_of_elements+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -25404,40 +28525,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_list_get_number_of_elements (); int -main () +main (void) { return libcdata_list_get_number_of_elements (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_list_get_number_of_elements=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_list_get_number_of_elements=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_get_number_of_elements" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_list_get_number_of_elements" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_list_get_number_of_elements" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_get_number_of_elements" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_get_number_of_elements" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_list_get_number_of_elements" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_get_first_element in -lcdata" >&5 -$as_echo_n "checking for libcdata_list_get_first_element in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_list_get_first_element+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_get_first_element in -lcdata" >&5 +printf %s "checking for libcdata_list_get_first_element in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_list_get_first_element+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -25446,40 +28567,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_list_get_first_element (); int -main () +main (void) { return libcdata_list_get_first_element (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_list_get_first_element=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_list_get_first_element=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_get_first_element" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_list_get_first_element" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_list_get_first_element" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_get_first_element" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_get_first_element" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_list_get_first_element" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_get_last_element in -lcdata" >&5 -$as_echo_n "checking for libcdata_list_get_last_element in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_list_get_last_element+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_get_last_element in -lcdata" >&5 +printf %s "checking for libcdata_list_get_last_element in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_list_get_last_element+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -25488,40 +28609,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_list_get_last_element (); int -main () +main (void) { return libcdata_list_get_last_element (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_list_get_last_element=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_list_get_last_element=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_get_last_element" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_list_get_last_element" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_list_get_last_element" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_get_last_element" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_get_last_element" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_list_get_last_element" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_get_element_by_index in -lcdata" >&5 -$as_echo_n "checking for libcdata_list_get_element_by_index in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_list_get_element_by_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_get_element_by_index in -lcdata" >&5 +printf %s "checking for libcdata_list_get_element_by_index in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_list_get_element_by_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -25530,40 +28651,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_list_get_element_by_index (); int -main () +main (void) { return libcdata_list_get_element_by_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_list_get_element_by_index=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_list_get_element_by_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_get_element_by_index" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_list_get_element_by_index" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_list_get_element_by_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_get_element_by_index" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_get_element_by_index" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_list_get_element_by_index" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_get_value_by_index in -lcdata" >&5 -$as_echo_n "checking for libcdata_list_get_value_by_index in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_list_get_value_by_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_get_value_by_index in -lcdata" >&5 +printf %s "checking for libcdata_list_get_value_by_index in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_list_get_value_by_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -25572,40 +28693,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_list_get_value_by_index (); int -main () +main (void) { return libcdata_list_get_value_by_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_list_get_value_by_index=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_list_get_value_by_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_get_value_by_index" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_list_get_value_by_index" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_list_get_value_by_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_get_value_by_index" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_get_value_by_index" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_list_get_value_by_index" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_prepend_element in -lcdata" >&5 -$as_echo_n "checking for libcdata_list_prepend_element in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_list_prepend_element+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_prepend_element in -lcdata" >&5 +printf %s "checking for libcdata_list_prepend_element in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_list_prepend_element+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -25614,40 +28735,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_list_prepend_element (); int -main () +main (void) { return libcdata_list_prepend_element (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_list_prepend_element=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_list_prepend_element=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_prepend_element" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_list_prepend_element" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_list_prepend_element" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_prepend_element" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_prepend_element" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_list_prepend_element" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_prepend_value in -lcdata" >&5 -$as_echo_n "checking for libcdata_list_prepend_value in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_list_prepend_value+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_prepend_value in -lcdata" >&5 +printf %s "checking for libcdata_list_prepend_value in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_list_prepend_value+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -25656,40 +28777,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_list_prepend_value (); int -main () +main (void) { return libcdata_list_prepend_value (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_list_prepend_value=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_list_prepend_value=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_prepend_value" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_list_prepend_value" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_list_prepend_value" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_prepend_value" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_prepend_value" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_list_prepend_value" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_append_element in -lcdata" >&5 -$as_echo_n "checking for libcdata_list_append_element in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_list_append_element+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_append_element in -lcdata" >&5 +printf %s "checking for libcdata_list_append_element in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_list_append_element+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -25698,40 +28819,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_list_append_element (); int -main () +main (void) { return libcdata_list_append_element (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_list_append_element=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_list_append_element=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_append_element" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_list_append_element" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_list_append_element" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_append_element" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_append_element" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_list_append_element" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_append_value in -lcdata" >&5 -$as_echo_n "checking for libcdata_list_append_value in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_list_append_value+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_append_value in -lcdata" >&5 +printf %s "checking for libcdata_list_append_value in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_list_append_value+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -25740,40 +28861,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_list_append_value (); int -main () +main (void) { return libcdata_list_append_value (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_list_append_value=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_list_append_value=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_append_value" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_list_append_value" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_list_append_value" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_append_value" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_append_value" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_list_append_value" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_insert_element in -lcdata" >&5 -$as_echo_n "checking for libcdata_list_insert_element in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_list_insert_element+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_insert_element in -lcdata" >&5 +printf %s "checking for libcdata_list_insert_element in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_list_insert_element+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -25782,40 +28903,82 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_list_insert_element (); int -main () +main (void) { return libcdata_list_insert_element (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_list_insert_element=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_list_insert_element=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_insert_element" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_list_insert_element" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_list_insert_element" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_insert_element" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_insert_element" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_list_insert_element" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_insert_value in -lcdata" >&5 -$as_echo_n "checking for libcdata_list_insert_value in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_list_insert_value+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_insert_element_with_existing in -lcdata" >&5 +printf %s "checking for libcdata_list_insert_element_with_existing in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_list_insert_element_with_existing+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcdata $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libcdata_list_insert_element_with_existing (); +int +main (void) +{ +return libcdata_list_insert_element_with_existing (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_cdata_libcdata_list_insert_element_with_existing=yes +else $as_nop + ac_cv_lib_cdata_libcdata_list_insert_element_with_existing=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_insert_element_with_existing" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_insert_element_with_existing" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_list_insert_element_with_existing" = xyes +then : + ac_cv_libcdata_dummy=yes +else $as_nop + ac_cv_libcdata=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_insert_value in -lcdata" >&5 +printf %s "checking for libcdata_list_insert_value in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_list_insert_value+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -25824,40 +28987,82 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_list_insert_value (); int -main () +main (void) { return libcdata_list_insert_value (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_list_insert_value=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_list_insert_value=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_insert_value" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_list_insert_value" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_list_insert_value" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_insert_value" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_insert_value" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_list_insert_value" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_remove_element in -lcdata" >&5 -$as_echo_n "checking for libcdata_list_remove_element in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_list_remove_element+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_insert_value_with_existing in -lcdata" >&5 +printf %s "checking for libcdata_list_insert_value_with_existing in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_list_insert_value_with_existing+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcdata $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libcdata_list_insert_value_with_existing (); +int +main (void) +{ +return libcdata_list_insert_value_with_existing (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_cdata_libcdata_list_insert_value_with_existing=yes +else $as_nop + ac_cv_lib_cdata_libcdata_list_insert_value_with_existing=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_insert_value_with_existing" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_insert_value_with_existing" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_list_insert_value_with_existing" = xyes +then : + ac_cv_libcdata_dummy=yes +else $as_nop + ac_cv_libcdata=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_remove_element in -lcdata" >&5 +printf %s "checking for libcdata_list_remove_element in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_list_remove_element+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -25866,41 +29071,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_list_remove_element (); int -main () +main (void) { return libcdata_list_remove_element (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_list_remove_element=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_list_remove_element=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_remove_element" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_list_remove_element" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_list_remove_element" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_remove_element" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_remove_element" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_list_remove_element" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_element_initialize in -lcdata" >&5 -$as_echo_n "checking for libcdata_list_element_initialize in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_list_element_initialize+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_element_initialize in -lcdata" >&5 +printf %s "checking for libcdata_list_element_initialize in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_list_element_initialize+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -25909,40 +29114,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_list_element_initialize (); int -main () +main (void) { return libcdata_list_element_initialize (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_list_element_initialize=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_list_element_initialize=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_element_initialize" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_list_element_initialize" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_list_element_initialize" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_element_initialize" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_element_initialize" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_list_element_initialize" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_element_free in -lcdata" >&5 -$as_echo_n "checking for libcdata_list_element_free in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_list_element_free+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_element_free in -lcdata" >&5 +printf %s "checking for libcdata_list_element_free in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_list_element_free+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -25951,40 +29156,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_list_element_free (); int -main () +main (void) { return libcdata_list_element_free (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_list_element_free=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_list_element_free=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_element_free" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_list_element_free" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_list_element_free" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_element_free" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_element_free" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_list_element_free" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_element_get_value in -lcdata" >&5 -$as_echo_n "checking for libcdata_list_element_get_value in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_list_element_get_value+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_element_get_value in -lcdata" >&5 +printf %s "checking for libcdata_list_element_get_value in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_list_element_get_value+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -25993,40 +29198,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_list_element_get_value (); int -main () +main (void) { return libcdata_list_element_get_value (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_list_element_get_value=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_list_element_get_value=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_element_get_value" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_list_element_get_value" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_list_element_get_value" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_element_get_value" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_element_get_value" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_list_element_get_value" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_element_set_value in -lcdata" >&5 -$as_echo_n "checking for libcdata_list_element_set_value in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_list_element_set_value+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_element_set_value in -lcdata" >&5 +printf %s "checking for libcdata_list_element_set_value in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_list_element_set_value+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -26035,40 +29240,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_list_element_set_value (); int -main () +main (void) { return libcdata_list_element_set_value (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_list_element_set_value=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_list_element_set_value=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_element_set_value" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_list_element_set_value" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_list_element_set_value" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_element_set_value" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_element_set_value" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_list_element_set_value" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_element_get_previous_element in -lcdata" >&5 -$as_echo_n "checking for libcdata_list_element_get_previous_element in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_list_element_get_previous_element+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_element_get_previous_element in -lcdata" >&5 +printf %s "checking for libcdata_list_element_get_previous_element in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_list_element_get_previous_element+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -26077,40 +29282,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_list_element_get_previous_element (); int -main () +main (void) { return libcdata_list_element_get_previous_element (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_list_element_get_previous_element=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_list_element_get_previous_element=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_element_get_previous_element" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_list_element_get_previous_element" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_list_element_get_previous_element" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_element_get_previous_element" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_element_get_previous_element" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_list_element_get_previous_element" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_element_set_previous_element in -lcdata" >&5 -$as_echo_n "checking for libcdata_list_element_set_previous_element in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_list_element_set_previous_element+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_element_set_previous_element in -lcdata" >&5 +printf %s "checking for libcdata_list_element_set_previous_element in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_list_element_set_previous_element+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -26119,40 +29324,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_list_element_set_previous_element (); int -main () +main (void) { return libcdata_list_element_set_previous_element (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_list_element_set_previous_element=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_list_element_set_previous_element=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_element_set_previous_element" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_list_element_set_previous_element" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_list_element_set_previous_element" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_element_set_previous_element" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_element_set_previous_element" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_list_element_set_previous_element" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_element_get_next_element in -lcdata" >&5 -$as_echo_n "checking for libcdata_list_element_get_next_element in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_list_element_get_next_element+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_element_get_next_element in -lcdata" >&5 +printf %s "checking for libcdata_list_element_get_next_element in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_list_element_get_next_element+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -26161,37 +29366,37 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_list_element_get_next_element (); int -main () +main (void) { return libcdata_list_element_get_next_element (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_list_element_get_next_element=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_list_element_get_next_element=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_element_get_next_element" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_list_element_get_next_element" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_list_element_get_next_element" = xyes; then : - ac_cv_libcdata_dummy=yes -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_element_set_next_element in -lcdata" >&5 -$as_echo_n "checking for libcdata_list_element_set_next_element in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_list_element_set_next_element+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_element_get_next_element" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_element_get_next_element" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_list_element_get_next_element" = xyes +then : + ac_cv_libcdata_dummy=yes +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_element_set_next_element in -lcdata" >&5 +printf %s "checking for libcdata_list_element_set_next_element in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_list_element_set_next_element+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -26200,40 +29405,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_list_element_set_next_element (); int -main () +main (void) { return libcdata_list_element_set_next_element (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_list_element_set_next_element=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_list_element_set_next_element=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_element_set_next_element" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_list_element_set_next_element" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_list_element_set_next_element" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_element_set_next_element" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_element_set_next_element" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_list_element_set_next_element" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_element_get_elements in -lcdata" >&5 -$as_echo_n "checking for libcdata_list_element_get_elements in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_list_element_get_elements+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_element_get_elements in -lcdata" >&5 +printf %s "checking for libcdata_list_element_get_elements in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_list_element_get_elements+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -26242,40 +29447,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_list_element_get_elements (); int -main () +main (void) { return libcdata_list_element_get_elements (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_list_element_get_elements=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_list_element_get_elements=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_element_get_elements" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_list_element_get_elements" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_list_element_get_elements" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_element_get_elements" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_element_get_elements" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_list_element_get_elements" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_element_set_elements in -lcdata" >&5 -$as_echo_n "checking for libcdata_list_element_set_elements in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_list_element_set_elements+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_element_set_elements in -lcdata" >&5 +printf %s "checking for libcdata_list_element_set_elements in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_list_element_set_elements+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -26284,32 +29489,31 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_list_element_set_elements (); int -main () +main (void) { return libcdata_list_element_set_elements (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_list_element_set_elements=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_list_element_set_elements=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_element_set_elements" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_list_element_set_elements" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_list_element_set_elements" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_element_set_elements" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_element_set_elements" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_list_element_set_elements" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi @@ -26317,11 +29521,12 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_initialize in -lcdata" >&5 -$as_echo_n "checking for libcdata_range_list_initialize in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_range_list_initialize+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_initialize in -lcdata" >&5 +printf %s "checking for libcdata_range_list_initialize in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_range_list_initialize+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -26330,40 +29535,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_range_list_initialize (); int -main () +main (void) { return libcdata_range_list_initialize (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_range_list_initialize=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_range_list_initialize=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_initialize" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_range_list_initialize" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_range_list_initialize" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_initialize" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_range_list_initialize" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_range_list_initialize" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_free in -lcdata" >&5 -$as_echo_n "checking for libcdata_range_list_free in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_range_list_free+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_free in -lcdata" >&5 +printf %s "checking for libcdata_range_list_free in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_range_list_free+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -26372,40 +29577,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_range_list_free (); int -main () +main (void) { return libcdata_range_list_free (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_range_list_free=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_range_list_free=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_free" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_range_list_free" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_range_list_free" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_free" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_range_list_free" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_range_list_free" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_empty in -lcdata" >&5 -$as_echo_n "checking for libcdata_range_list_empty in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_range_list_empty+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_empty in -lcdata" >&5 +printf %s "checking for libcdata_range_list_empty in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_range_list_empty+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -26414,40 +29619,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_range_list_empty (); int -main () +main (void) { return libcdata_range_list_empty (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_range_list_empty=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_range_list_empty=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_empty" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_range_list_empty" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_range_list_empty" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_empty" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_range_list_empty" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_range_list_empty" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_clone in -lcdata" >&5 -$as_echo_n "checking for libcdata_range_list_clone in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_range_list_clone+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_clone in -lcdata" >&5 +printf %s "checking for libcdata_range_list_clone in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_range_list_clone+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -26456,40 +29661,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_range_list_clone (); int -main () +main (void) { return libcdata_range_list_clone (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_range_list_clone=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_range_list_clone=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_clone" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_range_list_clone" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_range_list_clone" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_clone" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_range_list_clone" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_range_list_clone" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_get_number_of_elements in -lcdata" >&5 -$as_echo_n "checking for libcdata_range_list_get_number_of_elements in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_range_list_get_number_of_elements+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_get_number_of_elements in -lcdata" >&5 +printf %s "checking for libcdata_range_list_get_number_of_elements in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_range_list_get_number_of_elements+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -26498,40 +29703,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_range_list_get_number_of_elements (); int -main () +main (void) { return libcdata_range_list_get_number_of_elements (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_range_list_get_number_of_elements=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_range_list_get_number_of_elements=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_get_number_of_elements" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_range_list_get_number_of_elements" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_range_list_get_number_of_elements" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_get_number_of_elements" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_range_list_get_number_of_elements" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_range_list_get_number_of_elements" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_insert_range in -lcdata" >&5 -$as_echo_n "checking for libcdata_range_list_insert_range in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_range_list_insert_range+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_insert_range in -lcdata" >&5 +printf %s "checking for libcdata_range_list_insert_range in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_range_list_insert_range+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -26540,40 +29745,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_range_list_insert_range (); int -main () +main (void) { return libcdata_range_list_insert_range (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_range_list_insert_range=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_range_list_insert_range=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_insert_range" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_range_list_insert_range" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_range_list_insert_range" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_insert_range" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_range_list_insert_range" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_range_list_insert_range" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_insert_range_list in -lcdata" >&5 -$as_echo_n "checking for libcdata_range_list_insert_range_list in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_range_list_insert_range_list+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_insert_range_list in -lcdata" >&5 +printf %s "checking for libcdata_range_list_insert_range_list in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_range_list_insert_range_list+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -26582,40 +29787,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_range_list_insert_range_list (); int -main () +main (void) { return libcdata_range_list_insert_range_list (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_range_list_insert_range_list=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_range_list_insert_range_list=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_insert_range_list" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_range_list_insert_range_list" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_range_list_insert_range_list" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_insert_range_list" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_range_list_insert_range_list" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_range_list_insert_range_list" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_remove_range in -lcdata" >&5 -$as_echo_n "checking for libcdata_range_list_remove_range in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_range_list_remove_range+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_remove_range in -lcdata" >&5 +printf %s "checking for libcdata_range_list_remove_range in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_range_list_remove_range+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -26624,40 +29829,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_range_list_remove_range (); int -main () +main (void) { return libcdata_range_list_remove_range (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_range_list_remove_range=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_range_list_remove_range=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_remove_range" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_range_list_remove_range" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_range_list_remove_range" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_remove_range" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_range_list_remove_range" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_range_list_remove_range" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_get_range_by_index in -lcdata" >&5 -$as_echo_n "checking for libcdata_range_list_get_range_by_index in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_range_list_get_range_by_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_get_range_by_index in -lcdata" >&5 +printf %s "checking for libcdata_range_list_get_range_by_index in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_range_list_get_range_by_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -26666,40 +29871,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_range_list_get_range_by_index (); int -main () +main (void) { return libcdata_range_list_get_range_by_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_range_list_get_range_by_index=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_range_list_get_range_by_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_get_range_by_index" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_range_list_get_range_by_index" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_range_list_get_range_by_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_get_range_by_index" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_range_list_get_range_by_index" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_range_list_get_range_by_index" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_get_range_at_offset in -lcdata" >&5 -$as_echo_n "checking for libcdata_range_list_get_range_at_offset in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_range_list_get_range_at_offset+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_get_range_at_offset in -lcdata" >&5 +printf %s "checking for libcdata_range_list_get_range_at_offset in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_range_list_get_range_at_offset+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -26708,40 +29913,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_range_list_get_range_at_offset (); int -main () +main (void) { return libcdata_range_list_get_range_at_offset (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_range_list_get_range_at_offset=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_range_list_get_range_at_offset=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_get_range_at_offset" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_range_list_get_range_at_offset" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_range_list_get_range_at_offset" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_get_range_at_offset" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_range_list_get_range_at_offset" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_range_list_get_range_at_offset" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_range_is_present in -lcdata" >&5 -$as_echo_n "checking for libcdata_range_list_range_is_present in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_range_list_range_is_present+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_range_is_present in -lcdata" >&5 +printf %s "checking for libcdata_range_list_range_is_present in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_range_list_range_is_present+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -26750,40 +29955,82 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_range_list_range_is_present (); int -main () +main (void) { return libcdata_range_list_range_is_present (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_range_list_range_is_present=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_range_list_range_is_present=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_range_is_present" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_range_list_range_is_present" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_range_list_range_is_present" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_range_is_present" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_range_list_range_is_present" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_range_list_range_is_present" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_get_spanning_range in -lcdata" >&5 -$as_echo_n "checking for libcdata_range_list_get_spanning_range in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_range_list_get_spanning_range+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_range_has_overlapping_range in -lcdata" >&5 +printf %s "checking for libcdata_range_list_range_has_overlapping_range in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_range_list_range_has_overlapping_range+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcdata $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libcdata_range_list_range_has_overlapping_range (); +int +main (void) +{ +return libcdata_range_list_range_has_overlapping_range (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_cdata_libcdata_range_list_range_has_overlapping_range=yes +else $as_nop + ac_cv_lib_cdata_libcdata_range_list_range_has_overlapping_range=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_range_has_overlapping_range" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_range_list_range_has_overlapping_range" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_range_list_range_has_overlapping_range" = xyes +then : + ac_cv_libcdata_dummy=yes +else $as_nop + ac_cv_libcdata=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_get_spanning_range in -lcdata" >&5 +printf %s "checking for libcdata_range_list_get_spanning_range in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_range_list_get_spanning_range+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -26792,41 +30039,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_range_list_get_spanning_range (); int -main () +main (void) { return libcdata_range_list_get_spanning_range (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_range_list_get_spanning_range=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_range_list_get_spanning_range=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_get_spanning_range" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_range_list_get_spanning_range" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_range_list_get_spanning_range" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_get_spanning_range" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_range_list_get_spanning_range" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_range_list_get_spanning_range" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_initialize in -lcdata" >&5 -$as_echo_n "checking for libcdata_tree_node_initialize in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_tree_node_initialize+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_initialize in -lcdata" >&5 +printf %s "checking for libcdata_tree_node_initialize in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_tree_node_initialize+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -26835,40 +30082,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_tree_node_initialize (); int -main () +main (void) { return libcdata_tree_node_initialize (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_tree_node_initialize=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_tree_node_initialize=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_initialize" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_tree_node_initialize" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_tree_node_initialize" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_initialize" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_tree_node_initialize" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_tree_node_initialize" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_free in -lcdata" >&5 -$as_echo_n "checking for libcdata_tree_node_free in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_tree_node_free+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_free in -lcdata" >&5 +printf %s "checking for libcdata_tree_node_free in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_tree_node_free+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -26877,40 +30124,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_tree_node_free (); int -main () +main (void) { return libcdata_tree_node_free (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_tree_node_free=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_tree_node_free=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_free" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_tree_node_free" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_tree_node_free" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_free" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_tree_node_free" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_tree_node_free" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_empty in -lcdata" >&5 -$as_echo_n "checking for libcdata_tree_node_empty in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_tree_node_empty+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_empty in -lcdata" >&5 +printf %s "checking for libcdata_tree_node_empty in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_tree_node_empty+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -26919,40 +30166,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_tree_node_empty (); int -main () +main (void) { return libcdata_tree_node_empty (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_tree_node_empty=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_tree_node_empty=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_empty" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_tree_node_empty" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_tree_node_empty" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_empty" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_tree_node_empty" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_tree_node_empty" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_clone in -lcdata" >&5 -$as_echo_n "checking for libcdata_tree_node_clone in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_tree_node_clone+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_clone in -lcdata" >&5 +printf %s "checking for libcdata_tree_node_clone in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_tree_node_clone+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -26961,40 +30208,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_tree_node_clone (); int -main () +main (void) { return libcdata_tree_node_clone (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_tree_node_clone=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_tree_node_clone=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_clone" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_tree_node_clone" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_tree_node_clone" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_clone" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_tree_node_clone" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_tree_node_clone" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_get_value in -lcdata" >&5 -$as_echo_n "checking for libcdata_tree_node_get_value in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_tree_node_get_value+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_get_value in -lcdata" >&5 +printf %s "checking for libcdata_tree_node_get_value in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_tree_node_get_value+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -27003,40 +30250,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_tree_node_get_value (); int -main () +main (void) { return libcdata_tree_node_get_value (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_tree_node_get_value=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_tree_node_get_value=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_get_value" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_tree_node_get_value" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_tree_node_get_value" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_get_value" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_tree_node_get_value" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_tree_node_get_value" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_set_value in -lcdata" >&5 -$as_echo_n "checking for libcdata_tree_node_set_value in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_tree_node_set_value+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_set_value in -lcdata" >&5 +printf %s "checking for libcdata_tree_node_set_value in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_tree_node_set_value+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -27045,40 +30292,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_tree_node_set_value (); int -main () +main (void) { return libcdata_tree_node_set_value (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_tree_node_set_value=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_tree_node_set_value=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_set_value" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_tree_node_set_value" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_tree_node_set_value" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_set_value" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_tree_node_set_value" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_tree_node_set_value" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_get_parent_node in -lcdata" >&5 -$as_echo_n "checking for libcdata_tree_node_get_parent_node in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_tree_node_get_parent_node+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_get_parent_node in -lcdata" >&5 +printf %s "checking for libcdata_tree_node_get_parent_node in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_tree_node_get_parent_node+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -27087,40 +30334,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_tree_node_get_parent_node (); int -main () +main (void) { return libcdata_tree_node_get_parent_node (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_tree_node_get_parent_node=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_tree_node_get_parent_node=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_get_parent_node" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_tree_node_get_parent_node" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_tree_node_get_parent_node" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_get_parent_node" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_tree_node_get_parent_node" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_tree_node_get_parent_node" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_set_parent_node in -lcdata" >&5 -$as_echo_n "checking for libcdata_tree_node_set_parent_node in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_tree_node_set_parent_node+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_set_parent_node in -lcdata" >&5 +printf %s "checking for libcdata_tree_node_set_parent_node in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_tree_node_set_parent_node+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -27129,40 +30376,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_tree_node_set_parent_node (); int -main () +main (void) { return libcdata_tree_node_set_parent_node (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_tree_node_set_parent_node=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_tree_node_set_parent_node=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_set_parent_node" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_tree_node_set_parent_node" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_tree_node_set_parent_node" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_set_parent_node" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_tree_node_set_parent_node" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_tree_node_set_parent_node" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_get_previous_node in -lcdata" >&5 -$as_echo_n "checking for libcdata_tree_node_get_previous_node in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_tree_node_get_previous_node+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_get_previous_node in -lcdata" >&5 +printf %s "checking for libcdata_tree_node_get_previous_node in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_tree_node_get_previous_node+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -27171,40 +30418,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_tree_node_get_previous_node (); int -main () +main (void) { return libcdata_tree_node_get_previous_node (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_tree_node_get_previous_node=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_tree_node_get_previous_node=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_get_previous_node" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_tree_node_get_previous_node" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_tree_node_get_previous_node" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_get_previous_node" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_tree_node_get_previous_node" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_tree_node_get_previous_node" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_set_previous_node in -lcdata" >&5 -$as_echo_n "checking for libcdata_tree_node_set_previous_node in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_tree_node_set_previous_node+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_set_previous_node in -lcdata" >&5 +printf %s "checking for libcdata_tree_node_set_previous_node in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_tree_node_set_previous_node+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -27213,40 +30460,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_tree_node_set_previous_node (); int -main () +main (void) { return libcdata_tree_node_set_previous_node (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_tree_node_set_previous_node=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_tree_node_set_previous_node=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_set_previous_node" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_tree_node_set_previous_node" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_tree_node_set_previous_node" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_set_previous_node" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_tree_node_set_previous_node" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_tree_node_set_previous_node" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_get_next_node in -lcdata" >&5 -$as_echo_n "checking for libcdata_tree_node_get_next_node in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_tree_node_get_next_node+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_get_next_node in -lcdata" >&5 +printf %s "checking for libcdata_tree_node_get_next_node in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_tree_node_get_next_node+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -27255,40 +30502,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_tree_node_get_next_node (); int -main () +main (void) { return libcdata_tree_node_get_next_node (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_tree_node_get_next_node=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_tree_node_get_next_node=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_get_next_node" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_tree_node_get_next_node" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_tree_node_get_next_node" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_get_next_node" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_tree_node_get_next_node" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_tree_node_get_next_node" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_set_next_node in -lcdata" >&5 -$as_echo_n "checking for libcdata_tree_node_set_next_node in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_tree_node_set_next_node+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_set_next_node in -lcdata" >&5 +printf %s "checking for libcdata_tree_node_set_next_node in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_tree_node_set_next_node+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -27297,40 +30544,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_tree_node_set_next_node (); int -main () +main (void) { return libcdata_tree_node_set_next_node (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_tree_node_set_next_node=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_tree_node_set_next_node=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_set_next_node" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_tree_node_set_next_node" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_tree_node_set_next_node" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_set_next_node" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_tree_node_set_next_node" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_tree_node_set_next_node" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_get_nodes in -lcdata" >&5 -$as_echo_n "checking for libcdata_tree_node_get_nodes in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_tree_node_get_nodes+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_get_nodes in -lcdata" >&5 +printf %s "checking for libcdata_tree_node_get_nodes in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_tree_node_get_nodes+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -27339,40 +30586,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_tree_node_get_nodes (); int -main () +main (void) { return libcdata_tree_node_get_nodes (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_tree_node_get_nodes=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_tree_node_get_nodes=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_get_nodes" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_tree_node_get_nodes" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_tree_node_get_nodes" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_get_nodes" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_tree_node_get_nodes" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_tree_node_get_nodes" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_set_nodes in -lcdata" >&5 -$as_echo_n "checking for libcdata_tree_node_set_nodes in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_tree_node_set_nodes+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_set_nodes in -lcdata" >&5 +printf %s "checking for libcdata_tree_node_set_nodes in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_tree_node_set_nodes+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -27381,40 +30628,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_tree_node_set_nodes (); int -main () +main (void) { return libcdata_tree_node_set_nodes (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_tree_node_set_nodes=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_tree_node_set_nodes=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_set_nodes" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_tree_node_set_nodes" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_tree_node_set_nodes" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_set_nodes" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_tree_node_set_nodes" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_tree_node_set_nodes" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_append_node in -lcdata" >&5 -$as_echo_n "checking for libcdata_tree_node_append_node in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_tree_node_append_node+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_append_node in -lcdata" >&5 +printf %s "checking for libcdata_tree_node_append_node in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_tree_node_append_node+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -27423,40 +30670,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_tree_node_append_node (); int -main () +main (void) { return libcdata_tree_node_append_node (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_tree_node_append_node=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_tree_node_append_node=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_append_node" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_tree_node_append_node" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_tree_node_append_node" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_append_node" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_tree_node_append_node" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_tree_node_append_node" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_append_value in -lcdata" >&5 -$as_echo_n "checking for libcdata_tree_node_append_value in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_tree_node_append_value+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_append_value in -lcdata" >&5 +printf %s "checking for libcdata_tree_node_append_value in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_tree_node_append_value+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -27465,40 +30712,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_tree_node_append_value (); int -main () +main (void) { return libcdata_tree_node_append_value (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_tree_node_append_value=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_tree_node_append_value=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_append_value" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_tree_node_append_value" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_tree_node_append_value" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_append_value" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_tree_node_append_value" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_tree_node_append_value" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_insert_node in -lcdata" >&5 -$as_echo_n "checking for libcdata_tree_node_insert_node in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_tree_node_insert_node+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_insert_node in -lcdata" >&5 +printf %s "checking for libcdata_tree_node_insert_node in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_tree_node_insert_node+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -27507,40 +30754,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_tree_node_insert_node (); int -main () +main (void) { return libcdata_tree_node_insert_node (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_tree_node_insert_node=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_tree_node_insert_node=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_insert_node" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_tree_node_insert_node" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_tree_node_insert_node" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_insert_node" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_tree_node_insert_node" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_tree_node_insert_node" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_insert_value in -lcdata" >&5 -$as_echo_n "checking for libcdata_tree_node_insert_value in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_tree_node_insert_value+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_insert_value in -lcdata" >&5 +printf %s "checking for libcdata_tree_node_insert_value in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_tree_node_insert_value+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -27549,40 +30796,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_tree_node_insert_value (); int -main () +main (void) { return libcdata_tree_node_insert_value (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_tree_node_insert_value=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_tree_node_insert_value=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_insert_value" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_tree_node_insert_value" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_tree_node_insert_value" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_insert_value" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_tree_node_insert_value" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_tree_node_insert_value" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_replace_node in -lcdata" >&5 -$as_echo_n "checking for libcdata_tree_node_replace_node in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_tree_node_replace_node+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_replace_node in -lcdata" >&5 +printf %s "checking for libcdata_tree_node_replace_node in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_tree_node_replace_node+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -27591,40 +30838,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_tree_node_replace_node (); int -main () +main (void) { return libcdata_tree_node_replace_node (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_tree_node_replace_node=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_tree_node_replace_node=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_replace_node" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_tree_node_replace_node" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_tree_node_replace_node" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_replace_node" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_tree_node_replace_node" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_tree_node_replace_node" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_remove_node in -lcdata" >&5 -$as_echo_n "checking for libcdata_tree_node_remove_node in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_tree_node_remove_node+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_remove_node in -lcdata" >&5 +printf %s "checking for libcdata_tree_node_remove_node in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_tree_node_remove_node+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -27633,40 +30880,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_tree_node_remove_node (); int -main () +main (void) { return libcdata_tree_node_remove_node (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_tree_node_remove_node=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_tree_node_remove_node=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_remove_node" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_tree_node_remove_node" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_tree_node_remove_node" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_remove_node" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_tree_node_remove_node" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_tree_node_remove_node" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_get_number_of_sub_nodes in -lcdata" >&5 -$as_echo_n "checking for libcdata_tree_node_get_number_of_sub_nodes in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_tree_node_get_number_of_sub_nodes+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_get_number_of_sub_nodes in -lcdata" >&5 +printf %s "checking for libcdata_tree_node_get_number_of_sub_nodes in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_tree_node_get_number_of_sub_nodes+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -27675,40 +30922,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_tree_node_get_number_of_sub_nodes (); int -main () +main (void) { return libcdata_tree_node_get_number_of_sub_nodes (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_tree_node_get_number_of_sub_nodes=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_tree_node_get_number_of_sub_nodes=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_get_number_of_sub_nodes" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_tree_node_get_number_of_sub_nodes" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_tree_node_get_number_of_sub_nodes" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_get_number_of_sub_nodes" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_tree_node_get_number_of_sub_nodes" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_tree_node_get_number_of_sub_nodes" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_get_sub_node_by_index in -lcdata" >&5 -$as_echo_n "checking for libcdata_tree_node_get_sub_node_by_index in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_tree_node_get_sub_node_by_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_get_sub_node_by_index in -lcdata" >&5 +printf %s "checking for libcdata_tree_node_get_sub_node_by_index in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_tree_node_get_sub_node_by_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -27717,40 +30964,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_tree_node_get_sub_node_by_index (); int -main () +main (void) { return libcdata_tree_node_get_sub_node_by_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_tree_node_get_sub_node_by_index=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_tree_node_get_sub_node_by_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_get_sub_node_by_index" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_tree_node_get_sub_node_by_index" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_tree_node_get_sub_node_by_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_get_sub_node_by_index" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_tree_node_get_sub_node_by_index" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_tree_node_get_sub_node_by_index" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_get_leaf_node_list in -lcdata" >&5 -$as_echo_n "checking for libcdata_tree_node_get_leaf_node_list in -lcdata... " >&6; } -if ${ac_cv_lib_cdata_libcdata_tree_node_get_leaf_node_list+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_get_leaf_node_list in -lcdata" >&5 +printf %s "checking for libcdata_tree_node_get_leaf_node_list in -lcdata... " >&6; } +if test ${ac_cv_lib_cdata_libcdata_tree_node_get_leaf_node_list+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -27759,32 +31006,31 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcdata_tree_node_get_leaf_node_list (); int -main () +main (void) { return libcdata_tree_node_get_leaf_node_list (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cdata_libcdata_tree_node_get_leaf_node_list=yes -else +else $as_nop ac_cv_lib_cdata_libcdata_tree_node_get_leaf_node_list=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_get_leaf_node_list" >&5 -$as_echo "$ac_cv_lib_cdata_libcdata_tree_node_get_leaf_node_list" >&6; } -if test "x$ac_cv_lib_cdata_libcdata_tree_node_get_leaf_node_list" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_get_leaf_node_list" >&5 +printf "%s\n" "$ac_cv_lib_cdata_libcdata_tree_node_get_leaf_node_list" >&6; } +if test "x$ac_cv_lib_cdata_libcdata_tree_node_get_leaf_node_list" = xyes +then : ac_cv_libcdata_dummy=yes -else +else $as_nop ac_cv_libcdata=no fi @@ -27793,9 +31039,10 @@ fi fi - if test "x$ac_cv_with_libcdata" != x && test "x$ac_cv_with_libcdata" != xauto-detect && test "x$ac_cv_libcdata" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_with_libcdata" != x && test "x$ac_cv_with_libcdata" != xauto-detect && test "x$ac_cv_libcdata" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "unable to find supported libcdata in directory: $ac_cv_with_libcdata See \`config.log' for more details" "$LINENO" 5; } @@ -27803,24 +31050,27 @@ fi - if test "x$ac_cv_libcdata" = xyes; then : + if test "x$ac_cv_libcdata" = xyes +then : -$as_echo "#define HAVE_LIBCDATA 1" >>confdefs.h +printf "%s\n" "#define HAVE_LIBCDATA 1" >>confdefs.h fi - if test "x$ac_cv_libcdata" = xyes; then : + if test "x$ac_cv_libcdata" = xyes +then : HAVE_LIBCDATA=1 -else +else $as_nop HAVE_LIBCDATA=0 fi - if test "x$ac_cv_libcdata" != xyes; then : + if test "x$ac_cv_libcdata" != xyes +then : ac_cv_libcdata_CPPFLAGS="-I../libcdata"; ac_cv_libcdata_LIBADD="../libcdata/libcdata.la"; @@ -27829,7 +31079,7 @@ -$as_echo "#define HAVE_LOCAL_LIBCDATA 1" >>confdefs.h +printf "%s\n" "#define HAVE_LOCAL_LIBCDATA 1" >>confdefs.h HAVE_LOCAL_LIBCDATA=1 @@ -27844,24 +31094,28 @@ HAVE_LOCAL_LIBCDATA_FALSE= fi - if test "x$ac_cv_libcdata_CPPFLAGS" != "x"; then : + if test "x$ac_cv_libcdata_CPPFLAGS" != "x" +then : LIBCDATA_CPPFLAGS=$ac_cv_libcdata_CPPFLAGS fi - if test "x$ac_cv_libcdata_LIBADD" != "x"; then : + if test "x$ac_cv_libcdata_LIBADD" != "x" +then : LIBCDATA_LIBADD=$ac_cv_libcdata_LIBADD fi - if test "x$ac_cv_libcdata" = xyes; then : + if test "x$ac_cv_libcdata" = xyes +then : ax_libcdata_pc_libs_private=-lcdata fi - if test "x$ac_cv_libcdata" = xyes; then : + if test "x$ac_cv_libcdata" = xyes +then : ax_libcdata_spec_requires=libcdata ax_libcdata_spec_build_requires=libcdata-devel @@ -27873,53 +31127,59 @@ # Check whether --with-libclocale was given. -if test "${with_libclocale+set}" = set; then : +if test ${with_libclocale+y} +then : withval=$with_libclocale; ac_cv_with_libclocale=$withval -else +else $as_nop ac_cv_with_libclocale=auto-detect fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libclocale in includedir and libdir or in the specified DIR, or no if to use local version" >&5 -$as_echo_n "checking whether to use search for libclocale in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } -if ${ac_cv_with_libclocale+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use search for libclocale in includedir and libdir or in the specified DIR, or no if to use local version" >&5 +printf %s "checking whether to use search for libclocale in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } +if test ${ac_cv_with_libclocale+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_with_libclocale=auto-detect fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libclocale" >&5 -$as_echo "$ac_cv_with_libclocale" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libclocale" >&5 +printf "%s\n" "$ac_cv_with_libclocale" >&6; } - if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libclocale" = xno; then : + if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libclocale" = xno +then : ac_cv_libclocale=no -else +else $as_nop ac_cv_libclocale=check - if test "x$ac_cv_with_libclocale" != x && test "x$ac_cv_with_libclocale" != xauto-detect; then : - if test -d "$ac_cv_with_libclocale"; then : + if test "x$ac_cv_with_libclocale" != x && test "x$ac_cv_with_libclocale" != xauto-detect +then : + if test -d "$ac_cv_with_libclocale" +then : CFLAGS="$CFLAGS -I${ac_cv_with_libclocale}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libclocale}/lib" -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "no such directory: $ac_cv_with_libclocale See \`config.log' for more details" "$LINENO" 5; } fi -else - if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : +else $as_nop + if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x" +then : pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libclocale" >&5 -$as_echo_n "checking for libclocale... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libclocale >= 20120425" >&5 +printf %s "checking for libclocale >= 20120425... " >&6; } if test -n "$libclocale_CFLAGS"; then pkg_cv_libclocale_CFLAGS="$libclocale_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libclocale >= 20120425\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libclocale >= 20120425\""; } >&5 ($PKG_CONFIG --exists --print-errors "libclocale >= 20120425") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libclocale_CFLAGS=`$PKG_CONFIG --cflags "libclocale >= 20120425" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -27933,10 +31193,10 @@ pkg_cv_libclocale_LIBS="$libclocale_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libclocale >= 20120425\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libclocale >= 20120425\""; } >&5 ($PKG_CONFIG --exists --print-errors "libclocale >= 20120425") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libclocale_LIBS=`$PKG_CONFIG --libs "libclocale >= 20120425" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -27950,8 +31210,8 @@ if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -27959,33 +31219,35 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - libclocale_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libclocale >= 20120425" 2>&1` + libclocale_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libclocale >= 20120425" 2>&1` else - libclocale_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libclocale >= 20120425" 2>&1` + libclocale_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libclocale >= 20120425" 2>&1` fi - # Put the nasty error message in config.log where it belongs - echo "$libclocale_PKG_ERRORS" >&5 + # Put the nasty error message in config.log where it belongs + echo "$libclocale_PKG_ERRORS" >&5 - ac_cv_libclocale=check + ac_cv_libclocale=check elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ac_cv_libclocale=check -else - libclocale_CFLAGS=$pkg_cv_libclocale_CFLAGS - libclocale_LIBS=$pkg_cv_libclocale_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ac_cv_libclocale=yes + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ac_cv_libclocale=check +else + libclocale_CFLAGS=$pkg_cv_libclocale_CFLAGS + libclocale_LIBS=$pkg_cv_libclocale_LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + ac_cv_libclocale=yes fi fi - if test "x$ac_cv_libclocale" = xyes && test "x$ac_cv_enable_wide_character_type" != xno; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libclocale/features.h defines LIBCLOCALE_HAVE_WIDE_CHARACTER_TYPE as 1" >&5 -$as_echo_n "checking whether libclocale/features.h defines LIBCLOCALE_HAVE_WIDE_CHARACTER_TYPE as 1... " >&6; } -if ${ac_cv_header_libclocale_features_h_have_wide_character_type+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test "x$ac_cv_libclocale" = xyes && test "x$ac_cv_enable_wide_character_type" != xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether libclocale/features.h defines LIBCLOCALE_HAVE_WIDE_CHARACTER_TYPE as 1" >&5 +printf %s "checking whether libclocale/features.h defines LIBCLOCALE_HAVE_WIDE_CHARACTER_TYPE as 1... " >&6; } +if test ${ac_cv_header_libclocale_features_h_have_wide_character_type+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -27996,7 +31258,7 @@ /* end confdefs.h. */ #include int -main () +main (void) { #if !defined( LIBCLOCALE_HAVE_WIDE_CHARACTER_TYPE ) || ( LIBCLOCALE_HAVE_WIDE_CHARACTER_TYPE != 1 ) #error LIBCLOCALE_HAVE_WIDE_CHARACTER_TYPE not defined @@ -28005,12 +31267,13 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_header_libclocale_features_h_have_wide_character_type=yes -else +else $as_nop ac_cv_header_libclocale_features_h_have_wide_character_type=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -28018,45 +31281,45 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_libclocale_features_h_have_wide_character_type" >&5 -$as_echo "$ac_cv_header_libclocale_features_h_have_wide_character_type" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_libclocale_features_h_have_wide_character_type" >&5 +printf "%s\n" "$ac_cv_header_libclocale_features_h_have_wide_character_type" >&6; } - if test "x$ac_cv_header_libclocale_features_h_have_wide_character_type" = xno; then : + if test "x$ac_cv_header_libclocale_features_h_have_wide_character_type" = xno +then : ac_cv_libclocale=no fi fi - if test "x$ac_cv_libclocale" = xyes; then : + if test "x$ac_cv_libclocale" = xyes +then : ac_cv_libclocale_CPPFLAGS="$pkg_cv_libclocale_CFLAGS" ac_cv_libclocale_LIBADD="$pkg_cv_libclocale_LIBS" fi fi - if test "x$ac_cv_libclocale" = xcheck; then : - for ac_header in libclocale.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "libclocale.h" "ac_cv_header_libclocale_h" "$ac_includes_default" -if test "x$ac_cv_header_libclocale_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBCLOCALE_H 1 -_ACEOF + if test "x$ac_cv_libclocale" = xcheck +then : + ac_fn_c_check_header_compile "$LINENO" "libclocale.h" "ac_cv_header_libclocale_h" "$ac_includes_default" +if test "x$ac_cv_header_libclocale_h" = xyes +then : + printf "%s\n" "#define HAVE_LIBCLOCALE_H 1" >>confdefs.h fi -done - - if test "x$ac_cv_header_libclocale_h" = xno; then : + if test "x$ac_cv_header_libclocale_h" = xno +then : ac_cv_libclocale=no -else +else $as_nop ac_cv_libclocale=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libclocale_get_version in -lclocale" >&5 -$as_echo_n "checking for libclocale_get_version in -lclocale... " >&6; } -if ${ac_cv_lib_clocale_libclocale_get_version+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libclocale_get_version in -lclocale" >&5 +printf %s "checking for libclocale_get_version in -lclocale... " >&6; } +if test ${ac_cv_lib_clocale_libclocale_get_version+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lclocale $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -28065,41 +31328,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libclocale_get_version (); int -main () +main (void) { return libclocale_get_version (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_clocale_libclocale_get_version=yes -else +else $as_nop ac_cv_lib_clocale_libclocale_get_version=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clocale_libclocale_get_version" >&5 -$as_echo "$ac_cv_lib_clocale_libclocale_get_version" >&6; } -if test "x$ac_cv_lib_clocale_libclocale_get_version" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clocale_libclocale_get_version" >&5 +printf "%s\n" "$ac_cv_lib_clocale_libclocale_get_version" >&6; } +if test "x$ac_cv_lib_clocale_libclocale_get_version" = xyes +then : ac_cv_libclocale_dummy=yes -else +else $as_nop ac_cv_libclocale=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libclocale_codepage in -lclocale" >&5 -$as_echo_n "checking for libclocale_codepage in -lclocale... " >&6; } -if ${ac_cv_lib_clocale_libclocale_codepage+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libclocale_codepage in -lclocale" >&5 +printf %s "checking for libclocale_codepage in -lclocale... " >&6; } +if test ${ac_cv_lib_clocale_libclocale_codepage+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lclocale $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -28108,40 +31371,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libclocale_codepage (); int -main () +main (void) { return libclocale_codepage (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_clocale_libclocale_codepage=yes -else +else $as_nop ac_cv_lib_clocale_libclocale_codepage=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clocale_libclocale_codepage" >&5 -$as_echo "$ac_cv_lib_clocale_libclocale_codepage" >&6; } -if test "x$ac_cv_lib_clocale_libclocale_codepage" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clocale_libclocale_codepage" >&5 +printf "%s\n" "$ac_cv_lib_clocale_libclocale_codepage" >&6; } +if test "x$ac_cv_lib_clocale_libclocale_codepage" = xyes +then : ac_cv_libclocale_dummy=yes -else +else $as_nop ac_cv_libclocale=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libclocale_codepage_get in -lclocale" >&5 -$as_echo_n "checking for libclocale_codepage_get in -lclocale... " >&6; } -if ${ac_cv_lib_clocale_libclocale_codepage_get+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libclocale_codepage_get in -lclocale" >&5 +printf %s "checking for libclocale_codepage_get in -lclocale... " >&6; } +if test ${ac_cv_lib_clocale_libclocale_codepage_get+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lclocale $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -28150,40 +31413,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libclocale_codepage_get (); int -main () +main (void) { return libclocale_codepage_get (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_clocale_libclocale_codepage_get=yes -else +else $as_nop ac_cv_lib_clocale_libclocale_codepage_get=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clocale_libclocale_codepage_get" >&5 -$as_echo "$ac_cv_lib_clocale_libclocale_codepage_get" >&6; } -if test "x$ac_cv_lib_clocale_libclocale_codepage_get" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clocale_libclocale_codepage_get" >&5 +printf "%s\n" "$ac_cv_lib_clocale_libclocale_codepage_get" >&6; } +if test "x$ac_cv_lib_clocale_libclocale_codepage_get" = xyes +then : ac_cv_libclocale_dummy=yes -else +else $as_nop ac_cv_libclocale=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libclocale_codepage_set in -lclocale" >&5 -$as_echo_n "checking for libclocale_codepage_set in -lclocale... " >&6; } -if ${ac_cv_lib_clocale_libclocale_codepage_set+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libclocale_codepage_set in -lclocale" >&5 +printf %s "checking for libclocale_codepage_set in -lclocale... " >&6; } +if test ${ac_cv_lib_clocale_libclocale_codepage_set+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lclocale $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -28192,40 +31455,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libclocale_codepage_set (); int -main () +main (void) { return libclocale_codepage_set (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_clocale_libclocale_codepage_set=yes -else +else $as_nop ac_cv_lib_clocale_libclocale_codepage_set=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clocale_libclocale_codepage_set" >&5 -$as_echo "$ac_cv_lib_clocale_libclocale_codepage_set" >&6; } -if test "x$ac_cv_lib_clocale_libclocale_codepage_set" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clocale_libclocale_codepage_set" >&5 +printf "%s\n" "$ac_cv_lib_clocale_libclocale_codepage_set" >&6; } +if test "x$ac_cv_lib_clocale_libclocale_codepage_set" = xyes +then : ac_cv_libclocale_dummy=yes -else +else $as_nop ac_cv_libclocale=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libclocale_codepage_copy_from_string in -lclocale" >&5 -$as_echo_n "checking for libclocale_codepage_copy_from_string in -lclocale... " >&6; } -if ${ac_cv_lib_clocale_libclocale_codepage_copy_from_string+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libclocale_codepage_copy_from_string in -lclocale" >&5 +printf %s "checking for libclocale_codepage_copy_from_string in -lclocale... " >&6; } +if test ${ac_cv_lib_clocale_libclocale_codepage_copy_from_string+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lclocale $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -28234,42 +31497,43 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libclocale_codepage_copy_from_string (); int -main () +main (void) { return libclocale_codepage_copy_from_string (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_clocale_libclocale_codepage_copy_from_string=yes -else +else $as_nop ac_cv_lib_clocale_libclocale_codepage_copy_from_string=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clocale_libclocale_codepage_copy_from_string" >&5 -$as_echo "$ac_cv_lib_clocale_libclocale_codepage_copy_from_string" >&6; } -if test "x$ac_cv_lib_clocale_libclocale_codepage_copy_from_string" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clocale_libclocale_codepage_copy_from_string" >&5 +printf "%s\n" "$ac_cv_lib_clocale_libclocale_codepage_copy_from_string" >&6; } +if test "x$ac_cv_lib_clocale_libclocale_codepage_copy_from_string" = xyes +then : ac_cv_libclocale_dummy=yes -else +else $as_nop ac_cv_libclocale=no fi - if test "x$ac_cv_enable_wide_character_type" != xno; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libclocale_codepage_copy_from_string_wide in -lclocale" >&5 -$as_echo_n "checking for libclocale_codepage_copy_from_string_wide in -lclocale... " >&6; } -if ${ac_cv_lib_clocale_libclocale_codepage_copy_from_string_wide+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test "x$ac_cv_enable_wide_character_type" != xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libclocale_codepage_copy_from_string_wide in -lclocale" >&5 +printf %s "checking for libclocale_codepage_copy_from_string_wide in -lclocale... " >&6; } +if test ${ac_cv_lib_clocale_libclocale_codepage_copy_from_string_wide+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lclocale $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -28278,43 +31542,43 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libclocale_codepage_copy_from_string_wide (); int -main () +main (void) { return libclocale_codepage_copy_from_string_wide (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_clocale_libclocale_codepage_copy_from_string_wide=yes -else +else $as_nop ac_cv_lib_clocale_libclocale_codepage_copy_from_string_wide=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clocale_libclocale_codepage_copy_from_string_wide" >&5 -$as_echo "$ac_cv_lib_clocale_libclocale_codepage_copy_from_string_wide" >&6; } -if test "x$ac_cv_lib_clocale_libclocale_codepage_copy_from_string_wide" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clocale_libclocale_codepage_copy_from_string_wide" >&5 +printf "%s\n" "$ac_cv_lib_clocale_libclocale_codepage_copy_from_string_wide" >&6; } +if test "x$ac_cv_lib_clocale_libclocale_codepage_copy_from_string_wide" = xyes +then : ac_cv_libclocale_dummy=yes -else +else $as_nop ac_cv_libclocale=no fi fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libclocale_locale_get_codepage in -lclocale" >&5 -$as_echo_n "checking for libclocale_locale_get_codepage in -lclocale... " >&6; } -if ${ac_cv_lib_clocale_libclocale_locale_get_codepage+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libclocale_locale_get_codepage in -lclocale" >&5 +printf %s "checking for libclocale_locale_get_codepage in -lclocale... " >&6; } +if test ${ac_cv_lib_clocale_libclocale_locale_get_codepage+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lclocale $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -28323,40 +31587,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libclocale_locale_get_codepage (); int -main () +main (void) { return libclocale_locale_get_codepage (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_clocale_libclocale_locale_get_codepage=yes -else +else $as_nop ac_cv_lib_clocale_libclocale_locale_get_codepage=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clocale_libclocale_locale_get_codepage" >&5 -$as_echo "$ac_cv_lib_clocale_libclocale_locale_get_codepage" >&6; } -if test "x$ac_cv_lib_clocale_libclocale_locale_get_codepage" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clocale_libclocale_locale_get_codepage" >&5 +printf "%s\n" "$ac_cv_lib_clocale_libclocale_locale_get_codepage" >&6; } +if test "x$ac_cv_lib_clocale_libclocale_locale_get_codepage" = xyes +then : ac_cv_libclocale_dummy=yes -else +else $as_nop ac_cv_libclocale=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libclocale_locale_get_decimal_point in -lclocale" >&5 -$as_echo_n "checking for libclocale_locale_get_decimal_point in -lclocale... " >&6; } -if ${ac_cv_lib_clocale_libclocale_locale_get_decimal_point+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libclocale_locale_get_decimal_point in -lclocale" >&5 +printf %s "checking for libclocale_locale_get_decimal_point in -lclocale... " >&6; } +if test ${ac_cv_lib_clocale_libclocale_locale_get_decimal_point+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lclocale $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -28365,41 +31629,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libclocale_locale_get_decimal_point (); int -main () +main (void) { return libclocale_locale_get_decimal_point (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_clocale_libclocale_locale_get_decimal_point=yes -else +else $as_nop ac_cv_lib_clocale_libclocale_locale_get_decimal_point=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clocale_libclocale_locale_get_decimal_point" >&5 -$as_echo "$ac_cv_lib_clocale_libclocale_locale_get_decimal_point" >&6; } -if test "x$ac_cv_lib_clocale_libclocale_locale_get_decimal_point" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clocale_libclocale_locale_get_decimal_point" >&5 +printf "%s\n" "$ac_cv_lib_clocale_libclocale_locale_get_decimal_point" >&6; } +if test "x$ac_cv_lib_clocale_libclocale_locale_get_decimal_point" = xyes +then : ac_cv_libclocale_dummy=yes -else +else $as_nop ac_cv_libclocale=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libclocale_initialize in -lclocale" >&5 -$as_echo_n "checking for libclocale_initialize in -lclocale... " >&6; } -if ${ac_cv_lib_clocale_libclocale_initialize+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libclocale_initialize in -lclocale" >&5 +printf %s "checking for libclocale_initialize in -lclocale... " >&6; } +if test ${ac_cv_lib_clocale_libclocale_initialize+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lclocale $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -28408,32 +31672,31 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libclocale_initialize (); int -main () +main (void) { return libclocale_initialize (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_clocale_libclocale_initialize=yes -else +else $as_nop ac_cv_lib_clocale_libclocale_initialize=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clocale_libclocale_initialize" >&5 -$as_echo "$ac_cv_lib_clocale_libclocale_initialize" >&6; } -if test "x$ac_cv_lib_clocale_libclocale_initialize" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clocale_libclocale_initialize" >&5 +printf "%s\n" "$ac_cv_lib_clocale_libclocale_initialize" >&6; } +if test "x$ac_cv_lib_clocale_libclocale_initialize" = xyes +then : ac_cv_libclocale_dummy=yes -else +else $as_nop ac_cv_libclocale=no fi @@ -28442,9 +31705,10 @@ fi fi - if test "x$ac_cv_with_libclocale" != x && test "x$ac_cv_with_libclocale" != xauto-detect && test "x$ac_cv_libclocale" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_with_libclocale" != x && test "x$ac_cv_with_libclocale" != xauto-detect && test "x$ac_cv_libclocale" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "unable to find supported libclocale in directory: $ac_cv_with_libclocale See \`config.log' for more details" "$LINENO" 5; } @@ -28452,74 +31716,72 @@ fi - if test "x$ac_cv_libclocale" = xyes; then : + if test "x$ac_cv_libclocale" = xyes +then : -$as_echo "#define HAVE_LIBCLOCALE 1" >>confdefs.h +printf "%s\n" "#define HAVE_LIBCLOCALE 1" >>confdefs.h fi - if test "x$ac_cv_libclocale" = xyes; then : + if test "x$ac_cv_libclocale" = xyes +then : HAVE_LIBCLOCALE=1 -else +else $as_nop HAVE_LIBCLOCALE=0 fi - if test "x$ac_cv_libclocale" != xyes; then : - for ac_header in langinfo.h locale.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF + if test "x$ac_cv_libclocale" != xyes +then : + ac_fn_c_check_header_compile "$LINENO" "langinfo.h" "ac_cv_header_langinfo_h" "$ac_includes_default" +if test "x$ac_cv_header_langinfo_h" = xyes +then : + printf "%s\n" "#define HAVE_LANGINFO_H 1" >>confdefs.h fi +ac_fn_c_check_header_compile "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default" +if test "x$ac_cv_header_locale_h" = xyes +then : + printf "%s\n" "#define HAVE_LOCALE_H 1" >>confdefs.h -done +fi - for ac_func in getenv -do : - ac_fn_c_check_func "$LINENO" "getenv" "ac_cv_func_getenv" -if test "x$ac_cv_func_getenv" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETENV 1 -_ACEOF + ac_fn_c_check_func "$LINENO" "getenv" "ac_cv_func_getenv" +if test "x$ac_cv_func_getenv" = xyes +then : + printf "%s\n" "#define HAVE_GETENV 1" >>confdefs.h fi -done - if test "x$ac_cv_func_getenv" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_getenv" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: getenv See \`config.log' for more details" "$LINENO" 5; } fi - if test "x$ac_cv_enable_winapi" = xno; then : - for ac_func in localeconv -do : + if test "x$ac_cv_enable_winapi" = xno +then : ac_fn_c_check_func "$LINENO" "localeconv" "ac_cv_func_localeconv" -if test "x$ac_cv_func_localeconv" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LOCALECONV 1 -_ACEOF +if test "x$ac_cv_func_localeconv" = xyes +then : + printf "%s\n" "#define HAVE_LOCALECONV 1" >>confdefs.h fi -done - if test "x$ac_cv_func_localeconv" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_localeconv" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: localeconv See \`config.log' for more details" "$LINENO" 5; } @@ -28527,44 +31789,39 @@ fi - for ac_func in setlocale -do : ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale" -if test "x$ac_cv_func_setlocale" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SETLOCALE 1 -_ACEOF +if test "x$ac_cv_func_setlocale" = xyes +then : + printf "%s\n" "#define HAVE_SETLOCALE 1" >>confdefs.h fi -done - if test "x$ac_cv_func_setlocale" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_setlocale" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: setlocale See \`config.log' for more details" "$LINENO" 5; } fi - for ac_func in nl_langinfo -do : ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo" -if test "x$ac_cv_func_nl_langinfo" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_NL_LANGINFO 1 -_ACEOF +if test "x$ac_cv_func_nl_langinfo" = xyes +then : + printf "%s\n" "#define HAVE_NL_LANGINFO 1" >>confdefs.h fi -done - if test "x$ac_cv_func_nl_langinfo" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo CODESET support" >&5 -$as_echo_n "checking for nl_langinfo CODESET support... " >&6; } -if ${ac_cv_cv_langinfo_codeset+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test "x$ac_cv_func_nl_langinfo" = xyes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo CODESET support" >&5 +printf %s "checking for nl_langinfo CODESET support... " >&6; } +if test ${ac_cv_cv_langinfo_codeset+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -28575,19 +31832,20 @@ /* end confdefs.h. */ #include int -main () +main (void) { char* charset = nl_langinfo( CODESET ); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_cv_langinfo_codeset=yes -else +else $as_nop ac_cv_cv_langinfo_codeset=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -28596,15 +31854,16 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cv_langinfo_codeset" >&5 -$as_echo "$ac_cv_cv_langinfo_codeset" >&6; } -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cv_langinfo_codeset" >&5 +printf "%s\n" "$ac_cv_cv_langinfo_codeset" >&6; } +else $as_nop ac_cv_cv_langinfo_codeset=no fi - if test "x$ac_cv_cv_langinfo_codeset" = xyes; then : + if test "x$ac_cv_cv_langinfo_codeset" = xyes +then : -$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h +printf "%s\n" "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h fi @@ -28617,7 +31876,7 @@ -$as_echo "#define HAVE_LOCAL_LIBCLOCALE 1" >>confdefs.h +printf "%s\n" "#define HAVE_LOCAL_LIBCLOCALE 1" >>confdefs.h HAVE_LOCAL_LIBCLOCALE=1 @@ -28632,24 +31891,28 @@ HAVE_LOCAL_LIBCLOCALE_FALSE= fi - if test "x$ac_cv_libclocale_CPPFLAGS" != "x"; then : + if test "x$ac_cv_libclocale_CPPFLAGS" != "x" +then : LIBCLOCALE_CPPFLAGS=$ac_cv_libclocale_CPPFLAGS fi - if test "x$ac_cv_libclocale_LIBADD" != "x"; then : + if test "x$ac_cv_libclocale_LIBADD" != "x" +then : LIBCLOCALE_LIBADD=$ac_cv_libclocale_LIBADD fi - if test "x$ac_cv_libclocale" = xyes; then : + if test "x$ac_cv_libclocale" = xyes +then : ax_libclocale_pc_libs_private=-lclocale fi - if test "x$ac_cv_libclocale" = xyes; then : + if test "x$ac_cv_libclocale" = xyes +then : ax_libclocale_spec_requires=libclocale ax_libclocale_spec_build_requires=libclocale-devel @@ -28661,53 +31924,59 @@ # Check whether --with-libcnotify was given. -if test "${with_libcnotify+set}" = set; then : +if test ${with_libcnotify+y} +then : withval=$with_libcnotify; ac_cv_with_libcnotify=$withval -else +else $as_nop ac_cv_with_libcnotify=auto-detect fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libcnotify in includedir and libdir or in the specified DIR, or no if to use local version" >&5 -$as_echo_n "checking whether to use search for libcnotify in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } -if ${ac_cv_with_libcnotify+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use search for libcnotify in includedir and libdir or in the specified DIR, or no if to use local version" >&5 +printf %s "checking whether to use search for libcnotify in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } +if test ${ac_cv_with_libcnotify+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_with_libcnotify=auto-detect fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libcnotify" >&5 -$as_echo "$ac_cv_with_libcnotify" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libcnotify" >&5 +printf "%s\n" "$ac_cv_with_libcnotify" >&6; } - if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libcnotify" = xno; then : + if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libcnotify" = xno +then : ac_cv_libcnotify=no -else +else $as_nop ac_cv_libcnotify=check - if test "x$ac_cv_with_libcnotify" != x && test "x$ac_cv_with_libcnotify" != xauto-detect; then : - if test -d "$ac_cv_with_libcnotify"; then : + if test "x$ac_cv_with_libcnotify" != x && test "x$ac_cv_with_libcnotify" != xauto-detect +then : + if test -d "$ac_cv_with_libcnotify" +then : CFLAGS="$CFLAGS -I${ac_cv_with_libcnotify}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libcnotify}/lib" -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "no such directory: $ac_cv_with_libcnotify See \`config.log' for more details" "$LINENO" 5; } fi -else - if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : +else $as_nop + if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x" +then : pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcnotify" >&5 -$as_echo_n "checking for libcnotify... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcnotify >= 20120425" >&5 +printf %s "checking for libcnotify >= 20120425... " >&6; } if test -n "$libcnotify_CFLAGS"; then pkg_cv_libcnotify_CFLAGS="$libcnotify_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcnotify >= 20120425\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcnotify >= 20120425\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcnotify >= 20120425") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libcnotify_CFLAGS=`$PKG_CONFIG --cflags "libcnotify >= 20120425" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -28721,10 +31990,10 @@ pkg_cv_libcnotify_LIBS="$libcnotify_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcnotify >= 20120425\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcnotify >= 20120425\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcnotify >= 20120425") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libcnotify_LIBS=`$PKG_CONFIG --libs "libcnotify >= 20120425" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -28738,8 +32007,8 @@ if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -28747,58 +32016,57 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - libcnotify_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libcnotify >= 20120425" 2>&1` + libcnotify_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libcnotify >= 20120425" 2>&1` else - libcnotify_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libcnotify >= 20120425" 2>&1` + libcnotify_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libcnotify >= 20120425" 2>&1` fi - # Put the nasty error message in config.log where it belongs - echo "$libcnotify_PKG_ERRORS" >&5 + # Put the nasty error message in config.log where it belongs + echo "$libcnotify_PKG_ERRORS" >&5 - ac_cv_libcnotify=check + ac_cv_libcnotify=check elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ac_cv_libcnotify=check + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ac_cv_libcnotify=check else - libcnotify_CFLAGS=$pkg_cv_libcnotify_CFLAGS - libcnotify_LIBS=$pkg_cv_libcnotify_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ac_cv_libcnotify=yes + libcnotify_CFLAGS=$pkg_cv_libcnotify_CFLAGS + libcnotify_LIBS=$pkg_cv_libcnotify_LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + ac_cv_libcnotify=yes fi fi - if test "x$ac_cv_libcnotify" = xyes; then : + if test "x$ac_cv_libcnotify" = xyes +then : ac_cv_libcnotify_CPPFLAGS="$pkg_cv_libcnotify_CFLAGS" ac_cv_libcnotify_LIBADD="$pkg_cv_libcnotify_LIBS" fi fi - if test "x$ac_cv_libcnotify" = xcheck; then : - for ac_header in libcnotify.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "libcnotify.h" "ac_cv_header_libcnotify_h" "$ac_includes_default" -if test "x$ac_cv_header_libcnotify_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBCNOTIFY_H 1 -_ACEOF + if test "x$ac_cv_libcnotify" = xcheck +then : + ac_fn_c_check_header_compile "$LINENO" "libcnotify.h" "ac_cv_header_libcnotify_h" "$ac_includes_default" +if test "x$ac_cv_header_libcnotify_h" = xyes +then : + printf "%s\n" "#define HAVE_LIBCNOTIFY_H 1" >>confdefs.h fi -done - - if test "x$ac_cv_header_libcnotify_h" = xno; then : + if test "x$ac_cv_header_libcnotify_h" = xno +then : ac_cv_libcnotify=no -else +else $as_nop ac_cv_libcnotify=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcnotify_get_version in -lcnotify" >&5 -$as_echo_n "checking for libcnotify_get_version in -lcnotify... " >&6; } -if ${ac_cv_lib_cnotify_libcnotify_get_version+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcnotify_get_version in -lcnotify" >&5 +printf %s "checking for libcnotify_get_version in -lcnotify... " >&6; } +if test ${ac_cv_lib_cnotify_libcnotify_get_version+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcnotify $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -28807,41 +32075,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcnotify_get_version (); int -main () +main (void) { return libcnotify_get_version (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cnotify_libcnotify_get_version=yes -else +else $as_nop ac_cv_lib_cnotify_libcnotify_get_version=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cnotify_libcnotify_get_version" >&5 -$as_echo "$ac_cv_lib_cnotify_libcnotify_get_version" >&6; } -if test "x$ac_cv_lib_cnotify_libcnotify_get_version" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cnotify_libcnotify_get_version" >&5 +printf "%s\n" "$ac_cv_lib_cnotify_libcnotify_get_version" >&6; } +if test "x$ac_cv_lib_cnotify_libcnotify_get_version" = xyes +then : ac_cv_libcnotify_dummy=yes -else +else $as_nop ac_cv_libcnotify=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcnotify_printf in -lcnotify" >&5 -$as_echo_n "checking for libcnotify_printf in -lcnotify... " >&6; } -if ${ac_cv_lib_cnotify_libcnotify_printf+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcnotify_printf in -lcnotify" >&5 +printf %s "checking for libcnotify_printf in -lcnotify... " >&6; } +if test ${ac_cv_lib_cnotify_libcnotify_printf+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcnotify $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -28850,40 +32118,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcnotify_printf (); int -main () +main (void) { return libcnotify_printf (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cnotify_libcnotify_printf=yes -else +else $as_nop ac_cv_lib_cnotify_libcnotify_printf=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cnotify_libcnotify_printf" >&5 -$as_echo "$ac_cv_lib_cnotify_libcnotify_printf" >&6; } -if test "x$ac_cv_lib_cnotify_libcnotify_printf" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cnotify_libcnotify_printf" >&5 +printf "%s\n" "$ac_cv_lib_cnotify_libcnotify_printf" >&6; } +if test "x$ac_cv_lib_cnotify_libcnotify_printf" = xyes +then : ac_cv_libcnotify_dummy=yes -else +else $as_nop ac_cv_libcnotify=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcnotify_print_data in -lcnotify" >&5 -$as_echo_n "checking for libcnotify_print_data in -lcnotify... " >&6; } -if ${ac_cv_lib_cnotify_libcnotify_print_data+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcnotify_print_data in -lcnotify" >&5 +printf %s "checking for libcnotify_print_data in -lcnotify... " >&6; } +if test ${ac_cv_lib_cnotify_libcnotify_print_data+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcnotify $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -28892,40 +32160,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcnotify_print_data (); int -main () +main (void) { return libcnotify_print_data (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cnotify_libcnotify_print_data=yes -else +else $as_nop ac_cv_lib_cnotify_libcnotify_print_data=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cnotify_libcnotify_print_data" >&5 -$as_echo "$ac_cv_lib_cnotify_libcnotify_print_data" >&6; } -if test "x$ac_cv_lib_cnotify_libcnotify_print_data" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cnotify_libcnotify_print_data" >&5 +printf "%s\n" "$ac_cv_lib_cnotify_libcnotify_print_data" >&6; } +if test "x$ac_cv_lib_cnotify_libcnotify_print_data" = xyes +then : ac_cv_libcnotify_dummy=yes -else +else $as_nop ac_cv_libcnotify=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcnotify_print_error_backtrace in -lcnotify" >&5 -$as_echo_n "checking for libcnotify_print_error_backtrace in -lcnotify... " >&6; } -if ${ac_cv_lib_cnotify_libcnotify_print_error_backtrace+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcnotify_print_error_backtrace in -lcnotify" >&5 +printf %s "checking for libcnotify_print_error_backtrace in -lcnotify... " >&6; } +if test ${ac_cv_lib_cnotify_libcnotify_print_error_backtrace+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcnotify $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -28934,41 +32202,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcnotify_print_error_backtrace (); int -main () +main (void) { return libcnotify_print_error_backtrace (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cnotify_libcnotify_print_error_backtrace=yes -else +else $as_nop ac_cv_lib_cnotify_libcnotify_print_error_backtrace=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cnotify_libcnotify_print_error_backtrace" >&5 -$as_echo "$ac_cv_lib_cnotify_libcnotify_print_error_backtrace" >&6; } -if test "x$ac_cv_lib_cnotify_libcnotify_print_error_backtrace" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cnotify_libcnotify_print_error_backtrace" >&5 +printf "%s\n" "$ac_cv_lib_cnotify_libcnotify_print_error_backtrace" >&6; } +if test "x$ac_cv_lib_cnotify_libcnotify_print_error_backtrace" = xyes +then : ac_cv_libcnotify_dummy=yes -else +else $as_nop ac_cv_libcnotify=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcnotify_stream_set in -lcnotify" >&5 -$as_echo_n "checking for libcnotify_stream_set in -lcnotify... " >&6; } -if ${ac_cv_lib_cnotify_libcnotify_stream_set+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcnotify_stream_set in -lcnotify" >&5 +printf %s "checking for libcnotify_stream_set in -lcnotify... " >&6; } +if test ${ac_cv_lib_cnotify_libcnotify_stream_set+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcnotify $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -28977,40 +32245,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcnotify_stream_set (); int -main () +main (void) { return libcnotify_stream_set (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cnotify_libcnotify_stream_set=yes -else +else $as_nop ac_cv_lib_cnotify_libcnotify_stream_set=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cnotify_libcnotify_stream_set" >&5 -$as_echo "$ac_cv_lib_cnotify_libcnotify_stream_set" >&6; } -if test "x$ac_cv_lib_cnotify_libcnotify_stream_set" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cnotify_libcnotify_stream_set" >&5 +printf "%s\n" "$ac_cv_lib_cnotify_libcnotify_stream_set" >&6; } +if test "x$ac_cv_lib_cnotify_libcnotify_stream_set" = xyes +then : ac_cv_libcnotify_dummy=yes -else +else $as_nop ac_cv_libcnotify=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcnotify_stream_open in -lcnotify" >&5 -$as_echo_n "checking for libcnotify_stream_open in -lcnotify... " >&6; } -if ${ac_cv_lib_cnotify_libcnotify_stream_open+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcnotify_stream_open in -lcnotify" >&5 +printf %s "checking for libcnotify_stream_open in -lcnotify... " >&6; } +if test ${ac_cv_lib_cnotify_libcnotify_stream_open+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcnotify $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -29019,40 +32287,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcnotify_stream_open (); int -main () +main (void) { return libcnotify_stream_open (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cnotify_libcnotify_stream_open=yes -else +else $as_nop ac_cv_lib_cnotify_libcnotify_stream_open=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cnotify_libcnotify_stream_open" >&5 -$as_echo "$ac_cv_lib_cnotify_libcnotify_stream_open" >&6; } -if test "x$ac_cv_lib_cnotify_libcnotify_stream_open" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cnotify_libcnotify_stream_open" >&5 +printf "%s\n" "$ac_cv_lib_cnotify_libcnotify_stream_open" >&6; } +if test "x$ac_cv_lib_cnotify_libcnotify_stream_open" = xyes +then : ac_cv_libcnotify_dummy=yes -else +else $as_nop ac_cv_libcnotify=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcnotify_stream_close in -lcnotify" >&5 -$as_echo_n "checking for libcnotify_stream_close in -lcnotify... " >&6; } -if ${ac_cv_lib_cnotify_libcnotify_stream_close+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcnotify_stream_close in -lcnotify" >&5 +printf %s "checking for libcnotify_stream_close in -lcnotify... " >&6; } +if test ${ac_cv_lib_cnotify_libcnotify_stream_close+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcnotify $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -29061,41 +32329,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcnotify_stream_close (); int -main () +main (void) { return libcnotify_stream_close (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cnotify_libcnotify_stream_close=yes -else +else $as_nop ac_cv_lib_cnotify_libcnotify_stream_close=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cnotify_libcnotify_stream_close" >&5 -$as_echo "$ac_cv_lib_cnotify_libcnotify_stream_close" >&6; } -if test "x$ac_cv_lib_cnotify_libcnotify_stream_close" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cnotify_libcnotify_stream_close" >&5 +printf "%s\n" "$ac_cv_lib_cnotify_libcnotify_stream_close" >&6; } +if test "x$ac_cv_lib_cnotify_libcnotify_stream_close" = xyes +then : ac_cv_libcnotify_dummy=yes -else +else $as_nop ac_cv_libcnotify=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcnotify_verbose_set in -lcnotify" >&5 -$as_echo_n "checking for libcnotify_verbose_set in -lcnotify... " >&6; } -if ${ac_cv_lib_cnotify_libcnotify_verbose_set+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcnotify_verbose_set in -lcnotify" >&5 +printf %s "checking for libcnotify_verbose_set in -lcnotify... " >&6; } +if test ${ac_cv_lib_cnotify_libcnotify_verbose_set+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcnotify $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -29104,32 +32372,31 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcnotify_verbose_set (); int -main () +main (void) { return libcnotify_verbose_set (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cnotify_libcnotify_verbose_set=yes -else +else $as_nop ac_cv_lib_cnotify_libcnotify_verbose_set=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cnotify_libcnotify_verbose_set" >&5 -$as_echo "$ac_cv_lib_cnotify_libcnotify_verbose_set" >&6; } -if test "x$ac_cv_lib_cnotify_libcnotify_verbose_set" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cnotify_libcnotify_verbose_set" >&5 +printf "%s\n" "$ac_cv_lib_cnotify_libcnotify_verbose_set" >&6; } +if test "x$ac_cv_lib_cnotify_libcnotify_verbose_set" = xyes +then : ac_cv_libcnotify_dummy=yes -else +else $as_nop ac_cv_libcnotify=no fi @@ -29138,9 +32405,10 @@ fi fi - if test "x$ac_cv_with_libcnotify" != x && test "x$ac_cv_with_libcnotify" != xauto-detect && test "x$ac_cv_libcnotify" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_with_libcnotify" != x && test "x$ac_cv_with_libcnotify" != xauto-detect && test "x$ac_cv_libcnotify" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "unable to find supported libcnotify in directory: $ac_cv_with_libcnotify See \`config.log' for more details" "$LINENO" 5; } @@ -29148,58 +32416,57 @@ fi - if test "x$ac_cv_libcnotify" = xyes; then : + if test "x$ac_cv_libcnotify" = xyes +then : -$as_echo "#define HAVE_LIBCNOTIFY 1" >>confdefs.h +printf "%s\n" "#define HAVE_LIBCNOTIFY 1" >>confdefs.h fi - if test "x$ac_cv_libcnotify" = xyes; then : + if test "x$ac_cv_libcnotify" = xyes +then : HAVE_LIBCNOTIFY=1 -else +else $as_nop HAVE_LIBCNOTIFY=0 fi - if test "x$ac_cv_libcnotify" != xyes; then : - for ac_header in stdarg.h varargs.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF + if test "x$ac_cv_libcnotify" != xyes +then : + ac_fn_c_check_header_compile "$LINENO" "stdarg.h" "ac_cv_header_stdarg_h" "$ac_includes_default" +if test "x$ac_cv_header_stdarg_h" = xyes +then : + printf "%s\n" "#define HAVE_STDARG_H 1" >>confdefs.h fi +ac_fn_c_check_header_compile "$LINENO" "varargs.h" "ac_cv_header_varargs_h" "$ac_includes_default" +if test "x$ac_cv_header_varargs_h" = xyes +then : + printf "%s\n" "#define HAVE_VARARGS_H 1" >>confdefs.h -done +fi - if test "x$ac_cv_header_stdarg_h" != xyes && test "x$ac_cv_header_varargs_h" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_header_stdarg_h" != xyes && test "x$ac_cv_header_varargs_h" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing headers: stdarg.h and varargs.h See \`config.log' for more details" "$LINENO" 5; } fi - for ac_header in errno.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default" -if test "x$ac_cv_header_errno_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_ERRNO_H 1 -_ACEOF + ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default" +if test "x$ac_cv_header_errno_h" = xyes +then : + printf "%s\n" "#define HAVE_ERRNO_H 1" >>confdefs.h fi -done - ac_cv_libcnotify_CPPFLAGS="-I../libcnotify"; ac_cv_libcnotify_LIBADD="../libcnotify/libcnotify.la"; @@ -29208,7 +32475,7 @@ -$as_echo "#define HAVE_LOCAL_LIBCNOTIFY 1" >>confdefs.h +printf "%s\n" "#define HAVE_LOCAL_LIBCNOTIFY 1" >>confdefs.h HAVE_LOCAL_LIBCNOTIFY=1 @@ -29223,24 +32490,28 @@ HAVE_LOCAL_LIBCNOTIFY_FALSE= fi - if test "x$ac_cv_libcnotify_CPPFLAGS" != "x"; then : + if test "x$ac_cv_libcnotify_CPPFLAGS" != "x" +then : LIBCNOTIFY_CPPFLAGS=$ac_cv_libcnotify_CPPFLAGS fi - if test "x$ac_cv_libcnotify_LIBADD" != "x"; then : + if test "x$ac_cv_libcnotify_LIBADD" != "x" +then : LIBCNOTIFY_LIBADD=$ac_cv_libcnotify_LIBADD fi - if test "x$ac_cv_libcnotify" = xyes; then : + if test "x$ac_cv_libcnotify" = xyes +then : ax_libcnotify_pc_libs_private=-lcnotify fi - if test "x$ac_cv_libcnotify" = xyes; then : + if test "x$ac_cv_libcnotify" = xyes +then : ax_libcnotify_spec_requires=libcnotify ax_libcnotify_spec_build_requires=libcnotify-devel @@ -29252,53 +32523,59 @@ # Check whether --with-libcsplit was given. -if test "${with_libcsplit+set}" = set; then : +if test ${with_libcsplit+y} +then : withval=$with_libcsplit; ac_cv_with_libcsplit=$withval -else +else $as_nop ac_cv_with_libcsplit=auto-detect fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libcsplit in includedir and libdir or in the specified DIR, or no if to use local version" >&5 -$as_echo_n "checking whether to use search for libcsplit in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } -if ${ac_cv_with_libcsplit+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use search for libcsplit in includedir and libdir or in the specified DIR, or no if to use local version" >&5 +printf %s "checking whether to use search for libcsplit in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } +if test ${ac_cv_with_libcsplit+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_with_libcsplit=auto-detect fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libcsplit" >&5 -$as_echo "$ac_cv_with_libcsplit" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libcsplit" >&5 +printf "%s\n" "$ac_cv_with_libcsplit" >&6; } - if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libcsplit" = xno; then : + if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libcsplit" = xno +then : ac_cv_libcsplit=no -else +else $as_nop ac_cv_libcsplit=check - if test "x$ac_cv_with_libcsplit" != x && test "x$ac_cv_with_libcsplit" != xauto-detect; then : - if test -d "$ac_cv_with_libcsplit"; then : + if test "x$ac_cv_with_libcsplit" != x && test "x$ac_cv_with_libcsplit" != xauto-detect +then : + if test -d "$ac_cv_with_libcsplit" +then : CFLAGS="$CFLAGS -I${ac_cv_with_libcsplit}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libcsplit}/lib" -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "no such directory: $ac_cv_with_libcsplit See \`config.log' for more details" "$LINENO" 5; } fi -else - if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : +else $as_nop + if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x" +then : pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcsplit" >&5 -$as_echo_n "checking for libcsplit... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcsplit >= 20120701" >&5 +printf %s "checking for libcsplit >= 20120701... " >&6; } if test -n "$libcsplit_CFLAGS"; then pkg_cv_libcsplit_CFLAGS="$libcsplit_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcsplit >= 20120701\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcsplit >= 20120701\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcsplit >= 20120701") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libcsplit_CFLAGS=`$PKG_CONFIG --cflags "libcsplit >= 20120701" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -29312,10 +32589,10 @@ pkg_cv_libcsplit_LIBS="$libcsplit_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcsplit >= 20120701\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcsplit >= 20120701\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcsplit >= 20120701") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libcsplit_LIBS=`$PKG_CONFIG --libs "libcsplit >= 20120701" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -29329,8 +32606,8 @@ if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -29338,33 +32615,35 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - libcsplit_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libcsplit >= 20120701" 2>&1` + libcsplit_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libcsplit >= 20120701" 2>&1` else - libcsplit_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libcsplit >= 20120701" 2>&1` + libcsplit_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libcsplit >= 20120701" 2>&1` fi - # Put the nasty error message in config.log where it belongs - echo "$libcsplit_PKG_ERRORS" >&5 + # Put the nasty error message in config.log where it belongs + echo "$libcsplit_PKG_ERRORS" >&5 - ac_cv_libcsplit=check + ac_cv_libcsplit=check elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ac_cv_libcsplit=check -else - libcsplit_CFLAGS=$pkg_cv_libcsplit_CFLAGS - libcsplit_LIBS=$pkg_cv_libcsplit_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ac_cv_libcsplit=yes + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ac_cv_libcsplit=check +else + libcsplit_CFLAGS=$pkg_cv_libcsplit_CFLAGS + libcsplit_LIBS=$pkg_cv_libcsplit_LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + ac_cv_libcsplit=yes fi fi - if test "x$ac_cv_libcsplit" = xyes && test "x$ac_cv_enable_wide_character_type" != xno; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libcsplit/features.h defines LIBCSPLIT_HAVE_WIDE_CHARACTER_TYPE as 1" >&5 -$as_echo_n "checking whether libcsplit/features.h defines LIBCSPLIT_HAVE_WIDE_CHARACTER_TYPE as 1... " >&6; } -if ${ac_cv_header_libcsplit_features_h_have_wide_character_type+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test "x$ac_cv_libcsplit" = xyes && test "x$ac_cv_enable_wide_character_type" != xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether libcsplit/features.h defines LIBCSPLIT_HAVE_WIDE_CHARACTER_TYPE as 1" >&5 +printf %s "checking whether libcsplit/features.h defines LIBCSPLIT_HAVE_WIDE_CHARACTER_TYPE as 1... " >&6; } +if test ${ac_cv_header_libcsplit_features_h_have_wide_character_type+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -29375,7 +32654,7 @@ /* end confdefs.h. */ #include int -main () +main (void) { #if !defined( LIBCSPLIT_HAVE_WIDE_CHARACTER_TYPE ) || ( LIBCSPLIT_HAVE_WIDE_CHARACTER_TYPE != 1 ) #error LIBCSPLIT_HAVE_WIDE_CHARACTER_TYPE not defined @@ -29384,12 +32663,13 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_header_libcsplit_features_h_have_wide_character_type=yes -else +else $as_nop ac_cv_header_libcsplit_features_h_have_wide_character_type=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -29397,45 +32677,45 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_libcsplit_features_h_have_wide_character_type" >&5 -$as_echo "$ac_cv_header_libcsplit_features_h_have_wide_character_type" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_libcsplit_features_h_have_wide_character_type" >&5 +printf "%s\n" "$ac_cv_header_libcsplit_features_h_have_wide_character_type" >&6; } - if test "x$ac_cv_header_libcsplit_features_h_have_wide_character_type" = xno; then : + if test "x$ac_cv_header_libcsplit_features_h_have_wide_character_type" = xno +then : ac_cv_libcsplit=no fi fi - if test "x$ac_cv_libcsplit" = xyes; then : + if test "x$ac_cv_libcsplit" = xyes +then : ac_cv_libcsplit_CPPFLAGS="$pkg_cv_libcsplit_CFLAGS" ac_cv_libcsplit_LIBADD="$pkg_cv_libcsplit_LIBS" fi fi - if test "x$ac_cv_libcsplit" = xcheck; then : - for ac_header in libcsplit.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "libcsplit.h" "ac_cv_header_libcsplit_h" "$ac_includes_default" -if test "x$ac_cv_header_libcsplit_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBCSPLIT_H 1 -_ACEOF + if test "x$ac_cv_libcsplit" = xcheck +then : + ac_fn_c_check_header_compile "$LINENO" "libcsplit.h" "ac_cv_header_libcsplit_h" "$ac_includes_default" +if test "x$ac_cv_header_libcsplit_h" = xyes +then : + printf "%s\n" "#define HAVE_LIBCSPLIT_H 1" >>confdefs.h fi -done - - if test "x$ac_cv_header_libcsplit_h" = xno; then : + if test "x$ac_cv_header_libcsplit_h" = xno +then : ac_cv_libcsplit=no -else +else $as_nop ac_cv_libcsplit=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcsplit_get_version in -lcsplit" >&5 -$as_echo_n "checking for libcsplit_get_version in -lcsplit... " >&6; } -if ${ac_cv_lib_csplit_libcsplit_get_version+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcsplit_get_version in -lcsplit" >&5 +printf %s "checking for libcsplit_get_version in -lcsplit... " >&6; } +if test ${ac_cv_lib_csplit_libcsplit_get_version+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcsplit $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -29444,41 +32724,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcsplit_get_version (); int -main () +main (void) { return libcsplit_get_version (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_csplit_libcsplit_get_version=yes -else +else $as_nop ac_cv_lib_csplit_libcsplit_get_version=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_get_version" >&5 -$as_echo "$ac_cv_lib_csplit_libcsplit_get_version" >&6; } -if test "x$ac_cv_lib_csplit_libcsplit_get_version" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_get_version" >&5 +printf "%s\n" "$ac_cv_lib_csplit_libcsplit_get_version" >&6; } +if test "x$ac_cv_lib_csplit_libcsplit_get_version" = xyes +then : ac_cv_libcsplit_dummy=yes -else +else $as_nop ac_cv_libcsplit=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcsplit_narrow_string_split in -lcsplit" >&5 -$as_echo_n "checking for libcsplit_narrow_string_split in -lcsplit... " >&6; } -if ${ac_cv_lib_csplit_libcsplit_narrow_string_split+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcsplit_narrow_string_split in -lcsplit" >&5 +printf %s "checking for libcsplit_narrow_string_split in -lcsplit... " >&6; } +if test ${ac_cv_lib_csplit_libcsplit_narrow_string_split+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcsplit $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -29487,41 +32767,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcsplit_narrow_string_split (); int -main () +main (void) { return libcsplit_narrow_string_split (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_csplit_libcsplit_narrow_string_split=yes -else +else $as_nop ac_cv_lib_csplit_libcsplit_narrow_string_split=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_narrow_string_split" >&5 -$as_echo "$ac_cv_lib_csplit_libcsplit_narrow_string_split" >&6; } -if test "x$ac_cv_lib_csplit_libcsplit_narrow_string_split" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_narrow_string_split" >&5 +printf "%s\n" "$ac_cv_lib_csplit_libcsplit_narrow_string_split" >&6; } +if test "x$ac_cv_lib_csplit_libcsplit_narrow_string_split" = xyes +then : ac_cv_libcsplit_dummy=yes -else +else $as_nop ac_cv_libcsplit=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcsplit_narrow_split_string_free in -lcsplit" >&5 -$as_echo_n "checking for libcsplit_narrow_split_string_free in -lcsplit... " >&6; } -if ${ac_cv_lib_csplit_libcsplit_narrow_split_string_free+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcsplit_narrow_split_string_free in -lcsplit" >&5 +printf %s "checking for libcsplit_narrow_split_string_free in -lcsplit... " >&6; } +if test ${ac_cv_lib_csplit_libcsplit_narrow_split_string_free+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcsplit $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -29530,40 +32810,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcsplit_narrow_split_string_free (); int -main () +main (void) { return libcsplit_narrow_split_string_free (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_csplit_libcsplit_narrow_split_string_free=yes -else +else $as_nop ac_cv_lib_csplit_libcsplit_narrow_split_string_free=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_narrow_split_string_free" >&5 -$as_echo "$ac_cv_lib_csplit_libcsplit_narrow_split_string_free" >&6; } -if test "x$ac_cv_lib_csplit_libcsplit_narrow_split_string_free" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_narrow_split_string_free" >&5 +printf "%s\n" "$ac_cv_lib_csplit_libcsplit_narrow_split_string_free" >&6; } +if test "x$ac_cv_lib_csplit_libcsplit_narrow_split_string_free" = xyes +then : ac_cv_libcsplit_dummy=yes -else +else $as_nop ac_cv_libcsplit=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcsplit_narrow_split_string_get_string in -lcsplit" >&5 -$as_echo_n "checking for libcsplit_narrow_split_string_get_string in -lcsplit... " >&6; } -if ${ac_cv_lib_csplit_libcsplit_narrow_split_string_get_string+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcsplit_narrow_split_string_get_string in -lcsplit" >&5 +printf %s "checking for libcsplit_narrow_split_string_get_string in -lcsplit... " >&6; } +if test ${ac_cv_lib_csplit_libcsplit_narrow_split_string_get_string+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcsplit $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -29572,40 +32852,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcsplit_narrow_split_string_get_string (); int -main () +main (void) { return libcsplit_narrow_split_string_get_string (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_csplit_libcsplit_narrow_split_string_get_string=yes -else +else $as_nop ac_cv_lib_csplit_libcsplit_narrow_split_string_get_string=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_narrow_split_string_get_string" >&5 -$as_echo "$ac_cv_lib_csplit_libcsplit_narrow_split_string_get_string" >&6; } -if test "x$ac_cv_lib_csplit_libcsplit_narrow_split_string_get_string" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_narrow_split_string_get_string" >&5 +printf "%s\n" "$ac_cv_lib_csplit_libcsplit_narrow_split_string_get_string" >&6; } +if test "x$ac_cv_lib_csplit_libcsplit_narrow_split_string_get_string" = xyes +then : ac_cv_libcsplit_dummy=yes -else +else $as_nop ac_cv_libcsplit=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcsplit_narrow_split_string_get_number_of_segments in -lcsplit" >&5 -$as_echo_n "checking for libcsplit_narrow_split_string_get_number_of_segments in -lcsplit... " >&6; } -if ${ac_cv_lib_csplit_libcsplit_narrow_split_string_get_number_of_segments+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcsplit_narrow_split_string_get_number_of_segments in -lcsplit" >&5 +printf %s "checking for libcsplit_narrow_split_string_get_number_of_segments in -lcsplit... " >&6; } +if test ${ac_cv_lib_csplit_libcsplit_narrow_split_string_get_number_of_segments+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcsplit $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -29614,40 +32894,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcsplit_narrow_split_string_get_number_of_segments (); int -main () +main (void) { return libcsplit_narrow_split_string_get_number_of_segments (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_csplit_libcsplit_narrow_split_string_get_number_of_segments=yes -else +else $as_nop ac_cv_lib_csplit_libcsplit_narrow_split_string_get_number_of_segments=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_narrow_split_string_get_number_of_segments" >&5 -$as_echo "$ac_cv_lib_csplit_libcsplit_narrow_split_string_get_number_of_segments" >&6; } -if test "x$ac_cv_lib_csplit_libcsplit_narrow_split_string_get_number_of_segments" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_narrow_split_string_get_number_of_segments" >&5 +printf "%s\n" "$ac_cv_lib_csplit_libcsplit_narrow_split_string_get_number_of_segments" >&6; } +if test "x$ac_cv_lib_csplit_libcsplit_narrow_split_string_get_number_of_segments" = xyes +then : ac_cv_libcsplit_dummy=yes -else +else $as_nop ac_cv_libcsplit=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcsplit_narrow_split_string_get_segment_by_index in -lcsplit" >&5 -$as_echo_n "checking for libcsplit_narrow_split_string_get_segment_by_index in -lcsplit... " >&6; } -if ${ac_cv_lib_csplit_libcsplit_narrow_split_string_get_segment_by_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcsplit_narrow_split_string_get_segment_by_index in -lcsplit" >&5 +printf %s "checking for libcsplit_narrow_split_string_get_segment_by_index in -lcsplit... " >&6; } +if test ${ac_cv_lib_csplit_libcsplit_narrow_split_string_get_segment_by_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcsplit $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -29656,40 +32936,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcsplit_narrow_split_string_get_segment_by_index (); int -main () +main (void) { return libcsplit_narrow_split_string_get_segment_by_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_csplit_libcsplit_narrow_split_string_get_segment_by_index=yes -else +else $as_nop ac_cv_lib_csplit_libcsplit_narrow_split_string_get_segment_by_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_narrow_split_string_get_segment_by_index" >&5 -$as_echo "$ac_cv_lib_csplit_libcsplit_narrow_split_string_get_segment_by_index" >&6; } -if test "x$ac_cv_lib_csplit_libcsplit_narrow_split_string_get_segment_by_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_narrow_split_string_get_segment_by_index" >&5 +printf "%s\n" "$ac_cv_lib_csplit_libcsplit_narrow_split_string_get_segment_by_index" >&6; } +if test "x$ac_cv_lib_csplit_libcsplit_narrow_split_string_get_segment_by_index" = xyes +then : ac_cv_libcsplit_dummy=yes -else +else $as_nop ac_cv_libcsplit=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcsplit_narrow_split_string_set_segment_by_index in -lcsplit" >&5 -$as_echo_n "checking for libcsplit_narrow_split_string_set_segment_by_index in -lcsplit... " >&6; } -if ${ac_cv_lib_csplit_libcsplit_narrow_split_string_set_segment_by_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcsplit_narrow_split_string_set_segment_by_index in -lcsplit" >&5 +printf %s "checking for libcsplit_narrow_split_string_set_segment_by_index in -lcsplit... " >&6; } +if test ${ac_cv_lib_csplit_libcsplit_narrow_split_string_set_segment_by_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcsplit $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -29698,42 +32978,43 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcsplit_narrow_split_string_set_segment_by_index (); int -main () +main (void) { return libcsplit_narrow_split_string_set_segment_by_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_csplit_libcsplit_narrow_split_string_set_segment_by_index=yes -else +else $as_nop ac_cv_lib_csplit_libcsplit_narrow_split_string_set_segment_by_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_narrow_split_string_set_segment_by_index" >&5 -$as_echo "$ac_cv_lib_csplit_libcsplit_narrow_split_string_set_segment_by_index" >&6; } -if test "x$ac_cv_lib_csplit_libcsplit_narrow_split_string_set_segment_by_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_narrow_split_string_set_segment_by_index" >&5 +printf "%s\n" "$ac_cv_lib_csplit_libcsplit_narrow_split_string_set_segment_by_index" >&6; } +if test "x$ac_cv_lib_csplit_libcsplit_narrow_split_string_set_segment_by_index" = xyes +then : ac_cv_libcsplit_dummy=yes -else +else $as_nop ac_cv_libcsplit=no fi - if test "x$ac_cv_enable_wide_character_type" != xno; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcsplit_wide_string_split in -lcsplit" >&5 -$as_echo_n "checking for libcsplit_wide_string_split in -lcsplit... " >&6; } -if ${ac_cv_lib_csplit_libcsplit_wide_string_split+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test "x$ac_cv_enable_wide_character_type" != xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcsplit_wide_string_split in -lcsplit" >&5 +printf %s "checking for libcsplit_wide_string_split in -lcsplit... " >&6; } +if test ${ac_cv_lib_csplit_libcsplit_wide_string_split+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcsplit $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -29742,41 +33023,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcsplit_wide_string_split (); int -main () +main (void) { return libcsplit_wide_string_split (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_csplit_libcsplit_wide_string_split=yes -else +else $as_nop ac_cv_lib_csplit_libcsplit_wide_string_split=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_wide_string_split" >&5 -$as_echo "$ac_cv_lib_csplit_libcsplit_wide_string_split" >&6; } -if test "x$ac_cv_lib_csplit_libcsplit_wide_string_split" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_wide_string_split" >&5 +printf "%s\n" "$ac_cv_lib_csplit_libcsplit_wide_string_split" >&6; } +if test "x$ac_cv_lib_csplit_libcsplit_wide_string_split" = xyes +then : ac_cv_libcsplit_dummy=yes -else +else $as_nop ac_cv_libcsplit=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcsplit_wide_split_string_free in -lcsplit" >&5 -$as_echo_n "checking for libcsplit_wide_split_string_free in -lcsplit... " >&6; } -if ${ac_cv_lib_csplit_libcsplit_wide_split_string_free+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcsplit_wide_split_string_free in -lcsplit" >&5 +printf %s "checking for libcsplit_wide_split_string_free in -lcsplit... " >&6; } +if test ${ac_cv_lib_csplit_libcsplit_wide_split_string_free+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcsplit $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -29785,40 +33066,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcsplit_wide_split_string_free (); int -main () +main (void) { return libcsplit_wide_split_string_free (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_csplit_libcsplit_wide_split_string_free=yes -else +else $as_nop ac_cv_lib_csplit_libcsplit_wide_split_string_free=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_wide_split_string_free" >&5 -$as_echo "$ac_cv_lib_csplit_libcsplit_wide_split_string_free" >&6; } -if test "x$ac_cv_lib_csplit_libcsplit_wide_split_string_free" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_wide_split_string_free" >&5 +printf "%s\n" "$ac_cv_lib_csplit_libcsplit_wide_split_string_free" >&6; } +if test "x$ac_cv_lib_csplit_libcsplit_wide_split_string_free" = xyes +then : ac_cv_libcsplit_dummy=yes -else +else $as_nop ac_cv_libcsplit=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcsplit_wide_split_string_get_string in -lcsplit" >&5 -$as_echo_n "checking for libcsplit_wide_split_string_get_string in -lcsplit... " >&6; } -if ${ac_cv_lib_csplit_libcsplit_wide_split_string_get_string+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcsplit_wide_split_string_get_string in -lcsplit" >&5 +printf %s "checking for libcsplit_wide_split_string_get_string in -lcsplit... " >&6; } +if test ${ac_cv_lib_csplit_libcsplit_wide_split_string_get_string+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcsplit $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -29827,40 +33108,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcsplit_wide_split_string_get_string (); int -main () +main (void) { return libcsplit_wide_split_string_get_string (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_csplit_libcsplit_wide_split_string_get_string=yes -else +else $as_nop ac_cv_lib_csplit_libcsplit_wide_split_string_get_string=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_wide_split_string_get_string" >&5 -$as_echo "$ac_cv_lib_csplit_libcsplit_wide_split_string_get_string" >&6; } -if test "x$ac_cv_lib_csplit_libcsplit_wide_split_string_get_string" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_wide_split_string_get_string" >&5 +printf "%s\n" "$ac_cv_lib_csplit_libcsplit_wide_split_string_get_string" >&6; } +if test "x$ac_cv_lib_csplit_libcsplit_wide_split_string_get_string" = xyes +then : ac_cv_libcsplit_dummy=yes -else +else $as_nop ac_cv_libcsplit=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcsplit_wide_split_string_get_number_of_segments in -lcsplit" >&5 -$as_echo_n "checking for libcsplit_wide_split_string_get_number_of_segments in -lcsplit... " >&6; } -if ${ac_cv_lib_csplit_libcsplit_wide_split_string_get_number_of_segments+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcsplit_wide_split_string_get_number_of_segments in -lcsplit" >&5 +printf %s "checking for libcsplit_wide_split_string_get_number_of_segments in -lcsplit... " >&6; } +if test ${ac_cv_lib_csplit_libcsplit_wide_split_string_get_number_of_segments+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcsplit $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -29869,40 +33150,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcsplit_wide_split_string_get_number_of_segments (); int -main () +main (void) { return libcsplit_wide_split_string_get_number_of_segments (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_csplit_libcsplit_wide_split_string_get_number_of_segments=yes -else +else $as_nop ac_cv_lib_csplit_libcsplit_wide_split_string_get_number_of_segments=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_wide_split_string_get_number_of_segments" >&5 -$as_echo "$ac_cv_lib_csplit_libcsplit_wide_split_string_get_number_of_segments" >&6; } -if test "x$ac_cv_lib_csplit_libcsplit_wide_split_string_get_number_of_segments" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_wide_split_string_get_number_of_segments" >&5 +printf "%s\n" "$ac_cv_lib_csplit_libcsplit_wide_split_string_get_number_of_segments" >&6; } +if test "x$ac_cv_lib_csplit_libcsplit_wide_split_string_get_number_of_segments" = xyes +then : ac_cv_libcsplit_dummy=yes -else +else $as_nop ac_cv_libcsplit=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcsplit_wide_split_string_get_segment_by_index in -lcsplit" >&5 -$as_echo_n "checking for libcsplit_wide_split_string_get_segment_by_index in -lcsplit... " >&6; } -if ${ac_cv_lib_csplit_libcsplit_wide_split_string_get_segment_by_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcsplit_wide_split_string_get_segment_by_index in -lcsplit" >&5 +printf %s "checking for libcsplit_wide_split_string_get_segment_by_index in -lcsplit... " >&6; } +if test ${ac_cv_lib_csplit_libcsplit_wide_split_string_get_segment_by_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcsplit $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -29911,40 +33192,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcsplit_wide_split_string_get_segment_by_index (); int -main () +main (void) { return libcsplit_wide_split_string_get_segment_by_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_csplit_libcsplit_wide_split_string_get_segment_by_index=yes -else +else $as_nop ac_cv_lib_csplit_libcsplit_wide_split_string_get_segment_by_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_wide_split_string_get_segment_by_index" >&5 -$as_echo "$ac_cv_lib_csplit_libcsplit_wide_split_string_get_segment_by_index" >&6; } -if test "x$ac_cv_lib_csplit_libcsplit_wide_split_string_get_segment_by_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_wide_split_string_get_segment_by_index" >&5 +printf "%s\n" "$ac_cv_lib_csplit_libcsplit_wide_split_string_get_segment_by_index" >&6; } +if test "x$ac_cv_lib_csplit_libcsplit_wide_split_string_get_segment_by_index" = xyes +then : ac_cv_libcsplit_dummy=yes -else +else $as_nop ac_cv_libcsplit=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcsplit_wide_split_string_set_segment_by_index in -lcsplit" >&5 -$as_echo_n "checking for libcsplit_wide_split_string_set_segment_by_index in -lcsplit... " >&6; } -if ${ac_cv_lib_csplit_libcsplit_wide_split_string_set_segment_by_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcsplit_wide_split_string_set_segment_by_index in -lcsplit" >&5 +printf %s "checking for libcsplit_wide_split_string_set_segment_by_index in -lcsplit... " >&6; } +if test ${ac_cv_lib_csplit_libcsplit_wide_split_string_set_segment_by_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcsplit $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -29953,32 +33234,31 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcsplit_wide_split_string_set_segment_by_index (); int -main () +main (void) { return libcsplit_wide_split_string_set_segment_by_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_csplit_libcsplit_wide_split_string_set_segment_by_index=yes -else +else $as_nop ac_cv_lib_csplit_libcsplit_wide_split_string_set_segment_by_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_wide_split_string_set_segment_by_index" >&5 -$as_echo "$ac_cv_lib_csplit_libcsplit_wide_split_string_set_segment_by_index" >&6; } -if test "x$ac_cv_lib_csplit_libcsplit_wide_split_string_set_segment_by_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_wide_split_string_set_segment_by_index" >&5 +printf "%s\n" "$ac_cv_lib_csplit_libcsplit_wide_split_string_set_segment_by_index" >&6; } +if test "x$ac_cv_lib_csplit_libcsplit_wide_split_string_set_segment_by_index" = xyes +then : ac_cv_libcsplit_dummy=yes -else +else $as_nop ac_cv_libcsplit=no fi @@ -29989,9 +33269,10 @@ fi fi - if test "x$ac_cv_with_libcsplit" != x && test "x$ac_cv_with_libcsplit" != xauto-detect && test "x$ac_cv_libcsplit" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_with_libcsplit" != x && test "x$ac_cv_with_libcsplit" != xauto-detect && test "x$ac_cv_libcsplit" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "unable to find supported libcsplit in directory: $ac_cv_with_libcsplit See \`config.log' for more details" "$LINENO" 5; } @@ -29999,24 +33280,27 @@ fi - if test "x$ac_cv_libcsplit" = xyes; then : + if test "x$ac_cv_libcsplit" = xyes +then : -$as_echo "#define HAVE_LIBCSPLIT 1" >>confdefs.h +printf "%s\n" "#define HAVE_LIBCSPLIT 1" >>confdefs.h fi - if test "x$ac_cv_libcsplit" = xyes; then : + if test "x$ac_cv_libcsplit" = xyes +then : HAVE_LIBCSPLIT=1 -else +else $as_nop HAVE_LIBCSPLIT=0 fi - if test "x$ac_cv_libcsplit" != xyes; then : + if test "x$ac_cv_libcsplit" != xyes +then : ac_cv_libcsplit_CPPFLAGS="-I../libcsplit"; ac_cv_libcsplit_LIBADD="../libcsplit/libcsplit.la"; @@ -30025,7 +33309,7 @@ -$as_echo "#define HAVE_LOCAL_LIBCSPLIT 1" >>confdefs.h +printf "%s\n" "#define HAVE_LOCAL_LIBCSPLIT 1" >>confdefs.h HAVE_LOCAL_LIBCSPLIT=1 @@ -30040,24 +33324,28 @@ HAVE_LOCAL_LIBCSPLIT_FALSE= fi - if test "x$ac_cv_libcsplit_CPPFLAGS" != "x"; then : + if test "x$ac_cv_libcsplit_CPPFLAGS" != "x" +then : LIBCSPLIT_CPPFLAGS=$ac_cv_libcsplit_CPPFLAGS fi - if test "x$ac_cv_libcsplit_LIBADD" != "x"; then : + if test "x$ac_cv_libcsplit_LIBADD" != "x" +then : LIBCSPLIT_LIBADD=$ac_cv_libcsplit_LIBADD fi - if test "x$ac_cv_libcsplit" = xyes; then : + if test "x$ac_cv_libcsplit" = xyes +then : ax_libcsplit_pc_libs_private=-lcsplit fi - if test "x$ac_cv_libcsplit" = xyes; then : + if test "x$ac_cv_libcsplit" = xyes +then : ax_libcsplit_spec_requires=libcsplit ax_libcsplit_spec_build_requires=libcsplit-devel @@ -30069,55 +33357,61 @@ # Check whether --with-libuna was given. -if test "${with_libuna+set}" = set; then : +if test ${with_libuna+y} +then : withval=$with_libuna; ac_cv_with_libuna=$withval -else +else $as_nop ac_cv_with_libuna=auto-detect fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libuna in includedir and libdir or in the specified DIR, or no if to use local version" >&5 -$as_echo_n "checking whether to use search for libuna in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } -if ${ac_cv_with_libuna+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use search for libuna in includedir and libdir or in the specified DIR, or no if to use local version" >&5 +printf %s "checking whether to use search for libuna in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } +if test ${ac_cv_with_libuna+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_with_libuna=auto-detect fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libuna" >&5 -$as_echo "$ac_cv_with_libuna" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libuna" >&5 +printf "%s\n" "$ac_cv_with_libuna" >&6; } - if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libuna" = xno; then : + if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libuna" = xno +then : ac_cv_libuna=no -else +else $as_nop ac_cv_libuna=check - if test "x$ac_cv_with_libuna" != x && test "x$ac_cv_with_libuna" != xauto-detect; then : - if test -d "$ac_cv_with_libuna"; then : + if test "x$ac_cv_with_libuna" != x && test "x$ac_cv_with_libuna" != xauto-detect +then : + if test -d "$ac_cv_with_libuna" +then : CFLAGS="$CFLAGS -I${ac_cv_with_libuna}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libuna}/lib" -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "no such directory: $ac_cv_with_libuna See \`config.log' for more details" "$LINENO" 5; } fi -else - if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : +else $as_nop + if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x" +then : pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna" >&5 -$as_echo_n "checking for libuna... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna >= 20230702" >&5 +printf %s "checking for libuna >= 20230702... " >&6; } if test -n "$libuna_CFLAGS"; then pkg_cv_libuna_CFLAGS="$libuna_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libuna >= 20200711\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libuna >= 20200711") 2>&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libuna >= 20230702\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libuna >= 20230702") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_libuna_CFLAGS=`$PKG_CONFIG --cflags "libuna >= 20200711" 2>/dev/null` + pkg_cv_libuna_CFLAGS=`$PKG_CONFIG --cflags "libuna >= 20230702" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -30129,12 +33423,12 @@ pkg_cv_libuna_LIBS="$libuna_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libuna >= 20200711\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libuna >= 20200711") 2>&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libuna >= 20230702\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libuna >= 20230702") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_libuna_LIBS=`$PKG_CONFIG --libs "libuna >= 20200711" 2>/dev/null` + pkg_cv_libuna_LIBS=`$PKG_CONFIG --libs "libuna >= 20230702" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -30146,8 +33440,8 @@ if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -30155,58 +33449,57 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - libuna_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libuna >= 20200711" 2>&1` + libuna_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libuna >= 20230702" 2>&1` else - libuna_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libuna >= 20200711" 2>&1` + libuna_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libuna >= 20230702" 2>&1` fi - # Put the nasty error message in config.log where it belongs - echo "$libuna_PKG_ERRORS" >&5 + # Put the nasty error message in config.log where it belongs + echo "$libuna_PKG_ERRORS" >&5 - ac_cv_libuna=check + ac_cv_libuna=check elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ac_cv_libuna=check + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ac_cv_libuna=check else - libuna_CFLAGS=$pkg_cv_libuna_CFLAGS - libuna_LIBS=$pkg_cv_libuna_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ac_cv_libuna=yes + libuna_CFLAGS=$pkg_cv_libuna_CFLAGS + libuna_LIBS=$pkg_cv_libuna_LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + ac_cv_libuna=yes fi fi - if test "x$ac_cv_libuna" = xyes; then : + if test "x$ac_cv_libuna" = xyes +then : ac_cv_libuna_CPPFLAGS="$pkg_cv_libuna_CFLAGS" ac_cv_libuna_LIBADD="$pkg_cv_libuna_LIBS" fi fi - if test "x$ac_cv_libuna" = xcheck; then : - for ac_header in libuna.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "libuna.h" "ac_cv_header_libuna_h" "$ac_includes_default" -if test "x$ac_cv_header_libuna_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBUNA_H 1 -_ACEOF + if test "x$ac_cv_libuna" = xcheck +then : + ac_fn_c_check_header_compile "$LINENO" "libuna.h" "ac_cv_header_libuna_h" "$ac_includes_default" +if test "x$ac_cv_header_libuna_h" = xyes +then : + printf "%s\n" "#define HAVE_LIBUNA_H 1" >>confdefs.h fi -done - - if test "x$ac_cv_header_libuna_h" = xno; then : + if test "x$ac_cv_header_libuna_h" = xno +then : ac_cv_libuna=no -else +else $as_nop ac_cv_libuna=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_get_version in -luna" >&5 -$as_echo_n "checking for libuna_get_version in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_get_version+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_get_version in -luna" >&5 +printf %s "checking for libuna_get_version in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_get_version+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -30215,41 +33508,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_get_version (); int -main () +main (void) { return libuna_get_version (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_get_version=yes -else +else $as_nop ac_cv_lib_una_libuna_get_version=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_get_version" >&5 -$as_echo "$ac_cv_lib_una_libuna_get_version" >&6; } -if test "x$ac_cv_lib_una_libuna_get_version" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_get_version" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_get_version" >&6; } +if test "x$ac_cv_lib_una_libuna_get_version" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base16_stream_size_to_byte_stream in -luna" >&5 -$as_echo_n "checking for libuna_base16_stream_size_to_byte_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_base16_stream_size_to_byte_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_base16_stream_size_to_byte_stream in -luna" >&5 +printf %s "checking for libuna_base16_stream_size_to_byte_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_base16_stream_size_to_byte_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -30258,40 +33551,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_base16_stream_size_to_byte_stream (); int -main () +main (void) { return libuna_base16_stream_size_to_byte_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_base16_stream_size_to_byte_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_base16_stream_size_to_byte_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base16_stream_size_to_byte_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_base16_stream_size_to_byte_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_base16_stream_size_to_byte_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base16_stream_size_to_byte_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_base16_stream_size_to_byte_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_base16_stream_size_to_byte_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base16_stream_copy_to_byte_stream in -luna" >&5 -$as_echo_n "checking for libuna_base16_stream_copy_to_byte_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_base16_stream_copy_to_byte_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_base16_stream_copy_to_byte_stream in -luna" >&5 +printf %s "checking for libuna_base16_stream_copy_to_byte_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_base16_stream_copy_to_byte_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -30300,40 +33593,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_base16_stream_copy_to_byte_stream (); int -main () +main (void) { return libuna_base16_stream_copy_to_byte_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_base16_stream_copy_to_byte_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_base16_stream_copy_to_byte_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base16_stream_copy_to_byte_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_base16_stream_copy_to_byte_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_base16_stream_copy_to_byte_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base16_stream_copy_to_byte_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_base16_stream_copy_to_byte_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_base16_stream_copy_to_byte_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base16_stream_size_from_byte_stream in -luna" >&5 -$as_echo_n "checking for libuna_base16_stream_size_from_byte_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_base16_stream_size_from_byte_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_base16_stream_size_from_byte_stream in -luna" >&5 +printf %s "checking for libuna_base16_stream_size_from_byte_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_base16_stream_size_from_byte_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -30342,40 +33635,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_base16_stream_size_from_byte_stream (); int -main () +main (void) { return libuna_base16_stream_size_from_byte_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_base16_stream_size_from_byte_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_base16_stream_size_from_byte_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base16_stream_size_from_byte_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_base16_stream_size_from_byte_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_base16_stream_size_from_byte_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base16_stream_size_from_byte_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_base16_stream_size_from_byte_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_base16_stream_size_from_byte_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base16_stream_copy_from_byte_stream in -luna" >&5 -$as_echo_n "checking for libuna_base16_stream_copy_from_byte_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_base16_stream_copy_from_byte_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_base16_stream_copy_from_byte_stream in -luna" >&5 +printf %s "checking for libuna_base16_stream_copy_from_byte_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_base16_stream_copy_from_byte_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -30384,40 +33677,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_base16_stream_copy_from_byte_stream (); int -main () +main (void) { return libuna_base16_stream_copy_from_byte_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_base16_stream_copy_from_byte_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_base16_stream_copy_from_byte_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base16_stream_copy_from_byte_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_base16_stream_copy_from_byte_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_base16_stream_copy_from_byte_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base16_stream_copy_from_byte_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_base16_stream_copy_from_byte_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_base16_stream_copy_from_byte_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base16_stream_with_index_copy_from_byte_stream in -luna" >&5 -$as_echo_n "checking for libuna_base16_stream_with_index_copy_from_byte_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_base16_stream_with_index_copy_from_byte_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_base16_stream_with_index_copy_from_byte_stream in -luna" >&5 +printf %s "checking for libuna_base16_stream_with_index_copy_from_byte_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_base16_stream_with_index_copy_from_byte_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -30426,41 +33719,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_base16_stream_with_index_copy_from_byte_stream (); int -main () +main (void) { return libuna_base16_stream_with_index_copy_from_byte_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_base16_stream_with_index_copy_from_byte_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_base16_stream_with_index_copy_from_byte_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base16_stream_with_index_copy_from_byte_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_base16_stream_with_index_copy_from_byte_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_base16_stream_with_index_copy_from_byte_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base16_stream_with_index_copy_from_byte_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_base16_stream_with_index_copy_from_byte_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_base16_stream_with_index_copy_from_byte_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base32_quintuplet_copy_from_base32_stream in -luna" >&5 -$as_echo_n "checking for libuna_base32_quintuplet_copy_from_base32_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_base32_quintuplet_copy_from_base32_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_base32_quintuplet_copy_from_base32_stream in -luna" >&5 +printf %s "checking for libuna_base32_quintuplet_copy_from_base32_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_base32_quintuplet_copy_from_base32_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -30469,40 +33762,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_base32_quintuplet_copy_from_base32_stream (); int -main () +main (void) { return libuna_base32_quintuplet_copy_from_base32_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_base32_quintuplet_copy_from_base32_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_base32_quintuplet_copy_from_base32_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base32_quintuplet_copy_from_base32_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_base32_quintuplet_copy_from_base32_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_base32_quintuplet_copy_from_base32_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base32_quintuplet_copy_from_base32_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_base32_quintuplet_copy_from_base32_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_base32_quintuplet_copy_from_base32_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base32_quintuplet_copy_to_base32_stream in -luna" >&5 -$as_echo_n "checking for libuna_base32_quintuplet_copy_to_base32_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_base32_quintuplet_copy_to_base32_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_base32_quintuplet_copy_to_base32_stream in -luna" >&5 +printf %s "checking for libuna_base32_quintuplet_copy_to_base32_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_base32_quintuplet_copy_to_base32_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -30511,40 +33804,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_base32_quintuplet_copy_to_base32_stream (); int -main () +main (void) { return libuna_base32_quintuplet_copy_to_base32_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_base32_quintuplet_copy_to_base32_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_base32_quintuplet_copy_to_base32_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base32_quintuplet_copy_to_base32_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_base32_quintuplet_copy_to_base32_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_base32_quintuplet_copy_to_base32_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base32_quintuplet_copy_to_base32_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_base32_quintuplet_copy_to_base32_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_base32_quintuplet_copy_to_base32_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base32_quintuplet_copy_from_byte_stream in -luna" >&5 -$as_echo_n "checking for libuna_base32_quintuplet_copy_from_byte_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_base32_quintuplet_copy_from_byte_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_base32_quintuplet_copy_from_byte_stream in -luna" >&5 +printf %s "checking for libuna_base32_quintuplet_copy_from_byte_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_base32_quintuplet_copy_from_byte_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -30553,40 +33846,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_base32_quintuplet_copy_from_byte_stream (); int -main () +main (void) { return libuna_base32_quintuplet_copy_from_byte_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_base32_quintuplet_copy_from_byte_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_base32_quintuplet_copy_from_byte_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base32_quintuplet_copy_from_byte_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_base32_quintuplet_copy_from_byte_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_base32_quintuplet_copy_from_byte_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base32_quintuplet_copy_from_byte_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_base32_quintuplet_copy_from_byte_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_base32_quintuplet_copy_from_byte_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base32_quintuplet_copy_to_byte_stream in -luna" >&5 -$as_echo_n "checking for libuna_base32_quintuplet_copy_to_byte_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_base32_quintuplet_copy_to_byte_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_base32_quintuplet_copy_to_byte_stream in -luna" >&5 +printf %s "checking for libuna_base32_quintuplet_copy_to_byte_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_base32_quintuplet_copy_to_byte_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -30595,41 +33888,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_base32_quintuplet_copy_to_byte_stream (); int -main () +main (void) { return libuna_base32_quintuplet_copy_to_byte_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_base32_quintuplet_copy_to_byte_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_base32_quintuplet_copy_to_byte_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base32_quintuplet_copy_to_byte_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_base32_quintuplet_copy_to_byte_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_base32_quintuplet_copy_to_byte_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base32_quintuplet_copy_to_byte_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_base32_quintuplet_copy_to_byte_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_base32_quintuplet_copy_to_byte_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base32_stream_size_to_byte_stream in -luna" >&5 -$as_echo_n "checking for libuna_base32_stream_size_to_byte_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_base32_stream_size_to_byte_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_base32_stream_size_to_byte_stream in -luna" >&5 +printf %s "checking for libuna_base32_stream_size_to_byte_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_base32_stream_size_to_byte_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -30638,40 +33931,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_base32_stream_size_to_byte_stream (); int -main () +main (void) { return libuna_base32_stream_size_to_byte_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_base32_stream_size_to_byte_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_base32_stream_size_to_byte_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base32_stream_size_to_byte_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_base32_stream_size_to_byte_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_base32_stream_size_to_byte_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base32_stream_size_to_byte_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_base32_stream_size_to_byte_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_base32_stream_size_to_byte_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base32_stream_copy_to_byte_stream in -luna" >&5 -$as_echo_n "checking for libuna_base32_stream_copy_to_byte_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_base32_stream_copy_to_byte_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_base32_stream_copy_to_byte_stream in -luna" >&5 +printf %s "checking for libuna_base32_stream_copy_to_byte_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_base32_stream_copy_to_byte_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -30680,40 +33973,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_base32_stream_copy_to_byte_stream (); int -main () +main (void) { return libuna_base32_stream_copy_to_byte_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_base32_stream_copy_to_byte_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_base32_stream_copy_to_byte_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base32_stream_copy_to_byte_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_base32_stream_copy_to_byte_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_base32_stream_copy_to_byte_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base32_stream_copy_to_byte_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_base32_stream_copy_to_byte_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_base32_stream_copy_to_byte_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base32_stream_size_from_byte_stream in -luna" >&5 -$as_echo_n "checking for libuna_base32_stream_size_from_byte_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_base32_stream_size_from_byte_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_base32_stream_size_from_byte_stream in -luna" >&5 +printf %s "checking for libuna_base32_stream_size_from_byte_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_base32_stream_size_from_byte_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -30722,40 +34015,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_base32_stream_size_from_byte_stream (); int -main () +main (void) { return libuna_base32_stream_size_from_byte_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_base32_stream_size_from_byte_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_base32_stream_size_from_byte_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base32_stream_size_from_byte_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_base32_stream_size_from_byte_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_base32_stream_size_from_byte_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base32_stream_size_from_byte_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_base32_stream_size_from_byte_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_base32_stream_size_from_byte_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base32_stream_copy_from_byte_stream in -luna" >&5 -$as_echo_n "checking for libuna_base32_stream_copy_from_byte_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_base32_stream_copy_from_byte_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_base32_stream_copy_from_byte_stream in -luna" >&5 +printf %s "checking for libuna_base32_stream_copy_from_byte_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_base32_stream_copy_from_byte_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -30764,40 +34057,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_base32_stream_copy_from_byte_stream (); int -main () +main (void) { return libuna_base32_stream_copy_from_byte_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_base32_stream_copy_from_byte_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_base32_stream_copy_from_byte_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base32_stream_copy_from_byte_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_base32_stream_copy_from_byte_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_base32_stream_copy_from_byte_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base32_stream_copy_from_byte_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_base32_stream_copy_from_byte_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_base32_stream_copy_from_byte_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base32_stream_with_index_copy_from_byte_stream in -luna" >&5 -$as_echo_n "checking for libuna_base32_stream_with_index_copy_from_byte_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_base32_stream_with_index_copy_from_byte_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_base32_stream_with_index_copy_from_byte_stream in -luna" >&5 +printf %s "checking for libuna_base32_stream_with_index_copy_from_byte_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_base32_stream_with_index_copy_from_byte_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -30806,41 +34099,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_base32_stream_with_index_copy_from_byte_stream (); int -main () +main (void) { return libuna_base32_stream_with_index_copy_from_byte_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_base32_stream_with_index_copy_from_byte_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_base32_stream_with_index_copy_from_byte_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base32_stream_with_index_copy_from_byte_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_base32_stream_with_index_copy_from_byte_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_base32_stream_with_index_copy_from_byte_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base32_stream_with_index_copy_from_byte_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_base32_stream_with_index_copy_from_byte_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_base32_stream_with_index_copy_from_byte_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base64_triplet_copy_from_base64_stream in -luna" >&5 -$as_echo_n "checking for libuna_base64_triplet_copy_from_base64_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_base64_triplet_copy_from_base64_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_base64_triplet_copy_from_base64_stream in -luna" >&5 +printf %s "checking for libuna_base64_triplet_copy_from_base64_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_base64_triplet_copy_from_base64_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -30849,40 +34142,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_base64_triplet_copy_from_base64_stream (); int -main () +main (void) { return libuna_base64_triplet_copy_from_base64_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_base64_triplet_copy_from_base64_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_base64_triplet_copy_from_base64_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base64_triplet_copy_from_base64_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_base64_triplet_copy_from_base64_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_base64_triplet_copy_from_base64_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base64_triplet_copy_from_base64_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_base64_triplet_copy_from_base64_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_base64_triplet_copy_from_base64_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base64_triplet_copy_to_base64_stream in -luna" >&5 -$as_echo_n "checking for libuna_base64_triplet_copy_to_base64_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_base64_triplet_copy_to_base64_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_base64_triplet_copy_to_base64_stream in -luna" >&5 +printf %s "checking for libuna_base64_triplet_copy_to_base64_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_base64_triplet_copy_to_base64_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -30891,40 +34184,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_base64_triplet_copy_to_base64_stream (); int -main () +main (void) { return libuna_base64_triplet_copy_to_base64_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_base64_triplet_copy_to_base64_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_base64_triplet_copy_to_base64_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base64_triplet_copy_to_base64_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_base64_triplet_copy_to_base64_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_base64_triplet_copy_to_base64_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base64_triplet_copy_to_base64_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_base64_triplet_copy_to_base64_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_base64_triplet_copy_to_base64_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base64_triplet_copy_from_byte_stream in -luna" >&5 -$as_echo_n "checking for libuna_base64_triplet_copy_from_byte_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_base64_triplet_copy_from_byte_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_base64_triplet_copy_from_byte_stream in -luna" >&5 +printf %s "checking for libuna_base64_triplet_copy_from_byte_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_base64_triplet_copy_from_byte_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -30933,40 +34226,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_base64_triplet_copy_from_byte_stream (); int -main () +main (void) { return libuna_base64_triplet_copy_from_byte_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_base64_triplet_copy_from_byte_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_base64_triplet_copy_from_byte_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base64_triplet_copy_from_byte_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_base64_triplet_copy_from_byte_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_base64_triplet_copy_from_byte_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base64_triplet_copy_from_byte_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_base64_triplet_copy_from_byte_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_base64_triplet_copy_from_byte_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base64_triplet_copy_to_byte_stream in -luna" >&5 -$as_echo_n "checking for libuna_base64_triplet_copy_to_byte_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_base64_triplet_copy_to_byte_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_base64_triplet_copy_to_byte_stream in -luna" >&5 +printf %s "checking for libuna_base64_triplet_copy_to_byte_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_base64_triplet_copy_to_byte_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -30975,41 +34268,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_base64_triplet_copy_to_byte_stream (); int -main () +main (void) { return libuna_base64_triplet_copy_to_byte_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_base64_triplet_copy_to_byte_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_base64_triplet_copy_to_byte_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base64_triplet_copy_to_byte_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_base64_triplet_copy_to_byte_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_base64_triplet_copy_to_byte_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base64_triplet_copy_to_byte_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_base64_triplet_copy_to_byte_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_base64_triplet_copy_to_byte_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base64_stream_size_to_byte_stream in -luna" >&5 -$as_echo_n "checking for libuna_base64_stream_size_to_byte_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_base64_stream_size_to_byte_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_base64_stream_size_to_byte_stream in -luna" >&5 +printf %s "checking for libuna_base64_stream_size_to_byte_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_base64_stream_size_to_byte_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -31018,40 +34311,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_base64_stream_size_to_byte_stream (); int -main () +main (void) { return libuna_base64_stream_size_to_byte_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_base64_stream_size_to_byte_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_base64_stream_size_to_byte_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base64_stream_size_to_byte_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_base64_stream_size_to_byte_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_base64_stream_size_to_byte_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base64_stream_size_to_byte_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_base64_stream_size_to_byte_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_base64_stream_size_to_byte_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base64_stream_copy_to_byte_stream in -luna" >&5 -$as_echo_n "checking for libuna_base64_stream_copy_to_byte_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_base64_stream_copy_to_byte_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_base64_stream_copy_to_byte_stream in -luna" >&5 +printf %s "checking for libuna_base64_stream_copy_to_byte_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_base64_stream_copy_to_byte_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -31060,40 +34353,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_base64_stream_copy_to_byte_stream (); int -main () +main (void) { return libuna_base64_stream_copy_to_byte_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_base64_stream_copy_to_byte_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_base64_stream_copy_to_byte_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base64_stream_copy_to_byte_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_base64_stream_copy_to_byte_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_base64_stream_copy_to_byte_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base64_stream_copy_to_byte_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_base64_stream_copy_to_byte_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_base64_stream_copy_to_byte_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base64_stream_size_from_byte_stream in -luna" >&5 -$as_echo_n "checking for libuna_base64_stream_size_from_byte_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_base64_stream_size_from_byte_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_base64_stream_size_from_byte_stream in -luna" >&5 +printf %s "checking for libuna_base64_stream_size_from_byte_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_base64_stream_size_from_byte_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -31102,40 +34395,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_base64_stream_size_from_byte_stream (); int -main () +main (void) { return libuna_base64_stream_size_from_byte_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_base64_stream_size_from_byte_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_base64_stream_size_from_byte_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base64_stream_size_from_byte_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_base64_stream_size_from_byte_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_base64_stream_size_from_byte_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base64_stream_size_from_byte_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_base64_stream_size_from_byte_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_base64_stream_size_from_byte_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base64_stream_copy_from_byte_stream in -luna" >&5 -$as_echo_n "checking for libuna_base64_stream_copy_from_byte_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_base64_stream_copy_from_byte_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_base64_stream_copy_from_byte_stream in -luna" >&5 +printf %s "checking for libuna_base64_stream_copy_from_byte_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_base64_stream_copy_from_byte_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -31144,40 +34437,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_base64_stream_copy_from_byte_stream (); int -main () +main (void) { return libuna_base64_stream_copy_from_byte_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_base64_stream_copy_from_byte_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_base64_stream_copy_from_byte_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base64_stream_copy_from_byte_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_base64_stream_copy_from_byte_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_base64_stream_copy_from_byte_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base64_stream_copy_from_byte_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_base64_stream_copy_from_byte_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_base64_stream_copy_from_byte_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base64_stream_with_index_copy_from_byte_stream in -luna" >&5 -$as_echo_n "checking for libuna_base64_stream_with_index_copy_from_byte_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_base64_stream_with_index_copy_from_byte_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_base64_stream_with_index_copy_from_byte_stream in -luna" >&5 +printf %s "checking for libuna_base64_stream_with_index_copy_from_byte_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_base64_stream_with_index_copy_from_byte_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -31186,41 +34479,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_base64_stream_with_index_copy_from_byte_stream (); int -main () +main (void) { return libuna_base64_stream_with_index_copy_from_byte_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_base64_stream_with_index_copy_from_byte_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_base64_stream_with_index_copy_from_byte_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base64_stream_with_index_copy_from_byte_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_base64_stream_with_index_copy_from_byte_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_base64_stream_with_index_copy_from_byte_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base64_stream_with_index_copy_from_byte_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_base64_stream_with_index_copy_from_byte_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_base64_stream_with_index_copy_from_byte_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_byte_stream_size_from_utf8 in -luna" >&5 -$as_echo_n "checking for libuna_byte_stream_size_from_utf8 in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_byte_stream_size_from_utf8+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_byte_stream_size_from_utf8 in -luna" >&5 +printf %s "checking for libuna_byte_stream_size_from_utf8 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_byte_stream_size_from_utf8+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -31229,40 +34522,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_byte_stream_size_from_utf8 (); int -main () +main (void) { return libuna_byte_stream_size_from_utf8 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_byte_stream_size_from_utf8=yes -else +else $as_nop ac_cv_lib_una_libuna_byte_stream_size_from_utf8=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_byte_stream_size_from_utf8" >&5 -$as_echo "$ac_cv_lib_una_libuna_byte_stream_size_from_utf8" >&6; } -if test "x$ac_cv_lib_una_libuna_byte_stream_size_from_utf8" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_byte_stream_size_from_utf8" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_byte_stream_size_from_utf8" >&6; } +if test "x$ac_cv_lib_una_libuna_byte_stream_size_from_utf8" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_byte_stream_copy_from_utf8 in -luna" >&5 -$as_echo_n "checking for libuna_byte_stream_copy_from_utf8 in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_byte_stream_copy_from_utf8+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_byte_stream_copy_from_utf8 in -luna" >&5 +printf %s "checking for libuna_byte_stream_copy_from_utf8 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_byte_stream_copy_from_utf8+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -31271,40 +34564,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_byte_stream_copy_from_utf8 (); int -main () +main (void) { return libuna_byte_stream_copy_from_utf8 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_byte_stream_copy_from_utf8=yes -else +else $as_nop ac_cv_lib_una_libuna_byte_stream_copy_from_utf8=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_byte_stream_copy_from_utf8" >&5 -$as_echo "$ac_cv_lib_una_libuna_byte_stream_copy_from_utf8" >&6; } -if test "x$ac_cv_lib_una_libuna_byte_stream_copy_from_utf8" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_byte_stream_copy_from_utf8" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_byte_stream_copy_from_utf8" >&6; } +if test "x$ac_cv_lib_una_libuna_byte_stream_copy_from_utf8" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_byte_stream_size_from_utf16 in -luna" >&5 -$as_echo_n "checking for libuna_byte_stream_size_from_utf16 in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_byte_stream_size_from_utf16+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_byte_stream_size_from_utf16 in -luna" >&5 +printf %s "checking for libuna_byte_stream_size_from_utf16 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_byte_stream_size_from_utf16+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -31313,40 +34606,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_byte_stream_size_from_utf16 (); int -main () +main (void) { return libuna_byte_stream_size_from_utf16 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_byte_stream_size_from_utf16=yes -else +else $as_nop ac_cv_lib_una_libuna_byte_stream_size_from_utf16=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_byte_stream_size_from_utf16" >&5 -$as_echo "$ac_cv_lib_una_libuna_byte_stream_size_from_utf16" >&6; } -if test "x$ac_cv_lib_una_libuna_byte_stream_size_from_utf16" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_byte_stream_size_from_utf16" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_byte_stream_size_from_utf16" >&6; } +if test "x$ac_cv_lib_una_libuna_byte_stream_size_from_utf16" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_byte_stream_copy_from_utf16 in -luna" >&5 -$as_echo_n "checking for libuna_byte_stream_copy_from_utf16 in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_byte_stream_copy_from_utf16+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_byte_stream_copy_from_utf16 in -luna" >&5 +printf %s "checking for libuna_byte_stream_copy_from_utf16 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_byte_stream_copy_from_utf16+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -31355,40 +34648,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_byte_stream_copy_from_utf16 (); int -main () +main (void) { return libuna_byte_stream_copy_from_utf16 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_byte_stream_copy_from_utf16=yes -else +else $as_nop ac_cv_lib_una_libuna_byte_stream_copy_from_utf16=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_byte_stream_copy_from_utf16" >&5 -$as_echo "$ac_cv_lib_una_libuna_byte_stream_copy_from_utf16" >&6; } -if test "x$ac_cv_lib_una_libuna_byte_stream_copy_from_utf16" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_byte_stream_copy_from_utf16" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_byte_stream_copy_from_utf16" >&6; } +if test "x$ac_cv_lib_una_libuna_byte_stream_copy_from_utf16" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_byte_stream_size_from_utf32 in -luna" >&5 -$as_echo_n "checking for libuna_byte_stream_size_from_utf32 in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_byte_stream_size_from_utf32+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_byte_stream_size_from_utf32 in -luna" >&5 +printf %s "checking for libuna_byte_stream_size_from_utf32 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_byte_stream_size_from_utf32+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -31397,40 +34690,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_byte_stream_size_from_utf32 (); int -main () +main (void) { return libuna_byte_stream_size_from_utf32 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_byte_stream_size_from_utf32=yes -else +else $as_nop ac_cv_lib_una_libuna_byte_stream_size_from_utf32=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_byte_stream_size_from_utf32" >&5 -$as_echo "$ac_cv_lib_una_libuna_byte_stream_size_from_utf32" >&6; } -if test "x$ac_cv_lib_una_libuna_byte_stream_size_from_utf32" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_byte_stream_size_from_utf32" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_byte_stream_size_from_utf32" >&6; } +if test "x$ac_cv_lib_una_libuna_byte_stream_size_from_utf32" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_byte_stream_copy_from_utf32 in -luna" >&5 -$as_echo_n "checking for libuna_byte_stream_copy_from_utf32 in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_byte_stream_copy_from_utf32+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_byte_stream_copy_from_utf32 in -luna" >&5 +printf %s "checking for libuna_byte_stream_copy_from_utf32 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_byte_stream_copy_from_utf32+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -31439,41 +34732,1134 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_byte_stream_copy_from_utf32 (); int -main () +main (void) { return libuna_byte_stream_copy_from_utf32 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_byte_stream_copy_from_utf32=yes -else +else $as_nop ac_cv_lib_una_libuna_byte_stream_copy_from_utf32=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_byte_stream_copy_from_utf32" >&5 -$as_echo "$ac_cv_lib_una_libuna_byte_stream_copy_from_utf32" >&6; } -if test "x$ac_cv_lib_una_libuna_byte_stream_copy_from_utf32" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_byte_stream_copy_from_utf32" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_byte_stream_copy_from_utf32" >&6; } +if test "x$ac_cv_lib_una_libuna_byte_stream_copy_from_utf32" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_stream_size_from_utf8 in -luna" >&5 -$as_echo_n "checking for libuna_utf8_stream_size_from_utf8 in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf8_stream_size_from_utf8+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_size_to_byte_stream in -luna" >&5 +printf %s "checking for libuna_unicode_character_size_to_byte_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_unicode_character_size_to_byte_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-luna $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libuna_unicode_character_size_to_byte_stream (); +int +main (void) +{ +return libuna_unicode_character_size_to_byte_stream (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_unicode_character_size_to_byte_stream=yes +else $as_nop + ac_cv_lib_una_libuna_unicode_character_size_to_byte_stream=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_size_to_byte_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_size_to_byte_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_unicode_character_size_to_byte_stream" = xyes +then : + ac_cv_libuna_dummy=yes +else $as_nop + ac_cv_libuna=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_copy_from_byte_stream in -luna" >&5 +printf %s "checking for libuna_unicode_character_copy_from_byte_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_unicode_character_copy_from_byte_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-luna $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libuna_unicode_character_copy_from_byte_stream (); +int +main (void) +{ +return libuna_unicode_character_copy_from_byte_stream (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_unicode_character_copy_from_byte_stream=yes +else $as_nop + ac_cv_lib_una_libuna_unicode_character_copy_from_byte_stream=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_copy_from_byte_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_copy_from_byte_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_unicode_character_copy_from_byte_stream" = xyes +then : + ac_cv_libuna_dummy=yes +else $as_nop + ac_cv_libuna=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_copy_to_byte_stream in -luna" >&5 +printf %s "checking for libuna_unicode_character_copy_to_byte_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_unicode_character_copy_to_byte_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-luna $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libuna_unicode_character_copy_to_byte_stream (); +int +main (void) +{ +return libuna_unicode_character_copy_to_byte_stream (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_unicode_character_copy_to_byte_stream=yes +else $as_nop + ac_cv_lib_una_libuna_unicode_character_copy_to_byte_stream=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_copy_to_byte_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_copy_to_byte_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_unicode_character_copy_to_byte_stream" = xyes +then : + ac_cv_libuna_dummy=yes +else $as_nop + ac_cv_libuna=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_size_to_ucs2 in -luna" >&5 +printf %s "checking for libuna_unicode_character_size_to_ucs2 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_unicode_character_size_to_ucs2+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-luna $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libuna_unicode_character_size_to_ucs2 (); +int +main (void) +{ +return libuna_unicode_character_size_to_ucs2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_unicode_character_size_to_ucs2=yes +else $as_nop + ac_cv_lib_una_libuna_unicode_character_size_to_ucs2=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_size_to_ucs2" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_size_to_ucs2" >&6; } +if test "x$ac_cv_lib_una_libuna_unicode_character_size_to_ucs2" = xyes +then : + ac_cv_libuna_dummy=yes +else $as_nop + ac_cv_libuna=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_copy_from_ucs2 in -luna" >&5 +printf %s "checking for libuna_unicode_character_copy_from_ucs2 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_unicode_character_copy_from_ucs2+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-luna $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libuna_unicode_character_copy_from_ucs2 (); +int +main (void) +{ +return libuna_unicode_character_copy_from_ucs2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_unicode_character_copy_from_ucs2=yes +else $as_nop + ac_cv_lib_una_libuna_unicode_character_copy_from_ucs2=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_copy_from_ucs2" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_copy_from_ucs2" >&6; } +if test "x$ac_cv_lib_una_libuna_unicode_character_copy_from_ucs2" = xyes +then : + ac_cv_libuna_dummy=yes +else $as_nop + ac_cv_libuna=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_copy_to_ucs2 in -luna" >&5 +printf %s "checking for libuna_unicode_character_copy_to_ucs2 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_unicode_character_copy_to_ucs2+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-luna $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libuna_unicode_character_copy_to_ucs2 (); +int +main (void) +{ +return libuna_unicode_character_copy_to_ucs2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_unicode_character_copy_to_ucs2=yes +else $as_nop + ac_cv_lib_una_libuna_unicode_character_copy_to_ucs2=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_copy_to_ucs2" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_copy_to_ucs2" >&6; } +if test "x$ac_cv_lib_una_libuna_unicode_character_copy_to_ucs2" = xyes +then : + ac_cv_libuna_dummy=yes +else $as_nop + ac_cv_libuna=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_size_to_ucs4 in -luna" >&5 +printf %s "checking for libuna_unicode_character_size_to_ucs4 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_unicode_character_size_to_ucs4+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-luna $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libuna_unicode_character_size_to_ucs4 (); +int +main (void) +{ +return libuna_unicode_character_size_to_ucs4 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_unicode_character_size_to_ucs4=yes +else $as_nop + ac_cv_lib_una_libuna_unicode_character_size_to_ucs4=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_size_to_ucs4" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_size_to_ucs4" >&6; } +if test "x$ac_cv_lib_una_libuna_unicode_character_size_to_ucs4" = xyes +then : + ac_cv_libuna_dummy=yes +else $as_nop + ac_cv_libuna=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_copy_from_ucs4 in -luna" >&5 +printf %s "checking for libuna_unicode_character_copy_from_ucs4 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_unicode_character_copy_from_ucs4+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-luna $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libuna_unicode_character_copy_from_ucs4 (); +int +main (void) +{ +return libuna_unicode_character_copy_from_ucs4 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_unicode_character_copy_from_ucs4=yes +else $as_nop + ac_cv_lib_una_libuna_unicode_character_copy_from_ucs4=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_copy_from_ucs4" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_copy_from_ucs4" >&6; } +if test "x$ac_cv_lib_una_libuna_unicode_character_copy_from_ucs4" = xyes +then : + ac_cv_libuna_dummy=yes +else $as_nop + ac_cv_libuna=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_copy_to_ucs4 in -luna" >&5 +printf %s "checking for libuna_unicode_character_copy_to_ucs4 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_unicode_character_copy_to_ucs4+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-luna $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libuna_unicode_character_copy_to_ucs4 (); +int +main (void) +{ +return libuna_unicode_character_copy_to_ucs4 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_unicode_character_copy_to_ucs4=yes +else $as_nop + ac_cv_lib_una_libuna_unicode_character_copy_to_ucs4=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_copy_to_ucs4" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_copy_to_ucs4" >&6; } +if test "x$ac_cv_lib_una_libuna_unicode_character_copy_to_ucs4" = xyes +then : + ac_cv_libuna_dummy=yes +else $as_nop + ac_cv_libuna=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_copy_from_utf7_stream in -luna" >&5 +printf %s "checking for libuna_unicode_character_copy_from_utf7_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_unicode_character_copy_from_utf7_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-luna $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libuna_unicode_character_copy_from_utf7_stream (); +int +main (void) +{ +return libuna_unicode_character_copy_from_utf7_stream (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_unicode_character_copy_from_utf7_stream=yes +else $as_nop + ac_cv_lib_una_libuna_unicode_character_copy_from_utf7_stream=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_copy_from_utf7_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_copy_from_utf7_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_unicode_character_copy_from_utf7_stream" = xyes +then : + ac_cv_libuna_dummy=yes +else $as_nop + ac_cv_libuna=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_copy_to_utf7_stream in -luna" >&5 +printf %s "checking for libuna_unicode_character_copy_to_utf7_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_unicode_character_copy_to_utf7_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-luna $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libuna_unicode_character_copy_to_utf7_stream (); +int +main (void) +{ +return libuna_unicode_character_copy_to_utf7_stream (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_unicode_character_copy_to_utf7_stream=yes +else $as_nop + ac_cv_lib_una_libuna_unicode_character_copy_to_utf7_stream=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_copy_to_utf7_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_copy_to_utf7_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_unicode_character_copy_to_utf7_stream" = xyes +then : + ac_cv_libuna_dummy=yes +else $as_nop + ac_cv_libuna=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_size_to_utf8 in -luna" >&5 +printf %s "checking for libuna_unicode_character_size_to_utf8 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_unicode_character_size_to_utf8+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-luna $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libuna_unicode_character_size_to_utf8 (); +int +main (void) +{ +return libuna_unicode_character_size_to_utf8 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_unicode_character_size_to_utf8=yes +else $as_nop + ac_cv_lib_una_libuna_unicode_character_size_to_utf8=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_size_to_utf8" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_size_to_utf8" >&6; } +if test "x$ac_cv_lib_una_libuna_unicode_character_size_to_utf8" = xyes +then : + ac_cv_libuna_dummy=yes +else $as_nop + ac_cv_libuna=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_copy_from_utf8 in -luna" >&5 +printf %s "checking for libuna_unicode_character_copy_from_utf8 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_unicode_character_copy_from_utf8+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-luna $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libuna_unicode_character_copy_from_utf8 (); +int +main (void) +{ +return libuna_unicode_character_copy_from_utf8 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_unicode_character_copy_from_utf8=yes +else $as_nop + ac_cv_lib_una_libuna_unicode_character_copy_from_utf8=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_copy_from_utf8" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_copy_from_utf8" >&6; } +if test "x$ac_cv_lib_una_libuna_unicode_character_copy_from_utf8" = xyes +then : + ac_cv_libuna_dummy=yes +else $as_nop + ac_cv_libuna=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_copy_to_utf8 in -luna" >&5 +printf %s "checking for libuna_unicode_character_copy_to_utf8 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_unicode_character_copy_to_utf8+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-luna $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libuna_unicode_character_copy_to_utf8 (); +int +main (void) +{ +return libuna_unicode_character_copy_to_utf8 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_unicode_character_copy_to_utf8=yes +else $as_nop + ac_cv_lib_una_libuna_unicode_character_copy_to_utf8=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_copy_to_utf8" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_copy_to_utf8" >&6; } +if test "x$ac_cv_lib_una_libuna_unicode_character_copy_to_utf8" = xyes +then : + ac_cv_libuna_dummy=yes +else $as_nop + ac_cv_libuna=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_size_to_utf8_rfc2279 in -luna" >&5 +printf %s "checking for libuna_unicode_character_size_to_utf8_rfc2279 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_unicode_character_size_to_utf8_rfc2279+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-luna $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libuna_unicode_character_size_to_utf8_rfc2279 (); +int +main (void) +{ +return libuna_unicode_character_size_to_utf8_rfc2279 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_unicode_character_size_to_utf8_rfc2279=yes +else $as_nop + ac_cv_lib_una_libuna_unicode_character_size_to_utf8_rfc2279=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_size_to_utf8_rfc2279" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_size_to_utf8_rfc2279" >&6; } +if test "x$ac_cv_lib_una_libuna_unicode_character_size_to_utf8_rfc2279" = xyes +then : + ac_cv_libuna_dummy=yes +else $as_nop + ac_cv_libuna=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_copy_from_utf8_rfc2279 in -luna" >&5 +printf %s "checking for libuna_unicode_character_copy_from_utf8_rfc2279 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_unicode_character_copy_from_utf8_rfc2279+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-luna $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libuna_unicode_character_copy_from_utf8_rfc2279 (); +int +main (void) +{ +return libuna_unicode_character_copy_from_utf8_rfc2279 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_unicode_character_copy_from_utf8_rfc2279=yes +else $as_nop + ac_cv_lib_una_libuna_unicode_character_copy_from_utf8_rfc2279=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_copy_from_utf8_rfc2279" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_copy_from_utf8_rfc2279" >&6; } +if test "x$ac_cv_lib_una_libuna_unicode_character_copy_from_utf8_rfc2279" = xyes +then : + ac_cv_libuna_dummy=yes +else $as_nop + ac_cv_libuna=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_copy_to_utf8_rfc2279 in -luna" >&5 +printf %s "checking for libuna_unicode_character_copy_to_utf8_rfc2279 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_unicode_character_copy_to_utf8_rfc2279+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-luna $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libuna_unicode_character_copy_to_utf8_rfc2279 (); +int +main (void) +{ +return libuna_unicode_character_copy_to_utf8_rfc2279 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_unicode_character_copy_to_utf8_rfc2279=yes +else $as_nop + ac_cv_lib_una_libuna_unicode_character_copy_to_utf8_rfc2279=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_copy_to_utf8_rfc2279" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_copy_to_utf8_rfc2279" >&6; } +if test "x$ac_cv_lib_una_libuna_unicode_character_copy_to_utf8_rfc2279" = xyes +then : + ac_cv_libuna_dummy=yes +else $as_nop + ac_cv_libuna=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_size_to_utf16 in -luna" >&5 +printf %s "checking for libuna_unicode_character_size_to_utf16 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_unicode_character_size_to_utf16+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-luna $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libuna_unicode_character_size_to_utf16 (); +int +main (void) +{ +return libuna_unicode_character_size_to_utf16 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_unicode_character_size_to_utf16=yes +else $as_nop + ac_cv_lib_una_libuna_unicode_character_size_to_utf16=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_size_to_utf16" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_size_to_utf16" >&6; } +if test "x$ac_cv_lib_una_libuna_unicode_character_size_to_utf16" = xyes +then : + ac_cv_libuna_dummy=yes +else $as_nop + ac_cv_libuna=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_copy_from_utf16 in -luna" >&5 +printf %s "checking for libuna_unicode_character_copy_from_utf16 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_unicode_character_copy_from_utf16+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-luna $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libuna_unicode_character_copy_from_utf16 (); +int +main (void) +{ +return libuna_unicode_character_copy_from_utf16 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_unicode_character_copy_from_utf16=yes +else $as_nop + ac_cv_lib_una_libuna_unicode_character_copy_from_utf16=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_copy_from_utf16" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_copy_from_utf16" >&6; } +if test "x$ac_cv_lib_una_libuna_unicode_character_copy_from_utf16" = xyes +then : + ac_cv_libuna_dummy=yes +else $as_nop + ac_cv_libuna=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_copy_to_utf16 in -luna" >&5 +printf %s "checking for libuna_unicode_character_copy_to_utf16 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_unicode_character_copy_to_utf16+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-luna $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libuna_unicode_character_copy_to_utf16 (); +int +main (void) +{ +return libuna_unicode_character_copy_to_utf16 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_unicode_character_copy_to_utf16=yes +else $as_nop + ac_cv_lib_una_libuna_unicode_character_copy_to_utf16=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_copy_to_utf16" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_copy_to_utf16" >&6; } +if test "x$ac_cv_lib_una_libuna_unicode_character_copy_to_utf16" = xyes +then : + ac_cv_libuna_dummy=yes +else $as_nop + ac_cv_libuna=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_copy_from_utf16_stream in -luna" >&5 +printf %s "checking for libuna_unicode_character_copy_from_utf16_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_unicode_character_copy_from_utf16_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-luna $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libuna_unicode_character_copy_from_utf16_stream (); +int +main (void) +{ +return libuna_unicode_character_copy_from_utf16_stream (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_unicode_character_copy_from_utf16_stream=yes +else $as_nop + ac_cv_lib_una_libuna_unicode_character_copy_from_utf16_stream=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_copy_from_utf16_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_copy_from_utf16_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_unicode_character_copy_from_utf16_stream" = xyes +then : + ac_cv_libuna_dummy=yes +else $as_nop + ac_cv_libuna=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_copy_to_utf16_stream in -luna" >&5 +printf %s "checking for libuna_unicode_character_copy_to_utf16_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_unicode_character_copy_to_utf16_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-luna $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libuna_unicode_character_copy_to_utf16_stream (); +int +main (void) +{ +return libuna_unicode_character_copy_to_utf16_stream (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_unicode_character_copy_to_utf16_stream=yes +else $as_nop + ac_cv_lib_una_libuna_unicode_character_copy_to_utf16_stream=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_copy_to_utf16_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_copy_to_utf16_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_unicode_character_copy_to_utf16_stream" = xyes +then : + ac_cv_libuna_dummy=yes +else $as_nop + ac_cv_libuna=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_copy_from_utf32 in -luna" >&5 +printf %s "checking for libuna_unicode_character_copy_from_utf32 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_unicode_character_copy_from_utf32+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-luna $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libuna_unicode_character_copy_from_utf32 (); +int +main (void) +{ +return libuna_unicode_character_copy_from_utf32 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_unicode_character_copy_from_utf32=yes +else $as_nop + ac_cv_lib_una_libuna_unicode_character_copy_from_utf32=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_copy_from_utf32" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_copy_from_utf32" >&6; } +if test "x$ac_cv_lib_una_libuna_unicode_character_copy_from_utf32" = xyes +then : + ac_cv_libuna_dummy=yes +else $as_nop + ac_cv_libuna=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_copy_to_utf32 in -luna" >&5 +printf %s "checking for libuna_unicode_character_copy_to_utf32 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_unicode_character_copy_to_utf32+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-luna $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libuna_unicode_character_copy_to_utf32 (); +int +main (void) +{ +return libuna_unicode_character_copy_to_utf32 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_unicode_character_copy_to_utf32=yes +else $as_nop + ac_cv_lib_una_libuna_unicode_character_copy_to_utf32=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_copy_to_utf32" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_copy_to_utf32" >&6; } +if test "x$ac_cv_lib_una_libuna_unicode_character_copy_to_utf32" = xyes +then : + ac_cv_libuna_dummy=yes +else $as_nop + ac_cv_libuna=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_copy_from_utf32_stream in -luna" >&5 +printf %s "checking for libuna_unicode_character_copy_from_utf32_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_unicode_character_copy_from_utf32_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-luna $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libuna_unicode_character_copy_from_utf32_stream (); +int +main (void) +{ +return libuna_unicode_character_copy_from_utf32_stream (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_unicode_character_copy_from_utf32_stream=yes +else $as_nop + ac_cv_lib_una_libuna_unicode_character_copy_from_utf32_stream=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_copy_from_utf32_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_copy_from_utf32_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_unicode_character_copy_from_utf32_stream" = xyes +then : + ac_cv_libuna_dummy=yes +else $as_nop + ac_cv_libuna=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_copy_to_utf32_stream in -luna" >&5 +printf %s "checking for libuna_unicode_character_copy_to_utf32_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_unicode_character_copy_to_utf32_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-luna $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libuna_unicode_character_copy_to_utf32_stream (); +int +main (void) +{ +return libuna_unicode_character_copy_to_utf32_stream (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_unicode_character_copy_to_utf32_stream=yes +else $as_nop + ac_cv_lib_una_libuna_unicode_character_copy_to_utf32_stream=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_copy_to_utf32_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_copy_to_utf32_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_unicode_character_copy_to_utf32_stream" = xyes +then : + ac_cv_libuna_dummy=yes +else $as_nop + ac_cv_libuna=no +fi + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_stream_size_from_utf8 in -luna" >&5 +printf %s "checking for libuna_utf8_stream_size_from_utf8 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf8_stream_size_from_utf8+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -31482,40 +35868,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf8_stream_size_from_utf8 (); int -main () +main (void) { return libuna_utf8_stream_size_from_utf8 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf8_stream_size_from_utf8=yes -else +else $as_nop ac_cv_lib_una_libuna_utf8_stream_size_from_utf8=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_stream_size_from_utf8" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf8_stream_size_from_utf8" >&6; } -if test "x$ac_cv_lib_una_libuna_utf8_stream_size_from_utf8" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_stream_size_from_utf8" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf8_stream_size_from_utf8" >&6; } +if test "x$ac_cv_lib_una_libuna_utf8_stream_size_from_utf8" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_stream_copy_from_utf8 in -luna" >&5 -$as_echo_n "checking for libuna_utf8_stream_copy_from_utf8 in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf8_stream_copy_from_utf8+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_stream_copy_from_utf8 in -luna" >&5 +printf %s "checking for libuna_utf8_stream_copy_from_utf8 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf8_stream_copy_from_utf8+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -31524,40 +35910,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf8_stream_copy_from_utf8 (); int -main () +main (void) { return libuna_utf8_stream_copy_from_utf8 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf8_stream_copy_from_utf8=yes -else +else $as_nop ac_cv_lib_una_libuna_utf8_stream_copy_from_utf8=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_stream_copy_from_utf8" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf8_stream_copy_from_utf8" >&6; } -if test "x$ac_cv_lib_una_libuna_utf8_stream_copy_from_utf8" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_stream_copy_from_utf8" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf8_stream_copy_from_utf8" >&6; } +if test "x$ac_cv_lib_una_libuna_utf8_stream_copy_from_utf8" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_stream_size_from_utf16 in -luna" >&5 -$as_echo_n "checking for libuna_utf8_stream_size_from_utf16 in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf8_stream_size_from_utf16+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_stream_size_from_utf16 in -luna" >&5 +printf %s "checking for libuna_utf8_stream_size_from_utf16 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf8_stream_size_from_utf16+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -31566,40 +35952,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf8_stream_size_from_utf16 (); int -main () +main (void) { return libuna_utf8_stream_size_from_utf16 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf8_stream_size_from_utf16=yes -else +else $as_nop ac_cv_lib_una_libuna_utf8_stream_size_from_utf16=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_stream_size_from_utf16" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf8_stream_size_from_utf16" >&6; } -if test "x$ac_cv_lib_una_libuna_utf8_stream_size_from_utf16" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_stream_size_from_utf16" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf8_stream_size_from_utf16" >&6; } +if test "x$ac_cv_lib_una_libuna_utf8_stream_size_from_utf16" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_stream_copy_from_utf16 in -luna" >&5 -$as_echo_n "checking for libuna_utf8_stream_copy_from_utf16 in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf8_stream_copy_from_utf16+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_stream_copy_from_utf16 in -luna" >&5 +printf %s "checking for libuna_utf8_stream_copy_from_utf16 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf8_stream_copy_from_utf16+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -31608,40 +35994,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf8_stream_copy_from_utf16 (); int -main () +main (void) { return libuna_utf8_stream_copy_from_utf16 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf8_stream_copy_from_utf16=yes -else +else $as_nop ac_cv_lib_una_libuna_utf8_stream_copy_from_utf16=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_stream_copy_from_utf16" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf8_stream_copy_from_utf16" >&6; } -if test "x$ac_cv_lib_una_libuna_utf8_stream_copy_from_utf16" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_stream_copy_from_utf16" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf8_stream_copy_from_utf16" >&6; } +if test "x$ac_cv_lib_una_libuna_utf8_stream_copy_from_utf16" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_stream_size_from_utf32 in -luna" >&5 -$as_echo_n "checking for libuna_utf8_stream_size_from_utf32 in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf8_stream_size_from_utf32+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_stream_size_from_utf32 in -luna" >&5 +printf %s "checking for libuna_utf8_stream_size_from_utf32 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf8_stream_size_from_utf32+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -31650,40 +36036,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf8_stream_size_from_utf32 (); int -main () +main (void) { return libuna_utf8_stream_size_from_utf32 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf8_stream_size_from_utf32=yes -else +else $as_nop ac_cv_lib_una_libuna_utf8_stream_size_from_utf32=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_stream_size_from_utf32" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf8_stream_size_from_utf32" >&6; } -if test "x$ac_cv_lib_una_libuna_utf8_stream_size_from_utf32" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_stream_size_from_utf32" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf8_stream_size_from_utf32" >&6; } +if test "x$ac_cv_lib_una_libuna_utf8_stream_size_from_utf32" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_stream_copy_from_utf32 in -luna" >&5 -$as_echo_n "checking for libuna_utf8_stream_copy_from_utf32 in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf8_stream_copy_from_utf32+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_stream_copy_from_utf32 in -luna" >&5 +printf %s "checking for libuna_utf8_stream_copy_from_utf32 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf8_stream_copy_from_utf32+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -31692,41 +36078,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf8_stream_copy_from_utf32 (); int -main () +main (void) { return libuna_utf8_stream_copy_from_utf32 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf8_stream_copy_from_utf32=yes -else +else $as_nop ac_cv_lib_una_libuna_utf8_stream_copy_from_utf32=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_stream_copy_from_utf32" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf8_stream_copy_from_utf32" >&6; } -if test "x$ac_cv_lib_una_libuna_utf8_stream_copy_from_utf32" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_stream_copy_from_utf32" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf8_stream_copy_from_utf32" >&6; } +if test "x$ac_cv_lib_una_libuna_utf8_stream_copy_from_utf32" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_stream_size_from_utf8 in -luna" >&5 -$as_echo_n "checking for libuna_utf16_stream_size_from_utf8 in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf16_stream_size_from_utf8+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_stream_size_from_utf8 in -luna" >&5 +printf %s "checking for libuna_utf16_stream_size_from_utf8 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf16_stream_size_from_utf8+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -31735,40 +36121,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf16_stream_size_from_utf8 (); int -main () +main (void) { return libuna_utf16_stream_size_from_utf8 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf16_stream_size_from_utf8=yes -else +else $as_nop ac_cv_lib_una_libuna_utf16_stream_size_from_utf8=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_stream_size_from_utf8" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf16_stream_size_from_utf8" >&6; } -if test "x$ac_cv_lib_una_libuna_utf16_stream_size_from_utf8" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_stream_size_from_utf8" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf16_stream_size_from_utf8" >&6; } +if test "x$ac_cv_lib_una_libuna_utf16_stream_size_from_utf8" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_stream_copy_from_utf8 in -luna" >&5 -$as_echo_n "checking for libuna_utf16_stream_copy_from_utf8 in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf16_stream_copy_from_utf8+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_stream_copy_from_utf8 in -luna" >&5 +printf %s "checking for libuna_utf16_stream_copy_from_utf8 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf16_stream_copy_from_utf8+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -31777,40 +36163,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf16_stream_copy_from_utf8 (); int -main () +main (void) { return libuna_utf16_stream_copy_from_utf8 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf16_stream_copy_from_utf8=yes -else +else $as_nop ac_cv_lib_una_libuna_utf16_stream_copy_from_utf8=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_stream_copy_from_utf8" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf16_stream_copy_from_utf8" >&6; } -if test "x$ac_cv_lib_una_libuna_utf16_stream_copy_from_utf8" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_stream_copy_from_utf8" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf16_stream_copy_from_utf8" >&6; } +if test "x$ac_cv_lib_una_libuna_utf16_stream_copy_from_utf8" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_stream_size_from_utf16 in -luna" >&5 -$as_echo_n "checking for libuna_utf16_stream_size_from_utf16 in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf16_stream_size_from_utf16+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_stream_size_from_utf16 in -luna" >&5 +printf %s "checking for libuna_utf16_stream_size_from_utf16 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf16_stream_size_from_utf16+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -31819,40 +36205,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf16_stream_size_from_utf16 (); int -main () +main (void) { return libuna_utf16_stream_size_from_utf16 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf16_stream_size_from_utf16=yes -else +else $as_nop ac_cv_lib_una_libuna_utf16_stream_size_from_utf16=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_stream_size_from_utf16" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf16_stream_size_from_utf16" >&6; } -if test "x$ac_cv_lib_una_libuna_utf16_stream_size_from_utf16" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_stream_size_from_utf16" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf16_stream_size_from_utf16" >&6; } +if test "x$ac_cv_lib_una_libuna_utf16_stream_size_from_utf16" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_stream_copy_from_utf16 in -luna" >&5 -$as_echo_n "checking for libuna_utf16_stream_copy_from_utf16 in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf16_stream_copy_from_utf16+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_stream_copy_from_utf16 in -luna" >&5 +printf %s "checking for libuna_utf16_stream_copy_from_utf16 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf16_stream_copy_from_utf16+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -31861,40 +36247,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf16_stream_copy_from_utf16 (); int -main () +main (void) { return libuna_utf16_stream_copy_from_utf16 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf16_stream_copy_from_utf16=yes -else +else $as_nop ac_cv_lib_una_libuna_utf16_stream_copy_from_utf16=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_stream_copy_from_utf16" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf16_stream_copy_from_utf16" >&6; } -if test "x$ac_cv_lib_una_libuna_utf16_stream_copy_from_utf16" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_stream_copy_from_utf16" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf16_stream_copy_from_utf16" >&6; } +if test "x$ac_cv_lib_una_libuna_utf16_stream_copy_from_utf16" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_stream_size_from_utf32 in -luna" >&5 -$as_echo_n "checking for libuna_utf16_stream_size_from_utf32 in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf16_stream_size_from_utf32+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_stream_size_from_utf32 in -luna" >&5 +printf %s "checking for libuna_utf16_stream_size_from_utf32 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf16_stream_size_from_utf32+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -31903,40 +36289,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf16_stream_size_from_utf32 (); int -main () +main (void) { return libuna_utf16_stream_size_from_utf32 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf16_stream_size_from_utf32=yes -else +else $as_nop ac_cv_lib_una_libuna_utf16_stream_size_from_utf32=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_stream_size_from_utf32" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf16_stream_size_from_utf32" >&6; } -if test "x$ac_cv_lib_una_libuna_utf16_stream_size_from_utf32" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_stream_size_from_utf32" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf16_stream_size_from_utf32" >&6; } +if test "x$ac_cv_lib_una_libuna_utf16_stream_size_from_utf32" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_stream_copy_from_utf32 in -luna" >&5 -$as_echo_n "checking for libuna_utf16_stream_copy_from_utf32 in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf16_stream_copy_from_utf32+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_stream_copy_from_utf32 in -luna" >&5 +printf %s "checking for libuna_utf16_stream_copy_from_utf32 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf16_stream_copy_from_utf32+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -31945,41 +36331,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf16_stream_copy_from_utf32 (); int -main () +main (void) { return libuna_utf16_stream_copy_from_utf32 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf16_stream_copy_from_utf32=yes -else +else $as_nop ac_cv_lib_una_libuna_utf16_stream_copy_from_utf32=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_stream_copy_from_utf32" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf16_stream_copy_from_utf32" >&6; } -if test "x$ac_cv_lib_una_libuna_utf16_stream_copy_from_utf32" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_stream_copy_from_utf32" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf16_stream_copy_from_utf32" >&6; } +if test "x$ac_cv_lib_una_libuna_utf16_stream_copy_from_utf32" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_stream_size_from_utf8 in -luna" >&5 -$as_echo_n "checking for libuna_utf32_stream_size_from_utf8 in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf32_stream_size_from_utf8+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_stream_size_from_utf8 in -luna" >&5 +printf %s "checking for libuna_utf32_stream_size_from_utf8 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf32_stream_size_from_utf8+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -31988,40 +36374,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf32_stream_size_from_utf8 (); int -main () +main (void) { return libuna_utf32_stream_size_from_utf8 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf32_stream_size_from_utf8=yes -else +else $as_nop ac_cv_lib_una_libuna_utf32_stream_size_from_utf8=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_stream_size_from_utf8" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf32_stream_size_from_utf8" >&6; } -if test "x$ac_cv_lib_una_libuna_utf32_stream_size_from_utf8" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_stream_size_from_utf8" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf32_stream_size_from_utf8" >&6; } +if test "x$ac_cv_lib_una_libuna_utf32_stream_size_from_utf8" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_stream_copy_from_utf8 in -luna" >&5 -$as_echo_n "checking for libuna_utf32_stream_copy_from_utf8 in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf32_stream_copy_from_utf8+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_stream_copy_from_utf8 in -luna" >&5 +printf %s "checking for libuna_utf32_stream_copy_from_utf8 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf32_stream_copy_from_utf8+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -32030,40 +36416,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf32_stream_copy_from_utf8 (); int -main () +main (void) { return libuna_utf32_stream_copy_from_utf8 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf32_stream_copy_from_utf8=yes -else +else $as_nop ac_cv_lib_una_libuna_utf32_stream_copy_from_utf8=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_stream_copy_from_utf8" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf32_stream_copy_from_utf8" >&6; } -if test "x$ac_cv_lib_una_libuna_utf32_stream_copy_from_utf8" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_stream_copy_from_utf8" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf32_stream_copy_from_utf8" >&6; } +if test "x$ac_cv_lib_una_libuna_utf32_stream_copy_from_utf8" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_stream_size_from_utf16 in -luna" >&5 -$as_echo_n "checking for libuna_utf32_stream_size_from_utf16 in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf32_stream_size_from_utf16+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_stream_size_from_utf16 in -luna" >&5 +printf %s "checking for libuna_utf32_stream_size_from_utf16 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf32_stream_size_from_utf16+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -32072,40 +36458,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf32_stream_size_from_utf16 (); int -main () +main (void) { return libuna_utf32_stream_size_from_utf16 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf32_stream_size_from_utf16=yes -else +else $as_nop ac_cv_lib_una_libuna_utf32_stream_size_from_utf16=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_stream_size_from_utf16" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf32_stream_size_from_utf16" >&6; } -if test "x$ac_cv_lib_una_libuna_utf32_stream_size_from_utf16" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_stream_size_from_utf16" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf32_stream_size_from_utf16" >&6; } +if test "x$ac_cv_lib_una_libuna_utf32_stream_size_from_utf16" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_stream_copy_from_utf16 in -luna" >&5 -$as_echo_n "checking for libuna_utf32_stream_copy_from_utf16 in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf32_stream_copy_from_utf16+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_stream_copy_from_utf16 in -luna" >&5 +printf %s "checking for libuna_utf32_stream_copy_from_utf16 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf32_stream_copy_from_utf16+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -32114,40 +36500,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf32_stream_copy_from_utf16 (); int -main () +main (void) { return libuna_utf32_stream_copy_from_utf16 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf32_stream_copy_from_utf16=yes -else +else $as_nop ac_cv_lib_una_libuna_utf32_stream_copy_from_utf16=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_stream_copy_from_utf16" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf32_stream_copy_from_utf16" >&6; } -if test "x$ac_cv_lib_una_libuna_utf32_stream_copy_from_utf16" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_stream_copy_from_utf16" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf32_stream_copy_from_utf16" >&6; } +if test "x$ac_cv_lib_una_libuna_utf32_stream_copy_from_utf16" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_stream_size_from_utf32 in -luna" >&5 -$as_echo_n "checking for libuna_utf32_stream_size_from_utf32 in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf32_stream_size_from_utf32+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_stream_size_from_utf32 in -luna" >&5 +printf %s "checking for libuna_utf32_stream_size_from_utf32 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf32_stream_size_from_utf32+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -32156,40 +36542,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf32_stream_size_from_utf32 (); int -main () +main (void) { return libuna_utf32_stream_size_from_utf32 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf32_stream_size_from_utf32=yes -else +else $as_nop ac_cv_lib_una_libuna_utf32_stream_size_from_utf32=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_stream_size_from_utf32" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf32_stream_size_from_utf32" >&6; } -if test "x$ac_cv_lib_una_libuna_utf32_stream_size_from_utf32" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_stream_size_from_utf32" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf32_stream_size_from_utf32" >&6; } +if test "x$ac_cv_lib_una_libuna_utf32_stream_size_from_utf32" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_stream_copy_from_utf32 in -luna" >&5 -$as_echo_n "checking for libuna_utf32_stream_copy_from_utf32 in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf32_stream_copy_from_utf32+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_stream_copy_from_utf32 in -luna" >&5 +printf %s "checking for libuna_utf32_stream_copy_from_utf32 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf32_stream_copy_from_utf32+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -32198,41 +36584,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf32_stream_copy_from_utf32 (); int -main () +main (void) { return libuna_utf32_stream_copy_from_utf32 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf32_stream_copy_from_utf32=yes -else +else $as_nop ac_cv_lib_una_libuna_utf32_stream_copy_from_utf32=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_stream_copy_from_utf32" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf32_stream_copy_from_utf32" >&6; } -if test "x$ac_cv_lib_una_libuna_utf32_stream_copy_from_utf32" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_stream_copy_from_utf32" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf32_stream_copy_from_utf32" >&6; } +if test "x$ac_cv_lib_una_libuna_utf32_stream_copy_from_utf32" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_size_from_byte_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf8_string_size_from_byte_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf8_string_size_from_byte_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_size_from_byte_stream in -luna" >&5 +printf %s "checking for libuna_utf8_string_size_from_byte_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf8_string_size_from_byte_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -32241,40 +36627,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf8_string_size_from_byte_stream (); int -main () +main (void) { return libuna_utf8_string_size_from_byte_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf8_string_size_from_byte_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_utf8_string_size_from_byte_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_size_from_byte_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf8_string_size_from_byte_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf8_string_size_from_byte_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_size_from_byte_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf8_string_size_from_byte_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf8_string_size_from_byte_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_copy_from_byte_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf8_string_copy_from_byte_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf8_string_copy_from_byte_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_copy_from_byte_stream in -luna" >&5 +printf %s "checking for libuna_utf8_string_copy_from_byte_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf8_string_copy_from_byte_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -32283,40 +36669,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf8_string_copy_from_byte_stream (); int -main () +main (void) { return libuna_utf8_string_copy_from_byte_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf8_string_copy_from_byte_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_utf8_string_copy_from_byte_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_copy_from_byte_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf8_string_copy_from_byte_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf8_string_copy_from_byte_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_copy_from_byte_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf8_string_copy_from_byte_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf8_string_copy_from_byte_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_with_index_copy_from_byte_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf8_string_with_index_copy_from_byte_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_byte_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_with_index_copy_from_byte_stream in -luna" >&5 +printf %s "checking for libuna_utf8_string_with_index_copy_from_byte_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_byte_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -32325,40 +36711,82 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf8_string_with_index_copy_from_byte_stream (); int -main () +main (void) { return libuna_utf8_string_with_index_copy_from_byte_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_byte_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_byte_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_byte_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_byte_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_byte_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_byte_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_byte_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_byte_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_size_from_utf7_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf8_string_size_from_utf7_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf8_string_size_from_utf7_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_compare_with_byte_stream in -luna" >&5 +printf %s "checking for libuna_utf8_string_compare_with_byte_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf8_string_compare_with_byte_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-luna $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libuna_utf8_string_compare_with_byte_stream (); +int +main (void) +{ +return libuna_utf8_string_compare_with_byte_stream (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_utf8_string_compare_with_byte_stream=yes +else $as_nop + ac_cv_lib_una_libuna_utf8_string_compare_with_byte_stream=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_compare_with_byte_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf8_string_compare_with_byte_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf8_string_compare_with_byte_stream" = xyes +then : + ac_cv_libuna_dummy=yes +else $as_nop + ac_cv_libuna=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_size_from_utf7_stream in -luna" >&5 +printf %s "checking for libuna_utf8_string_size_from_utf7_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf8_string_size_from_utf7_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -32367,40 +36795,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf8_string_size_from_utf7_stream (); int -main () +main (void) { return libuna_utf8_string_size_from_utf7_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf8_string_size_from_utf7_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_utf8_string_size_from_utf7_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_size_from_utf7_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf8_string_size_from_utf7_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf8_string_size_from_utf7_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_size_from_utf7_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf8_string_size_from_utf7_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf8_string_size_from_utf7_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_copy_from_utf7_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf8_string_copy_from_utf7_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf8_string_copy_from_utf7_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_copy_from_utf7_stream in -luna" >&5 +printf %s "checking for libuna_utf8_string_copy_from_utf7_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf8_string_copy_from_utf7_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -32409,40 +36837,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf8_string_copy_from_utf7_stream (); int -main () +main (void) { return libuna_utf8_string_copy_from_utf7_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf8_string_copy_from_utf7_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_utf8_string_copy_from_utf7_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_copy_from_utf7_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf8_string_copy_from_utf7_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf8_string_copy_from_utf7_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_copy_from_utf7_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf8_string_copy_from_utf7_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf8_string_copy_from_utf7_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_with_index_copy_from_utf7_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf8_string_with_index_copy_from_utf7_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf7_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_with_index_copy_from_utf7_stream in -luna" >&5 +printf %s "checking for libuna_utf8_string_with_index_copy_from_utf7_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf7_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -32451,40 +36879,82 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf8_string_with_index_copy_from_utf7_stream (); int -main () +main (void) { return libuna_utf8_string_with_index_copy_from_utf7_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf7_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf7_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf7_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf7_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf7_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf7_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf7_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf7_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_size_from_utf8_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf8_string_size_from_utf8_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf8_string_size_from_utf8_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_compare_with_utf7_stream in -luna" >&5 +printf %s "checking for libuna_utf8_string_compare_with_utf7_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf8_string_compare_with_utf7_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-luna $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libuna_utf8_string_compare_with_utf7_stream (); +int +main (void) +{ +return libuna_utf8_string_compare_with_utf7_stream (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_utf8_string_compare_with_utf7_stream=yes +else $as_nop + ac_cv_lib_una_libuna_utf8_string_compare_with_utf7_stream=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_compare_with_utf7_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf8_string_compare_with_utf7_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf8_string_compare_with_utf7_stream" = xyes +then : + ac_cv_libuna_dummy=yes +else $as_nop + ac_cv_libuna=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_size_from_utf8_stream in -luna" >&5 +printf %s "checking for libuna_utf8_string_size_from_utf8_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf8_string_size_from_utf8_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -32493,40 +36963,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf8_string_size_from_utf8_stream (); int -main () +main (void) { return libuna_utf8_string_size_from_utf8_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf8_string_size_from_utf8_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_utf8_string_size_from_utf8_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_size_from_utf8_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf8_string_size_from_utf8_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf8_string_size_from_utf8_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_size_from_utf8_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf8_string_size_from_utf8_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf8_string_size_from_utf8_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_copy_from_utf8_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf8_string_copy_from_utf8_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf8_string_copy_from_utf8_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_copy_from_utf8_stream in -luna" >&5 +printf %s "checking for libuna_utf8_string_copy_from_utf8_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf8_string_copy_from_utf8_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -32535,40 +37005,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf8_string_copy_from_utf8_stream (); int -main () +main (void) { return libuna_utf8_string_copy_from_utf8_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf8_string_copy_from_utf8_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_utf8_string_copy_from_utf8_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_copy_from_utf8_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf8_string_copy_from_utf8_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf8_string_copy_from_utf8_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_copy_from_utf8_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf8_string_copy_from_utf8_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf8_string_copy_from_utf8_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_with_index_copy_from_utf8_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf8_string_with_index_copy_from_utf8_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf8_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_with_index_copy_from_utf8_stream in -luna" >&5 +printf %s "checking for libuna_utf8_string_with_index_copy_from_utf8_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf8_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -32577,40 +37047,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf8_string_with_index_copy_from_utf8_stream (); int -main () +main (void) { return libuna_utf8_string_with_index_copy_from_utf8_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf8_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf8_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf8_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf8_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf8_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf8_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf8_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf8_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_size_from_utf16_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf8_string_size_from_utf16_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf8_string_size_from_utf16_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_compare_with_utf8_stream in -luna" >&5 +printf %s "checking for libuna_utf8_string_compare_with_utf8_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf8_string_compare_with_utf8_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -32619,40 +37089,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char libuna_utf8_string_size_from_utf16_stream (); +char libuna_utf8_string_compare_with_utf8_stream (); int -main () +main (void) { -return libuna_utf8_string_size_from_utf16_stream (); +return libuna_utf8_string_compare_with_utf8_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_una_libuna_utf8_string_size_from_utf16_stream=yes -else - ac_cv_lib_una_libuna_utf8_string_size_from_utf16_stream=no +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_utf8_string_compare_with_utf8_stream=yes +else $as_nop + ac_cv_lib_una_libuna_utf8_string_compare_with_utf8_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_size_from_utf16_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf8_string_size_from_utf16_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf8_string_size_from_utf16_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_compare_with_utf8_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf8_string_compare_with_utf8_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf8_string_compare_with_utf8_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_copy_from_utf16_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf8_string_copy_from_utf16_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf8_string_copy_from_utf16_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_size_from_utf16 in -luna" >&5 +printf %s "checking for libuna_utf8_string_size_from_utf16 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf8_string_size_from_utf16+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -32661,40 +37131,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char libuna_utf8_string_copy_from_utf16_stream (); +char libuna_utf8_string_size_from_utf16 (); int -main () +main (void) { -return libuna_utf8_string_copy_from_utf16_stream (); +return libuna_utf8_string_size_from_utf16 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_una_libuna_utf8_string_copy_from_utf16_stream=yes -else - ac_cv_lib_una_libuna_utf8_string_copy_from_utf16_stream=no +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_utf8_string_size_from_utf16=yes +else $as_nop + ac_cv_lib_una_libuna_utf8_string_size_from_utf16=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_copy_from_utf16_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf8_string_copy_from_utf16_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf8_string_copy_from_utf16_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_size_from_utf16" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf8_string_size_from_utf16" >&6; } +if test "x$ac_cv_lib_una_libuna_utf8_string_size_from_utf16" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_with_index_copy_from_utf16_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf8_string_with_index_copy_from_utf16_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_copy_from_utf16 in -luna" >&5 +printf %s "checking for libuna_utf8_string_copy_from_utf16 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf8_string_copy_from_utf16+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -32703,40 +37173,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char libuna_utf8_string_with_index_copy_from_utf16_stream (); +char libuna_utf8_string_copy_from_utf16 (); int -main () +main (void) { -return libuna_utf8_string_with_index_copy_from_utf16_stream (); +return libuna_utf8_string_copy_from_utf16 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16_stream=yes -else - ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16_stream=no +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_utf8_string_copy_from_utf16=yes +else $as_nop + ac_cv_lib_una_libuna_utf8_string_copy_from_utf16=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_copy_from_utf16" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf8_string_copy_from_utf16" >&6; } +if test "x$ac_cv_lib_una_libuna_utf8_string_copy_from_utf16" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_size_from_utf32_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf8_string_size_from_utf32_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf8_string_size_from_utf32_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_with_index_copy_from_utf16 in -luna" >&5 +printf %s "checking for libuna_utf8_string_with_index_copy_from_utf16 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -32745,40 +37215,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char libuna_utf8_string_size_from_utf32_stream (); +char libuna_utf8_string_with_index_copy_from_utf16 (); int -main () +main (void) { -return libuna_utf8_string_size_from_utf32_stream (); +return libuna_utf8_string_with_index_copy_from_utf16 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_una_libuna_utf8_string_size_from_utf32_stream=yes -else - ac_cv_lib_una_libuna_utf8_string_size_from_utf32_stream=no +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16=yes +else $as_nop + ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_size_from_utf32_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf8_string_size_from_utf32_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf8_string_size_from_utf32_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16" >&6; } +if test "x$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_copy_from_utf32_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf8_string_copy_from_utf32_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf8_string_copy_from_utf32_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_compare_with_utf16 in -luna" >&5 +printf %s "checking for libuna_utf8_string_compare_with_utf16 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf8_string_compare_with_utf16+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -32787,40 +37257,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char libuna_utf8_string_copy_from_utf32_stream (); +char libuna_utf8_string_compare_with_utf16 (); int -main () +main (void) { -return libuna_utf8_string_copy_from_utf32_stream (); +return libuna_utf8_string_compare_with_utf16 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_una_libuna_utf8_string_copy_from_utf32_stream=yes -else - ac_cv_lib_una_libuna_utf8_string_copy_from_utf32_stream=no +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_utf8_string_compare_with_utf16=yes +else $as_nop + ac_cv_lib_una_libuna_utf8_string_compare_with_utf16=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_copy_from_utf32_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf8_string_copy_from_utf32_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf8_string_copy_from_utf32_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_compare_with_utf16" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf8_string_compare_with_utf16" >&6; } +if test "x$ac_cv_lib_una_libuna_utf8_string_compare_with_utf16" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_with_index_copy_from_utf32_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf8_string_with_index_copy_from_utf32_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_size_from_utf16_stream in -luna" >&5 +printf %s "checking for libuna_utf8_string_size_from_utf16_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf8_string_size_from_utf16_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -32829,40 +37299,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char libuna_utf8_string_with_index_copy_from_utf32_stream (); +char libuna_utf8_string_size_from_utf16_stream (); int -main () +main (void) { -return libuna_utf8_string_with_index_copy_from_utf32_stream (); +return libuna_utf8_string_size_from_utf16_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32_stream=yes -else - ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32_stream=no +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_utf8_string_size_from_utf16_stream=yes +else $as_nop + ac_cv_lib_una_libuna_utf8_string_size_from_utf16_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_size_from_utf16_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf8_string_size_from_utf16_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf8_string_size_from_utf16_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_size_from_utf16 in -luna" >&5 -$as_echo_n "checking for libuna_utf8_string_size_from_utf16 in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf8_string_size_from_utf16+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_copy_from_utf16_stream in -luna" >&5 +printf %s "checking for libuna_utf8_string_copy_from_utf16_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf8_string_copy_from_utf16_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -32871,40 +37341,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char libuna_utf8_string_size_from_utf16 (); +char libuna_utf8_string_copy_from_utf16_stream (); int -main () +main (void) { -return libuna_utf8_string_size_from_utf16 (); +return libuna_utf8_string_copy_from_utf16_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_una_libuna_utf8_string_size_from_utf16=yes -else - ac_cv_lib_una_libuna_utf8_string_size_from_utf16=no +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_utf8_string_copy_from_utf16_stream=yes +else $as_nop + ac_cv_lib_una_libuna_utf8_string_copy_from_utf16_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_size_from_utf16" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf8_string_size_from_utf16" >&6; } -if test "x$ac_cv_lib_una_libuna_utf8_string_size_from_utf16" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_copy_from_utf16_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf8_string_copy_from_utf16_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf8_string_copy_from_utf16_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_copy_from_utf16 in -luna" >&5 -$as_echo_n "checking for libuna_utf8_string_copy_from_utf16 in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf8_string_copy_from_utf16+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_with_index_copy_from_utf16_stream in -luna" >&5 +printf %s "checking for libuna_utf8_string_with_index_copy_from_utf16_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -32913,40 +37383,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char libuna_utf8_string_copy_from_utf16 (); +char libuna_utf8_string_with_index_copy_from_utf16_stream (); int -main () +main (void) { -return libuna_utf8_string_copy_from_utf16 (); +return libuna_utf8_string_with_index_copy_from_utf16_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_una_libuna_utf8_string_copy_from_utf16=yes -else - ac_cv_lib_una_libuna_utf8_string_copy_from_utf16=no +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16_stream=yes +else $as_nop + ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_copy_from_utf16" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf8_string_copy_from_utf16" >&6; } -if test "x$ac_cv_lib_una_libuna_utf8_string_copy_from_utf16" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_with_index_copy_from_utf16 in -luna" >&5 -$as_echo_n "checking for libuna_utf8_string_with_index_copy_from_utf16 in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_compare_with_utf16_stream in -luna" >&5 +printf %s "checking for libuna_utf8_string_compare_with_utf16_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf8_string_compare_with_utf16_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -32955,40 +37425,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char libuna_utf8_string_with_index_copy_from_utf16 (); +char libuna_utf8_string_compare_with_utf16_stream (); int -main () +main (void) { -return libuna_utf8_string_with_index_copy_from_utf16 (); +return libuna_utf8_string_compare_with_utf16_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16=yes -else - ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16=no +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_utf8_string_compare_with_utf16_stream=yes +else $as_nop + ac_cv_lib_una_libuna_utf8_string_compare_with_utf16_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16" >&6; } -if test "x$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_compare_with_utf16_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf8_string_compare_with_utf16_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf8_string_compare_with_utf16_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_size_from_utf32 in -luna" >&5 -$as_echo_n "checking for libuna_utf8_string_size_from_utf32 in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf8_string_size_from_utf32+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_size_from_utf32 in -luna" >&5 +printf %s "checking for libuna_utf8_string_size_from_utf32 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf8_string_size_from_utf32+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -32997,40 +37467,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf8_string_size_from_utf32 (); int -main () +main (void) { return libuna_utf8_string_size_from_utf32 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf8_string_size_from_utf32=yes -else +else $as_nop ac_cv_lib_una_libuna_utf8_string_size_from_utf32=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_size_from_utf32" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf8_string_size_from_utf32" >&6; } -if test "x$ac_cv_lib_una_libuna_utf8_string_size_from_utf32" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_size_from_utf32" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf8_string_size_from_utf32" >&6; } +if test "x$ac_cv_lib_una_libuna_utf8_string_size_from_utf32" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_copy_from_utf32 in -luna" >&5 -$as_echo_n "checking for libuna_utf8_string_copy_from_utf32 in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf8_string_copy_from_utf32+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_copy_from_utf32 in -luna" >&5 +printf %s "checking for libuna_utf8_string_copy_from_utf32 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf8_string_copy_from_utf32+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -33039,40 +37509,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf8_string_copy_from_utf32 (); int -main () +main (void) { return libuna_utf8_string_copy_from_utf32 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf8_string_copy_from_utf32=yes -else +else $as_nop ac_cv_lib_una_libuna_utf8_string_copy_from_utf32=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_copy_from_utf32" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf8_string_copy_from_utf32" >&6; } -if test "x$ac_cv_lib_una_libuna_utf8_string_copy_from_utf32" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_copy_from_utf32" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf8_string_copy_from_utf32" >&6; } +if test "x$ac_cv_lib_una_libuna_utf8_string_copy_from_utf32" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_with_index_copy_from_utf32 in -luna" >&5 -$as_echo_n "checking for libuna_utf8_string_with_index_copy_from_utf32 in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_with_index_copy_from_utf32 in -luna" >&5 +printf %s "checking for libuna_utf8_string_with_index_copy_from_utf32 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -33081,40 +37551,250 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf8_string_with_index_copy_from_utf32 (); int -main () +main (void) { return libuna_utf8_string_with_index_copy_from_utf32 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32=yes -else +else $as_nop ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32" >&6; } -if test "x$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32" >&6; } +if test "x$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_size_from_scsu_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf8_string_size_from_scsu_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf8_string_size_from_scsu_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_compare_with_utf32 in -luna" >&5 +printf %s "checking for libuna_utf8_string_compare_with_utf32 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf8_string_compare_with_utf32+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-luna $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libuna_utf8_string_compare_with_utf32 (); +int +main (void) +{ +return libuna_utf8_string_compare_with_utf32 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_utf8_string_compare_with_utf32=yes +else $as_nop + ac_cv_lib_una_libuna_utf8_string_compare_with_utf32=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_compare_with_utf32" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf8_string_compare_with_utf32" >&6; } +if test "x$ac_cv_lib_una_libuna_utf8_string_compare_with_utf32" = xyes +then : + ac_cv_libuna_dummy=yes +else $as_nop + ac_cv_libuna=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_size_from_utf32_stream in -luna" >&5 +printf %s "checking for libuna_utf8_string_size_from_utf32_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf8_string_size_from_utf32_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-luna $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libuna_utf8_string_size_from_utf32_stream (); +int +main (void) +{ +return libuna_utf8_string_size_from_utf32_stream (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_utf8_string_size_from_utf32_stream=yes +else $as_nop + ac_cv_lib_una_libuna_utf8_string_size_from_utf32_stream=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_size_from_utf32_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf8_string_size_from_utf32_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf8_string_size_from_utf32_stream" = xyes +then : + ac_cv_libuna_dummy=yes +else $as_nop + ac_cv_libuna=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_copy_from_utf32_stream in -luna" >&5 +printf %s "checking for libuna_utf8_string_copy_from_utf32_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf8_string_copy_from_utf32_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-luna $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libuna_utf8_string_copy_from_utf32_stream (); +int +main (void) +{ +return libuna_utf8_string_copy_from_utf32_stream (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_utf8_string_copy_from_utf32_stream=yes +else $as_nop + ac_cv_lib_una_libuna_utf8_string_copy_from_utf32_stream=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_copy_from_utf32_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf8_string_copy_from_utf32_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf8_string_copy_from_utf32_stream" = xyes +then : + ac_cv_libuna_dummy=yes +else $as_nop + ac_cv_libuna=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_with_index_copy_from_utf32_stream in -luna" >&5 +printf %s "checking for libuna_utf8_string_with_index_copy_from_utf32_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-luna $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libuna_utf8_string_with_index_copy_from_utf32_stream (); +int +main (void) +{ +return libuna_utf8_string_with_index_copy_from_utf32_stream (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32_stream=yes +else $as_nop + ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32_stream=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32_stream" = xyes +then : + ac_cv_libuna_dummy=yes +else $as_nop + ac_cv_libuna=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_compare_with_utf32_stream in -luna" >&5 +printf %s "checking for libuna_utf8_string_compare_with_utf32_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf8_string_compare_with_utf32_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-luna $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libuna_utf8_string_compare_with_utf32_stream (); +int +main (void) +{ +return libuna_utf8_string_compare_with_utf32_stream (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_utf8_string_compare_with_utf32_stream=yes +else $as_nop + ac_cv_lib_una_libuna_utf8_string_compare_with_utf32_stream=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_compare_with_utf32_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf8_string_compare_with_utf32_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf8_string_compare_with_utf32_stream" = xyes +then : + ac_cv_libuna_dummy=yes +else $as_nop + ac_cv_libuna=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_size_from_scsu_stream in -luna" >&5 +printf %s "checking for libuna_utf8_string_size_from_scsu_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf8_string_size_from_scsu_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -33123,40 +37803,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf8_string_size_from_scsu_stream (); int -main () +main (void) { return libuna_utf8_string_size_from_scsu_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf8_string_size_from_scsu_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_utf8_string_size_from_scsu_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_size_from_scsu_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf8_string_size_from_scsu_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf8_string_size_from_scsu_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_size_from_scsu_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf8_string_size_from_scsu_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf8_string_size_from_scsu_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_copy_from_scsu_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf8_string_copy_from_scsu_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf8_string_copy_from_scsu_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_copy_from_scsu_stream in -luna" >&5 +printf %s "checking for libuna_utf8_string_copy_from_scsu_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf8_string_copy_from_scsu_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -33165,40 +37845,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf8_string_copy_from_scsu_stream (); int -main () +main (void) { return libuna_utf8_string_copy_from_scsu_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf8_string_copy_from_scsu_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_utf8_string_copy_from_scsu_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_copy_from_scsu_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf8_string_copy_from_scsu_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf8_string_copy_from_scsu_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_copy_from_scsu_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf8_string_copy_from_scsu_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf8_string_copy_from_scsu_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_with_index_copy_from_scsu_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf8_string_with_index_copy_from_scsu_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_scsu_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_with_index_copy_from_scsu_stream in -luna" >&5 +printf %s "checking for libuna_utf8_string_with_index_copy_from_scsu_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_scsu_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -33207,41 +37887,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf8_string_with_index_copy_from_scsu_stream (); int -main () +main (void) { return libuna_utf8_string_with_index_copy_from_scsu_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_scsu_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_scsu_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_scsu_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_scsu_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_scsu_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_scsu_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_scsu_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_scsu_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_size_from_byte_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf16_string_size_from_byte_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf16_string_size_from_byte_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_size_from_byte_stream in -luna" >&5 +printf %s "checking for libuna_utf16_string_size_from_byte_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf16_string_size_from_byte_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -33250,40 +37930,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf16_string_size_from_byte_stream (); int -main () +main (void) { return libuna_utf16_string_size_from_byte_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf16_string_size_from_byte_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_utf16_string_size_from_byte_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_size_from_byte_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf16_string_size_from_byte_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf16_string_size_from_byte_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_size_from_byte_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf16_string_size_from_byte_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf16_string_size_from_byte_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_copy_from_byte_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf16_string_copy_from_byte_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf16_string_copy_from_byte_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_copy_from_byte_stream in -luna" >&5 +printf %s "checking for libuna_utf16_string_copy_from_byte_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf16_string_copy_from_byte_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -33292,40 +37972,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf16_string_copy_from_byte_stream (); int -main () +main (void) { return libuna_utf16_string_copy_from_byte_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf16_string_copy_from_byte_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_utf16_string_copy_from_byte_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_copy_from_byte_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf16_string_copy_from_byte_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf16_string_copy_from_byte_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_copy_from_byte_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf16_string_copy_from_byte_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf16_string_copy_from_byte_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_with_index_copy_from_byte_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf16_string_with_index_copy_from_byte_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_byte_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_with_index_copy_from_byte_stream in -luna" >&5 +printf %s "checking for libuna_utf16_string_with_index_copy_from_byte_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_byte_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -33334,40 +38014,82 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf16_string_with_index_copy_from_byte_stream (); int -main () +main (void) { return libuna_utf16_string_with_index_copy_from_byte_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_byte_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_byte_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_byte_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_byte_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_byte_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_byte_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_byte_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_byte_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_size_from_utf7_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf16_string_size_from_utf7_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf16_string_size_from_utf7_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_compare_with_byte_stream in -luna" >&5 +printf %s "checking for libuna_utf16_string_compare_with_byte_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf16_string_compare_with_byte_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-luna $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libuna_utf16_string_compare_with_byte_stream (); +int +main (void) +{ +return libuna_utf16_string_compare_with_byte_stream (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_utf16_string_compare_with_byte_stream=yes +else $as_nop + ac_cv_lib_una_libuna_utf16_string_compare_with_byte_stream=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_compare_with_byte_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf16_string_compare_with_byte_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf16_string_compare_with_byte_stream" = xyes +then : + ac_cv_libuna_dummy=yes +else $as_nop + ac_cv_libuna=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_size_from_utf7_stream in -luna" >&5 +printf %s "checking for libuna_utf16_string_size_from_utf7_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf16_string_size_from_utf7_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -33376,40 +38098,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf16_string_size_from_utf7_stream (); int -main () +main (void) { return libuna_utf16_string_size_from_utf7_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf16_string_size_from_utf7_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_utf16_string_size_from_utf7_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_size_from_utf7_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf16_string_size_from_utf7_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf16_string_size_from_utf7_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_size_from_utf7_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf16_string_size_from_utf7_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf16_string_size_from_utf7_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_copy_from_utf7_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf16_string_copy_from_utf7_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf16_string_copy_from_utf7_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_copy_from_utf7_stream in -luna" >&5 +printf %s "checking for libuna_utf16_string_copy_from_utf7_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf16_string_copy_from_utf7_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -33418,40 +38140,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf16_string_copy_from_utf7_stream (); int -main () +main (void) { return libuna_utf16_string_copy_from_utf7_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf16_string_copy_from_utf7_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_utf16_string_copy_from_utf7_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_copy_from_utf7_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf16_string_copy_from_utf7_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf16_string_copy_from_utf7_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_copy_from_utf7_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf16_string_copy_from_utf7_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf16_string_copy_from_utf7_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_with_index_copy_from_utf7_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf16_string_with_index_copy_from_utf7_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf7_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_with_index_copy_from_utf7_stream in -luna" >&5 +printf %s "checking for libuna_utf16_string_with_index_copy_from_utf7_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf7_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -33460,40 +38182,208 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf16_string_with_index_copy_from_utf7_stream (); int -main () +main (void) { return libuna_utf16_string_with_index_copy_from_utf7_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf7_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf7_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf7_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf7_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf7_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf7_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf7_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf7_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_size_from_utf8_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf16_string_size_from_utf8_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf16_string_size_from_utf8_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_compare_with_utf7_stream in -luna" >&5 +printf %s "checking for libuna_utf16_string_compare_with_utf7_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf16_string_compare_with_utf7_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-luna $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libuna_utf16_string_compare_with_utf7_stream (); +int +main (void) +{ +return libuna_utf16_string_compare_with_utf7_stream (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_utf16_string_compare_with_utf7_stream=yes +else $as_nop + ac_cv_lib_una_libuna_utf16_string_compare_with_utf7_stream=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_compare_with_utf7_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf16_string_compare_with_utf7_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf16_string_compare_with_utf7_stream" = xyes +then : + ac_cv_libuna_dummy=yes +else $as_nop + ac_cv_libuna=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_size_from_utf8 in -luna" >&5 +printf %s "checking for libuna_utf16_string_size_from_utf8 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf16_string_size_from_utf8+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-luna $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libuna_utf16_string_size_from_utf8 (); +int +main (void) +{ +return libuna_utf16_string_size_from_utf8 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_utf16_string_size_from_utf8=yes +else $as_nop + ac_cv_lib_una_libuna_utf16_string_size_from_utf8=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_size_from_utf8" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf16_string_size_from_utf8" >&6; } +if test "x$ac_cv_lib_una_libuna_utf16_string_size_from_utf8" = xyes +then : + ac_cv_libuna_dummy=yes +else $as_nop + ac_cv_libuna=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_copy_from_utf8 in -luna" >&5 +printf %s "checking for libuna_utf16_string_copy_from_utf8 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf16_string_copy_from_utf8+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-luna $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libuna_utf16_string_copy_from_utf8 (); +int +main (void) +{ +return libuna_utf16_string_copy_from_utf8 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_utf16_string_copy_from_utf8=yes +else $as_nop + ac_cv_lib_una_libuna_utf16_string_copy_from_utf8=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_copy_from_utf8" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf16_string_copy_from_utf8" >&6; } +if test "x$ac_cv_lib_una_libuna_utf16_string_copy_from_utf8" = xyes +then : + ac_cv_libuna_dummy=yes +else $as_nop + ac_cv_libuna=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_with_index_copy_from_utf8 in -luna" >&5 +printf %s "checking for libuna_utf16_string_with_index_copy_from_utf8 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-luna $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libuna_utf16_string_with_index_copy_from_utf8 (); +int +main (void) +{ +return libuna_utf16_string_with_index_copy_from_utf8 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8=yes +else $as_nop + ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8" >&6; } +if test "x$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8" = xyes +then : + ac_cv_libuna_dummy=yes +else $as_nop + ac_cv_libuna=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_size_from_utf8_stream in -luna" >&5 +printf %s "checking for libuna_utf16_string_size_from_utf8_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf16_string_size_from_utf8_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -33502,40 +38392,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf16_string_size_from_utf8_stream (); int -main () +main (void) { return libuna_utf16_string_size_from_utf8_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf16_string_size_from_utf8_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_utf16_string_size_from_utf8_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_size_from_utf8_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf16_string_size_from_utf8_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf16_string_size_from_utf8_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_size_from_utf8_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf16_string_size_from_utf8_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf16_string_size_from_utf8_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_copy_from_utf8_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf16_string_copy_from_utf8_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf16_string_copy_from_utf8_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_copy_from_utf8_stream in -luna" >&5 +printf %s "checking for libuna_utf16_string_copy_from_utf8_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf16_string_copy_from_utf8_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -33544,40 +38434,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf16_string_copy_from_utf8_stream (); int -main () +main (void) { return libuna_utf16_string_copy_from_utf8_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf16_string_copy_from_utf8_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_utf16_string_copy_from_utf8_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_copy_from_utf8_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf16_string_copy_from_utf8_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf16_string_copy_from_utf8_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_copy_from_utf8_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf16_string_copy_from_utf8_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf16_string_copy_from_utf8_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_with_index_copy_from_utf8_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf16_string_with_index_copy_from_utf8_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_with_index_copy_from_utf8_stream in -luna" >&5 +printf %s "checking for libuna_utf16_string_with_index_copy_from_utf8_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -33586,40 +38476,82 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf16_string_with_index_copy_from_utf8_stream (); int -main () +main (void) { return libuna_utf16_string_with_index_copy_from_utf8_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_size_from_utf16_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf16_string_size_from_utf16_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf16_string_size_from_utf16_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_compare_with_utf8_stream in -luna" >&5 +printf %s "checking for libuna_utf16_string_compare_with_utf8_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf16_string_compare_with_utf8_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-luna $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libuna_utf16_string_compare_with_utf8_stream (); +int +main (void) +{ +return libuna_utf16_string_compare_with_utf8_stream (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_utf16_string_compare_with_utf8_stream=yes +else $as_nop + ac_cv_lib_una_libuna_utf16_string_compare_with_utf8_stream=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_compare_with_utf8_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf16_string_compare_with_utf8_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf16_string_compare_with_utf8_stream" = xyes +then : + ac_cv_libuna_dummy=yes +else $as_nop + ac_cv_libuna=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_size_from_utf16_stream in -luna" >&5 +printf %s "checking for libuna_utf16_string_size_from_utf16_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf16_string_size_from_utf16_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -33628,40 +38560,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf16_string_size_from_utf16_stream (); int -main () +main (void) { return libuna_utf16_string_size_from_utf16_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf16_string_size_from_utf16_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_utf16_string_size_from_utf16_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_size_from_utf16_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf16_string_size_from_utf16_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf16_string_size_from_utf16_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_size_from_utf16_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf16_string_size_from_utf16_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf16_string_size_from_utf16_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_copy_from_utf16_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf16_string_copy_from_utf16_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf16_string_copy_from_utf16_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_copy_from_utf16_stream in -luna" >&5 +printf %s "checking for libuna_utf16_string_copy_from_utf16_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf16_string_copy_from_utf16_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -33670,40 +38602,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf16_string_copy_from_utf16_stream (); int -main () +main (void) { return libuna_utf16_string_copy_from_utf16_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf16_string_copy_from_utf16_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_utf16_string_copy_from_utf16_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_copy_from_utf16_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf16_string_copy_from_utf16_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf16_string_copy_from_utf16_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_copy_from_utf16_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf16_string_copy_from_utf16_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf16_string_copy_from_utf16_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_with_index_copy_from_utf16_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf16_string_with_index_copy_from_utf16_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf16_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_with_index_copy_from_utf16_stream in -luna" >&5 +printf %s "checking for libuna_utf16_string_with_index_copy_from_utf16_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf16_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -33712,40 +38644,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf16_string_with_index_copy_from_utf16_stream (); int -main () +main (void) { return libuna_utf16_string_with_index_copy_from_utf16_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf16_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf16_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf16_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf16_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf16_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf16_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf16_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf16_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_size_from_utf32_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf16_string_size_from_utf32_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf16_string_size_from_utf32_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_compare_with_utf16_stream in -luna" >&5 +printf %s "checking for libuna_utf16_string_compare_with_utf16_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf16_string_compare_with_utf16_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -33754,40 +38686,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char libuna_utf16_string_size_from_utf32_stream (); +char libuna_utf16_string_compare_with_utf16_stream (); int -main () +main (void) { -return libuna_utf16_string_size_from_utf32_stream (); +return libuna_utf16_string_compare_with_utf16_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_una_libuna_utf16_string_size_from_utf32_stream=yes -else - ac_cv_lib_una_libuna_utf16_string_size_from_utf32_stream=no +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_utf16_string_compare_with_utf16_stream=yes +else $as_nop + ac_cv_lib_una_libuna_utf16_string_compare_with_utf16_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_size_from_utf32_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf16_string_size_from_utf32_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf16_string_size_from_utf32_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_compare_with_utf16_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf16_string_compare_with_utf16_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf16_string_compare_with_utf16_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_copy_from_utf32_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf16_string_copy_from_utf32_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf16_string_copy_from_utf32_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_size_from_utf32 in -luna" >&5 +printf %s "checking for libuna_utf16_string_size_from_utf32 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf16_string_size_from_utf32+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -33796,40 +38728,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char libuna_utf16_string_copy_from_utf32_stream (); +char libuna_utf16_string_size_from_utf32 (); int -main () +main (void) { -return libuna_utf16_string_copy_from_utf32_stream (); +return libuna_utf16_string_size_from_utf32 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_una_libuna_utf16_string_copy_from_utf32_stream=yes -else - ac_cv_lib_una_libuna_utf16_string_copy_from_utf32_stream=no +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_utf16_string_size_from_utf32=yes +else $as_nop + ac_cv_lib_una_libuna_utf16_string_size_from_utf32=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_copy_from_utf32_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf16_string_copy_from_utf32_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf16_string_copy_from_utf32_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_size_from_utf32" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf16_string_size_from_utf32" >&6; } +if test "x$ac_cv_lib_una_libuna_utf16_string_size_from_utf32" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_with_index_copy_from_utf32_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf16_string_with_index_copy_from_utf32_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_copy_from_utf32 in -luna" >&5 +printf %s "checking for libuna_utf16_string_copy_from_utf32 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf16_string_copy_from_utf32+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -33838,40 +38770,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char libuna_utf16_string_with_index_copy_from_utf32_stream (); +char libuna_utf16_string_copy_from_utf32 (); int -main () +main (void) { -return libuna_utf16_string_with_index_copy_from_utf32_stream (); +return libuna_utf16_string_copy_from_utf32 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32_stream=yes -else - ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32_stream=no +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_utf16_string_copy_from_utf32=yes +else $as_nop + ac_cv_lib_una_libuna_utf16_string_copy_from_utf32=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_copy_from_utf32" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf16_string_copy_from_utf32" >&6; } +if test "x$ac_cv_lib_una_libuna_utf16_string_copy_from_utf32" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_size_from_utf8 in -luna" >&5 -$as_echo_n "checking for libuna_utf16_string_size_from_utf8 in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf16_string_size_from_utf8+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_with_index_copy_from_utf32 in -luna" >&5 +printf %s "checking for libuna_utf16_string_with_index_copy_from_utf32 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -33880,40 +38812,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char libuna_utf16_string_size_from_utf8 (); +char libuna_utf16_string_with_index_copy_from_utf32 (); int -main () +main (void) { -return libuna_utf16_string_size_from_utf8 (); +return libuna_utf16_string_with_index_copy_from_utf32 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_una_libuna_utf16_string_size_from_utf8=yes -else - ac_cv_lib_una_libuna_utf16_string_size_from_utf8=no +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32=yes +else $as_nop + ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_size_from_utf8" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf16_string_size_from_utf8" >&6; } -if test "x$ac_cv_lib_una_libuna_utf16_string_size_from_utf8" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32" >&6; } +if test "x$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_copy_from_utf8 in -luna" >&5 -$as_echo_n "checking for libuna_utf16_string_copy_from_utf8 in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf16_string_copy_from_utf8+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_compare_with_utf32 in -luna" >&5 +printf %s "checking for libuna_utf16_string_compare_with_utf32 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf16_string_compare_with_utf32+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -33922,40 +38854,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char libuna_utf16_string_copy_from_utf8 (); +char libuna_utf16_string_compare_with_utf32 (); int -main () +main (void) { -return libuna_utf16_string_copy_from_utf8 (); +return libuna_utf16_string_compare_with_utf32 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_una_libuna_utf16_string_copy_from_utf8=yes -else - ac_cv_lib_una_libuna_utf16_string_copy_from_utf8=no +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_utf16_string_compare_with_utf32=yes +else $as_nop + ac_cv_lib_una_libuna_utf16_string_compare_with_utf32=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_copy_from_utf8" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf16_string_copy_from_utf8" >&6; } -if test "x$ac_cv_lib_una_libuna_utf16_string_copy_from_utf8" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_compare_with_utf32" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf16_string_compare_with_utf32" >&6; } +if test "x$ac_cv_lib_una_libuna_utf16_string_compare_with_utf32" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_with_index_copy_from_utf8 in -luna" >&5 -$as_echo_n "checking for libuna_utf16_string_with_index_copy_from_utf8 in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_size_from_utf32_stream in -luna" >&5 +printf %s "checking for libuna_utf16_string_size_from_utf32_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf16_string_size_from_utf32_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -33964,40 +38896,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char libuna_utf16_string_with_index_copy_from_utf8 (); +char libuna_utf16_string_size_from_utf32_stream (); int -main () +main (void) { -return libuna_utf16_string_with_index_copy_from_utf8 (); +return libuna_utf16_string_size_from_utf32_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8=yes -else - ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8=no +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_utf16_string_size_from_utf32_stream=yes +else $as_nop + ac_cv_lib_una_libuna_utf16_string_size_from_utf32_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8" >&6; } -if test "x$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_size_from_utf32_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf16_string_size_from_utf32_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf16_string_size_from_utf32_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_size_from_utf32 in -luna" >&5 -$as_echo_n "checking for libuna_utf16_string_size_from_utf32 in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf16_string_size_from_utf32+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_copy_from_utf32_stream in -luna" >&5 +printf %s "checking for libuna_utf16_string_copy_from_utf32_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf16_string_copy_from_utf32_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -34006,40 +38938,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char libuna_utf16_string_size_from_utf32 (); +char libuna_utf16_string_copy_from_utf32_stream (); int -main () +main (void) { -return libuna_utf16_string_size_from_utf32 (); +return libuna_utf16_string_copy_from_utf32_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_una_libuna_utf16_string_size_from_utf32=yes -else - ac_cv_lib_una_libuna_utf16_string_size_from_utf32=no +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_utf16_string_copy_from_utf32_stream=yes +else $as_nop + ac_cv_lib_una_libuna_utf16_string_copy_from_utf32_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_size_from_utf32" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf16_string_size_from_utf32" >&6; } -if test "x$ac_cv_lib_una_libuna_utf16_string_size_from_utf32" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_copy_from_utf32_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf16_string_copy_from_utf32_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf16_string_copy_from_utf32_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_copy_from_utf32 in -luna" >&5 -$as_echo_n "checking for libuna_utf16_string_copy_from_utf32 in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf16_string_copy_from_utf32+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_with_index_copy_from_utf32_stream in -luna" >&5 +printf %s "checking for libuna_utf16_string_with_index_copy_from_utf32_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -34048,40 +38980,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char libuna_utf16_string_copy_from_utf32 (); +char libuna_utf16_string_with_index_copy_from_utf32_stream (); int -main () +main (void) { -return libuna_utf16_string_copy_from_utf32 (); +return libuna_utf16_string_with_index_copy_from_utf32_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_una_libuna_utf16_string_copy_from_utf32=yes -else - ac_cv_lib_una_libuna_utf16_string_copy_from_utf32=no +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32_stream=yes +else $as_nop + ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_copy_from_utf32" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf16_string_copy_from_utf32" >&6; } -if test "x$ac_cv_lib_una_libuna_utf16_string_copy_from_utf32" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_with_index_copy_from_utf32 in -luna" >&5 -$as_echo_n "checking for libuna_utf16_string_with_index_copy_from_utf32 in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_compare_with_utf32_stream in -luna" >&5 +printf %s "checking for libuna_utf16_string_compare_with_utf32_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf16_string_compare_with_utf32_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -34090,40 +39022,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char libuna_utf16_string_with_index_copy_from_utf32 (); +char libuna_utf16_string_compare_with_utf32_stream (); int -main () +main (void) { -return libuna_utf16_string_with_index_copy_from_utf32 (); +return libuna_utf16_string_compare_with_utf32_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32=yes -else - ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32=no +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_utf16_string_compare_with_utf32_stream=yes +else $as_nop + ac_cv_lib_una_libuna_utf16_string_compare_with_utf32_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32" >&6; } -if test "x$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_compare_with_utf32_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf16_string_compare_with_utf32_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf16_string_compare_with_utf32_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_size_from_scsu_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf16_string_size_from_scsu_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf16_string_size_from_scsu_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_size_from_scsu_stream in -luna" >&5 +printf %s "checking for libuna_utf16_string_size_from_scsu_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf16_string_size_from_scsu_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -34132,40 +39064,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf16_string_size_from_scsu_stream (); int -main () +main (void) { return libuna_utf16_string_size_from_scsu_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf16_string_size_from_scsu_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_utf16_string_size_from_scsu_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_size_from_scsu_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf16_string_size_from_scsu_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf16_string_size_from_scsu_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_size_from_scsu_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf16_string_size_from_scsu_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf16_string_size_from_scsu_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_copy_from_scsu_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf16_string_copy_from_scsu_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf16_string_copy_from_scsu_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_copy_from_scsu_stream in -luna" >&5 +printf %s "checking for libuna_utf16_string_copy_from_scsu_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf16_string_copy_from_scsu_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -34174,40 +39106,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf16_string_copy_from_scsu_stream (); int -main () +main (void) { return libuna_utf16_string_copy_from_scsu_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf16_string_copy_from_scsu_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_utf16_string_copy_from_scsu_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_copy_from_scsu_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf16_string_copy_from_scsu_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf16_string_copy_from_scsu_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_copy_from_scsu_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf16_string_copy_from_scsu_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf16_string_copy_from_scsu_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_with_index_copy_from_scsu_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf16_string_with_index_copy_from_scsu_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_scsu_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_with_index_copy_from_scsu_stream in -luna" >&5 +printf %s "checking for libuna_utf16_string_with_index_copy_from_scsu_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_scsu_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -34216,41 +39148,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf16_string_with_index_copy_from_scsu_stream (); int -main () +main (void) { return libuna_utf16_string_with_index_copy_from_scsu_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_scsu_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_scsu_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_scsu_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_scsu_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_scsu_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_scsu_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_scsu_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_scsu_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_size_from_byte_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf32_string_size_from_byte_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf32_string_size_from_byte_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_size_from_byte_stream in -luna" >&5 +printf %s "checking for libuna_utf32_string_size_from_byte_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf32_string_size_from_byte_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -34259,40 +39191,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf32_string_size_from_byte_stream (); int -main () +main (void) { return libuna_utf32_string_size_from_byte_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf32_string_size_from_byte_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_utf32_string_size_from_byte_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_size_from_byte_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf32_string_size_from_byte_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf32_string_size_from_byte_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_size_from_byte_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf32_string_size_from_byte_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf32_string_size_from_byte_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_copy_from_byte_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf32_string_copy_from_byte_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf32_string_copy_from_byte_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_copy_from_byte_stream in -luna" >&5 +printf %s "checking for libuna_utf32_string_copy_from_byte_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf32_string_copy_from_byte_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -34301,40 +39233,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf32_string_copy_from_byte_stream (); int -main () +main (void) { return libuna_utf32_string_copy_from_byte_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf32_string_copy_from_byte_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_utf32_string_copy_from_byte_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_copy_from_byte_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf32_string_copy_from_byte_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf32_string_copy_from_byte_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_copy_from_byte_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf32_string_copy_from_byte_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf32_string_copy_from_byte_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_with_index_copy_from_byte_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf32_string_with_index_copy_from_byte_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_byte_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_with_index_copy_from_byte_stream in -luna" >&5 +printf %s "checking for libuna_utf32_string_with_index_copy_from_byte_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_byte_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -34343,40 +39275,82 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf32_string_with_index_copy_from_byte_stream (); int -main () +main (void) { return libuna_utf32_string_with_index_copy_from_byte_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_byte_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_byte_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_byte_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_byte_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_byte_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_byte_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_byte_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_byte_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_size_from_utf7_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf32_string_size_from_utf7_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf32_string_size_from_utf7_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_compare_with_byte_stream in -luna" >&5 +printf %s "checking for libuna_utf32_string_compare_with_byte_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf32_string_compare_with_byte_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-luna $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libuna_utf32_string_compare_with_byte_stream (); +int +main (void) +{ +return libuna_utf32_string_compare_with_byte_stream (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_utf32_string_compare_with_byte_stream=yes +else $as_nop + ac_cv_lib_una_libuna_utf32_string_compare_with_byte_stream=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_compare_with_byte_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf32_string_compare_with_byte_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf32_string_compare_with_byte_stream" = xyes +then : + ac_cv_libuna_dummy=yes +else $as_nop + ac_cv_libuna=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_size_from_utf7_stream in -luna" >&5 +printf %s "checking for libuna_utf32_string_size_from_utf7_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf32_string_size_from_utf7_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -34385,40 +39359,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf32_string_size_from_utf7_stream (); int -main () +main (void) { return libuna_utf32_string_size_from_utf7_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf32_string_size_from_utf7_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_utf32_string_size_from_utf7_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_size_from_utf7_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf32_string_size_from_utf7_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf32_string_size_from_utf7_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_size_from_utf7_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf32_string_size_from_utf7_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf32_string_size_from_utf7_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_copy_from_utf7_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf32_string_copy_from_utf7_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf32_string_copy_from_utf7_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_copy_from_utf7_stream in -luna" >&5 +printf %s "checking for libuna_utf32_string_copy_from_utf7_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf32_string_copy_from_utf7_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -34427,40 +39401,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf32_string_copy_from_utf7_stream (); int -main () +main (void) { return libuna_utf32_string_copy_from_utf7_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf32_string_copy_from_utf7_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_utf32_string_copy_from_utf7_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_copy_from_utf7_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf32_string_copy_from_utf7_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf32_string_copy_from_utf7_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_copy_from_utf7_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf32_string_copy_from_utf7_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf32_string_copy_from_utf7_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_with_index_copy_from_utf7_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf32_string_with_index_copy_from_utf7_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf7_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_with_index_copy_from_utf7_stream in -luna" >&5 +printf %s "checking for libuna_utf32_string_with_index_copy_from_utf7_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf7_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -34469,40 +39443,82 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf32_string_with_index_copy_from_utf7_stream (); int -main () +main (void) { return libuna_utf32_string_with_index_copy_from_utf7_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf7_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf7_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf7_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf7_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf7_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf7_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf7_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf7_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_size_from_utf8_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf32_string_size_from_utf8_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf32_string_size_from_utf8_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_compare_with_utf7_stream in -luna" >&5 +printf %s "checking for libuna_utf32_string_compare_with_utf7_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf32_string_compare_with_utf7_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-luna $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libuna_utf32_string_compare_with_utf7_stream (); +int +main (void) +{ +return libuna_utf32_string_compare_with_utf7_stream (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_utf32_string_compare_with_utf7_stream=yes +else $as_nop + ac_cv_lib_una_libuna_utf32_string_compare_with_utf7_stream=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_compare_with_utf7_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf32_string_compare_with_utf7_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf32_string_compare_with_utf7_stream" = xyes +then : + ac_cv_libuna_dummy=yes +else $as_nop + ac_cv_libuna=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_size_from_utf8_stream in -luna" >&5 +printf %s "checking for libuna_utf32_string_size_from_utf8_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf32_string_size_from_utf8_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -34511,40 +39527,164 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf32_string_size_from_utf8_stream (); int -main () +main (void) { return libuna_utf32_string_size_from_utf8_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf32_string_size_from_utf8_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_utf32_string_size_from_utf8_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_size_from_utf8_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf32_string_size_from_utf8_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf32_string_size_from_utf8_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_size_from_utf8_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf32_string_size_from_utf8_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf32_string_size_from_utf8_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_copy_from_utf8_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf32_string_copy_from_utf8_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf32_string_copy_from_utf8_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_size_from_utf8 in -luna" >&5 +printf %s "checking for libuna_utf32_string_size_from_utf8 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf32_string_size_from_utf8+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-luna $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libuna_utf32_string_size_from_utf8 (); +int +main (void) +{ +return libuna_utf32_string_size_from_utf8 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_utf32_string_size_from_utf8=yes +else $as_nop + ac_cv_lib_una_libuna_utf32_string_size_from_utf8=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_size_from_utf8" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf32_string_size_from_utf8" >&6; } +if test "x$ac_cv_lib_una_libuna_utf32_string_size_from_utf8" = xyes +then : + ac_cv_libuna_dummy=yes +else $as_nop + ac_cv_libuna=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_copy_from_utf8 in -luna" >&5 +printf %s "checking for libuna_utf32_string_copy_from_utf8 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf32_string_copy_from_utf8+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-luna $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libuna_utf32_string_copy_from_utf8 (); +int +main (void) +{ +return libuna_utf32_string_copy_from_utf8 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_utf32_string_copy_from_utf8=yes +else $as_nop + ac_cv_lib_una_libuna_utf32_string_copy_from_utf8=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_copy_from_utf8" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf32_string_copy_from_utf8" >&6; } +if test "x$ac_cv_lib_una_libuna_utf32_string_copy_from_utf8" = xyes +then : + ac_cv_libuna_dummy=yes +else $as_nop + ac_cv_libuna=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ac_cv_libuna_dummy=yes in -llibuna_utf32_string_with_index_copy_from_utf8" >&5 +printf %s "checking for ac_cv_libuna_dummy=yes in -llibuna_utf32_string_with_index_copy_from_utf8... " >&6; } +if test ${ac_cv_lib_libuna_utf32_string_with_index_copy_from_utf8_ac_cv_libuna_dummy_yes+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-llibuna_utf32_string_with_index_copy_from_utf8 $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char ac_cv_libuna_dummy=yes (); +int +main (void) +{ +return ac_cv_libuna_dummy=yes (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_libuna_utf32_string_with_index_copy_from_utf8_ac_cv_libuna_dummy_yes=yes +else $as_nop + ac_cv_lib_libuna_utf32_string_with_index_copy_from_utf8_ac_cv_libuna_dummy_yes=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_libuna_utf32_string_with_index_copy_from_utf8_ac_cv_libuna_dummy_yes" >&5 +printf "%s\n" "$ac_cv_lib_libuna_utf32_string_with_index_copy_from_utf8_ac_cv_libuna_dummy_yes" >&6; } +if test "x$ac_cv_lib_libuna_utf32_string_with_index_copy_from_utf8_ac_cv_libuna_dummy_yes" = xyes +then : + ac_cv_libuna=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_copy_from_utf8_stream in -luna" >&5 +printf %s "checking for libuna_utf32_string_copy_from_utf8_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf32_string_copy_from_utf8_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -34553,40 +39693,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf32_string_copy_from_utf8_stream (); int -main () +main (void) { return libuna_utf32_string_copy_from_utf8_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf32_string_copy_from_utf8_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_utf32_string_copy_from_utf8_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_copy_from_utf8_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf32_string_copy_from_utf8_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf32_string_copy_from_utf8_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_copy_from_utf8_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf32_string_copy_from_utf8_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf32_string_copy_from_utf8_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_with_index_copy_from_utf8_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf32_string_with_index_copy_from_utf8_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf8_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_with_index_copy_from_utf8_stream in -luna" >&5 +printf %s "checking for libuna_utf32_string_with_index_copy_from_utf8_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf8_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -34595,40 +39735,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf32_string_with_index_copy_from_utf8_stream (); int -main () +main (void) { return libuna_utf32_string_with_index_copy_from_utf8_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf8_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf8_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf8_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf8_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf8_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf8_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf8_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf8_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_size_from_utf16_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf32_string_size_from_utf16_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf32_string_size_from_utf16_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_compare_with_utf8_stream in -luna" >&5 +printf %s "checking for libuna_utf32_string_compare_with_utf8_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf32_string_compare_with_utf8_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -34637,40 +39777,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char libuna_utf32_string_size_from_utf16_stream (); +char libuna_utf32_string_compare_with_utf8_stream (); int -main () +main (void) { -return libuna_utf32_string_size_from_utf16_stream (); +return libuna_utf32_string_compare_with_utf8_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_una_libuna_utf32_string_size_from_utf16_stream=yes -else - ac_cv_lib_una_libuna_utf32_string_size_from_utf16_stream=no +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_utf32_string_compare_with_utf8_stream=yes +else $as_nop + ac_cv_lib_una_libuna_utf32_string_compare_with_utf8_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_size_from_utf16_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf32_string_size_from_utf16_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf32_string_size_from_utf16_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_compare_with_utf8_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf32_string_compare_with_utf8_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf32_string_compare_with_utf8_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_copy_from_utf16_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf32_string_copy_from_utf16_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf32_string_copy_from_utf16_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_size_from_utf16 in -luna" >&5 +printf %s "checking for libuna_utf32_string_size_from_utf16 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf32_string_size_from_utf16+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -34679,40 +39819,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char libuna_utf32_string_copy_from_utf16_stream (); +char libuna_utf32_string_size_from_utf16 (); int -main () +main (void) { -return libuna_utf32_string_copy_from_utf16_stream (); +return libuna_utf32_string_size_from_utf16 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_una_libuna_utf32_string_copy_from_utf16_stream=yes -else - ac_cv_lib_una_libuna_utf32_string_copy_from_utf16_stream=no +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_utf32_string_size_from_utf16=yes +else $as_nop + ac_cv_lib_una_libuna_utf32_string_size_from_utf16=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_copy_from_utf16_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf32_string_copy_from_utf16_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf32_string_copy_from_utf16_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_size_from_utf16" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf32_string_size_from_utf16" >&6; } +if test "x$ac_cv_lib_una_libuna_utf32_string_size_from_utf16" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_with_index_copy_from_utf16_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf32_string_with_index_copy_from_utf16_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_copy_from_utf16 in -luna" >&5 +printf %s "checking for libuna_utf32_string_copy_from_utf16 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf32_string_copy_from_utf16+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -34721,40 +39861,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char libuna_utf32_string_with_index_copy_from_utf16_stream (); +char libuna_utf32_string_copy_from_utf16 (); int -main () +main (void) { -return libuna_utf32_string_with_index_copy_from_utf16_stream (); +return libuna_utf32_string_copy_from_utf16 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16_stream=yes -else - ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16_stream=no +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_utf32_string_copy_from_utf16=yes +else $as_nop + ac_cv_lib_una_libuna_utf32_string_copy_from_utf16=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_copy_from_utf16" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf32_string_copy_from_utf16" >&6; } +if test "x$ac_cv_lib_una_libuna_utf32_string_copy_from_utf16" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_size_from_utf32_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf32_string_size_from_utf32_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf32_string_size_from_utf32_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_with_index_copy_from_utf16 in -luna" >&5 +printf %s "checking for libuna_utf32_string_with_index_copy_from_utf16 in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -34763,40 +39903,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char libuna_utf32_string_size_from_utf32_stream (); +char libuna_utf32_string_with_index_copy_from_utf16 (); int -main () +main (void) { -return libuna_utf32_string_size_from_utf32_stream (); +return libuna_utf32_string_with_index_copy_from_utf16 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_una_libuna_utf32_string_size_from_utf32_stream=yes -else - ac_cv_lib_una_libuna_utf32_string_size_from_utf32_stream=no +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16=yes +else $as_nop + ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_size_from_utf32_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf32_string_size_from_utf32_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf32_string_size_from_utf32_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16" >&6; } +if test "x$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_copy_from_utf32_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf32_string_copy_from_utf32_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf32_string_copy_from_utf32_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_size_from_utf16_stream in -luna" >&5 +printf %s "checking for libuna_utf32_string_size_from_utf16_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf32_string_size_from_utf16_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -34805,40 +39945,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char libuna_utf32_string_copy_from_utf32_stream (); +char libuna_utf32_string_size_from_utf16_stream (); int -main () +main (void) { -return libuna_utf32_string_copy_from_utf32_stream (); +return libuna_utf32_string_size_from_utf16_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_una_libuna_utf32_string_copy_from_utf32_stream=yes -else - ac_cv_lib_una_libuna_utf32_string_copy_from_utf32_stream=no +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_utf32_string_size_from_utf16_stream=yes +else $as_nop + ac_cv_lib_una_libuna_utf32_string_size_from_utf16_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_copy_from_utf32_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf32_string_copy_from_utf32_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf32_string_copy_from_utf32_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_size_from_utf16_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf32_string_size_from_utf16_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf32_string_size_from_utf16_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_with_index_copy_from_utf32_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf32_string_with_index_copy_from_utf32_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf32_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_copy_from_utf16_stream in -luna" >&5 +printf %s "checking for libuna_utf32_string_copy_from_utf16_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf32_string_copy_from_utf16_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -34847,40 +39987,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char libuna_utf32_string_with_index_copy_from_utf32_stream (); +char libuna_utf32_string_copy_from_utf16_stream (); int -main () +main (void) { -return libuna_utf32_string_with_index_copy_from_utf32_stream (); +return libuna_utf32_string_copy_from_utf16_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf32_stream=yes -else - ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf32_stream=no +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_utf32_string_copy_from_utf16_stream=yes +else $as_nop + ac_cv_lib_una_libuna_utf32_string_copy_from_utf16_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf32_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf32_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf32_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_copy_from_utf16_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf32_string_copy_from_utf16_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf32_string_copy_from_utf16_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_size_from_utf8 in -luna" >&5 -$as_echo_n "checking for libuna_utf32_string_size_from_utf8 in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf32_string_size_from_utf8+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_with_index_copy_from_utf16_stream in -luna" >&5 +printf %s "checking for libuna_utf32_string_with_index_copy_from_utf16_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -34889,40 +40029,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char libuna_utf32_string_size_from_utf8 (); +char libuna_utf32_string_with_index_copy_from_utf16_stream (); int -main () +main (void) { -return libuna_utf32_string_size_from_utf8 (); +return libuna_utf32_string_with_index_copy_from_utf16_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_una_libuna_utf32_string_size_from_utf8=yes -else - ac_cv_lib_una_libuna_utf32_string_size_from_utf8=no +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16_stream=yes +else $as_nop + ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_size_from_utf8" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf32_string_size_from_utf8" >&6; } -if test "x$ac_cv_lib_una_libuna_utf32_string_size_from_utf8" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_copy_from_utf8 in -luna" >&5 -$as_echo_n "checking for libuna_utf32_string_copy_from_utf8 in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf32_string_copy_from_utf8+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_compare_with_utf16_stream in -luna" >&5 +printf %s "checking for libuna_utf32_string_compare_with_utf16_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf32_string_compare_with_utf16_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -34931,80 +40071,82 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char libuna_utf32_string_copy_from_utf8 (); +char libuna_utf32_string_compare_with_utf16_stream (); int -main () +main (void) { -return libuna_utf32_string_copy_from_utf8 (); +return libuna_utf32_string_compare_with_utf16_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_una_libuna_utf32_string_copy_from_utf8=yes -else - ac_cv_lib_una_libuna_utf32_string_copy_from_utf8=no +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_utf32_string_compare_with_utf16_stream=yes +else $as_nop + ac_cv_lib_una_libuna_utf32_string_compare_with_utf16_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_copy_from_utf8" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf32_string_copy_from_utf8" >&6; } -if test "x$ac_cv_lib_una_libuna_utf32_string_copy_from_utf8" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_compare_with_utf16_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf32_string_compare_with_utf16_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf32_string_compare_with_utf16_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ac_cv_libuna_dummy=yes in -llibuna_utf32_string_with_index_copy_from_utf8" >&5 -$as_echo_n "checking for ac_cv_libuna_dummy=yes in -llibuna_utf32_string_with_index_copy_from_utf8... " >&6; } -if ${ac_cv_lib_libuna_utf32_string_with_index_copy_from_utf8_ac_cv_libuna_dummy_yes+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_size_from_utf32_stream in -luna" >&5 +printf %s "checking for libuna_utf32_string_size_from_utf32_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf32_string_size_from_utf32_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS -LIBS="-llibuna_utf32_string_with_index_copy_from_utf8 $LIBS" +LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char ac_cv_libuna_dummy=yes (); +char libuna_utf32_string_size_from_utf32_stream (); int -main () +main (void) { -return ac_cv_libuna_dummy=yes (); +return libuna_utf32_string_size_from_utf32_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_libuna_utf32_string_with_index_copy_from_utf8_ac_cv_libuna_dummy_yes=yes -else - ac_cv_lib_libuna_utf32_string_with_index_copy_from_utf8_ac_cv_libuna_dummy_yes=no +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_utf32_string_size_from_utf32_stream=yes +else $as_nop + ac_cv_lib_una_libuna_utf32_string_size_from_utf32_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_libuna_utf32_string_with_index_copy_from_utf8_ac_cv_libuna_dummy_yes" >&5 -$as_echo "$ac_cv_lib_libuna_utf32_string_with_index_copy_from_utf8_ac_cv_libuna_dummy_yes" >&6; } -if test "x$ac_cv_lib_libuna_utf32_string_with_index_copy_from_utf8_ac_cv_libuna_dummy_yes" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_size_from_utf32_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf32_string_size_from_utf32_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf32_string_size_from_utf32_stream" = xyes +then : + ac_cv_libuna_dummy=yes +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_size_from_utf16 in -luna" >&5 -$as_echo_n "checking for libuna_utf32_string_size_from_utf16 in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf32_string_size_from_utf16+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_copy_from_utf32_stream in -luna" >&5 +printf %s "checking for libuna_utf32_string_copy_from_utf32_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf32_string_copy_from_utf32_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -35013,40 +40155,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char libuna_utf32_string_size_from_utf16 (); +char libuna_utf32_string_copy_from_utf32_stream (); int -main () +main (void) { -return libuna_utf32_string_size_from_utf16 (); +return libuna_utf32_string_copy_from_utf32_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_una_libuna_utf32_string_size_from_utf16=yes -else - ac_cv_lib_una_libuna_utf32_string_size_from_utf16=no +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_utf32_string_copy_from_utf32_stream=yes +else $as_nop + ac_cv_lib_una_libuna_utf32_string_copy_from_utf32_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_size_from_utf16" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf32_string_size_from_utf16" >&6; } -if test "x$ac_cv_lib_una_libuna_utf32_string_size_from_utf16" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_copy_from_utf32_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf32_string_copy_from_utf32_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf32_string_copy_from_utf32_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_copy_from_utf16 in -luna" >&5 -$as_echo_n "checking for libuna_utf32_string_copy_from_utf16 in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf32_string_copy_from_utf16+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_with_index_copy_from_utf32_stream in -luna" >&5 +printf %s "checking for libuna_utf32_string_with_index_copy_from_utf32_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf32_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -35055,40 +40197,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char libuna_utf32_string_copy_from_utf16 (); +char libuna_utf32_string_with_index_copy_from_utf32_stream (); int -main () +main (void) { -return libuna_utf32_string_copy_from_utf16 (); +return libuna_utf32_string_with_index_copy_from_utf32_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_una_libuna_utf32_string_copy_from_utf16=yes -else - ac_cv_lib_una_libuna_utf32_string_copy_from_utf16=no +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf32_stream=yes +else $as_nop + ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf32_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_copy_from_utf16" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf32_string_copy_from_utf16" >&6; } -if test "x$ac_cv_lib_una_libuna_utf32_string_copy_from_utf16" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf32_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf32_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf32_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_with_index_copy_from_utf16 in -luna" >&5 -$as_echo_n "checking for libuna_utf32_string_with_index_copy_from_utf16 in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_compare_with_utf32_stream in -luna" >&5 +printf %s "checking for libuna_utf32_string_compare_with_utf32_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf32_string_compare_with_utf32_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -35097,40 +40239,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char libuna_utf32_string_with_index_copy_from_utf16 (); +char libuna_utf32_string_compare_with_utf32_stream (); int -main () +main (void) { -return libuna_utf32_string_with_index_copy_from_utf16 (); +return libuna_utf32_string_compare_with_utf32_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16=yes -else - ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16=no +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_una_libuna_utf32_string_compare_with_utf32_stream=yes +else $as_nop + ac_cv_lib_una_libuna_utf32_string_compare_with_utf32_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16" >&6; } -if test "x$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_compare_with_utf32_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf32_string_compare_with_utf32_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf32_string_compare_with_utf32_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_size_from_scsu_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf32_string_size_from_scsu_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf32_string_size_from_scsu_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_size_from_scsu_stream in -luna" >&5 +printf %s "checking for libuna_utf32_string_size_from_scsu_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf32_string_size_from_scsu_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -35139,40 +40281,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf32_string_size_from_scsu_stream (); int -main () +main (void) { return libuna_utf32_string_size_from_scsu_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf32_string_size_from_scsu_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_utf32_string_size_from_scsu_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_size_from_scsu_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf32_string_size_from_scsu_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf32_string_size_from_scsu_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_size_from_scsu_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf32_string_size_from_scsu_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf32_string_size_from_scsu_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_copy_from_scsu_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf32_string_copy_from_scsu_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf32_string_copy_from_scsu_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_copy_from_scsu_stream in -luna" >&5 +printf %s "checking for libuna_utf32_string_copy_from_scsu_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf32_string_copy_from_scsu_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -35181,40 +40323,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf32_string_copy_from_scsu_stream (); int -main () +main (void) { return libuna_utf32_string_copy_from_scsu_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf32_string_copy_from_scsu_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_utf32_string_copy_from_scsu_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_copy_from_scsu_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf32_string_copy_from_scsu_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf32_string_copy_from_scsu_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_copy_from_scsu_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf32_string_copy_from_scsu_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf32_string_copy_from_scsu_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_with_index_copy_from_scsu_stream in -luna" >&5 -$as_echo_n "checking for libuna_utf32_string_with_index_copy_from_scsu_stream in -luna... " >&6; } -if ${ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_scsu_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_with_index_copy_from_scsu_stream in -luna" >&5 +printf %s "checking for libuna_utf32_string_with_index_copy_from_scsu_stream in -luna... " >&6; } +if test ${ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_scsu_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -35223,41 +40365,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libuna_utf32_string_with_index_copy_from_scsu_stream (); int -main () +main (void) { return libuna_utf32_string_with_index_copy_from_scsu_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_scsu_stream=yes -else +else $as_nop ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_scsu_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_scsu_stream" >&5 -$as_echo "$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_scsu_stream" >&6; } -if test "x$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_scsu_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_scsu_stream" >&5 +printf "%s\n" "$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_scsu_stream" >&6; } +if test "x$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_scsu_stream" = xyes +then : ac_cv_libuna_dummy=yes -else +else $as_nop ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if \`LIBUNA_COMPARE_LESS' is defined" >&5 -$as_echo_n "checking if \`LIBUNA_COMPARE_LESS' is defined... " >&6; } -if ${ac_cv_libuna_defines_compare_less+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if \`LIBUNA_COMPARE_LESS' is defined" >&5 +printf %s "checking if \`LIBUNA_COMPARE_LESS' is defined... " >&6; } +if test ${ac_cv_libuna_defines_compare_less+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -35268,7 +40410,7 @@ /* end confdefs.h. */ #include int -main () +main (void) { int test = LIBUNA_COMPARE_LESS; @@ -35277,12 +40419,13 @@ return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_libuna_defines_compare_less=yes -else +else $as_nop ac_cv_libuna_defines_compare_less=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -35291,18 +40434,20 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libuna_defines_compare_less" >&5 -$as_echo "$ac_cv_libuna_defines_compare_less" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libuna_defines_compare_less" >&5 +printf "%s\n" "$ac_cv_libuna_defines_compare_less" >&6; } - if test "x$ac_cv_libuna_defines_compare_less" != xyes; then : + if test "x$ac_cv_libuna_defines_compare_less" != xyes +then : ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if \`LIBUNA_COMPARE_EQUAL' is defined" >&5 -$as_echo_n "checking if \`LIBUNA_COMPARE_EQUAL' is defined... " >&6; } -if ${ac_cv_libuna_defines_compare_equal+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if \`LIBUNA_COMPARE_EQUAL' is defined" >&5 +printf %s "checking if \`LIBUNA_COMPARE_EQUAL' is defined... " >&6; } +if test ${ac_cv_libuna_defines_compare_equal+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -35313,7 +40458,7 @@ /* end confdefs.h. */ #include int -main () +main (void) { int test = LIBUNA_COMPARE_EQUAL; @@ -35322,12 +40467,13 @@ return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_libuna_defines_compare_equal=yes -else +else $as_nop ac_cv_libuna_defines_compare_equal=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -35336,18 +40482,20 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libuna_defines_compare_equal" >&5 -$as_echo "$ac_cv_libuna_defines_compare_equal" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libuna_defines_compare_equal" >&5 +printf "%s\n" "$ac_cv_libuna_defines_compare_equal" >&6; } - if test "x$ac_cv_libuna_defines_compare_less" != xyes; then : + if test "x$ac_cv_libuna_defines_compare_less" != xyes +then : ac_cv_libuna=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if \`LIBUNA_COMPARE_GREATER' is defined" >&5 -$as_echo_n "checking if \`LIBUNA_COMPARE_GREATER' is defined... " >&6; } -if ${ac_cv_libuna_defines_compare_greater+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if \`LIBUNA_COMPARE_GREATER' is defined" >&5 +printf %s "checking if \`LIBUNA_COMPARE_GREATER' is defined... " >&6; } +if test ${ac_cv_libuna_defines_compare_greater+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -35358,7 +40506,7 @@ /* end confdefs.h. */ #include int -main () +main (void) { int test = LIBUNA_COMPARE_GREATER; @@ -35367,12 +40515,13 @@ return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_libuna_defines_compare_greater=yes -else +else $as_nop ac_cv_libuna_defines_compare_greater=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -35381,10 +40530,59 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libuna_defines_compare_greater" >&5 -$as_echo "$ac_cv_libuna_defines_compare_greater" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libuna_defines_compare_greater" >&5 +printf "%s\n" "$ac_cv_libuna_defines_compare_greater" >&6; } - if test "x$ac_cv_libuna_defines_compare_less" != xyes; then : + if test "x$ac_cv_libuna_defines_compare_less" != xyes +then : + ac_cv_libuna=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if \`LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE' is defined" >&5 +printf %s "checking if \`LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE' is defined... " >&6; } +if test ${ac_cv_libuna_defines_compare_greater+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +int test = LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE; + +return( 0 ); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_libuna_defines_compare_greater=yes +else $as_nop + ac_cv_libuna_defines_compare_greater=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libuna_defines_compare_greater" >&5 +printf "%s\n" "$ac_cv_libuna_defines_compare_greater" >&6; } + + if test "x$ac_cv_libuna_defines_utf16_stream_allow_unpaired_surrogate" != xyes +then : ac_cv_libuna=no fi @@ -35392,9 +40590,10 @@ fi fi - if test "x$ac_cv_with_libuna" != x && test "x$ac_cv_with_libuna" != xauto-detect && test "x$ac_cv_libuna" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_with_libuna" != x && test "x$ac_cv_with_libuna" != xauto-detect && test "x$ac_cv_libuna" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "unable to find supported libuna in directory: $ac_cv_with_libuna See \`config.log' for more details" "$LINENO" 5; } @@ -35402,24 +40601,27 @@ fi - if test "x$ac_cv_libuna" = xyes; then : + if test "x$ac_cv_libuna" = xyes +then : -$as_echo "#define HAVE_LIBUNA 1" >>confdefs.h +printf "%s\n" "#define HAVE_LIBUNA 1" >>confdefs.h fi - if test "x$ac_cv_libuna" = xyes; then : + if test "x$ac_cv_libuna" = xyes +then : HAVE_LIBUNA=1 -else +else $as_nop HAVE_LIBUNA=0 fi - if test "x$ac_cv_libuna" != xyes; then : + if test "x$ac_cv_libuna" != xyes +then : ac_cv_libuna_CPPFLAGS="-I../libuna"; ac_cv_libuna_LIBADD="../libuna/libuna.la"; @@ -35428,7 +40630,7 @@ -$as_echo "#define HAVE_LOCAL_LIBUNA 1" >>confdefs.h +printf "%s\n" "#define HAVE_LOCAL_LIBUNA 1" >>confdefs.h HAVE_LOCAL_LIBUNA=1 @@ -35443,24 +40645,28 @@ HAVE_LOCAL_LIBUNA_FALSE= fi - if test "x$ac_cv_libuna_CPPFLAGS" != "x"; then : + if test "x$ac_cv_libuna_CPPFLAGS" != "x" +then : LIBUNA_CPPFLAGS=$ac_cv_libuna_CPPFLAGS fi - if test "x$ac_cv_libuna_LIBADD" != "x"; then : + if test "x$ac_cv_libuna_LIBADD" != "x" +then : LIBUNA_LIBADD=$ac_cv_libuna_LIBADD fi - if test "x$ac_cv_libuna" = xyes; then : + if test "x$ac_cv_libuna" = xyes +then : ax_libuna_pc_libs_private=-luna fi - if test "x$ac_cv_libuna" = xyes; then : + if test "x$ac_cv_libuna" = xyes +then : ax_libuna_spec_requires=libuna ax_libuna_spec_build_requires=libuna-devel @@ -35472,53 +40678,59 @@ # Check whether --with-libcfile was given. -if test "${with_libcfile+set}" = set; then : +if test ${with_libcfile+y} +then : withval=$with_libcfile; ac_cv_with_libcfile=$withval -else +else $as_nop ac_cv_with_libcfile=auto-detect fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libcfile in includedir and libdir or in the specified DIR, or no if to use local version" >&5 -$as_echo_n "checking whether to use search for libcfile in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } -if ${ac_cv_with_libcfile+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use search for libcfile in includedir and libdir or in the specified DIR, or no if to use local version" >&5 +printf %s "checking whether to use search for libcfile in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } +if test ${ac_cv_with_libcfile+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_with_libcfile=auto-detect fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libcfile" >&5 -$as_echo "$ac_cv_with_libcfile" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libcfile" >&5 +printf "%s\n" "$ac_cv_with_libcfile" >&6; } - if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libcfile" = xno; then : + if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libcfile" = xno +then : ac_cv_libcfile=no -else +else $as_nop ac_cv_libcfile=check - if test "x$ac_cv_with_libcfile" != x && test "x$ac_cv_with_libcfile" != xauto-detect; then : - if test -d "$ac_cv_with_libcfile"; then : + if test "x$ac_cv_with_libcfile" != x && test "x$ac_cv_with_libcfile" != xauto-detect +then : + if test -d "$ac_cv_with_libcfile" +then : CFLAGS="$CFLAGS -I${ac_cv_with_libcfile}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libcfile}/lib" -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "no such directory: $ac_cv_with_libcfile See \`config.log' for more details" "$LINENO" 5; } fi -else - if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : +else $as_nop + if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x" +then : pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile" >&5 -$as_echo_n "checking for libcfile... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile >= 20160409" >&5 +printf %s "checking for libcfile >= 20160409... " >&6; } if test -n "$libcfile_CFLAGS"; then pkg_cv_libcfile_CFLAGS="$libcfile_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcfile >= 20160409\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcfile >= 20160409\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcfile >= 20160409") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libcfile_CFLAGS=`$PKG_CONFIG --cflags "libcfile >= 20160409" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -35532,10 +40744,10 @@ pkg_cv_libcfile_LIBS="$libcfile_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcfile >= 20160409\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcfile >= 20160409\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcfile >= 20160409") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libcfile_LIBS=`$PKG_CONFIG --libs "libcfile >= 20160409" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -35549,8 +40761,8 @@ if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -35558,33 +40770,35 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - libcfile_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libcfile >= 20160409" 2>&1` + libcfile_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libcfile >= 20160409" 2>&1` else - libcfile_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libcfile >= 20160409" 2>&1` + libcfile_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libcfile >= 20160409" 2>&1` fi - # Put the nasty error message in config.log where it belongs - echo "$libcfile_PKG_ERRORS" >&5 + # Put the nasty error message in config.log where it belongs + echo "$libcfile_PKG_ERRORS" >&5 - ac_cv_libcfile=check + ac_cv_libcfile=check elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ac_cv_libcfile=check -else - libcfile_CFLAGS=$pkg_cv_libcfile_CFLAGS - libcfile_LIBS=$pkg_cv_libcfile_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ac_cv_libcfile=yes + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ac_cv_libcfile=check +else + libcfile_CFLAGS=$pkg_cv_libcfile_CFLAGS + libcfile_LIBS=$pkg_cv_libcfile_LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + ac_cv_libcfile=yes fi fi - if test "x$ac_cv_libcfile" = xyes && test "x$ac_cv_enable_wide_character_type" != xno; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libcfile/features.h defines LIBCFILE_HAVE_WIDE_CHARACTER_TYPE as 1" >&5 -$as_echo_n "checking whether libcfile/features.h defines LIBCFILE_HAVE_WIDE_CHARACTER_TYPE as 1... " >&6; } -if ${ac_cv_header_libcfile_features_h_have_wide_character_type+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test "x$ac_cv_libcfile" = xyes && test "x$ac_cv_enable_wide_character_type" != xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether libcfile/features.h defines LIBCFILE_HAVE_WIDE_CHARACTER_TYPE as 1" >&5 +printf %s "checking whether libcfile/features.h defines LIBCFILE_HAVE_WIDE_CHARACTER_TYPE as 1... " >&6; } +if test ${ac_cv_header_libcfile_features_h_have_wide_character_type+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -35595,7 +40809,7 @@ /* end confdefs.h. */ #include int -main () +main (void) { #if !defined( LIBCFILE_HAVE_WIDE_CHARACTER_TYPE ) || ( LIBCFILE_HAVE_WIDE_CHARACTER_TYPE != 1 ) #error LIBCFILE_HAVE_WIDE_CHARACTER_TYPE not defined @@ -35604,12 +40818,13 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_header_libcfile_features_h_have_wide_character_type=yes -else +else $as_nop ac_cv_header_libcfile_features_h_have_wide_character_type=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -35617,45 +40832,45 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_libcfile_features_h_have_wide_character_type" >&5 -$as_echo "$ac_cv_header_libcfile_features_h_have_wide_character_type" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_libcfile_features_h_have_wide_character_type" >&5 +printf "%s\n" "$ac_cv_header_libcfile_features_h_have_wide_character_type" >&6; } - if test "x$ac_cv_header_libcfile_features_h_have_wide_character_type" = xno; then : + if test "x$ac_cv_header_libcfile_features_h_have_wide_character_type" = xno +then : ac_cv_libcfile=no fi fi - if test "x$ac_cv_libcfile" = xyes; then : + if test "x$ac_cv_libcfile" = xyes +then : ac_cv_libcfile_CPPFLAGS="$pkg_cv_libcfile_CFLAGS" ac_cv_libcfile_LIBADD="$pkg_cv_libcfile_LIBS" fi fi - if test "x$ac_cv_libcfile" = xcheck; then : - for ac_header in libcfile.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "libcfile.h" "ac_cv_header_libcfile_h" "$ac_includes_default" -if test "x$ac_cv_header_libcfile_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBCFILE_H 1 -_ACEOF + if test "x$ac_cv_libcfile" = xcheck +then : + ac_fn_c_check_header_compile "$LINENO" "libcfile.h" "ac_cv_header_libcfile_h" "$ac_includes_default" +if test "x$ac_cv_header_libcfile_h" = xyes +then : + printf "%s\n" "#define HAVE_LIBCFILE_H 1" >>confdefs.h fi -done - - if test "x$ac_cv_header_libcfile_h" = xno; then : + if test "x$ac_cv_header_libcfile_h" = xno +then : ac_cv_libcfile=no -else +else $as_nop ac_cv_libcfile=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_get_version in -lcfile" >&5 -$as_echo_n "checking for libcfile_get_version in -lcfile... " >&6; } -if ${ac_cv_lib_cfile_libcfile_get_version+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile_get_version in -lcfile" >&5 +printf %s "checking for libcfile_get_version in -lcfile... " >&6; } +if test ${ac_cv_lib_cfile_libcfile_get_version+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -35664,41 +40879,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcfile_get_version (); int -main () +main (void) { return libcfile_get_version (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cfile_libcfile_get_version=yes -else +else $as_nop ac_cv_lib_cfile_libcfile_get_version=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_get_version" >&5 -$as_echo "$ac_cv_lib_cfile_libcfile_get_version" >&6; } -if test "x$ac_cv_lib_cfile_libcfile_get_version" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_get_version" >&5 +printf "%s\n" "$ac_cv_lib_cfile_libcfile_get_version" >&6; } +if test "x$ac_cv_lib_cfile_libcfile_get_version" = xyes +then : ac_cv_libcfile_dummy=yes -else +else $as_nop ac_cv_libcfile=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_initialize in -lcfile" >&5 -$as_echo_n "checking for libcfile_file_initialize in -lcfile... " >&6; } -if ${ac_cv_lib_cfile_libcfile_file_initialize+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_initialize in -lcfile" >&5 +printf %s "checking for libcfile_file_initialize in -lcfile... " >&6; } +if test ${ac_cv_lib_cfile_libcfile_file_initialize+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -35707,40 +40922,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcfile_file_initialize (); int -main () +main (void) { return libcfile_file_initialize (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cfile_libcfile_file_initialize=yes -else +else $as_nop ac_cv_lib_cfile_libcfile_file_initialize=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_initialize" >&5 -$as_echo "$ac_cv_lib_cfile_libcfile_file_initialize" >&6; } -if test "x$ac_cv_lib_cfile_libcfile_file_initialize" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_initialize" >&5 +printf "%s\n" "$ac_cv_lib_cfile_libcfile_file_initialize" >&6; } +if test "x$ac_cv_lib_cfile_libcfile_file_initialize" = xyes +then : ac_cv_libcfile_dummy=yes -else +else $as_nop ac_cv_libcfile=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_free in -lcfile" >&5 -$as_echo_n "checking for libcfile_file_free in -lcfile... " >&6; } -if ${ac_cv_lib_cfile_libcfile_file_free+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_free in -lcfile" >&5 +printf %s "checking for libcfile_file_free in -lcfile... " >&6; } +if test ${ac_cv_lib_cfile_libcfile_file_free+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -35749,40 +40964,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcfile_file_free (); int -main () +main (void) { return libcfile_file_free (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cfile_libcfile_file_free=yes -else +else $as_nop ac_cv_lib_cfile_libcfile_file_free=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_free" >&5 -$as_echo "$ac_cv_lib_cfile_libcfile_file_free" >&6; } -if test "x$ac_cv_lib_cfile_libcfile_file_free" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_free" >&5 +printf "%s\n" "$ac_cv_lib_cfile_libcfile_file_free" >&6; } +if test "x$ac_cv_lib_cfile_libcfile_file_free" = xyes +then : ac_cv_libcfile_dummy=yes -else +else $as_nop ac_cv_libcfile=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_open in -lcfile" >&5 -$as_echo_n "checking for libcfile_file_open in -lcfile... " >&6; } -if ${ac_cv_lib_cfile_libcfile_file_open+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_open in -lcfile" >&5 +printf %s "checking for libcfile_file_open in -lcfile... " >&6; } +if test ${ac_cv_lib_cfile_libcfile_file_open+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -35791,40 +41006,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcfile_file_open (); int -main () +main (void) { return libcfile_file_open (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cfile_libcfile_file_open=yes -else +else $as_nop ac_cv_lib_cfile_libcfile_file_open=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_open" >&5 -$as_echo "$ac_cv_lib_cfile_libcfile_file_open" >&6; } -if test "x$ac_cv_lib_cfile_libcfile_file_open" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_open" >&5 +printf "%s\n" "$ac_cv_lib_cfile_libcfile_file_open" >&6; } +if test "x$ac_cv_lib_cfile_libcfile_file_open" = xyes +then : ac_cv_libcfile_dummy=yes -else +else $as_nop ac_cv_libcfile=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_open_with_error_code in -lcfile" >&5 -$as_echo_n "checking for libcfile_file_open_with_error_code in -lcfile... " >&6; } -if ${ac_cv_lib_cfile_libcfile_file_open_with_error_code+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_open_with_error_code in -lcfile" >&5 +printf %s "checking for libcfile_file_open_with_error_code in -lcfile... " >&6; } +if test ${ac_cv_lib_cfile_libcfile_file_open_with_error_code+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -35833,40 +41048,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcfile_file_open_with_error_code (); int -main () +main (void) { return libcfile_file_open_with_error_code (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cfile_libcfile_file_open_with_error_code=yes -else +else $as_nop ac_cv_lib_cfile_libcfile_file_open_with_error_code=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_open_with_error_code" >&5 -$as_echo "$ac_cv_lib_cfile_libcfile_file_open_with_error_code" >&6; } -if test "x$ac_cv_lib_cfile_libcfile_file_open_with_error_code" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_open_with_error_code" >&5 +printf "%s\n" "$ac_cv_lib_cfile_libcfile_file_open_with_error_code" >&6; } +if test "x$ac_cv_lib_cfile_libcfile_file_open_with_error_code" = xyes +then : ac_cv_libcfile_dummy=yes -else +else $as_nop ac_cv_libcfile=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_close in -lcfile" >&5 -$as_echo_n "checking for libcfile_file_close in -lcfile... " >&6; } -if ${ac_cv_lib_cfile_libcfile_file_close+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_close in -lcfile" >&5 +printf %s "checking for libcfile_file_close in -lcfile... " >&6; } +if test ${ac_cv_lib_cfile_libcfile_file_close+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -35875,40 +41090,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcfile_file_close (); int -main () +main (void) { return libcfile_file_close (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cfile_libcfile_file_close=yes -else +else $as_nop ac_cv_lib_cfile_libcfile_file_close=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_close" >&5 -$as_echo "$ac_cv_lib_cfile_libcfile_file_close" >&6; } -if test "x$ac_cv_lib_cfile_libcfile_file_close" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_close" >&5 +printf "%s\n" "$ac_cv_lib_cfile_libcfile_file_close" >&6; } +if test "x$ac_cv_lib_cfile_libcfile_file_close" = xyes +then : ac_cv_libcfile_dummy=yes -else +else $as_nop ac_cv_libcfile=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_read_buffer in -lcfile" >&5 -$as_echo_n "checking for libcfile_file_read_buffer in -lcfile... " >&6; } -if ${ac_cv_lib_cfile_libcfile_file_read_buffer+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_read_buffer in -lcfile" >&5 +printf %s "checking for libcfile_file_read_buffer in -lcfile... " >&6; } +if test ${ac_cv_lib_cfile_libcfile_file_read_buffer+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -35917,40 +41132,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcfile_file_read_buffer (); int -main () +main (void) { return libcfile_file_read_buffer (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cfile_libcfile_file_read_buffer=yes -else +else $as_nop ac_cv_lib_cfile_libcfile_file_read_buffer=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_read_buffer" >&5 -$as_echo "$ac_cv_lib_cfile_libcfile_file_read_buffer" >&6; } -if test "x$ac_cv_lib_cfile_libcfile_file_read_buffer" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_read_buffer" >&5 +printf "%s\n" "$ac_cv_lib_cfile_libcfile_file_read_buffer" >&6; } +if test "x$ac_cv_lib_cfile_libcfile_file_read_buffer" = xyes +then : ac_cv_libcfile_dummy=yes -else +else $as_nop ac_cv_libcfile=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_read_buffer_with_error_code in -lcfile" >&5 -$as_echo_n "checking for libcfile_file_read_buffer_with_error_code in -lcfile... " >&6; } -if ${ac_cv_lib_cfile_libcfile_file_read_buffer_with_error_code+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_read_buffer_with_error_code in -lcfile" >&5 +printf %s "checking for libcfile_file_read_buffer_with_error_code in -lcfile... " >&6; } +if test ${ac_cv_lib_cfile_libcfile_file_read_buffer_with_error_code+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -35959,40 +41174,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcfile_file_read_buffer_with_error_code (); int -main () +main (void) { return libcfile_file_read_buffer_with_error_code (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cfile_libcfile_file_read_buffer_with_error_code=yes -else +else $as_nop ac_cv_lib_cfile_libcfile_file_read_buffer_with_error_code=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_read_buffer_with_error_code" >&5 -$as_echo "$ac_cv_lib_cfile_libcfile_file_read_buffer_with_error_code" >&6; } -if test "x$ac_cv_lib_cfile_libcfile_file_read_buffer_with_error_code" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_read_buffer_with_error_code" >&5 +printf "%s\n" "$ac_cv_lib_cfile_libcfile_file_read_buffer_with_error_code" >&6; } +if test "x$ac_cv_lib_cfile_libcfile_file_read_buffer_with_error_code" = xyes +then : ac_cv_libcfile_dummy=yes -else +else $as_nop ac_cv_libcfile=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_write_buffer in -lcfile" >&5 -$as_echo_n "checking for libcfile_file_write_buffer in -lcfile... " >&6; } -if ${ac_cv_lib_cfile_libcfile_file_write_buffer+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_write_buffer in -lcfile" >&5 +printf %s "checking for libcfile_file_write_buffer in -lcfile... " >&6; } +if test ${ac_cv_lib_cfile_libcfile_file_write_buffer+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -36001,40 +41216,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcfile_file_write_buffer (); int -main () +main (void) { return libcfile_file_write_buffer (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cfile_libcfile_file_write_buffer=yes -else +else $as_nop ac_cv_lib_cfile_libcfile_file_write_buffer=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_write_buffer" >&5 -$as_echo "$ac_cv_lib_cfile_libcfile_file_write_buffer" >&6; } -if test "x$ac_cv_lib_cfile_libcfile_file_write_buffer" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_write_buffer" >&5 +printf "%s\n" "$ac_cv_lib_cfile_libcfile_file_write_buffer" >&6; } +if test "x$ac_cv_lib_cfile_libcfile_file_write_buffer" = xyes +then : ac_cv_libcfile_dummy=yes -else +else $as_nop ac_cv_libcfile=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_write_buffer_with_error_code in -lcfile" >&5 -$as_echo_n "checking for libcfile_file_write_buffer_with_error_code in -lcfile... " >&6; } -if ${ac_cv_lib_cfile_libcfile_file_write_buffer_with_error_code+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_write_buffer_with_error_code in -lcfile" >&5 +printf %s "checking for libcfile_file_write_buffer_with_error_code in -lcfile... " >&6; } +if test ${ac_cv_lib_cfile_libcfile_file_write_buffer_with_error_code+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -36043,40 +41258,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcfile_file_write_buffer_with_error_code (); int -main () +main (void) { return libcfile_file_write_buffer_with_error_code (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cfile_libcfile_file_write_buffer_with_error_code=yes -else +else $as_nop ac_cv_lib_cfile_libcfile_file_write_buffer_with_error_code=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_write_buffer_with_error_code" >&5 -$as_echo "$ac_cv_lib_cfile_libcfile_file_write_buffer_with_error_code" >&6; } -if test "x$ac_cv_lib_cfile_libcfile_file_write_buffer_with_error_code" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_write_buffer_with_error_code" >&5 +printf "%s\n" "$ac_cv_lib_cfile_libcfile_file_write_buffer_with_error_code" >&6; } +if test "x$ac_cv_lib_cfile_libcfile_file_write_buffer_with_error_code" = xyes +then : ac_cv_libcfile_dummy=yes -else +else $as_nop ac_cv_libcfile=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_seek_offset in -lcfile" >&5 -$as_echo_n "checking for libcfile_file_seek_offset in -lcfile... " >&6; } -if ${ac_cv_lib_cfile_libcfile_file_seek_offset+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_seek_offset in -lcfile" >&5 +printf %s "checking for libcfile_file_seek_offset in -lcfile... " >&6; } +if test ${ac_cv_lib_cfile_libcfile_file_seek_offset+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -36085,40 +41300,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcfile_file_seek_offset (); int -main () +main (void) { return libcfile_file_seek_offset (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cfile_libcfile_file_seek_offset=yes -else +else $as_nop ac_cv_lib_cfile_libcfile_file_seek_offset=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_seek_offset" >&5 -$as_echo "$ac_cv_lib_cfile_libcfile_file_seek_offset" >&6; } -if test "x$ac_cv_lib_cfile_libcfile_file_seek_offset" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_seek_offset" >&5 +printf "%s\n" "$ac_cv_lib_cfile_libcfile_file_seek_offset" >&6; } +if test "x$ac_cv_lib_cfile_libcfile_file_seek_offset" = xyes +then : ac_cv_libcfile_dummy=yes -else +else $as_nop ac_cv_libcfile=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_resize in -lcfile" >&5 -$as_echo_n "checking for libcfile_file_resize in -lcfile... " >&6; } -if ${ac_cv_lib_cfile_libcfile_file_resize+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_resize in -lcfile" >&5 +printf %s "checking for libcfile_file_resize in -lcfile... " >&6; } +if test ${ac_cv_lib_cfile_libcfile_file_resize+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -36127,40 +41342,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcfile_file_resize (); int -main () +main (void) { return libcfile_file_resize (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cfile_libcfile_file_resize=yes -else +else $as_nop ac_cv_lib_cfile_libcfile_file_resize=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_resize" >&5 -$as_echo "$ac_cv_lib_cfile_libcfile_file_resize" >&6; } -if test "x$ac_cv_lib_cfile_libcfile_file_resize" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_resize" >&5 +printf "%s\n" "$ac_cv_lib_cfile_libcfile_file_resize" >&6; } +if test "x$ac_cv_lib_cfile_libcfile_file_resize" = xyes +then : ac_cv_libcfile_dummy=yes -else +else $as_nop ac_cv_libcfile=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_is_open in -lcfile" >&5 -$as_echo_n "checking for libcfile_file_is_open in -lcfile... " >&6; } -if ${ac_cv_lib_cfile_libcfile_file_is_open+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_is_open in -lcfile" >&5 +printf %s "checking for libcfile_file_is_open in -lcfile... " >&6; } +if test ${ac_cv_lib_cfile_libcfile_file_is_open+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -36169,40 +41384,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcfile_file_is_open (); int -main () +main (void) { return libcfile_file_is_open (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cfile_libcfile_file_is_open=yes -else +else $as_nop ac_cv_lib_cfile_libcfile_file_is_open=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_is_open" >&5 -$as_echo "$ac_cv_lib_cfile_libcfile_file_is_open" >&6; } -if test "x$ac_cv_lib_cfile_libcfile_file_is_open" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_is_open" >&5 +printf "%s\n" "$ac_cv_lib_cfile_libcfile_file_is_open" >&6; } +if test "x$ac_cv_lib_cfile_libcfile_file_is_open" = xyes +then : ac_cv_libcfile_dummy=yes -else +else $as_nop ac_cv_libcfile=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_get_offset in -lcfile" >&5 -$as_echo_n "checking for libcfile_file_get_offset in -lcfile... " >&6; } -if ${ac_cv_lib_cfile_libcfile_file_get_offset+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_get_offset in -lcfile" >&5 +printf %s "checking for libcfile_file_get_offset in -lcfile... " >&6; } +if test ${ac_cv_lib_cfile_libcfile_file_get_offset+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -36211,40 +41426,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcfile_file_get_offset (); int -main () +main (void) { return libcfile_file_get_offset (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cfile_libcfile_file_get_offset=yes -else +else $as_nop ac_cv_lib_cfile_libcfile_file_get_offset=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_get_offset" >&5 -$as_echo "$ac_cv_lib_cfile_libcfile_file_get_offset" >&6; } -if test "x$ac_cv_lib_cfile_libcfile_file_get_offset" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_get_offset" >&5 +printf "%s\n" "$ac_cv_lib_cfile_libcfile_file_get_offset" >&6; } +if test "x$ac_cv_lib_cfile_libcfile_file_get_offset" = xyes +then : ac_cv_libcfile_dummy=yes -else +else $as_nop ac_cv_libcfile=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_get_size in -lcfile" >&5 -$as_echo_n "checking for libcfile_file_get_size in -lcfile... " >&6; } -if ${ac_cv_lib_cfile_libcfile_file_get_size+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_get_size in -lcfile" >&5 +printf %s "checking for libcfile_file_get_size in -lcfile... " >&6; } +if test ${ac_cv_lib_cfile_libcfile_file_get_size+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -36253,40 +41468,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcfile_file_get_size (); int -main () +main (void) { return libcfile_file_get_size (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cfile_libcfile_file_get_size=yes -else +else $as_nop ac_cv_lib_cfile_libcfile_file_get_size=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_get_size" >&5 -$as_echo "$ac_cv_lib_cfile_libcfile_file_get_size" >&6; } -if test "x$ac_cv_lib_cfile_libcfile_file_get_size" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_get_size" >&5 +printf "%s\n" "$ac_cv_lib_cfile_libcfile_file_get_size" >&6; } +if test "x$ac_cv_lib_cfile_libcfile_file_get_size" = xyes +then : ac_cv_libcfile_dummy=yes -else +else $as_nop ac_cv_libcfile=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_is_device in -lcfile" >&5 -$as_echo_n "checking for libcfile_file_is_device in -lcfile... " >&6; } -if ${ac_cv_lib_cfile_libcfile_file_is_device+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_is_device in -lcfile" >&5 +printf %s "checking for libcfile_file_is_device in -lcfile... " >&6; } +if test ${ac_cv_lib_cfile_libcfile_file_is_device+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -36295,40 +41510,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcfile_file_is_device (); int -main () +main (void) { return libcfile_file_is_device (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cfile_libcfile_file_is_device=yes -else +else $as_nop ac_cv_lib_cfile_libcfile_file_is_device=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_is_device" >&5 -$as_echo "$ac_cv_lib_cfile_libcfile_file_is_device" >&6; } -if test "x$ac_cv_lib_cfile_libcfile_file_is_device" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_is_device" >&5 +printf "%s\n" "$ac_cv_lib_cfile_libcfile_file_is_device" >&6; } +if test "x$ac_cv_lib_cfile_libcfile_file_is_device" = xyes +then : ac_cv_libcfile_dummy=yes -else +else $as_nop ac_cv_libcfile=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_io_control_read in -lcfile" >&5 -$as_echo_n "checking for libcfile_file_io_control_read in -lcfile... " >&6; } -if ${ac_cv_lib_cfile_libcfile_file_io_control_read+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_io_control_read in -lcfile" >&5 +printf %s "checking for libcfile_file_io_control_read in -lcfile... " >&6; } +if test ${ac_cv_lib_cfile_libcfile_file_io_control_read+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -36337,40 +41552,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcfile_file_io_control_read (); int -main () +main (void) { return libcfile_file_io_control_read (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cfile_libcfile_file_io_control_read=yes -else +else $as_nop ac_cv_lib_cfile_libcfile_file_io_control_read=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_io_control_read" >&5 -$as_echo "$ac_cv_lib_cfile_libcfile_file_io_control_read" >&6; } -if test "x$ac_cv_lib_cfile_libcfile_file_io_control_read" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_io_control_read" >&5 +printf "%s\n" "$ac_cv_lib_cfile_libcfile_file_io_control_read" >&6; } +if test "x$ac_cv_lib_cfile_libcfile_file_io_control_read" = xyes +then : ac_cv_libcfile_dummy=yes -else +else $as_nop ac_cv_libcfile=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_io_control_read_with_error_code in -lcfile" >&5 -$as_echo_n "checking for libcfile_file_io_control_read_with_error_code in -lcfile... " >&6; } -if ${ac_cv_lib_cfile_libcfile_file_io_control_read_with_error_code+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_io_control_read_with_error_code in -lcfile" >&5 +printf %s "checking for libcfile_file_io_control_read_with_error_code in -lcfile... " >&6; } +if test ${ac_cv_lib_cfile_libcfile_file_io_control_read_with_error_code+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -36379,42 +41594,43 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcfile_file_io_control_read_with_error_code (); int -main () +main (void) { return libcfile_file_io_control_read_with_error_code (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cfile_libcfile_file_io_control_read_with_error_code=yes -else +else $as_nop ac_cv_lib_cfile_libcfile_file_io_control_read_with_error_code=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_io_control_read_with_error_code" >&5 -$as_echo "$ac_cv_lib_cfile_libcfile_file_io_control_read_with_error_code" >&6; } -if test "x$ac_cv_lib_cfile_libcfile_file_io_control_read_with_error_code" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_io_control_read_with_error_code" >&5 +printf "%s\n" "$ac_cv_lib_cfile_libcfile_file_io_control_read_with_error_code" >&6; } +if test "x$ac_cv_lib_cfile_libcfile_file_io_control_read_with_error_code" = xyes +then : ac_cv_libcfile_dummy=yes -else +else $as_nop ac_cv_libcfile=no fi - if test "x$ac_cv_enable_wide_character_type" != xno; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_open_wide in -lcfile" >&5 -$as_echo_n "checking for libcfile_file_open_wide in -lcfile... " >&6; } -if ${ac_cv_lib_cfile_libcfile_file_open_wide+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test "x$ac_cv_enable_wide_character_type" != xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_open_wide in -lcfile" >&5 +printf %s "checking for libcfile_file_open_wide in -lcfile... " >&6; } +if test ${ac_cv_lib_cfile_libcfile_file_open_wide+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -36423,40 +41639,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcfile_file_open_wide (); int -main () +main (void) { return libcfile_file_open_wide (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cfile_libcfile_file_open_wide=yes -else +else $as_nop ac_cv_lib_cfile_libcfile_file_open_wide=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_open_wide" >&5 -$as_echo "$ac_cv_lib_cfile_libcfile_file_open_wide" >&6; } -if test "x$ac_cv_lib_cfile_libcfile_file_open_wide" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_open_wide" >&5 +printf "%s\n" "$ac_cv_lib_cfile_libcfile_file_open_wide" >&6; } +if test "x$ac_cv_lib_cfile_libcfile_file_open_wide" = xyes +then : ac_cv_libcfile_dummy=yes -else +else $as_nop ac_cv_libcfile=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_open_wide_with_error_code in -lcfile" >&5 -$as_echo_n "checking for libcfile_file_open_wide_with_error_code in -lcfile... " >&6; } -if ${ac_cv_lib_cfile_libcfile_file_open_wide_with_error_code+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_open_wide_with_error_code in -lcfile" >&5 +printf %s "checking for libcfile_file_open_wide_with_error_code in -lcfile... " >&6; } +if test ${ac_cv_lib_cfile_libcfile_file_open_wide_with_error_code+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -36465,43 +41681,43 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcfile_file_open_wide_with_error_code (); int -main () +main (void) { return libcfile_file_open_wide_with_error_code (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cfile_libcfile_file_open_wide_with_error_code=yes -else +else $as_nop ac_cv_lib_cfile_libcfile_file_open_wide_with_error_code=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_open_wide_with_error_code" >&5 -$as_echo "$ac_cv_lib_cfile_libcfile_file_open_wide_with_error_code" >&6; } -if test "x$ac_cv_lib_cfile_libcfile_file_open_wide_with_error_code" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_open_wide_with_error_code" >&5 +printf "%s\n" "$ac_cv_lib_cfile_libcfile_file_open_wide_with_error_code" >&6; } +if test "x$ac_cv_lib_cfile_libcfile_file_open_wide_with_error_code" = xyes +then : ac_cv_libcfile_dummy=yes -else +else $as_nop ac_cv_libcfile=no fi fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_exists in -lcfile" >&5 -$as_echo_n "checking for libcfile_file_exists in -lcfile... " >&6; } -if ${ac_cv_lib_cfile_libcfile_file_exists+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_exists in -lcfile" >&5 +printf %s "checking for libcfile_file_exists in -lcfile... " >&6; } +if test ${ac_cv_lib_cfile_libcfile_file_exists+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -36510,40 +41726,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcfile_file_exists (); int -main () +main (void) { return libcfile_file_exists (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cfile_libcfile_file_exists=yes -else +else $as_nop ac_cv_lib_cfile_libcfile_file_exists=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_exists" >&5 -$as_echo "$ac_cv_lib_cfile_libcfile_file_exists" >&6; } -if test "x$ac_cv_lib_cfile_libcfile_file_exists" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_exists" >&5 +printf "%s\n" "$ac_cv_lib_cfile_libcfile_file_exists" >&6; } +if test "x$ac_cv_lib_cfile_libcfile_file_exists" = xyes +then : ac_cv_libcfile_dummy=yes -else +else $as_nop ac_cv_libcfile=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_remove in -lcfile" >&5 -$as_echo_n "checking for libcfile_file_remove in -lcfile... " >&6; } -if ${ac_cv_lib_cfile_libcfile_file_remove+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_remove in -lcfile" >&5 +printf %s "checking for libcfile_file_remove in -lcfile... " >&6; } +if test ${ac_cv_lib_cfile_libcfile_file_remove+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -36552,42 +41768,43 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcfile_file_remove (); int -main () +main (void) { return libcfile_file_remove (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cfile_libcfile_file_remove=yes -else +else $as_nop ac_cv_lib_cfile_libcfile_file_remove=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_remove" >&5 -$as_echo "$ac_cv_lib_cfile_libcfile_file_remove" >&6; } -if test "x$ac_cv_lib_cfile_libcfile_file_remove" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_remove" >&5 +printf "%s\n" "$ac_cv_lib_cfile_libcfile_file_remove" >&6; } +if test "x$ac_cv_lib_cfile_libcfile_file_remove" = xyes +then : ac_cv_libcfile_dummy=yes -else +else $as_nop ac_cv_libcfile=no fi - if test "x$ac_cv_enable_wide_character_type" != xno; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_exists_wide in -lcfile" >&5 -$as_echo_n "checking for libcfile_file_exists_wide in -lcfile... " >&6; } -if ${ac_cv_lib_cfile_libcfile_file_exists_wide+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test "x$ac_cv_enable_wide_character_type" != xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_exists_wide in -lcfile" >&5 +printf %s "checking for libcfile_file_exists_wide in -lcfile... " >&6; } +if test ${ac_cv_lib_cfile_libcfile_file_exists_wide+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -36596,40 +41813,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcfile_file_exists_wide (); int -main () +main (void) { return libcfile_file_exists_wide (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cfile_libcfile_file_exists_wide=yes -else +else $as_nop ac_cv_lib_cfile_libcfile_file_exists_wide=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_exists_wide" >&5 -$as_echo "$ac_cv_lib_cfile_libcfile_file_exists_wide" >&6; } -if test "x$ac_cv_lib_cfile_libcfile_file_exists_wide" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_exists_wide" >&5 +printf "%s\n" "$ac_cv_lib_cfile_libcfile_file_exists_wide" >&6; } +if test "x$ac_cv_lib_cfile_libcfile_file_exists_wide" = xyes +then : ac_cv_libcfile_dummy=yes -else +else $as_nop ac_cv_libcfile=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_remove_wide in -lcfile" >&5 -$as_echo_n "checking for libcfile_file_remove_wide in -lcfile... " >&6; } -if ${ac_cv_lib_cfile_libcfile_file_remove_wide+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_remove_wide in -lcfile" >&5 +printf %s "checking for libcfile_file_remove_wide in -lcfile... " >&6; } +if test ${ac_cv_lib_cfile_libcfile_file_remove_wide+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -36638,32 +41855,31 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcfile_file_remove_wide (); int -main () +main (void) { return libcfile_file_remove_wide (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cfile_libcfile_file_remove_wide=yes -else +else $as_nop ac_cv_lib_cfile_libcfile_file_remove_wide=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_remove_wide" >&5 -$as_echo "$ac_cv_lib_cfile_libcfile_file_remove_wide" >&6; } -if test "x$ac_cv_lib_cfile_libcfile_file_remove_wide" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_remove_wide" >&5 +printf "%s\n" "$ac_cv_lib_cfile_libcfile_file_remove_wide" >&6; } +if test "x$ac_cv_lib_cfile_libcfile_file_remove_wide" = xyes +then : ac_cv_libcfile_dummy=yes -else +else $as_nop ac_cv_libcfile=no fi @@ -36674,9 +41890,10 @@ fi fi - if test "x$ac_cv_with_libcfile" != x && test "x$ac_cv_with_libcfile" != xauto-detect && test "x$ac_cv_libcfile" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_with_libcfile" != x && test "x$ac_cv_with_libcfile" != xauto-detect && test "x$ac_cv_libcfile" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "unable to find supported libcfile in directory: $ac_cv_with_libcfile See \`config.log' for more details" "$LINENO" 5; } @@ -36684,88 +41901,162 @@ fi - if test "x$ac_cv_libcfile" = xyes; then : + if test "x$ac_cv_libcfile" = xyes +then : -$as_echo "#define HAVE_LIBCFILE 1" >>confdefs.h +printf "%s\n" "#define HAVE_LIBCFILE 1" >>confdefs.h fi - if test "x$ac_cv_libcfile" = xyes; then : + if test "x$ac_cv_libcfile" = xyes +then : HAVE_LIBCFILE=1 -else +else $as_nop HAVE_LIBCFILE=0 fi - if test "x$ac_cv_libcfile" != xyes; then : - for ac_header in errno.h stdio.h sys/stat.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF + if test "x$ac_cv_libcfile" != xyes +then : + ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default" +if test "x$ac_cv_header_errno_h" = xyes +then : + printf "%s\n" "#define HAVE_ERRNO_H 1" >>confdefs.h fi +ac_fn_c_check_header_compile "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default" +if test "x$ac_cv_header_stdio_h" = xyes +then : + printf "%s\n" "#define HAVE_STDIO_H 1" >>confdefs.h -done +fi +ac_fn_c_check_header_compile "$LINENO" "sys/stat.h" "ac_cv_header_sys_stat_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_stat_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_STAT_H 1" >>confdefs.h +fi - for ac_header in cygwin/fs.h fcntl.h linux/fs.h sys/disk.h sys/disklabel.h sys/ioctl.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF + + ac_fn_c_check_header_compile "$LINENO" "cygwin/fs.h" "ac_cv_header_cygwin_fs_h" "$ac_includes_default" +if test "x$ac_cv_header_cygwin_fs_h" = xyes +then : + printf "%s\n" "#define HAVE_CYGWIN_FS_H 1" >>confdefs.h fi +ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default" +if test "x$ac_cv_header_fcntl_h" = xyes +then : + printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h -done +fi +ac_fn_c_check_header_compile "$LINENO" "linux/fs.h" "ac_cv_header_linux_fs_h" "$ac_includes_default" +if test "x$ac_cv_header_linux_fs_h" = xyes +then : + printf "%s\n" "#define HAVE_LINUX_FS_H 1" >>confdefs.h +fi +ac_fn_c_check_header_compile "$LINENO" "sys/disk.h" "ac_cv_header_sys_disk_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_disk_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_DISK_H 1" >>confdefs.h - for ac_func in close fstat ftruncate ioctl lseek open read write -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF +fi +ac_fn_c_check_header_compile "$LINENO" "sys/disklabel.h" "ac_cv_header_sys_disklabel_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_disklabel_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_DISKLABEL_H 1" >>confdefs.h fi -done +ac_fn_c_check_header_compile "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_ioctl_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_IOCTL_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" +if test "x$ac_cv_header_unistd_h" = xyes +then : + printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h + +fi + + ac_fn_c_check_func "$LINENO" "close" "ac_cv_func_close" +if test "x$ac_cv_func_close" = xyes +then : + printf "%s\n" "#define HAVE_CLOSE 1" >>confdefs.h - if test "x$ac_cv_func_close" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +fi +ac_fn_c_check_func "$LINENO" "fstat" "ac_cv_func_fstat" +if test "x$ac_cv_func_fstat" = xyes +then : + printf "%s\n" "#define HAVE_FSTAT 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "ftruncate" "ac_cv_func_ftruncate" +if test "x$ac_cv_func_ftruncate" = xyes +then : + printf "%s\n" "#define HAVE_FTRUNCATE 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "ioctl" "ac_cv_func_ioctl" +if test "x$ac_cv_func_ioctl" = xyes +then : + printf "%s\n" "#define HAVE_IOCTL 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "lseek" "ac_cv_func_lseek" +if test "x$ac_cv_func_lseek" = xyes +then : + printf "%s\n" "#define HAVE_LSEEK 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "open" "ac_cv_func_open" +if test "x$ac_cv_func_open" = xyes +then : + printf "%s\n" "#define HAVE_OPEN 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "read" "ac_cv_func_read" +if test "x$ac_cv_func_read" = xyes +then : + printf "%s\n" "#define HAVE_READ 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "write" "ac_cv_func_write" +if test "x$ac_cv_func_write" = xyes +then : + printf "%s\n" "#define HAVE_WRITE 1" >>confdefs.h + +fi + + + if test "x$ac_cv_func_close" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: close See \`config.log' for more details" "$LINENO" 5; } fi - for ac_func in posix_fadvise -do : ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise" -if test "x$ac_cv_func_posix_fadvise" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_POSIX_FADVISE 1 -_ACEOF +if test "x$ac_cv_func_posix_fadvise" = xyes +then : + printf "%s\n" "#define HAVE_POSIX_FADVISE 1" >>confdefs.h fi -done - if test "x$ac_cv_func_posix_fadvise" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_fadvise can be linked" >&5 -$as_echo_n "checking whether posix_fadvise can be linked... " >&6; } + if test "x$ac_cv_func_posix_fadvise" = xyes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether posix_fadvise can be linked" >&5 +printf %s "checking whether posix_fadvise can be linked... " >&6; } SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wall -Werror" @@ -36780,7 +42071,7 @@ /* end confdefs.h. */ #include int -main () +main (void) { #if !defined( POSIX_FADV_SEQUENTIAL ) #define POSIX_FADV_SEQUENTIAL 2 @@ -36790,12 +42081,13 @@ return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_func_posix_fadvise=yes -else +else $as_nop ac_cv_func_posix_fadvise=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ac_ext=c @@ -36806,40 +42098,45 @@ CFLAGS="$SAVE_CFLAGS" - if test "x$ac_cv_func_posix_fadvise" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + if test "x$ac_cv_func_posix_fadvise" = xyes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -$as_echo "#define HAVE_POSIX_FADVISE 1" >>confdefs.h +printf "%s\n" "#define HAVE_POSIX_FADVISE 1" >>confdefs.h -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi fi - if test "x$ac_cv_func_fstat" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_fstat" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: fstat See \`config.log' for more details" "$LINENO" 5; } fi - if test "x$ac_cv_func_ftruncate" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_ftruncate" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: ftruncate See \`config.log' for more details" "$LINENO" 5; } fi - if test x"$ac_cv_enable_winapi" = xno; then : - if test "x$ac_cv_func_ioctl" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test x"$ac_cv_enable_winapi" = xno +then : + if test "x$ac_cv_func_ioctl" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: ioctl See \`config.log' for more details" "$LINENO" 5; } @@ -36847,62 +42144,69 @@ fi - if test "x$ac_cv_func_lseek" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_lseek" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: lseek See \`config.log' for more details" "$LINENO" 5; } fi - if test "x$ac_cv_func_open" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_open" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: open See \`config.log' for more details" "$LINENO" 5; } fi - if test "x$ac_cv_func_read" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_read" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: read See \`config.log' for more details" "$LINENO" 5; } fi - if test "x$ac_cv_func_write" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_write" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: write See \`config.log' for more details" "$LINENO" 5; } fi - for ac_func in stat unlink -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF + ac_fn_c_check_func "$LINENO" "stat" "ac_cv_func_stat" +if test "x$ac_cv_func_stat" = xyes +then : + printf "%s\n" "#define HAVE_STAT 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "unlink" "ac_cv_func_unlink" +if test "x$ac_cv_func_unlink" = xyes +then : + printf "%s\n" "#define HAVE_UNLINK 1" >>confdefs.h fi -done - if test "x$ac_cv_func_stat" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_stat" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: stat See \`config.log' for more details" "$LINENO" 5; } fi - if test "x$ac_cv_func_unlink" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_unlink" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: unlink See \`config.log' for more details" "$LINENO" 5; } @@ -36915,7 +42219,7 @@ -$as_echo "#define HAVE_LOCAL_LIBCFILE 1" >>confdefs.h +printf "%s\n" "#define HAVE_LOCAL_LIBCFILE 1" >>confdefs.h HAVE_LOCAL_LIBCFILE=1 @@ -36930,24 +42234,28 @@ HAVE_LOCAL_LIBCFILE_FALSE= fi - if test "x$ac_cv_libcfile_CPPFLAGS" != "x"; then : + if test "x$ac_cv_libcfile_CPPFLAGS" != "x" +then : LIBCFILE_CPPFLAGS=$ac_cv_libcfile_CPPFLAGS fi - if test "x$ac_cv_libcfile_LIBADD" != "x"; then : + if test "x$ac_cv_libcfile_LIBADD" != "x" +then : LIBCFILE_LIBADD=$ac_cv_libcfile_LIBADD fi - if test "x$ac_cv_libcfile" = xyes; then : + if test "x$ac_cv_libcfile" = xyes +then : ax_libcfile_pc_libs_private=-lcfile fi - if test "x$ac_cv_libcfile" = xyes; then : + if test "x$ac_cv_libcfile" = xyes +then : ax_libcfile_spec_requires=libcfile ax_libcfile_spec_build_requires=libcfile-devel @@ -36959,53 +42267,59 @@ # Check whether --with-libcpath was given. -if test "${with_libcpath+set}" = set; then : +if test ${with_libcpath+y} +then : withval=$with_libcpath; ac_cv_with_libcpath=$withval -else +else $as_nop ac_cv_with_libcpath=auto-detect fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libcpath in includedir and libdir or in the specified DIR, or no if to use local version" >&5 -$as_echo_n "checking whether to use search for libcpath in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } -if ${ac_cv_with_libcpath+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use search for libcpath in includedir and libdir or in the specified DIR, or no if to use local version" >&5 +printf %s "checking whether to use search for libcpath in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } +if test ${ac_cv_with_libcpath+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_with_libcpath=auto-detect fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libcpath" >&5 -$as_echo "$ac_cv_with_libcpath" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libcpath" >&5 +printf "%s\n" "$ac_cv_with_libcpath" >&6; } - if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libcpath" = xno; then : + if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libcpath" = xno +then : ac_cv_libcpath=no -else +else $as_nop ac_cv_libcpath=check - if test "x$ac_cv_with_libcpath" != x && test "x$ac_cv_with_libcpath" != xauto-detect; then : - if test -d "$ac_cv_with_libcpath"; then : + if test "x$ac_cv_with_libcpath" != x && test "x$ac_cv_with_libcpath" != xauto-detect +then : + if test -d "$ac_cv_with_libcpath" +then : CFLAGS="$CFLAGS -I${ac_cv_with_libcpath}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libcpath}/lib" -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "no such directory: $ac_cv_with_libcpath See \`config.log' for more details" "$LINENO" 5; } fi -else - if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : +else $as_nop + if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x" +then : pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcpath" >&5 -$as_echo_n "checking for libcpath... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcpath >= 20180716" >&5 +printf %s "checking for libcpath >= 20180716... " >&6; } if test -n "$libcpath_CFLAGS"; then pkg_cv_libcpath_CFLAGS="$libcpath_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcpath >= 20180716\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcpath >= 20180716\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcpath >= 20180716") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libcpath_CFLAGS=`$PKG_CONFIG --cflags "libcpath >= 20180716" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -37019,10 +42333,10 @@ pkg_cv_libcpath_LIBS="$libcpath_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcpath >= 20180716\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcpath >= 20180716\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcpath >= 20180716") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libcpath_LIBS=`$PKG_CONFIG --libs "libcpath >= 20180716" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -37036,8 +42350,8 @@ if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -37045,33 +42359,35 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - libcpath_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libcpath >= 20180716" 2>&1` + libcpath_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libcpath >= 20180716" 2>&1` else - libcpath_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libcpath >= 20180716" 2>&1` + libcpath_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libcpath >= 20180716" 2>&1` fi - # Put the nasty error message in config.log where it belongs - echo "$libcpath_PKG_ERRORS" >&5 + # Put the nasty error message in config.log where it belongs + echo "$libcpath_PKG_ERRORS" >&5 - ac_cv_libcpath=check + ac_cv_libcpath=check elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ac_cv_libcpath=check -else - libcpath_CFLAGS=$pkg_cv_libcpath_CFLAGS - libcpath_LIBS=$pkg_cv_libcpath_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ac_cv_libcpath=yes + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ac_cv_libcpath=check +else + libcpath_CFLAGS=$pkg_cv_libcpath_CFLAGS + libcpath_LIBS=$pkg_cv_libcpath_LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + ac_cv_libcpath=yes fi fi - if test "x$ac_cv_libcpath" = xyes && test "x$ac_cv_enable_wide_character_type" != xno; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libcpath/features.h defines LIBCPATH_HAVE_WIDE_CHARACTER_TYPE as 1" >&5 -$as_echo_n "checking whether libcpath/features.h defines LIBCPATH_HAVE_WIDE_CHARACTER_TYPE as 1... " >&6; } -if ${ac_cv_header_libcpath_features_h_have_wide_character_type+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test "x$ac_cv_libcpath" = xyes && test "x$ac_cv_enable_wide_character_type" != xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether libcpath/features.h defines LIBCPATH_HAVE_WIDE_CHARACTER_TYPE as 1" >&5 +printf %s "checking whether libcpath/features.h defines LIBCPATH_HAVE_WIDE_CHARACTER_TYPE as 1... " >&6; } +if test ${ac_cv_header_libcpath_features_h_have_wide_character_type+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -37082,7 +42398,7 @@ /* end confdefs.h. */ #include int -main () +main (void) { #if !defined( LIBCPATH_HAVE_WIDE_CHARACTER_TYPE ) || ( LIBCPATH_HAVE_WIDE_CHARACTER_TYPE != 1 ) #error LIBCPATH_HAVE_WIDE_CHARACTER_TYPE not defined @@ -37091,12 +42407,13 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_header_libcpath_features_h_have_wide_character_type=yes -else +else $as_nop ac_cv_header_libcpath_features_h_have_wide_character_type=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -37104,45 +42421,45 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_libcpath_features_h_have_wide_character_type" >&5 -$as_echo "$ac_cv_header_libcpath_features_h_have_wide_character_type" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_libcpath_features_h_have_wide_character_type" >&5 +printf "%s\n" "$ac_cv_header_libcpath_features_h_have_wide_character_type" >&6; } - if test "x$ac_cv_header_libcpath_features_h_have_wide_character_type" = xno; then : + if test "x$ac_cv_header_libcpath_features_h_have_wide_character_type" = xno +then : ac_cv_libcpath=no fi fi - if test "x$ac_cv_libcpath" = xyes; then : + if test "x$ac_cv_libcpath" = xyes +then : ac_cv_libcpath_CPPFLAGS="$pkg_cv_libcpath_CFLAGS" ac_cv_libcpath_LIBADD="$pkg_cv_libcpath_LIBS" fi fi - if test "x$ac_cv_libcpath" = xcheck; then : - for ac_header in libcpath.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "libcpath.h" "ac_cv_header_libcpath_h" "$ac_includes_default" -if test "x$ac_cv_header_libcpath_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBCPATH_H 1 -_ACEOF + if test "x$ac_cv_libcpath" = xcheck +then : + ac_fn_c_check_header_compile "$LINENO" "libcpath.h" "ac_cv_header_libcpath_h" "$ac_includes_default" +if test "x$ac_cv_header_libcpath_h" = xyes +then : + printf "%s\n" "#define HAVE_LIBCPATH_H 1" >>confdefs.h fi -done - - if test "x$ac_cv_header_libcpath_h" = xno; then : + if test "x$ac_cv_header_libcpath_h" = xno +then : ac_cv_libcpath=no -else +else $as_nop ac_cv_libcpath=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcpath_get_version in -lcpath" >&5 -$as_echo_n "checking for libcpath_get_version in -lcpath... " >&6; } -if ${ac_cv_lib_cpath_libcpath_get_version+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcpath_get_version in -lcpath" >&5 +printf %s "checking for libcpath_get_version in -lcpath... " >&6; } +if test ${ac_cv_lib_cpath_libcpath_get_version+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcpath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -37151,41 +42468,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcpath_get_version (); int -main () +main (void) { return libcpath_get_version (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cpath_libcpath_get_version=yes -else +else $as_nop ac_cv_lib_cpath_libcpath_get_version=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_get_version" >&5 -$as_echo "$ac_cv_lib_cpath_libcpath_get_version" >&6; } -if test "x$ac_cv_lib_cpath_libcpath_get_version" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_get_version" >&5 +printf "%s\n" "$ac_cv_lib_cpath_libcpath_get_version" >&6; } +if test "x$ac_cv_lib_cpath_libcpath_get_version" = xyes +then : ac_cv_libcpath_dummy=yes -else +else $as_nop ac_cv_libcpath=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_change_directory in -lcpath" >&5 -$as_echo_n "checking for libcpath_path_change_directory in -lcpath... " >&6; } -if ${ac_cv_lib_cpath_libcpath_path_change_directory+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_change_directory in -lcpath" >&5 +printf %s "checking for libcpath_path_change_directory in -lcpath... " >&6; } +if test ${ac_cv_lib_cpath_libcpath_path_change_directory+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcpath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -37194,40 +42511,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcpath_path_change_directory (); int -main () +main (void) { return libcpath_path_change_directory (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cpath_libcpath_path_change_directory=yes -else +else $as_nop ac_cv_lib_cpath_libcpath_path_change_directory=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_change_directory" >&5 -$as_echo "$ac_cv_lib_cpath_libcpath_path_change_directory" >&6; } -if test "x$ac_cv_lib_cpath_libcpath_path_change_directory" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_change_directory" >&5 +printf "%s\n" "$ac_cv_lib_cpath_libcpath_path_change_directory" >&6; } +if test "x$ac_cv_lib_cpath_libcpath_path_change_directory" = xyes +then : ac_cv_libcpath_dummy=yes -else +else $as_nop ac_cv_libcpath=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_get_current_working_directory in -lcpath" >&5 -$as_echo_n "checking for libcpath_path_get_current_working_directory in -lcpath... " >&6; } -if ${ac_cv_lib_cpath_libcpath_path_get_current_working_directory+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_get_current_working_directory in -lcpath" >&5 +printf %s "checking for libcpath_path_get_current_working_directory in -lcpath... " >&6; } +if test ${ac_cv_lib_cpath_libcpath_path_get_current_working_directory+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcpath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -37236,40 +42553,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcpath_path_get_current_working_directory (); int -main () +main (void) { return libcpath_path_get_current_working_directory (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cpath_libcpath_path_get_current_working_directory=yes -else +else $as_nop ac_cv_lib_cpath_libcpath_path_get_current_working_directory=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_get_current_working_directory" >&5 -$as_echo "$ac_cv_lib_cpath_libcpath_path_get_current_working_directory" >&6; } -if test "x$ac_cv_lib_cpath_libcpath_path_get_current_working_directory" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_get_current_working_directory" >&5 +printf "%s\n" "$ac_cv_lib_cpath_libcpath_path_get_current_working_directory" >&6; } +if test "x$ac_cv_lib_cpath_libcpath_path_get_current_working_directory" = xyes +then : ac_cv_libcpath_dummy=yes -else +else $as_nop ac_cv_libcpath=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_get_full_path in -lcpath" >&5 -$as_echo_n "checking for libcpath_path_get_full_path in -lcpath... " >&6; } -if ${ac_cv_lib_cpath_libcpath_path_get_full_path+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_get_full_path in -lcpath" >&5 +printf %s "checking for libcpath_path_get_full_path in -lcpath... " >&6; } +if test ${ac_cv_lib_cpath_libcpath_path_get_full_path+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcpath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -37278,40 +42595,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcpath_path_get_full_path (); int -main () +main (void) { return libcpath_path_get_full_path (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cpath_libcpath_path_get_full_path=yes -else +else $as_nop ac_cv_lib_cpath_libcpath_path_get_full_path=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_get_full_path" >&5 -$as_echo "$ac_cv_lib_cpath_libcpath_path_get_full_path" >&6; } -if test "x$ac_cv_lib_cpath_libcpath_path_get_full_path" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_get_full_path" >&5 +printf "%s\n" "$ac_cv_lib_cpath_libcpath_path_get_full_path" >&6; } +if test "x$ac_cv_lib_cpath_libcpath_path_get_full_path" = xyes +then : ac_cv_libcpath_dummy=yes -else +else $as_nop ac_cv_libcpath=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_get_sanitized_filename in -lcpath" >&5 -$as_echo_n "checking for libcpath_path_get_sanitized_filename in -lcpath... " >&6; } -if ${ac_cv_lib_cpath_libcpath_path_get_sanitized_filename+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_get_sanitized_filename in -lcpath" >&5 +printf %s "checking for libcpath_path_get_sanitized_filename in -lcpath... " >&6; } +if test ${ac_cv_lib_cpath_libcpath_path_get_sanitized_filename+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcpath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -37320,40 +42637,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcpath_path_get_sanitized_filename (); int -main () +main (void) { return libcpath_path_get_sanitized_filename (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cpath_libcpath_path_get_sanitized_filename=yes -else +else $as_nop ac_cv_lib_cpath_libcpath_path_get_sanitized_filename=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_get_sanitized_filename" >&5 -$as_echo "$ac_cv_lib_cpath_libcpath_path_get_sanitized_filename" >&6; } -if test "x$ac_cv_lib_cpath_libcpath_path_get_sanitized_filename" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_get_sanitized_filename" >&5 +printf "%s\n" "$ac_cv_lib_cpath_libcpath_path_get_sanitized_filename" >&6; } +if test "x$ac_cv_lib_cpath_libcpath_path_get_sanitized_filename" = xyes +then : ac_cv_libcpath_dummy=yes -else +else $as_nop ac_cv_libcpath=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_get_sanitized_path in -lcpath" >&5 -$as_echo_n "checking for libcpath_path_get_sanitized_path in -lcpath... " >&6; } -if ${ac_cv_lib_cpath_libcpath_path_get_sanitized_path+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_get_sanitized_path in -lcpath" >&5 +printf %s "checking for libcpath_path_get_sanitized_path in -lcpath... " >&6; } +if test ${ac_cv_lib_cpath_libcpath_path_get_sanitized_path+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcpath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -37362,40 +42679,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcpath_path_get_sanitized_path (); int -main () +main (void) { return libcpath_path_get_sanitized_path (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cpath_libcpath_path_get_sanitized_path=yes -else +else $as_nop ac_cv_lib_cpath_libcpath_path_get_sanitized_path=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_get_sanitized_path" >&5 -$as_echo "$ac_cv_lib_cpath_libcpath_path_get_sanitized_path" >&6; } -if test "x$ac_cv_lib_cpath_libcpath_path_get_sanitized_path" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_get_sanitized_path" >&5 +printf "%s\n" "$ac_cv_lib_cpath_libcpath_path_get_sanitized_path" >&6; } +if test "x$ac_cv_lib_cpath_libcpath_path_get_sanitized_path" = xyes +then : ac_cv_libcpath_dummy=yes -else +else $as_nop ac_cv_libcpath=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_join in -lcpath" >&5 -$as_echo_n "checking for libcpath_path_join in -lcpath... " >&6; } -if ${ac_cv_lib_cpath_libcpath_path_join+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_join in -lcpath" >&5 +printf %s "checking for libcpath_path_join in -lcpath... " >&6; } +if test ${ac_cv_lib_cpath_libcpath_path_join+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcpath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -37404,40 +42721,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcpath_path_join (); int -main () +main (void) { return libcpath_path_join (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cpath_libcpath_path_join=yes -else +else $as_nop ac_cv_lib_cpath_libcpath_path_join=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_join" >&5 -$as_echo "$ac_cv_lib_cpath_libcpath_path_join" >&6; } -if test "x$ac_cv_lib_cpath_libcpath_path_join" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_join" >&5 +printf "%s\n" "$ac_cv_lib_cpath_libcpath_path_join" >&6; } +if test "x$ac_cv_lib_cpath_libcpath_path_join" = xyes +then : ac_cv_libcpath_dummy=yes -else +else $as_nop ac_cv_libcpath=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_make_directory in -lcpath" >&5 -$as_echo_n "checking for libcpath_path_make_directory in -lcpath... " >&6; } -if ${ac_cv_lib_cpath_libcpath_path_make_directory+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_make_directory in -lcpath" >&5 +printf %s "checking for libcpath_path_make_directory in -lcpath... " >&6; } +if test ${ac_cv_lib_cpath_libcpath_path_make_directory+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcpath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -37446,42 +42763,43 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcpath_path_make_directory (); int -main () +main (void) { return libcpath_path_make_directory (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cpath_libcpath_path_make_directory=yes -else +else $as_nop ac_cv_lib_cpath_libcpath_path_make_directory=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_make_directory" >&5 -$as_echo "$ac_cv_lib_cpath_libcpath_path_make_directory" >&6; } -if test "x$ac_cv_lib_cpath_libcpath_path_make_directory" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_make_directory" >&5 +printf "%s\n" "$ac_cv_lib_cpath_libcpath_path_make_directory" >&6; } +if test "x$ac_cv_lib_cpath_libcpath_path_make_directory" = xyes +then : ac_cv_libcpath_dummy=yes -else +else $as_nop ac_cv_libcpath=no fi - if test "x$ac_cv_enable_wide_character_type" != xno; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_change_directory_wide in -lcpath" >&5 -$as_echo_n "checking for libcpath_path_change_directory_wide in -lcpath... " >&6; } -if ${ac_cv_lib_cpath_libcpath_path_change_directory_wide+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test "x$ac_cv_enable_wide_character_type" != xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_change_directory_wide in -lcpath" >&5 +printf %s "checking for libcpath_path_change_directory_wide in -lcpath... " >&6; } +if test ${ac_cv_lib_cpath_libcpath_path_change_directory_wide+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcpath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -37490,40 +42808,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcpath_path_change_directory_wide (); int -main () +main (void) { return libcpath_path_change_directory_wide (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cpath_libcpath_path_change_directory_wide=yes -else +else $as_nop ac_cv_lib_cpath_libcpath_path_change_directory_wide=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_change_directory_wide" >&5 -$as_echo "$ac_cv_lib_cpath_libcpath_path_change_directory_wide" >&6; } -if test "x$ac_cv_lib_cpath_libcpath_path_change_directory_wide" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_change_directory_wide" >&5 +printf "%s\n" "$ac_cv_lib_cpath_libcpath_path_change_directory_wide" >&6; } +if test "x$ac_cv_lib_cpath_libcpath_path_change_directory_wide" = xyes +then : ac_cv_libcpath_dummy=yes -else +else $as_nop ac_cv_libcpath=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_get_current_working_directory_wide in -lcpath" >&5 -$as_echo_n "checking for libcpath_path_get_current_working_directory_wide in -lcpath... " >&6; } -if ${ac_cv_lib_cpath_libcpath_path_get_current_working_directory_wide+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_get_current_working_directory_wide in -lcpath" >&5 +printf %s "checking for libcpath_path_get_current_working_directory_wide in -lcpath... " >&6; } +if test ${ac_cv_lib_cpath_libcpath_path_get_current_working_directory_wide+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcpath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -37532,40 +42850,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcpath_path_get_current_working_directory_wide (); int -main () +main (void) { return libcpath_path_get_current_working_directory_wide (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cpath_libcpath_path_get_current_working_directory_wide=yes -else +else $as_nop ac_cv_lib_cpath_libcpath_path_get_current_working_directory_wide=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_get_current_working_directory_wide" >&5 -$as_echo "$ac_cv_lib_cpath_libcpath_path_get_current_working_directory_wide" >&6; } -if test "x$ac_cv_lib_cpath_libcpath_path_get_current_working_directory_wide" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_get_current_working_directory_wide" >&5 +printf "%s\n" "$ac_cv_lib_cpath_libcpath_path_get_current_working_directory_wide" >&6; } +if test "x$ac_cv_lib_cpath_libcpath_path_get_current_working_directory_wide" = xyes +then : ac_cv_libcpath_dummy=yes -else +else $as_nop ac_cv_libcpath=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_get_full_path_wide in -lcpath" >&5 -$as_echo_n "checking for libcpath_path_get_full_path_wide in -lcpath... " >&6; } -if ${ac_cv_lib_cpath_libcpath_path_get_full_path_wide+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_get_full_path_wide in -lcpath" >&5 +printf %s "checking for libcpath_path_get_full_path_wide in -lcpath... " >&6; } +if test ${ac_cv_lib_cpath_libcpath_path_get_full_path_wide+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcpath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -37574,40 +42892,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcpath_path_get_full_path_wide (); int -main () +main (void) { return libcpath_path_get_full_path_wide (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cpath_libcpath_path_get_full_path_wide=yes -else +else $as_nop ac_cv_lib_cpath_libcpath_path_get_full_path_wide=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_get_full_path_wide" >&5 -$as_echo "$ac_cv_lib_cpath_libcpath_path_get_full_path_wide" >&6; } -if test "x$ac_cv_lib_cpath_libcpath_path_get_full_path_wide" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_get_full_path_wide" >&5 +printf "%s\n" "$ac_cv_lib_cpath_libcpath_path_get_full_path_wide" >&6; } +if test "x$ac_cv_lib_cpath_libcpath_path_get_full_path_wide" = xyes +then : ac_cv_libcpath_dummy=yes -else +else $as_nop ac_cv_libcpath=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_get_sanitized_filename_wide in -lcpath" >&5 -$as_echo_n "checking for libcpath_path_get_sanitized_filename_wide in -lcpath... " >&6; } -if ${ac_cv_lib_cpath_libcpath_path_get_sanitized_filename_wide+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_get_sanitized_filename_wide in -lcpath" >&5 +printf %s "checking for libcpath_path_get_sanitized_filename_wide in -lcpath... " >&6; } +if test ${ac_cv_lib_cpath_libcpath_path_get_sanitized_filename_wide+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcpath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -37616,40 +42934,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcpath_path_get_sanitized_filename_wide (); int -main () +main (void) { return libcpath_path_get_sanitized_filename_wide (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cpath_libcpath_path_get_sanitized_filename_wide=yes -else +else $as_nop ac_cv_lib_cpath_libcpath_path_get_sanitized_filename_wide=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_get_sanitized_filename_wide" >&5 -$as_echo "$ac_cv_lib_cpath_libcpath_path_get_sanitized_filename_wide" >&6; } -if test "x$ac_cv_lib_cpath_libcpath_path_get_sanitized_filename_wide" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_get_sanitized_filename_wide" >&5 +printf "%s\n" "$ac_cv_lib_cpath_libcpath_path_get_sanitized_filename_wide" >&6; } +if test "x$ac_cv_lib_cpath_libcpath_path_get_sanitized_filename_wide" = xyes +then : ac_cv_libcpath_dummy=yes -else +else $as_nop ac_cv_libcpath=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_get_sanitized_path_wide in -lcpath" >&5 -$as_echo_n "checking for libcpath_path_get_sanitized_path_wide in -lcpath... " >&6; } -if ${ac_cv_lib_cpath_libcpath_path_get_sanitized_path_wide+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_get_sanitized_path_wide in -lcpath" >&5 +printf %s "checking for libcpath_path_get_sanitized_path_wide in -lcpath... " >&6; } +if test ${ac_cv_lib_cpath_libcpath_path_get_sanitized_path_wide+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcpath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -37658,40 +42976,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcpath_path_get_sanitized_path_wide (); int -main () +main (void) { return libcpath_path_get_sanitized_path_wide (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cpath_libcpath_path_get_sanitized_path_wide=yes -else +else $as_nop ac_cv_lib_cpath_libcpath_path_get_sanitized_path_wide=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_get_sanitized_path_wide" >&5 -$as_echo "$ac_cv_lib_cpath_libcpath_path_get_sanitized_path_wide" >&6; } -if test "x$ac_cv_lib_cpath_libcpath_path_get_sanitized_path_wide" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_get_sanitized_path_wide" >&5 +printf "%s\n" "$ac_cv_lib_cpath_libcpath_path_get_sanitized_path_wide" >&6; } +if test "x$ac_cv_lib_cpath_libcpath_path_get_sanitized_path_wide" = xyes +then : ac_cv_libcpath_dummy=yes -else +else $as_nop ac_cv_libcpath=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_join_wide in -lcpath" >&5 -$as_echo_n "checking for libcpath_path_join_wide in -lcpath... " >&6; } -if ${ac_cv_lib_cpath_libcpath_path_join_wide+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_join_wide in -lcpath" >&5 +printf %s "checking for libcpath_path_join_wide in -lcpath... " >&6; } +if test ${ac_cv_lib_cpath_libcpath_path_join_wide+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcpath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -37700,40 +43018,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcpath_path_join_wide (); int -main () +main (void) { return libcpath_path_join_wide (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cpath_libcpath_path_join_wide=yes -else +else $as_nop ac_cv_lib_cpath_libcpath_path_join_wide=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_join_wide" >&5 -$as_echo "$ac_cv_lib_cpath_libcpath_path_join_wide" >&6; } -if test "x$ac_cv_lib_cpath_libcpath_path_join_wide" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_join_wide" >&5 +printf "%s\n" "$ac_cv_lib_cpath_libcpath_path_join_wide" >&6; } +if test "x$ac_cv_lib_cpath_libcpath_path_join_wide" = xyes +then : ac_cv_libcpath_dummy=yes -else +else $as_nop ac_cv_libcpath=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_make_directory_wide in -lcpath" >&5 -$as_echo_n "checking for libcpath_path_make_directory_wide in -lcpath... " >&6; } -if ${ac_cv_lib_cpath_libcpath_path_make_directory_wide+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_make_directory_wide in -lcpath" >&5 +printf %s "checking for libcpath_path_make_directory_wide in -lcpath... " >&6; } +if test ${ac_cv_lib_cpath_libcpath_path_make_directory_wide+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcpath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -37742,32 +43060,31 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libcpath_path_make_directory_wide (); int -main () +main (void) { return libcpath_path_make_directory_wide (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cpath_libcpath_path_make_directory_wide=yes -else +else $as_nop ac_cv_lib_cpath_libcpath_path_make_directory_wide=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_make_directory_wide" >&5 -$as_echo "$ac_cv_lib_cpath_libcpath_path_make_directory_wide" >&6; } -if test "x$ac_cv_lib_cpath_libcpath_path_make_directory_wide" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_make_directory_wide" >&5 +printf "%s\n" "$ac_cv_lib_cpath_libcpath_path_make_directory_wide" >&6; } +if test "x$ac_cv_lib_cpath_libcpath_path_make_directory_wide" = xyes +then : ac_cv_libcpath_dummy=yes -else +else $as_nop ac_cv_libcpath=no fi @@ -37778,9 +43095,10 @@ fi fi - if test "x$ac_cv_with_libcpath" != x && test "x$ac_cv_with_libcpath" != xauto-detect && test "x$ac_cv_libcpath" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_with_libcpath" != x && test "x$ac_cv_with_libcpath" != xauto-detect && test "x$ac_cv_libcpath" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "unable to find supported libcpath in directory: $ac_cv_with_libcpath See \`config.log' for more details" "$LINENO" 5; } @@ -37788,82 +43106,91 @@ fi - if test "x$ac_cv_libcpath" = xyes; then : + if test "x$ac_cv_libcpath" = xyes +then : -$as_echo "#define HAVE_LIBCPATH 1" >>confdefs.h +printf "%s\n" "#define HAVE_LIBCPATH 1" >>confdefs.h fi - if test "x$ac_cv_libcpath" = xyes; then : + if test "x$ac_cv_libcpath" = xyes +then : HAVE_LIBCPATH=1 -else +else $as_nop HAVE_LIBCPATH=0 fi - if test "x$ac_cv_libcpath" != xyes; then : - for ac_header in errno.h sys/stat.h sys/syslimits.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF + if test "x$ac_cv_libcpath" != xyes +then : + ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default" +if test "x$ac_cv_header_errno_h" = xyes +then : + printf "%s\n" "#define HAVE_ERRNO_H 1" >>confdefs.h fi +ac_fn_c_check_header_compile "$LINENO" "sys/stat.h" "ac_cv_header_sys_stat_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_stat_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_STAT_H 1" >>confdefs.h -done +fi +ac_fn_c_check_header_compile "$LINENO" "sys/syslimits.h" "ac_cv_header_sys_syslimits_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_syslimits_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_SYSLIMITS_H 1" >>confdefs.h +fi - for ac_func in chdir getcwd -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF + + ac_fn_c_check_func "$LINENO" "chdir" "ac_cv_func_chdir" +if test "x$ac_cv_func_chdir" = xyes +then : + printf "%s\n" "#define HAVE_CHDIR 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd" +if test "x$ac_cv_func_getcwd" = xyes +then : + printf "%s\n" "#define HAVE_GETCWD 1" >>confdefs.h fi -done - if test "x$ac_cv_func_chdir" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_chdir" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing functions: chdir See \`config.log' for more details" "$LINENO" 5; } fi - if test "x$ac_cv_func_getcwd" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_getcwd" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing functions: getcwd See \`config.log' for more details" "$LINENO" 5; } fi - for ac_func in mkdir -do : ac_fn_c_check_func "$LINENO" "mkdir" "ac_cv_func_mkdir" -if test "x$ac_cv_func_mkdir" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_MKDIR 1 -_ACEOF +if test "x$ac_cv_func_mkdir" = xyes +then : + printf "%s\n" "#define HAVE_MKDIR 1" >>confdefs.h fi -done - if test "x$ac_cv_func_mkdir" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to use mkdir" >&5 -$as_echo_n "checking how to use mkdir... " >&6; } + if test "x$ac_cv_func_mkdir" = xyes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to use mkdir" >&5 +printf %s "checking how to use mkdir... " >&6; } SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wall -Werror" @@ -37879,43 +43206,46 @@ #include #include int -main () +main (void) { mkdir( "", 0 ) ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: with additional mode argument" >&5 -$as_echo "with additional mode argument" >&6; } +if ac_fn_c_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: with additional mode argument" >&5 +printf "%s\n" "with additional mode argument" >&6; } ac_cv_cv_mkdir_mode=yes -else +else $as_nop ac_cv_cv_mkdir_mode=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - if test "x$ac_cv_cv_mkdir_mode" = xno; then : + if test "x$ac_cv_cv_mkdir_mode" = xno +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main () +main (void) { mkdir( "" ) ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: with single argument" >&5 -$as_echo "with single argument" >&6; } +if ac_fn_c_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: with single argument" >&5 +printf "%s\n" "with single argument" >&6; } ac_cv_cv_mkdir=yes -else +else $as_nop ac_cv_cv_mkdir=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi @@ -37928,31 +43258,35 @@ CFLAGS="$SAVE_CFLAGS" - if test "x$ac_cv_cv_mkdir_mode" = xno && test "x$ac_cv_cv_mkdir" = xno; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unknown" >&5 -$as_echo "$as_me: WARNING: unknown" >&2;} + if test "x$ac_cv_cv_mkdir_mode" = xno && test "x$ac_cv_cv_mkdir" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unknown" >&5 +printf "%s\n" "$as_me: WARNING: unknown" >&2;} ac_cv_func_mkdir=no fi - if test "x$ac_cv_func_mkdir" = xyes; then : + if test "x$ac_cv_func_mkdir" = xyes +then : -$as_echo "#define HAVE_MKDIR 1" >>confdefs.h +printf "%s\n" "#define HAVE_MKDIR 1" >>confdefs.h fi - if test "x$ac_cv_cv_mkdir_mode" = xyes; then : + if test "x$ac_cv_cv_mkdir_mode" = xyes +then : -$as_echo "#define HAVE_MKDIR_MODE 1" >>confdefs.h +printf "%s\n" "#define HAVE_MKDIR_MODE 1" >>confdefs.h fi fi - if test "x$ac_cv_func_mkdir" = xno; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_mkdir" = xno +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: mkdir See \`config.log' for more details" "$LINENO" 5; } @@ -37966,7 +43300,7 @@ -$as_echo "#define HAVE_LOCAL_LIBCPATH 1" >>confdefs.h +printf "%s\n" "#define HAVE_LOCAL_LIBCPATH 1" >>confdefs.h HAVE_LOCAL_LIBCPATH=1 @@ -37981,24 +43315,28 @@ HAVE_LOCAL_LIBCPATH_FALSE= fi - if test "x$ac_cv_libcpath_CPPFLAGS" != "x"; then : + if test "x$ac_cv_libcpath_CPPFLAGS" != "x" +then : LIBCPATH_CPPFLAGS=$ac_cv_libcpath_CPPFLAGS fi - if test "x$ac_cv_libcpath_LIBADD" != "x"; then : + if test "x$ac_cv_libcpath_LIBADD" != "x" +then : LIBCPATH_LIBADD=$ac_cv_libcpath_LIBADD fi - if test "x$ac_cv_libcpath" = xyes; then : + if test "x$ac_cv_libcpath" = xyes +then : ax_libcpath_pc_libs_private=-lcpath fi - if test "x$ac_cv_libcpath" = xyes; then : + if test "x$ac_cv_libcpath" = xyes +then : ax_libcpath_spec_requires=libcpath ax_libcpath_spec_build_requires=libcpath-devel @@ -38010,55 +43348,61 @@ # Check whether --with-libbfio was given. -if test "${with_libbfio+set}" = set; then : +if test ${with_libbfio+y} +then : withval=$with_libbfio; ac_cv_with_libbfio=$withval -else +else $as_nop ac_cv_with_libbfio=auto-detect fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libbfio in includedir and libdir or in the specified DIR, or no if to use local version" >&5 -$as_echo_n "checking whether to use search for libbfio in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } -if ${ac_cv_with_libbfio+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use search for libbfio in includedir and libdir or in the specified DIR, or no if to use local version" >&5 +printf %s "checking whether to use search for libbfio in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } +if test ${ac_cv_with_libbfio+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_with_libbfio=auto-detect fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libbfio" >&5 -$as_echo "$ac_cv_with_libbfio" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libbfio" >&5 +printf "%s\n" "$ac_cv_with_libbfio" >&6; } - if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libbfio" = xno; then : + if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libbfio" = xno +then : ac_cv_libbfio=no -else +else $as_nop ac_cv_libbfio=check - if test "x$ac_cv_with_libbfio" != x && test "x$ac_cv_with_libbfio" != xauto-detect; then : - if test -d "$ac_cv_with_libbfio"; then : + if test "x$ac_cv_with_libbfio" != x && test "x$ac_cv_with_libbfio" != xauto-detect +then : + if test -d "$ac_cv_with_libbfio" +then : CFLAGS="$CFLAGS -I${ac_cv_with_libbfio}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libbfio}/lib" -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "no such directory: $ac_cv_with_libbfio See \`config.log' for more details" "$LINENO" 5; } fi -else - if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : +else $as_nop + if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x" +then : pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio" >&5 -$as_echo_n "checking for libbfio... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio >= 20201125" >&5 +printf %s "checking for libbfio >= 20201125... " >&6; } if test -n "$libbfio_CFLAGS"; then pkg_cv_libbfio_CFLAGS="$libbfio_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libbfio >= 20191230\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libbfio >= 20191230") 2>&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libbfio >= 20201125\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libbfio >= 20201125") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_libbfio_CFLAGS=`$PKG_CONFIG --cflags "libbfio >= 20191230" 2>/dev/null` + pkg_cv_libbfio_CFLAGS=`$PKG_CONFIG --cflags "libbfio >= 20201125" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -38070,12 +43414,12 @@ pkg_cv_libbfio_LIBS="$libbfio_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libbfio >= 20191230\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libbfio >= 20191230") 2>&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libbfio >= 20201125\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libbfio >= 20201125") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_libbfio_LIBS=`$PKG_CONFIG --libs "libbfio >= 20191230" 2>/dev/null` + pkg_cv_libbfio_LIBS=`$PKG_CONFIG --libs "libbfio >= 20201125" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -38087,8 +43431,8 @@ if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -38096,33 +43440,35 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - libbfio_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libbfio >= 20191230" 2>&1` + libbfio_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libbfio >= 20201125" 2>&1` else - libbfio_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libbfio >= 20191230" 2>&1` + libbfio_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libbfio >= 20201125" 2>&1` fi - # Put the nasty error message in config.log where it belongs - echo "$libbfio_PKG_ERRORS" >&5 + # Put the nasty error message in config.log where it belongs + echo "$libbfio_PKG_ERRORS" >&5 - ac_cv_libbfio=check + ac_cv_libbfio=check elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ac_cv_libbfio=check -else - libbfio_CFLAGS=$pkg_cv_libbfio_CFLAGS - libbfio_LIBS=$pkg_cv_libbfio_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ac_cv_libbfio=yes + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ac_cv_libbfio=check +else + libbfio_CFLAGS=$pkg_cv_libbfio_CFLAGS + libbfio_LIBS=$pkg_cv_libbfio_LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + ac_cv_libbfio=yes fi fi - if test "x$ac_cv_libbfio" = xyes && test "x$ac_cv_enable_wide_character_type" != xno; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libbfio/features.h defines LIBBFIO_HAVE_WIDE_CHARACTER_TYPE as 1" >&5 -$as_echo_n "checking whether libbfio/features.h defines LIBBFIO_HAVE_WIDE_CHARACTER_TYPE as 1... " >&6; } -if ${ac_cv_header_libbfio_features_h_have_wide_character_type+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test "x$ac_cv_libbfio" = xyes && test "x$ac_cv_enable_wide_character_type" != xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether libbfio/features.h defines LIBBFIO_HAVE_WIDE_CHARACTER_TYPE as 1" >&5 +printf %s "checking whether libbfio/features.h defines LIBBFIO_HAVE_WIDE_CHARACTER_TYPE as 1... " >&6; } +if test ${ac_cv_header_libbfio_features_h_have_wide_character_type+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -38133,7 +43479,7 @@ /* end confdefs.h. */ #include int -main () +main (void) { #if !defined( LIBBFIO_HAVE_WIDE_CHARACTER_TYPE ) || ( LIBBFIO_HAVE_WIDE_CHARACTER_TYPE != 1 ) #error LIBBFIO_HAVE_WIDE_CHARACTER_TYPE not defined @@ -38142,12 +43488,13 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_header_libbfio_features_h_have_wide_character_type=yes -else +else $as_nop ac_cv_header_libbfio_features_h_have_wide_character_type=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -38155,45 +43502,45 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_libbfio_features_h_have_wide_character_type" >&5 -$as_echo "$ac_cv_header_libbfio_features_h_have_wide_character_type" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_libbfio_features_h_have_wide_character_type" >&5 +printf "%s\n" "$ac_cv_header_libbfio_features_h_have_wide_character_type" >&6; } - if test "x$ac_cv_header_libbfio_features_h_have_wide_character_type" = xno; then : + if test "x$ac_cv_header_libbfio_features_h_have_wide_character_type" = xno +then : ac_cv_libbfio=no fi fi - if test "x$ac_cv_libbfio" = xyes; then : + if test "x$ac_cv_libbfio" = xyes +then : ac_cv_libbfio_CPPFLAGS="$pkg_cv_libbfio_CFLAGS" ac_cv_libbfio_LIBADD="$pkg_cv_libbfio_LIBS" fi fi - if test "x$ac_cv_libbfio" = xcheck; then : - for ac_header in libbfio.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "libbfio.h" "ac_cv_header_libbfio_h" "$ac_includes_default" -if test "x$ac_cv_header_libbfio_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBBFIO_H 1 -_ACEOF + if test "x$ac_cv_libbfio" = xcheck +then : + ac_fn_c_check_header_compile "$LINENO" "libbfio.h" "ac_cv_header_libbfio_h" "$ac_includes_default" +if test "x$ac_cv_header_libbfio_h" = xyes +then : + printf "%s\n" "#define HAVE_LIBBFIO_H 1" >>confdefs.h fi -done - - if test "x$ac_cv_header_libbfio_h" = xno; then : + if test "x$ac_cv_header_libbfio_h" = xno +then : ac_cv_libbfio=no -else +else $as_nop ac_cv_libbfio=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_get_version in -lbfio" >&5 -$as_echo_n "checking for libbfio_get_version in -lbfio... " >&6; } -if ${ac_cv_lib_bfio_libbfio_get_version+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_get_version in -lbfio" >&5 +printf %s "checking for libbfio_get_version in -lbfio... " >&6; } +if test ${ac_cv_lib_bfio_libbfio_get_version+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -38202,41 +43549,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libbfio_get_version (); int -main () +main (void) { return libbfio_get_version (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_bfio_libbfio_get_version=yes -else +else $as_nop ac_cv_lib_bfio_libbfio_get_version=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_get_version" >&5 -$as_echo "$ac_cv_lib_bfio_libbfio_get_version" >&6; } -if test "x$ac_cv_lib_bfio_libbfio_get_version" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_get_version" >&5 +printf "%s\n" "$ac_cv_lib_bfio_libbfio_get_version" >&6; } +if test "x$ac_cv_lib_bfio_libbfio_get_version" = xyes +then : ac_cv_libbfio_dummy=yes -else +else $as_nop ac_cv_libbfio=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_free in -lbfio" >&5 -$as_echo_n "checking for libbfio_handle_free in -lbfio... " >&6; } -if ${ac_cv_lib_bfio_libbfio_handle_free+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_free in -lbfio" >&5 +printf %s "checking for libbfio_handle_free in -lbfio... " >&6; } +if test ${ac_cv_lib_bfio_libbfio_handle_free+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -38245,40 +43592,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libbfio_handle_free (); int -main () +main (void) { return libbfio_handle_free (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_bfio_libbfio_handle_free=yes -else +else $as_nop ac_cv_lib_bfio_libbfio_handle_free=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_free" >&5 -$as_echo "$ac_cv_lib_bfio_libbfio_handle_free" >&6; } -if test "x$ac_cv_lib_bfio_libbfio_handle_free" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_free" >&5 +printf "%s\n" "$ac_cv_lib_bfio_libbfio_handle_free" >&6; } +if test "x$ac_cv_lib_bfio_libbfio_handle_free" = xyes +then : ac_cv_libbfio_dummy=yes -else +else $as_nop ac_cv_libbfio=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_open in -lbfio" >&5 -$as_echo_n "checking for libbfio_handle_open in -lbfio... " >&6; } -if ${ac_cv_lib_bfio_libbfio_handle_open+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_open in -lbfio" >&5 +printf %s "checking for libbfio_handle_open in -lbfio... " >&6; } +if test ${ac_cv_lib_bfio_libbfio_handle_open+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -38287,40 +43634,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libbfio_handle_open (); int -main () +main (void) { return libbfio_handle_open (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_bfio_libbfio_handle_open=yes -else +else $as_nop ac_cv_lib_bfio_libbfio_handle_open=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_open" >&5 -$as_echo "$ac_cv_lib_bfio_libbfio_handle_open" >&6; } -if test "x$ac_cv_lib_bfio_libbfio_handle_open" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_open" >&5 +printf "%s\n" "$ac_cv_lib_bfio_libbfio_handle_open" >&6; } +if test "x$ac_cv_lib_bfio_libbfio_handle_open" = xyes +then : ac_cv_libbfio_dummy=yes -else +else $as_nop ac_cv_libbfio=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_close in -lbfio" >&5 -$as_echo_n "checking for libbfio_handle_close in -lbfio... " >&6; } -if ${ac_cv_lib_bfio_libbfio_handle_close+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_close in -lbfio" >&5 +printf %s "checking for libbfio_handle_close in -lbfio... " >&6; } +if test ${ac_cv_lib_bfio_libbfio_handle_close+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -38329,40 +43676,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libbfio_handle_close (); int -main () +main (void) { return libbfio_handle_close (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_bfio_libbfio_handle_close=yes -else +else $as_nop ac_cv_lib_bfio_libbfio_handle_close=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_close" >&5 -$as_echo "$ac_cv_lib_bfio_libbfio_handle_close" >&6; } -if test "x$ac_cv_lib_bfio_libbfio_handle_close" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_close" >&5 +printf "%s\n" "$ac_cv_lib_bfio_libbfio_handle_close" >&6; } +if test "x$ac_cv_lib_bfio_libbfio_handle_close" = xyes +then : ac_cv_libbfio_dummy=yes -else +else $as_nop ac_cv_libbfio=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_exists in -lbfio" >&5 -$as_echo_n "checking for libbfio_handle_exists in -lbfio... " >&6; } -if ${ac_cv_lib_bfio_libbfio_handle_exists+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_exists in -lbfio" >&5 +printf %s "checking for libbfio_handle_exists in -lbfio... " >&6; } +if test ${ac_cv_lib_bfio_libbfio_handle_exists+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -38371,40 +43718,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libbfio_handle_exists (); int -main () +main (void) { return libbfio_handle_exists (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_bfio_libbfio_handle_exists=yes -else +else $as_nop ac_cv_lib_bfio_libbfio_handle_exists=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_exists" >&5 -$as_echo "$ac_cv_lib_bfio_libbfio_handle_exists" >&6; } -if test "x$ac_cv_lib_bfio_libbfio_handle_exists" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_exists" >&5 +printf "%s\n" "$ac_cv_lib_bfio_libbfio_handle_exists" >&6; } +if test "x$ac_cv_lib_bfio_libbfio_handle_exists" = xyes +then : ac_cv_libbfio_dummy=yes -else +else $as_nop ac_cv_libbfio=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_read_buffer in -lbfio" >&5 -$as_echo_n "checking for libbfio_handle_read_buffer in -lbfio... " >&6; } -if ${ac_cv_lib_bfio_libbfio_handle_read_buffer+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_read_buffer in -lbfio" >&5 +printf %s "checking for libbfio_handle_read_buffer in -lbfio... " >&6; } +if test ${ac_cv_lib_bfio_libbfio_handle_read_buffer+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -38413,40 +43760,82 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libbfio_handle_read_buffer (); int -main () +main (void) { return libbfio_handle_read_buffer (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_bfio_libbfio_handle_read_buffer=yes -else +else $as_nop ac_cv_lib_bfio_libbfio_handle_read_buffer=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_read_buffer" >&5 -$as_echo "$ac_cv_lib_bfio_libbfio_handle_read_buffer" >&6; } -if test "x$ac_cv_lib_bfio_libbfio_handle_read_buffer" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_read_buffer" >&5 +printf "%s\n" "$ac_cv_lib_bfio_libbfio_handle_read_buffer" >&6; } +if test "x$ac_cv_lib_bfio_libbfio_handle_read_buffer" = xyes +then : ac_cv_libbfio_dummy=yes -else +else $as_nop ac_cv_libbfio=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_write_buffer in -lbfio" >&5 -$as_echo_n "checking for libbfio_handle_write_buffer in -lbfio... " >&6; } -if ${ac_cv_lib_bfio_libbfio_handle_write_buffer+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_read_buffer_at_offset in -lbfio" >&5 +printf %s "checking for libbfio_handle_read_buffer_at_offset in -lbfio... " >&6; } +if test ${ac_cv_lib_bfio_libbfio_handle_read_buffer_at_offset+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lbfio $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libbfio_handle_read_buffer_at_offset (); +int +main (void) +{ +return libbfio_handle_read_buffer_at_offset (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_bfio_libbfio_handle_read_buffer_at_offset=yes +else $as_nop + ac_cv_lib_bfio_libbfio_handle_read_buffer_at_offset=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_read_buffer_at_offset" >&5 +printf "%s\n" "$ac_cv_lib_bfio_libbfio_handle_read_buffer_at_offset" >&6; } +if test "x$ac_cv_lib_bfio_libbfio_handle_read_buffer_at_offset" = xyes +then : + ac_cv_libbfio_dummy=yes +else $as_nop + ac_cv_libbfio=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_write_buffer in -lbfio" >&5 +printf %s "checking for libbfio_handle_write_buffer in -lbfio... " >&6; } +if test ${ac_cv_lib_bfio_libbfio_handle_write_buffer+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -38455,40 +43844,82 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libbfio_handle_write_buffer (); int -main () +main (void) { return libbfio_handle_write_buffer (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_bfio_libbfio_handle_write_buffer=yes -else +else $as_nop ac_cv_lib_bfio_libbfio_handle_write_buffer=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_write_buffer" >&5 -$as_echo "$ac_cv_lib_bfio_libbfio_handle_write_buffer" >&6; } -if test "x$ac_cv_lib_bfio_libbfio_handle_write_buffer" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_write_buffer" >&5 +printf "%s\n" "$ac_cv_lib_bfio_libbfio_handle_write_buffer" >&6; } +if test "x$ac_cv_lib_bfio_libbfio_handle_write_buffer" = xyes +then : ac_cv_libbfio_dummy=yes -else +else $as_nop ac_cv_libbfio=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_seek_offset in -lbfio" >&5 -$as_echo_n "checking for libbfio_handle_seek_offset in -lbfio... " >&6; } -if ${ac_cv_lib_bfio_libbfio_handle_seek_offset+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_write_buffer_at_offset in -lbfio" >&5 +printf %s "checking for libbfio_handle_write_buffer_at_offset in -lbfio... " >&6; } +if test ${ac_cv_lib_bfio_libbfio_handle_write_buffer_at_offset+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lbfio $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libbfio_handle_write_buffer_at_offset (); +int +main (void) +{ +return libbfio_handle_write_buffer_at_offset (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_bfio_libbfio_handle_write_buffer_at_offset=yes +else $as_nop + ac_cv_lib_bfio_libbfio_handle_write_buffer_at_offset=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_write_buffer_at_offset" >&5 +printf "%s\n" "$ac_cv_lib_bfio_libbfio_handle_write_buffer_at_offset" >&6; } +if test "x$ac_cv_lib_bfio_libbfio_handle_write_buffer_at_offset" = xyes +then : + ac_cv_libbfio_dummy=yes +else $as_nop + ac_cv_libbfio=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_seek_offset in -lbfio" >&5 +printf %s "checking for libbfio_handle_seek_offset in -lbfio... " >&6; } +if test ${ac_cv_lib_bfio_libbfio_handle_seek_offset+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -38497,41 +43928,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libbfio_handle_seek_offset (); int -main () +main (void) { return libbfio_handle_seek_offset (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_bfio_libbfio_handle_seek_offset=yes -else +else $as_nop ac_cv_lib_bfio_libbfio_handle_seek_offset=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_seek_offset" >&5 -$as_echo "$ac_cv_lib_bfio_libbfio_handle_seek_offset" >&6; } -if test "x$ac_cv_lib_bfio_libbfio_handle_seek_offset" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_seek_offset" >&5 +printf "%s\n" "$ac_cv_lib_bfio_libbfio_handle_seek_offset" >&6; } +if test "x$ac_cv_lib_bfio_libbfio_handle_seek_offset" = xyes +then : ac_cv_libbfio_dummy=yes -else +else $as_nop ac_cv_libbfio=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_is_open in -lbfio" >&5 -$as_echo_n "checking for libbfio_handle_is_open in -lbfio... " >&6; } -if ${ac_cv_lib_bfio_libbfio_handle_is_open+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_is_open in -lbfio" >&5 +printf %s "checking for libbfio_handle_is_open in -lbfio... " >&6; } +if test ${ac_cv_lib_bfio_libbfio_handle_is_open+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -38540,40 +43971,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libbfio_handle_is_open (); int -main () +main (void) { return libbfio_handle_is_open (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_bfio_libbfio_handle_is_open=yes -else +else $as_nop ac_cv_lib_bfio_libbfio_handle_is_open=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_is_open" >&5 -$as_echo "$ac_cv_lib_bfio_libbfio_handle_is_open" >&6; } -if test "x$ac_cv_lib_bfio_libbfio_handle_is_open" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_is_open" >&5 +printf "%s\n" "$ac_cv_lib_bfio_libbfio_handle_is_open" >&6; } +if test "x$ac_cv_lib_bfio_libbfio_handle_is_open" = xyes +then : ac_cv_libbfio_dummy=yes -else +else $as_nop ac_cv_libbfio=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_get_offset in -lbfio" >&5 -$as_echo_n "checking for libbfio_handle_get_offset in -lbfio... " >&6; } -if ${ac_cv_lib_bfio_libbfio_handle_get_offset+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_get_offset in -lbfio" >&5 +printf %s "checking for libbfio_handle_get_offset in -lbfio... " >&6; } +if test ${ac_cv_lib_bfio_libbfio_handle_get_offset+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -38582,40 +44013,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libbfio_handle_get_offset (); int -main () +main (void) { return libbfio_handle_get_offset (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_bfio_libbfio_handle_get_offset=yes -else +else $as_nop ac_cv_lib_bfio_libbfio_handle_get_offset=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_get_offset" >&5 -$as_echo "$ac_cv_lib_bfio_libbfio_handle_get_offset" >&6; } -if test "x$ac_cv_lib_bfio_libbfio_handle_get_offset" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_get_offset" >&5 +printf "%s\n" "$ac_cv_lib_bfio_libbfio_handle_get_offset" >&6; } +if test "x$ac_cv_lib_bfio_libbfio_handle_get_offset" = xyes +then : ac_cv_libbfio_dummy=yes -else +else $as_nop ac_cv_libbfio=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_get_size in -lbfio" >&5 -$as_echo_n "checking for libbfio_handle_get_size in -lbfio... " >&6; } -if ${ac_cv_lib_bfio_libbfio_handle_get_size+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_get_size in -lbfio" >&5 +printf %s "checking for libbfio_handle_get_size in -lbfio... " >&6; } +if test ${ac_cv_lib_bfio_libbfio_handle_get_size+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -38624,40 +44055,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libbfio_handle_get_size (); int -main () +main (void) { return libbfio_handle_get_size (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_bfio_libbfio_handle_get_size=yes -else +else $as_nop ac_cv_lib_bfio_libbfio_handle_get_size=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_get_size" >&5 -$as_echo "$ac_cv_lib_bfio_libbfio_handle_get_size" >&6; } -if test "x$ac_cv_lib_bfio_libbfio_handle_get_size" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_get_size" >&5 +printf "%s\n" "$ac_cv_lib_bfio_libbfio_handle_get_size" >&6; } +if test "x$ac_cv_lib_bfio_libbfio_handle_get_size" = xyes +then : ac_cv_libbfio_dummy=yes -else +else $as_nop ac_cv_libbfio=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_set_track_offsets_read in -lbfio" >&5 -$as_echo_n "checking for libbfio_handle_set_track_offsets_read in -lbfio... " >&6; } -if ${ac_cv_lib_bfio_libbfio_handle_set_track_offsets_read+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_set_track_offsets_read in -lbfio" >&5 +printf %s "checking for libbfio_handle_set_track_offsets_read in -lbfio... " >&6; } +if test ${ac_cv_lib_bfio_libbfio_handle_set_track_offsets_read+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -38666,40 +44097,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libbfio_handle_set_track_offsets_read (); int -main () +main (void) { return libbfio_handle_set_track_offsets_read (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_bfio_libbfio_handle_set_track_offsets_read=yes -else +else $as_nop ac_cv_lib_bfio_libbfio_handle_set_track_offsets_read=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_set_track_offsets_read" >&5 -$as_echo "$ac_cv_lib_bfio_libbfio_handle_set_track_offsets_read" >&6; } -if test "x$ac_cv_lib_bfio_libbfio_handle_set_track_offsets_read" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_set_track_offsets_read" >&5 +printf "%s\n" "$ac_cv_lib_bfio_libbfio_handle_set_track_offsets_read" >&6; } +if test "x$ac_cv_lib_bfio_libbfio_handle_set_track_offsets_read" = xyes +then : ac_cv_libbfio_dummy=yes -else +else $as_nop ac_cv_libbfio=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_get_number_of_offsets_read in -lbfio" >&5 -$as_echo_n "checking for libbfio_handle_get_number_of_offsets_read in -lbfio... " >&6; } -if ${ac_cv_lib_bfio_libbfio_handle_get_number_of_offsets_read+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_get_number_of_offsets_read in -lbfio" >&5 +printf %s "checking for libbfio_handle_get_number_of_offsets_read in -lbfio... " >&6; } +if test ${ac_cv_lib_bfio_libbfio_handle_get_number_of_offsets_read+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -38708,40 +44139,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libbfio_handle_get_number_of_offsets_read (); int -main () +main (void) { return libbfio_handle_get_number_of_offsets_read (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_bfio_libbfio_handle_get_number_of_offsets_read=yes -else +else $as_nop ac_cv_lib_bfio_libbfio_handle_get_number_of_offsets_read=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_get_number_of_offsets_read" >&5 -$as_echo "$ac_cv_lib_bfio_libbfio_handle_get_number_of_offsets_read" >&6; } -if test "x$ac_cv_lib_bfio_libbfio_handle_get_number_of_offsets_read" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_get_number_of_offsets_read" >&5 +printf "%s\n" "$ac_cv_lib_bfio_libbfio_handle_get_number_of_offsets_read" >&6; } +if test "x$ac_cv_lib_bfio_libbfio_handle_get_number_of_offsets_read" = xyes +then : ac_cv_libbfio_dummy=yes -else +else $as_nop ac_cv_libbfio=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_get_offset_read in -lbfio" >&5 -$as_echo_n "checking for libbfio_handle_get_offset_read in -lbfio... " >&6; } -if ${ac_cv_lib_bfio_libbfio_handle_get_offset_read+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_get_offset_read in -lbfio" >&5 +printf %s "checking for libbfio_handle_get_offset_read in -lbfio... " >&6; } +if test ${ac_cv_lib_bfio_libbfio_handle_get_offset_read+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -38750,41 +44181,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libbfio_handle_get_offset_read (); int -main () +main (void) { return libbfio_handle_get_offset_read (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_bfio_libbfio_handle_get_offset_read=yes -else +else $as_nop ac_cv_lib_bfio_libbfio_handle_get_offset_read=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_get_offset_read" >&5 -$as_echo "$ac_cv_lib_bfio_libbfio_handle_get_offset_read" >&6; } -if test "x$ac_cv_lib_bfio_libbfio_handle_get_offset_read" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_get_offset_read" >&5 +printf "%s\n" "$ac_cv_lib_bfio_libbfio_handle_get_offset_read" >&6; } +if test "x$ac_cv_lib_bfio_libbfio_handle_get_offset_read" = xyes +then : ac_cv_libbfio_dummy=yes -else +else $as_nop ac_cv_libbfio=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_file_initialize in -lbfio" >&5 -$as_echo_n "checking for libbfio_file_initialize in -lbfio... " >&6; } -if ${ac_cv_lib_bfio_libbfio_file_initialize+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_file_initialize in -lbfio" >&5 +printf %s "checking for libbfio_file_initialize in -lbfio... " >&6; } +if test ${ac_cv_lib_bfio_libbfio_file_initialize+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -38793,40 +44224,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libbfio_file_initialize (); int -main () +main (void) { return libbfio_file_initialize (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_bfio_libbfio_file_initialize=yes -else +else $as_nop ac_cv_lib_bfio_libbfio_file_initialize=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_file_initialize" >&5 -$as_echo "$ac_cv_lib_bfio_libbfio_file_initialize" >&6; } -if test "x$ac_cv_lib_bfio_libbfio_file_initialize" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_file_initialize" >&5 +printf "%s\n" "$ac_cv_lib_bfio_libbfio_file_initialize" >&6; } +if test "x$ac_cv_lib_bfio_libbfio_file_initialize" = xyes +then : ac_cv_libbfio_dummy=yes -else +else $as_nop ac_cv_libbfio=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_file_get_name_size in -lbfio" >&5 -$as_echo_n "checking for libbfio_file_get_name_size in -lbfio... " >&6; } -if ${ac_cv_lib_bfio_libbfio_file_get_name_size+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_file_get_name_size in -lbfio" >&5 +printf %s "checking for libbfio_file_get_name_size in -lbfio... " >&6; } +if test ${ac_cv_lib_bfio_libbfio_file_get_name_size+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -38835,40 +44266,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libbfio_file_get_name_size (); int -main () +main (void) { return libbfio_file_get_name_size (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_bfio_libbfio_file_get_name_size=yes -else +else $as_nop ac_cv_lib_bfio_libbfio_file_get_name_size=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_file_get_name_size" >&5 -$as_echo "$ac_cv_lib_bfio_libbfio_file_get_name_size" >&6; } -if test "x$ac_cv_lib_bfio_libbfio_file_get_name_size" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_file_get_name_size" >&5 +printf "%s\n" "$ac_cv_lib_bfio_libbfio_file_get_name_size" >&6; } +if test "x$ac_cv_lib_bfio_libbfio_file_get_name_size" = xyes +then : ac_cv_libbfio_dummy=yes -else +else $as_nop ac_cv_libbfio=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_file_get_name in -lbfio" >&5 -$as_echo_n "checking for libbfio_file_get_name in -lbfio... " >&6; } -if ${ac_cv_lib_bfio_libbfio_file_get_name+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_file_get_name in -lbfio" >&5 +printf %s "checking for libbfio_file_get_name in -lbfio... " >&6; } +if test ${ac_cv_lib_bfio_libbfio_file_get_name+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -38877,40 +44308,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libbfio_file_get_name (); int -main () +main (void) { return libbfio_file_get_name (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_bfio_libbfio_file_get_name=yes -else +else $as_nop ac_cv_lib_bfio_libbfio_file_get_name=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_file_get_name" >&5 -$as_echo "$ac_cv_lib_bfio_libbfio_file_get_name" >&6; } -if test "x$ac_cv_lib_bfio_libbfio_file_get_name" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_file_get_name" >&5 +printf "%s\n" "$ac_cv_lib_bfio_libbfio_file_get_name" >&6; } +if test "x$ac_cv_lib_bfio_libbfio_file_get_name" = xyes +then : ac_cv_libbfio_dummy=yes -else +else $as_nop ac_cv_libbfio=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_file_set_name in -lbfio" >&5 -$as_echo_n "checking for libbfio_file_set_name in -lbfio... " >&6; } -if ${ac_cv_lib_bfio_libbfio_file_set_name+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_file_set_name in -lbfio" >&5 +printf %s "checking for libbfio_file_set_name in -lbfio... " >&6; } +if test ${ac_cv_lib_bfio_libbfio_file_set_name+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -38919,42 +44350,43 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libbfio_file_set_name (); int -main () +main (void) { return libbfio_file_set_name (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_bfio_libbfio_file_set_name=yes -else +else $as_nop ac_cv_lib_bfio_libbfio_file_set_name=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_file_set_name" >&5 -$as_echo "$ac_cv_lib_bfio_libbfio_file_set_name" >&6; } -if test "x$ac_cv_lib_bfio_libbfio_file_set_name" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_file_set_name" >&5 +printf "%s\n" "$ac_cv_lib_bfio_libbfio_file_set_name" >&6; } +if test "x$ac_cv_lib_bfio_libbfio_file_set_name" = xyes +then : ac_cv_libbfio_dummy=yes -else +else $as_nop ac_cv_libbfio=no fi - if test "x$ac_cv_enable_wide_character_type" != xno; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_file_get_name_size_wide in -lbfio" >&5 -$as_echo_n "checking for libbfio_file_get_name_size_wide in -lbfio... " >&6; } -if ${ac_cv_lib_bfio_libbfio_file_get_name_size_wide+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test "x$ac_cv_enable_wide_character_type" != xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_file_get_name_size_wide in -lbfio" >&5 +printf %s "checking for libbfio_file_get_name_size_wide in -lbfio... " >&6; } +if test ${ac_cv_lib_bfio_libbfio_file_get_name_size_wide+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -38963,40 +44395,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libbfio_file_get_name_size_wide (); int -main () +main (void) { return libbfio_file_get_name_size_wide (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_bfio_libbfio_file_get_name_size_wide=yes -else +else $as_nop ac_cv_lib_bfio_libbfio_file_get_name_size_wide=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_file_get_name_size_wide" >&5 -$as_echo "$ac_cv_lib_bfio_libbfio_file_get_name_size_wide" >&6; } -if test "x$ac_cv_lib_bfio_libbfio_file_get_name_size_wide" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_file_get_name_size_wide" >&5 +printf "%s\n" "$ac_cv_lib_bfio_libbfio_file_get_name_size_wide" >&6; } +if test "x$ac_cv_lib_bfio_libbfio_file_get_name_size_wide" = xyes +then : ac_cv_libbfio_dummy=yes -else +else $as_nop ac_cv_libbfio=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_file_get_name_wide in -lbfio" >&5 -$as_echo_n "checking for libbfio_file_get_name_wide in -lbfio... " >&6; } -if ${ac_cv_lib_bfio_libbfio_file_get_name_wide+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_file_get_name_wide in -lbfio" >&5 +printf %s "checking for libbfio_file_get_name_wide in -lbfio... " >&6; } +if test ${ac_cv_lib_bfio_libbfio_file_get_name_wide+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -39005,40 +44437,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libbfio_file_get_name_wide (); int -main () +main (void) { return libbfio_file_get_name_wide (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_bfio_libbfio_file_get_name_wide=yes -else +else $as_nop ac_cv_lib_bfio_libbfio_file_get_name_wide=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_file_get_name_wide" >&5 -$as_echo "$ac_cv_lib_bfio_libbfio_file_get_name_wide" >&6; } -if test "x$ac_cv_lib_bfio_libbfio_file_get_name_wide" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_file_get_name_wide" >&5 +printf "%s\n" "$ac_cv_lib_bfio_libbfio_file_get_name_wide" >&6; } +if test "x$ac_cv_lib_bfio_libbfio_file_get_name_wide" = xyes +then : ac_cv_libbfio_dummy=yes -else +else $as_nop ac_cv_libbfio=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_file_set_name_wide in -lbfio" >&5 -$as_echo_n "checking for libbfio_file_set_name_wide in -lbfio... " >&6; } -if ${ac_cv_lib_bfio_libbfio_file_set_name_wide+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_file_set_name_wide in -lbfio" >&5 +printf %s "checking for libbfio_file_set_name_wide in -lbfio... " >&6; } +if test ${ac_cv_lib_bfio_libbfio_file_set_name_wide+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -39047,43 +44479,43 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libbfio_file_set_name_wide (); int -main () +main (void) { return libbfio_file_set_name_wide (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_bfio_libbfio_file_set_name_wide=yes -else +else $as_nop ac_cv_lib_bfio_libbfio_file_set_name_wide=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_file_set_name_wide" >&5 -$as_echo "$ac_cv_lib_bfio_libbfio_file_set_name_wide" >&6; } -if test "x$ac_cv_lib_bfio_libbfio_file_set_name_wide" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_file_set_name_wide" >&5 +printf "%s\n" "$ac_cv_lib_bfio_libbfio_file_set_name_wide" >&6; } +if test "x$ac_cv_lib_bfio_libbfio_file_set_name_wide" = xyes +then : ac_cv_libbfio_dummy=yes -else +else $as_nop ac_cv_libbfio=no fi fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_initialize in -lbfio" >&5 -$as_echo_n "checking for libbfio_pool_initialize in -lbfio... " >&6; } -if ${ac_cv_lib_bfio_libbfio_pool_initialize+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_initialize in -lbfio" >&5 +printf %s "checking for libbfio_pool_initialize in -lbfio... " >&6; } +if test ${ac_cv_lib_bfio_libbfio_pool_initialize+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -39092,40 +44524,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libbfio_pool_initialize (); int -main () +main (void) { return libbfio_pool_initialize (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_bfio_libbfio_pool_initialize=yes -else +else $as_nop ac_cv_lib_bfio_libbfio_pool_initialize=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_initialize" >&5 -$as_echo "$ac_cv_lib_bfio_libbfio_pool_initialize" >&6; } -if test "x$ac_cv_lib_bfio_libbfio_pool_initialize" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_initialize" >&5 +printf "%s\n" "$ac_cv_lib_bfio_libbfio_pool_initialize" >&6; } +if test "x$ac_cv_lib_bfio_libbfio_pool_initialize" = xyes +then : ac_cv_libbfio_dummy=yes -else +else $as_nop ac_cv_libbfio=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_free in -lbfio" >&5 -$as_echo_n "checking for libbfio_pool_free in -lbfio... " >&6; } -if ${ac_cv_lib_bfio_libbfio_pool_free+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_free in -lbfio" >&5 +printf %s "checking for libbfio_pool_free in -lbfio... " >&6; } +if test ${ac_cv_lib_bfio_libbfio_pool_free+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -39134,40 +44566,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libbfio_pool_free (); int -main () +main (void) { return libbfio_pool_free (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_bfio_libbfio_pool_free=yes -else +else $as_nop ac_cv_lib_bfio_libbfio_pool_free=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_free" >&5 -$as_echo "$ac_cv_lib_bfio_libbfio_pool_free" >&6; } -if test "x$ac_cv_lib_bfio_libbfio_pool_free" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_free" >&5 +printf "%s\n" "$ac_cv_lib_bfio_libbfio_pool_free" >&6; } +if test "x$ac_cv_lib_bfio_libbfio_pool_free" = xyes +then : ac_cv_libbfio_dummy=yes -else +else $as_nop ac_cv_libbfio=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_clone in -lbfio" >&5 -$as_echo_n "checking for libbfio_pool_clone in -lbfio... " >&6; } -if ${ac_cv_lib_bfio_libbfio_pool_clone+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_clone in -lbfio" >&5 +printf %s "checking for libbfio_pool_clone in -lbfio... " >&6; } +if test ${ac_cv_lib_bfio_libbfio_pool_clone+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -39176,41 +44608,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libbfio_pool_clone (); int -main () +main (void) { return libbfio_pool_clone (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_bfio_libbfio_pool_clone=yes -else +else $as_nop ac_cv_lib_bfio_libbfio_pool_clone=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_clone" >&5 -$as_echo "$ac_cv_lib_bfio_libbfio_pool_clone" >&6; } -if test "x$ac_cv_lib_bfio_libbfio_pool_clone" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_clone" >&5 +printf "%s\n" "$ac_cv_lib_bfio_libbfio_pool_clone" >&6; } +if test "x$ac_cv_lib_bfio_libbfio_pool_clone" = xyes +then : ac_cv_libbfio_dummy=yes -else +else $as_nop ac_cv_libbfio=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_get_number_of_handles in -lbfio" >&5 -$as_echo_n "checking for libbfio_pool_get_number_of_handles in -lbfio... " >&6; } -if ${ac_cv_lib_bfio_libbfio_pool_get_number_of_handles+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_get_number_of_handles in -lbfio" >&5 +printf %s "checking for libbfio_pool_get_number_of_handles in -lbfio... " >&6; } +if test ${ac_cv_lib_bfio_libbfio_pool_get_number_of_handles+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -39219,40 +44651,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libbfio_pool_get_number_of_handles (); int -main () +main (void) { return libbfio_pool_get_number_of_handles (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_bfio_libbfio_pool_get_number_of_handles=yes -else +else $as_nop ac_cv_lib_bfio_libbfio_pool_get_number_of_handles=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_get_number_of_handles" >&5 -$as_echo "$ac_cv_lib_bfio_libbfio_pool_get_number_of_handles" >&6; } -if test "x$ac_cv_lib_bfio_libbfio_pool_get_number_of_handles" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_get_number_of_handles" >&5 +printf "%s\n" "$ac_cv_lib_bfio_libbfio_pool_get_number_of_handles" >&6; } +if test "x$ac_cv_lib_bfio_libbfio_pool_get_number_of_handles" = xyes +then : ac_cv_libbfio_dummy=yes -else +else $as_nop ac_cv_libbfio=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_get_handle in -lbfio" >&5 -$as_echo_n "checking for libbfio_pool_get_handle in -lbfio... " >&6; } -if ${ac_cv_lib_bfio_libbfio_pool_get_handle+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_get_handle in -lbfio" >&5 +printf %s "checking for libbfio_pool_get_handle in -lbfio... " >&6; } +if test ${ac_cv_lib_bfio_libbfio_pool_get_handle+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -39261,40 +44693,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libbfio_pool_get_handle (); int -main () +main (void) { return libbfio_pool_get_handle (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_bfio_libbfio_pool_get_handle=yes -else +else $as_nop ac_cv_lib_bfio_libbfio_pool_get_handle=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_get_handle" >&5 -$as_echo "$ac_cv_lib_bfio_libbfio_pool_get_handle" >&6; } -if test "x$ac_cv_lib_bfio_libbfio_pool_get_handle" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_get_handle" >&5 +printf "%s\n" "$ac_cv_lib_bfio_libbfio_pool_get_handle" >&6; } +if test "x$ac_cv_lib_bfio_libbfio_pool_get_handle" = xyes +then : ac_cv_libbfio_dummy=yes -else +else $as_nop ac_cv_libbfio=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_set_handle in -lbfio" >&5 -$as_echo_n "checking for libbfio_pool_set_handle in -lbfio... " >&6; } -if ${ac_cv_lib_bfio_libbfio_pool_set_handle+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_set_handle in -lbfio" >&5 +printf %s "checking for libbfio_pool_set_handle in -lbfio... " >&6; } +if test ${ac_cv_lib_bfio_libbfio_pool_set_handle+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -39303,40 +44735,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libbfio_pool_set_handle (); int -main () +main (void) { return libbfio_pool_set_handle (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_bfio_libbfio_pool_set_handle=yes -else +else $as_nop ac_cv_lib_bfio_libbfio_pool_set_handle=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_set_handle" >&5 -$as_echo "$ac_cv_lib_bfio_libbfio_pool_set_handle" >&6; } -if test "x$ac_cv_lib_bfio_libbfio_pool_set_handle" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_set_handle" >&5 +printf "%s\n" "$ac_cv_lib_bfio_libbfio_pool_set_handle" >&6; } +if test "x$ac_cv_lib_bfio_libbfio_pool_set_handle" = xyes +then : ac_cv_libbfio_dummy=yes -else +else $as_nop ac_cv_libbfio=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_append_handle in -lbfio" >&5 -$as_echo_n "checking for libbfio_pool_append_handle in -lbfio... " >&6; } -if ${ac_cv_lib_bfio_libbfio_pool_append_handle+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_append_handle in -lbfio" >&5 +printf %s "checking for libbfio_pool_append_handle in -lbfio... " >&6; } +if test ${ac_cv_lib_bfio_libbfio_pool_append_handle+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -39345,40 +44777,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libbfio_pool_append_handle (); int -main () +main (void) { return libbfio_pool_append_handle (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_bfio_libbfio_pool_append_handle=yes -else +else $as_nop ac_cv_lib_bfio_libbfio_pool_append_handle=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_append_handle" >&5 -$as_echo "$ac_cv_lib_bfio_libbfio_pool_append_handle" >&6; } -if test "x$ac_cv_lib_bfio_libbfio_pool_append_handle" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_append_handle" >&5 +printf "%s\n" "$ac_cv_lib_bfio_libbfio_pool_append_handle" >&6; } +if test "x$ac_cv_lib_bfio_libbfio_pool_append_handle" = xyes +then : ac_cv_libbfio_dummy=yes -else +else $as_nop ac_cv_libbfio=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_remove_handle in -lbfio" >&5 -$as_echo_n "checking for libbfio_pool_remove_handle in -lbfio... " >&6; } -if ${ac_cv_lib_bfio_libbfio_pool_remove_handle+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_remove_handle in -lbfio" >&5 +printf %s "checking for libbfio_pool_remove_handle in -lbfio... " >&6; } +if test ${ac_cv_lib_bfio_libbfio_pool_remove_handle+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -39387,40 +44819,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libbfio_pool_remove_handle (); int -main () +main (void) { return libbfio_pool_remove_handle (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_bfio_libbfio_pool_remove_handle=yes -else +else $as_nop ac_cv_lib_bfio_libbfio_pool_remove_handle=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_remove_handle" >&5 -$as_echo "$ac_cv_lib_bfio_libbfio_pool_remove_handle" >&6; } -if test "x$ac_cv_lib_bfio_libbfio_pool_remove_handle" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_remove_handle" >&5 +printf "%s\n" "$ac_cv_lib_bfio_libbfio_pool_remove_handle" >&6; } +if test "x$ac_cv_lib_bfio_libbfio_pool_remove_handle" = xyes +then : ac_cv_libbfio_dummy=yes -else +else $as_nop ac_cv_libbfio=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_get_maximum_number_of_open_handles in -lbfio" >&5 -$as_echo_n "checking for libbfio_pool_get_maximum_number_of_open_handles in -lbfio... " >&6; } -if ${ac_cv_lib_bfio_libbfio_pool_get_maximum_number_of_open_handles+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_get_maximum_number_of_open_handles in -lbfio" >&5 +printf %s "checking for libbfio_pool_get_maximum_number_of_open_handles in -lbfio... " >&6; } +if test ${ac_cv_lib_bfio_libbfio_pool_get_maximum_number_of_open_handles+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -39429,40 +44861,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libbfio_pool_get_maximum_number_of_open_handles (); int -main () +main (void) { return libbfio_pool_get_maximum_number_of_open_handles (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_bfio_libbfio_pool_get_maximum_number_of_open_handles=yes -else +else $as_nop ac_cv_lib_bfio_libbfio_pool_get_maximum_number_of_open_handles=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_get_maximum_number_of_open_handles" >&5 -$as_echo "$ac_cv_lib_bfio_libbfio_pool_get_maximum_number_of_open_handles" >&6; } -if test "x$ac_cv_lib_bfio_libbfio_pool_get_maximum_number_of_open_handles" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_get_maximum_number_of_open_handles" >&5 +printf "%s\n" "$ac_cv_lib_bfio_libbfio_pool_get_maximum_number_of_open_handles" >&6; } +if test "x$ac_cv_lib_bfio_libbfio_pool_get_maximum_number_of_open_handles" = xyes +then : ac_cv_libbfio_dummy=yes -else +else $as_nop ac_cv_libbfio=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_set_maximum_number_of_open_handles in -lbfio" >&5 -$as_echo_n "checking for libbfio_pool_set_maximum_number_of_open_handles in -lbfio... " >&6; } -if ${ac_cv_lib_bfio_libbfio_pool_set_maximum_number_of_open_handles+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_set_maximum_number_of_open_handles in -lbfio" >&5 +printf %s "checking for libbfio_pool_set_maximum_number_of_open_handles in -lbfio... " >&6; } +if test ${ac_cv_lib_bfio_libbfio_pool_set_maximum_number_of_open_handles+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -39471,41 +44903,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libbfio_pool_set_maximum_number_of_open_handles (); int -main () +main (void) { return libbfio_pool_set_maximum_number_of_open_handles (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_bfio_libbfio_pool_set_maximum_number_of_open_handles=yes -else +else $as_nop ac_cv_lib_bfio_libbfio_pool_set_maximum_number_of_open_handles=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_set_maximum_number_of_open_handles" >&5 -$as_echo "$ac_cv_lib_bfio_libbfio_pool_set_maximum_number_of_open_handles" >&6; } -if test "x$ac_cv_lib_bfio_libbfio_pool_set_maximum_number_of_open_handles" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_set_maximum_number_of_open_handles" >&5 +printf "%s\n" "$ac_cv_lib_bfio_libbfio_pool_set_maximum_number_of_open_handles" >&6; } +if test "x$ac_cv_lib_bfio_libbfio_pool_set_maximum_number_of_open_handles" = xyes +then : ac_cv_libbfio_dummy=yes -else +else $as_nop ac_cv_libbfio=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_open in -lbfio" >&5 -$as_echo_n "checking for libbfio_pool_open in -lbfio... " >&6; } -if ${ac_cv_lib_bfio_libbfio_pool_open+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_open in -lbfio" >&5 +printf %s "checking for libbfio_pool_open in -lbfio... " >&6; } +if test ${ac_cv_lib_bfio_libbfio_pool_open+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -39514,40 +44946,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libbfio_pool_open (); int -main () +main (void) { return libbfio_pool_open (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_bfio_libbfio_pool_open=yes -else +else $as_nop ac_cv_lib_bfio_libbfio_pool_open=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_open" >&5 -$as_echo "$ac_cv_lib_bfio_libbfio_pool_open" >&6; } -if test "x$ac_cv_lib_bfio_libbfio_pool_open" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_open" >&5 +printf "%s\n" "$ac_cv_lib_bfio_libbfio_pool_open" >&6; } +if test "x$ac_cv_lib_bfio_libbfio_pool_open" = xyes +then : ac_cv_libbfio_dummy=yes -else +else $as_nop ac_cv_libbfio=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_reopen in -lbfio" >&5 -$as_echo_n "checking for libbfio_pool_reopen in -lbfio... " >&6; } -if ${ac_cv_lib_bfio_libbfio_pool_reopen+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_reopen in -lbfio" >&5 +printf %s "checking for libbfio_pool_reopen in -lbfio... " >&6; } +if test ${ac_cv_lib_bfio_libbfio_pool_reopen+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -39556,40 +44988,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libbfio_pool_reopen (); int -main () +main (void) { return libbfio_pool_reopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_bfio_libbfio_pool_reopen=yes -else +else $as_nop ac_cv_lib_bfio_libbfio_pool_reopen=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_reopen" >&5 -$as_echo "$ac_cv_lib_bfio_libbfio_pool_reopen" >&6; } -if test "x$ac_cv_lib_bfio_libbfio_pool_reopen" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_reopen" >&5 +printf "%s\n" "$ac_cv_lib_bfio_libbfio_pool_reopen" >&6; } +if test "x$ac_cv_lib_bfio_libbfio_pool_reopen" = xyes +then : ac_cv_libbfio_dummy=yes -else +else $as_nop ac_cv_libbfio=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_close in -lbfio" >&5 -$as_echo_n "checking for libbfio_pool_close in -lbfio... " >&6; } -if ${ac_cv_lib_bfio_libbfio_pool_close+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_close in -lbfio" >&5 +printf %s "checking for libbfio_pool_close in -lbfio... " >&6; } +if test ${ac_cv_lib_bfio_libbfio_pool_close+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -39598,40 +45030,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libbfio_pool_close (); int -main () +main (void) { return libbfio_pool_close (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_bfio_libbfio_pool_close=yes -else +else $as_nop ac_cv_lib_bfio_libbfio_pool_close=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_close" >&5 -$as_echo "$ac_cv_lib_bfio_libbfio_pool_close" >&6; } -if test "x$ac_cv_lib_bfio_libbfio_pool_close" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_close" >&5 +printf "%s\n" "$ac_cv_lib_bfio_libbfio_pool_close" >&6; } +if test "x$ac_cv_lib_bfio_libbfio_pool_close" = xyes +then : ac_cv_libbfio_dummy=yes -else +else $as_nop ac_cv_libbfio=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_close_all in -lbfio" >&5 -$as_echo_n "checking for libbfio_pool_close_all in -lbfio... " >&6; } -if ${ac_cv_lib_bfio_libbfio_pool_close_all+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_close_all in -lbfio" >&5 +printf %s "checking for libbfio_pool_close_all in -lbfio... " >&6; } +if test ${ac_cv_lib_bfio_libbfio_pool_close_all+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -39640,40 +45072,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libbfio_pool_close_all (); int -main () +main (void) { return libbfio_pool_close_all (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_bfio_libbfio_pool_close_all=yes -else +else $as_nop ac_cv_lib_bfio_libbfio_pool_close_all=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_close_all" >&5 -$as_echo "$ac_cv_lib_bfio_libbfio_pool_close_all" >&6; } -if test "x$ac_cv_lib_bfio_libbfio_pool_close_all" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_close_all" >&5 +printf "%s\n" "$ac_cv_lib_bfio_libbfio_pool_close_all" >&6; } +if test "x$ac_cv_lib_bfio_libbfio_pool_close_all" = xyes +then : ac_cv_libbfio_dummy=yes -else +else $as_nop ac_cv_libbfio=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_read_buffer in -lbfio" >&5 -$as_echo_n "checking for libbfio_pool_read_buffer in -lbfio... " >&6; } -if ${ac_cv_lib_bfio_libbfio_pool_read_buffer+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_read_buffer in -lbfio" >&5 +printf %s "checking for libbfio_pool_read_buffer in -lbfio... " >&6; } +if test ${ac_cv_lib_bfio_libbfio_pool_read_buffer+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -39682,40 +45114,82 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libbfio_pool_read_buffer (); int -main () +main (void) { return libbfio_pool_read_buffer (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_bfio_libbfio_pool_read_buffer=yes -else +else $as_nop ac_cv_lib_bfio_libbfio_pool_read_buffer=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_read_buffer" >&5 -$as_echo "$ac_cv_lib_bfio_libbfio_pool_read_buffer" >&6; } -if test "x$ac_cv_lib_bfio_libbfio_pool_read_buffer" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_read_buffer" >&5 +printf "%s\n" "$ac_cv_lib_bfio_libbfio_pool_read_buffer" >&6; } +if test "x$ac_cv_lib_bfio_libbfio_pool_read_buffer" = xyes +then : ac_cv_libbfio_dummy=yes -else +else $as_nop ac_cv_libbfio=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_write_buffer in -lbfio" >&5 -$as_echo_n "checking for libbfio_pool_write_buffer in -lbfio... " >&6; } -if ${ac_cv_lib_bfio_libbfio_pool_write_buffer+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_read_buffer_at_offset in -lbfio" >&5 +printf %s "checking for libbfio_pool_read_buffer_at_offset in -lbfio... " >&6; } +if test ${ac_cv_lib_bfio_libbfio_pool_read_buffer_at_offset+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lbfio $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libbfio_pool_read_buffer_at_offset (); +int +main (void) +{ +return libbfio_pool_read_buffer_at_offset (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_bfio_libbfio_pool_read_buffer_at_offset=yes +else $as_nop + ac_cv_lib_bfio_libbfio_pool_read_buffer_at_offset=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_read_buffer_at_offset" >&5 +printf "%s\n" "$ac_cv_lib_bfio_libbfio_pool_read_buffer_at_offset" >&6; } +if test "x$ac_cv_lib_bfio_libbfio_pool_read_buffer_at_offset" = xyes +then : + ac_cv_libbfio_dummy=yes +else $as_nop + ac_cv_libbfio=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_write_buffer in -lbfio" >&5 +printf %s "checking for libbfio_pool_write_buffer in -lbfio... " >&6; } +if test ${ac_cv_lib_bfio_libbfio_pool_write_buffer+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -39724,40 +45198,82 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libbfio_pool_write_buffer (); int -main () +main (void) { return libbfio_pool_write_buffer (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_bfio_libbfio_pool_write_buffer=yes -else +else $as_nop ac_cv_lib_bfio_libbfio_pool_write_buffer=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_write_buffer" >&5 -$as_echo "$ac_cv_lib_bfio_libbfio_pool_write_buffer" >&6; } -if test "x$ac_cv_lib_bfio_libbfio_pool_write_buffer" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_write_buffer" >&5 +printf "%s\n" "$ac_cv_lib_bfio_libbfio_pool_write_buffer" >&6; } +if test "x$ac_cv_lib_bfio_libbfio_pool_write_buffer" = xyes +then : ac_cv_libbfio_dummy=yes -else +else $as_nop ac_cv_libbfio=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_seek_offset in -lbfio" >&5 -$as_echo_n "checking for libbfio_pool_seek_offset in -lbfio... " >&6; } -if ${ac_cv_lib_bfio_libbfio_pool_seek_offset+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_write_buffer_at_offset in -lbfio" >&5 +printf %s "checking for libbfio_pool_write_buffer_at_offset in -lbfio... " >&6; } +if test ${ac_cv_lib_bfio_libbfio_pool_write_buffer_at_offset+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lbfio $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libbfio_pool_write_buffer_at_offset (); +int +main (void) +{ +return libbfio_pool_write_buffer_at_offset (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_bfio_libbfio_pool_write_buffer_at_offset=yes +else $as_nop + ac_cv_lib_bfio_libbfio_pool_write_buffer_at_offset=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_write_buffer_at_offset" >&5 +printf "%s\n" "$ac_cv_lib_bfio_libbfio_pool_write_buffer_at_offset" >&6; } +if test "x$ac_cv_lib_bfio_libbfio_pool_write_buffer_at_offset" = xyes +then : + ac_cv_libbfio_dummy=yes +else $as_nop + ac_cv_libbfio=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_seek_offset in -lbfio" >&5 +printf %s "checking for libbfio_pool_seek_offset in -lbfio... " >&6; } +if test ${ac_cv_lib_bfio_libbfio_pool_seek_offset+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -39766,40 +45282,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libbfio_pool_seek_offset (); int -main () +main (void) { return libbfio_pool_seek_offset (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_bfio_libbfio_pool_seek_offset=yes -else +else $as_nop ac_cv_lib_bfio_libbfio_pool_seek_offset=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_seek_offset" >&5 -$as_echo "$ac_cv_lib_bfio_libbfio_pool_seek_offset" >&6; } -if test "x$ac_cv_lib_bfio_libbfio_pool_seek_offset" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_seek_offset" >&5 +printf "%s\n" "$ac_cv_lib_bfio_libbfio_pool_seek_offset" >&6; } +if test "x$ac_cv_lib_bfio_libbfio_pool_seek_offset" = xyes +then : ac_cv_libbfio_dummy=yes -else +else $as_nop ac_cv_libbfio=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_get_offset in -lbfio" >&5 -$as_echo_n "checking for libbfio_pool_get_offset in -lbfio... " >&6; } -if ${ac_cv_lib_bfio_libbfio_pool_get_offset+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_get_offset in -lbfio" >&5 +printf %s "checking for libbfio_pool_get_offset in -lbfio... " >&6; } +if test ${ac_cv_lib_bfio_libbfio_pool_get_offset+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -39808,40 +45324,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libbfio_pool_get_offset (); int -main () +main (void) { return libbfio_pool_get_offset (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_bfio_libbfio_pool_get_offset=yes -else +else $as_nop ac_cv_lib_bfio_libbfio_pool_get_offset=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_get_offset" >&5 -$as_echo "$ac_cv_lib_bfio_libbfio_pool_get_offset" >&6; } -if test "x$ac_cv_lib_bfio_libbfio_pool_get_offset" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_get_offset" >&5 +printf "%s\n" "$ac_cv_lib_bfio_libbfio_pool_get_offset" >&6; } +if test "x$ac_cv_lib_bfio_libbfio_pool_get_offset" = xyes +then : ac_cv_libbfio_dummy=yes -else +else $as_nop ac_cv_libbfio=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_get_size in -lbfio" >&5 -$as_echo_n "checking for libbfio_pool_get_size in -lbfio... " >&6; } -if ${ac_cv_lib_bfio_libbfio_pool_get_size+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_get_size in -lbfio" >&5 +printf %s "checking for libbfio_pool_get_size in -lbfio... " >&6; } +if test ${ac_cv_lib_bfio_libbfio_pool_get_size+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -39850,43 +45366,133 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libbfio_pool_get_size (); int -main () +main (void) { return libbfio_pool_get_size (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_bfio_libbfio_pool_get_size=yes -else +else $as_nop ac_cv_lib_bfio_libbfio_pool_get_size=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_get_size" >&5 -$as_echo "$ac_cv_lib_bfio_libbfio_pool_get_size" >&6; } -if test "x$ac_cv_lib_bfio_libbfio_pool_get_size" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_get_size" >&5 +printf "%s\n" "$ac_cv_lib_bfio_libbfio_pool_get_size" >&6; } +if test "x$ac_cv_lib_bfio_libbfio_pool_get_size" = xyes +then : ac_cv_libbfio_dummy=yes -else +else $as_nop ac_cv_libbfio=no fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_file_pool_open in -lbfio" >&5 +printf %s "checking for libbfio_file_pool_open in -lbfio... " >&6; } +if test ${ac_cv_lib_bfio_libbfio_file_pool_open+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lbfio $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libbfio_file_pool_open (); +int +main (void) +{ +return libbfio_file_pool_open (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_bfio_libbfio_file_pool_open=yes +else $as_nop + ac_cv_lib_bfio_libbfio_file_pool_open=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_file_pool_open" >&5 +printf "%s\n" "$ac_cv_lib_bfio_libbfio_file_pool_open" >&6; } +if test "x$ac_cv_lib_bfio_libbfio_file_pool_open" = xyes +then : + ac_cv_libbfio_dummy=yes +else $as_nop + ac_cv_libbfio=no +fi + + + if test "x$ac_cv_enable_wide_character_type" != xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_file_pool_open_wide in -lbfio" >&5 +printf %s "checking for libbfio_file_pool_open_wide in -lbfio... " >&6; } +if test ${ac_cv_lib_bfio_libbfio_file_pool_open_wide+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lbfio $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libbfio_file_pool_open_wide (); +int +main (void) +{ +return libbfio_file_pool_open_wide (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_bfio_libbfio_file_pool_open_wide=yes +else $as_nop + ac_cv_lib_bfio_libbfio_file_pool_open_wide=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_file_pool_open_wide" >&5 +printf "%s\n" "$ac_cv_lib_bfio_libbfio_file_pool_open_wide" >&6; } +if test "x$ac_cv_lib_bfio_libbfio_file_pool_open_wide" = xyes +then : + ac_cv_libbfio_dummy=yes +else $as_nop + ac_cv_libbfio=no +fi + + +fi + ac_cv_libbfio_LIBADD="-lbfio" fi fi - if test "x$ac_cv_with_libbfio" != x && test "x$ac_cv_with_libbfio" != xauto-detect && test "x$ac_cv_libbfio" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_with_libbfio" != x && test "x$ac_cv_with_libbfio" != xauto-detect && test "x$ac_cv_libbfio" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "unable to find supported libbfio in directory: $ac_cv_with_libbfio See \`config.log' for more details" "$LINENO" 5; } @@ -39894,24 +45500,27 @@ fi - if test "x$ac_cv_libbfio" = xyes; then : + if test "x$ac_cv_libbfio" = xyes +then : -$as_echo "#define HAVE_LIBBFIO 1" >>confdefs.h +printf "%s\n" "#define HAVE_LIBBFIO 1" >>confdefs.h fi - if test "x$ac_cv_libbfio" = xyes; then : + if test "x$ac_cv_libbfio" = xyes +then : HAVE_LIBBFIO=1 -else +else $as_nop HAVE_LIBBFIO=0 fi - if test "x$ac_cv_libbfio" != xyes; then : + if test "x$ac_cv_libbfio" != xyes +then : ac_cv_libbfio_CPPFLAGS="-I../libbfio"; ac_cv_libbfio_LIBADD="../libbfio/libbfio.la"; @@ -39920,7 +45529,7 @@ -$as_echo "#define HAVE_LOCAL_LIBBFIO 1" >>confdefs.h +printf "%s\n" "#define HAVE_LOCAL_LIBBFIO 1" >>confdefs.h HAVE_LOCAL_LIBBFIO=1 @@ -39935,24 +45544,28 @@ HAVE_LOCAL_LIBBFIO_FALSE= fi - if test "x$ac_cv_libbfio_CPPFLAGS" != "x"; then : + if test "x$ac_cv_libbfio_CPPFLAGS" != "x" +then : LIBBFIO_CPPFLAGS=$ac_cv_libbfio_CPPFLAGS fi - if test "x$ac_cv_libbfio_LIBADD" != "x"; then : + if test "x$ac_cv_libbfio_LIBADD" != "x" +then : LIBBFIO_LIBADD=$ac_cv_libbfio_LIBADD fi - if test "x$ac_cv_libbfio" = xyes; then : + if test "x$ac_cv_libbfio" = xyes +then : ax_libbfio_pc_libs_private=-lbfio fi - if test "x$ac_cv_libbfio" = xyes; then : + if test "x$ac_cv_libbfio" = xyes +then : ax_libbfio_spec_requires=libbfio ax_libbfio_spec_build_requires=libbfio-devel @@ -39964,53 +45577,59 @@ # Check whether --with-libfcache was given. -if test "${with_libfcache+set}" = set; then : +if test ${with_libfcache+y} +then : withval=$with_libfcache; ac_cv_with_libfcache=$withval -else +else $as_nop ac_cv_with_libfcache=auto-detect fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libfcache in includedir and libdir or in the specified DIR, or no if to use local version" >&5 -$as_echo_n "checking whether to use search for libfcache in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } -if ${ac_cv_with_libfcache+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use search for libfcache in includedir and libdir or in the specified DIR, or no if to use local version" >&5 +printf %s "checking whether to use search for libfcache in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } +if test ${ac_cv_with_libfcache+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_with_libfcache=auto-detect fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libfcache" >&5 -$as_echo "$ac_cv_with_libfcache" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libfcache" >&5 +printf "%s\n" "$ac_cv_with_libfcache" >&6; } - if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libfcache" = xno; then : + if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libfcache" = xno +then : ac_cv_libfcache=no -else +else $as_nop ac_cv_libfcache=check - if test "x$ac_cv_with_libfcache" != x && test "x$ac_cv_with_libfcache" != xauto-detect; then : - if test -d "$ac_cv_with_libfcache"; then : + if test "x$ac_cv_with_libfcache" != x && test "x$ac_cv_with_libfcache" != xauto-detect +then : + if test -d "$ac_cv_with_libfcache" +then : CFLAGS="$CFLAGS -I${ac_cv_with_libfcache}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libfcache}/lib" -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "no such directory: $ac_cv_with_libfcache See \`config.log' for more details" "$LINENO" 5; } fi -else - if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : +else $as_nop + if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x" +then : pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfcache" >&5 -$as_echo_n "checking for libfcache... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfcache >= 20191109" >&5 +printf %s "checking for libfcache >= 20191109... " >&6; } if test -n "$libfcache_CFLAGS"; then pkg_cv_libfcache_CFLAGS="$libfcache_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfcache >= 20191109\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfcache >= 20191109\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfcache >= 20191109") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libfcache_CFLAGS=`$PKG_CONFIG --cflags "libfcache >= 20191109" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -40024,10 +45643,10 @@ pkg_cv_libfcache_LIBS="$libfcache_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfcache >= 20191109\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfcache >= 20191109\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfcache >= 20191109") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libfcache_LIBS=`$PKG_CONFIG --libs "libfcache >= 20191109" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -40041,8 +45660,8 @@ if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -40050,58 +45669,57 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - libfcache_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libfcache >= 20191109" 2>&1` + libfcache_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libfcache >= 20191109" 2>&1` else - libfcache_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libfcache >= 20191109" 2>&1` + libfcache_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libfcache >= 20191109" 2>&1` fi - # Put the nasty error message in config.log where it belongs - echo "$libfcache_PKG_ERRORS" >&5 + # Put the nasty error message in config.log where it belongs + echo "$libfcache_PKG_ERRORS" >&5 - ac_cv_libfcache=check + ac_cv_libfcache=check elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ac_cv_libfcache=check + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ac_cv_libfcache=check else - libfcache_CFLAGS=$pkg_cv_libfcache_CFLAGS - libfcache_LIBS=$pkg_cv_libfcache_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ac_cv_libfcache=yes + libfcache_CFLAGS=$pkg_cv_libfcache_CFLAGS + libfcache_LIBS=$pkg_cv_libfcache_LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + ac_cv_libfcache=yes fi fi - if test "x$ac_cv_libfcache" = xyes; then : + if test "x$ac_cv_libfcache" = xyes +then : ac_cv_libfcache_CPPFLAGS="$pkg_cv_libfcache_CFLAGS" ac_cv_libfcache_LIBADD="$pkg_cv_libfcache_LIBS" fi fi - if test "x$ac_cv_libfcache" = xcheck; then : - for ac_header in libfcache.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "libfcache.h" "ac_cv_header_libfcache_h" "$ac_includes_default" -if test "x$ac_cv_header_libfcache_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBFCACHE_H 1 -_ACEOF + if test "x$ac_cv_libfcache" = xcheck +then : + ac_fn_c_check_header_compile "$LINENO" "libfcache.h" "ac_cv_header_libfcache_h" "$ac_includes_default" +if test "x$ac_cv_header_libfcache_h" = xyes +then : + printf "%s\n" "#define HAVE_LIBFCACHE_H 1" >>confdefs.h fi -done - - if test "x$ac_cv_header_libfcache_h" = xno; then : + if test "x$ac_cv_header_libfcache_h" = xno +then : ac_cv_libfcache=no -else +else $as_nop ac_cv_libfcache=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfcache_get_version in -lfcache" >&5 -$as_echo_n "checking for libfcache_get_version in -lfcache... " >&6; } -if ${ac_cv_lib_fcache_libfcache_get_version+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfcache_get_version in -lfcache" >&5 +printf %s "checking for libfcache_get_version in -lfcache... " >&6; } +if test ${ac_cv_lib_fcache_libfcache_get_version+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfcache $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -40110,41 +45728,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfcache_get_version (); int -main () +main (void) { return libfcache_get_version (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fcache_libfcache_get_version=yes -else +else $as_nop ac_cv_lib_fcache_libfcache_get_version=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_get_version" >&5 -$as_echo "$ac_cv_lib_fcache_libfcache_get_version" >&6; } -if test "x$ac_cv_lib_fcache_libfcache_get_version" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_get_version" >&5 +printf "%s\n" "$ac_cv_lib_fcache_libfcache_get_version" >&6; } +if test "x$ac_cv_lib_fcache_libfcache_get_version" = xyes +then : ac_cv_libfcache_dummy=yes -else +else $as_nop ac_cv_libfcache=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_initialize in -lfcache" >&5 -$as_echo_n "checking for libfcache_cache_initialize in -lfcache... " >&6; } -if ${ac_cv_lib_fcache_libfcache_cache_initialize+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_initialize in -lfcache" >&5 +printf %s "checking for libfcache_cache_initialize in -lfcache... " >&6; } +if test ${ac_cv_lib_fcache_libfcache_cache_initialize+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfcache $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -40153,40 +45771,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfcache_cache_initialize (); int -main () +main (void) { return libfcache_cache_initialize (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fcache_libfcache_cache_initialize=yes -else +else $as_nop ac_cv_lib_fcache_libfcache_cache_initialize=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_initialize" >&5 -$as_echo "$ac_cv_lib_fcache_libfcache_cache_initialize" >&6; } -if test "x$ac_cv_lib_fcache_libfcache_cache_initialize" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_initialize" >&5 +printf "%s\n" "$ac_cv_lib_fcache_libfcache_cache_initialize" >&6; } +if test "x$ac_cv_lib_fcache_libfcache_cache_initialize" = xyes +then : ac_cv_libfcache_dummy=yes -else +else $as_nop ac_cv_libfcache=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_free in -lfcache" >&5 -$as_echo_n "checking for libfcache_cache_free in -lfcache... " >&6; } -if ${ac_cv_lib_fcache_libfcache_cache_free+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_free in -lfcache" >&5 +printf %s "checking for libfcache_cache_free in -lfcache... " >&6; } +if test ${ac_cv_lib_fcache_libfcache_cache_free+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfcache $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -40195,40 +45813,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfcache_cache_free (); int -main () +main (void) { return libfcache_cache_free (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fcache_libfcache_cache_free=yes -else +else $as_nop ac_cv_lib_fcache_libfcache_cache_free=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_free" >&5 -$as_echo "$ac_cv_lib_fcache_libfcache_cache_free" >&6; } -if test "x$ac_cv_lib_fcache_libfcache_cache_free" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_free" >&5 +printf "%s\n" "$ac_cv_lib_fcache_libfcache_cache_free" >&6; } +if test "x$ac_cv_lib_fcache_libfcache_cache_free" = xyes +then : ac_cv_libfcache_dummy=yes -else +else $as_nop ac_cv_libfcache=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_clone in -lfcache" >&5 -$as_echo_n "checking for libfcache_cache_clone in -lfcache... " >&6; } -if ${ac_cv_lib_fcache_libfcache_cache_clone+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_clone in -lfcache" >&5 +printf %s "checking for libfcache_cache_clone in -lfcache... " >&6; } +if test ${ac_cv_lib_fcache_libfcache_cache_clone+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfcache $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -40237,40 +45855,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfcache_cache_clone (); int -main () +main (void) { return libfcache_cache_clone (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fcache_libfcache_cache_clone=yes -else +else $as_nop ac_cv_lib_fcache_libfcache_cache_clone=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_clone" >&5 -$as_echo "$ac_cv_lib_fcache_libfcache_cache_clone" >&6; } -if test "x$ac_cv_lib_fcache_libfcache_cache_clone" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_clone" >&5 +printf "%s\n" "$ac_cv_lib_fcache_libfcache_cache_clone" >&6; } +if test "x$ac_cv_lib_fcache_libfcache_cache_clone" = xyes +then : ac_cv_libfcache_dummy=yes -else +else $as_nop ac_cv_libfcache=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_clear in -lfcache" >&5 -$as_echo_n "checking for libfcache_cache_clear in -lfcache... " >&6; } -if ${ac_cv_lib_fcache_libfcache_cache_clear+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_clear in -lfcache" >&5 +printf %s "checking for libfcache_cache_clear in -lfcache... " >&6; } +if test ${ac_cv_lib_fcache_libfcache_cache_clear+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfcache $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -40279,40 +45897,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfcache_cache_clear (); int -main () +main (void) { return libfcache_cache_clear (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fcache_libfcache_cache_clear=yes -else +else $as_nop ac_cv_lib_fcache_libfcache_cache_clear=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_clear" >&5 -$as_echo "$ac_cv_lib_fcache_libfcache_cache_clear" >&6; } -if test "x$ac_cv_lib_fcache_libfcache_cache_clear" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_clear" >&5 +printf "%s\n" "$ac_cv_lib_fcache_libfcache_cache_clear" >&6; } +if test "x$ac_cv_lib_fcache_libfcache_cache_clear" = xyes +then : ac_cv_libfcache_dummy=yes -else +else $as_nop ac_cv_libfcache=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_get_number_of_entries in -lfcache" >&5 -$as_echo_n "checking for libfcache_cache_get_number_of_entries in -lfcache... " >&6; } -if ${ac_cv_lib_fcache_libfcache_cache_get_number_of_entries+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_get_number_of_entries in -lfcache" >&5 +printf %s "checking for libfcache_cache_get_number_of_entries in -lfcache... " >&6; } +if test ${ac_cv_lib_fcache_libfcache_cache_get_number_of_entries+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfcache $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -40321,40 +45939,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfcache_cache_get_number_of_entries (); int -main () +main (void) { return libfcache_cache_get_number_of_entries (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fcache_libfcache_cache_get_number_of_entries=yes -else +else $as_nop ac_cv_lib_fcache_libfcache_cache_get_number_of_entries=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_get_number_of_entries" >&5 -$as_echo "$ac_cv_lib_fcache_libfcache_cache_get_number_of_entries" >&6; } -if test "x$ac_cv_lib_fcache_libfcache_cache_get_number_of_entries" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_get_number_of_entries" >&5 +printf "%s\n" "$ac_cv_lib_fcache_libfcache_cache_get_number_of_entries" >&6; } +if test "x$ac_cv_lib_fcache_libfcache_cache_get_number_of_entries" = xyes +then : ac_cv_libfcache_dummy=yes -else +else $as_nop ac_cv_libfcache=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_get_number_of_cache_values in -lfcache" >&5 -$as_echo_n "checking for libfcache_cache_get_number_of_cache_values in -lfcache... " >&6; } -if ${ac_cv_lib_fcache_libfcache_cache_get_number_of_cache_values+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_get_number_of_cache_values in -lfcache" >&5 +printf %s "checking for libfcache_cache_get_number_of_cache_values in -lfcache... " >&6; } +if test ${ac_cv_lib_fcache_libfcache_cache_get_number_of_cache_values+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfcache $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -40363,40 +45981,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfcache_cache_get_number_of_cache_values (); int -main () +main (void) { return libfcache_cache_get_number_of_cache_values (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fcache_libfcache_cache_get_number_of_cache_values=yes -else +else $as_nop ac_cv_lib_fcache_libfcache_cache_get_number_of_cache_values=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_get_number_of_cache_values" >&5 -$as_echo "$ac_cv_lib_fcache_libfcache_cache_get_number_of_cache_values" >&6; } -if test "x$ac_cv_lib_fcache_libfcache_cache_get_number_of_cache_values" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_get_number_of_cache_values" >&5 +printf "%s\n" "$ac_cv_lib_fcache_libfcache_cache_get_number_of_cache_values" >&6; } +if test "x$ac_cv_lib_fcache_libfcache_cache_get_number_of_cache_values" = xyes +then : ac_cv_libfcache_dummy=yes -else +else $as_nop ac_cv_libfcache=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_clear_value_by_index in -lfcache" >&5 -$as_echo_n "checking for libfcache_cache_clear_value_by_index in -lfcache... " >&6; } -if ${ac_cv_lib_fcache_libfcache_cache_clear_value_by_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_clear_value_by_index in -lfcache" >&5 +printf %s "checking for libfcache_cache_clear_value_by_index in -lfcache... " >&6; } +if test ${ac_cv_lib_fcache_libfcache_cache_clear_value_by_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfcache $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -40405,40 +46023,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfcache_cache_clear_value_by_index (); int -main () +main (void) { return libfcache_cache_clear_value_by_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fcache_libfcache_cache_clear_value_by_index=yes -else +else $as_nop ac_cv_lib_fcache_libfcache_cache_clear_value_by_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_clear_value_by_index" >&5 -$as_echo "$ac_cv_lib_fcache_libfcache_cache_clear_value_by_index" >&6; } -if test "x$ac_cv_lib_fcache_libfcache_cache_clear_value_by_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_clear_value_by_index" >&5 +printf "%s\n" "$ac_cv_lib_fcache_libfcache_cache_clear_value_by_index" >&6; } +if test "x$ac_cv_lib_fcache_libfcache_cache_clear_value_by_index" = xyes +then : ac_cv_libfcache_dummy=yes -else +else $as_nop ac_cv_libfcache=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_get_value_by_identifier in -lfcache" >&5 -$as_echo_n "checking for libfcache_cache_get_value_by_identifier in -lfcache... " >&6; } -if ${ac_cv_lib_fcache_libfcache_cache_get_value_by_identifier+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_get_value_by_identifier in -lfcache" >&5 +printf %s "checking for libfcache_cache_get_value_by_identifier in -lfcache... " >&6; } +if test ${ac_cv_lib_fcache_libfcache_cache_get_value_by_identifier+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfcache $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -40447,40 +46065,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfcache_cache_get_value_by_identifier (); int -main () +main (void) { return libfcache_cache_get_value_by_identifier (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fcache_libfcache_cache_get_value_by_identifier=yes -else +else $as_nop ac_cv_lib_fcache_libfcache_cache_get_value_by_identifier=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_get_value_by_identifier" >&5 -$as_echo "$ac_cv_lib_fcache_libfcache_cache_get_value_by_identifier" >&6; } -if test "x$ac_cv_lib_fcache_libfcache_cache_get_value_by_identifier" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_get_value_by_identifier" >&5 +printf "%s\n" "$ac_cv_lib_fcache_libfcache_cache_get_value_by_identifier" >&6; } +if test "x$ac_cv_lib_fcache_libfcache_cache_get_value_by_identifier" = xyes +then : ac_cv_libfcache_dummy=yes -else +else $as_nop ac_cv_libfcache=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_get_value_by_index in -lfcache" >&5 -$as_echo_n "checking for libfcache_cache_get_value_by_index in -lfcache... " >&6; } -if ${ac_cv_lib_fcache_libfcache_cache_get_value_by_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_get_value_by_index in -lfcache" >&5 +printf %s "checking for libfcache_cache_get_value_by_index in -lfcache... " >&6; } +if test ${ac_cv_lib_fcache_libfcache_cache_get_value_by_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfcache $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -40489,40 +46107,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfcache_cache_get_value_by_index (); int -main () +main (void) { return libfcache_cache_get_value_by_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fcache_libfcache_cache_get_value_by_index=yes -else +else $as_nop ac_cv_lib_fcache_libfcache_cache_get_value_by_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_get_value_by_index" >&5 -$as_echo "$ac_cv_lib_fcache_libfcache_cache_get_value_by_index" >&6; } -if test "x$ac_cv_lib_fcache_libfcache_cache_get_value_by_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_get_value_by_index" >&5 +printf "%s\n" "$ac_cv_lib_fcache_libfcache_cache_get_value_by_index" >&6; } +if test "x$ac_cv_lib_fcache_libfcache_cache_get_value_by_index" = xyes +then : ac_cv_libfcache_dummy=yes -else +else $as_nop ac_cv_libfcache=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_set_value_by_identifier in -lfcache" >&5 -$as_echo_n "checking for libfcache_cache_set_value_by_identifier in -lfcache... " >&6; } -if ${ac_cv_lib_fcache_libfcache_cache_set_value_by_identifier+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_set_value_by_identifier in -lfcache" >&5 +printf %s "checking for libfcache_cache_set_value_by_identifier in -lfcache... " >&6; } +if test ${ac_cv_lib_fcache_libfcache_cache_set_value_by_identifier+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfcache $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -40531,40 +46149,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfcache_cache_set_value_by_identifier (); int -main () +main (void) { return libfcache_cache_set_value_by_identifier (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fcache_libfcache_cache_set_value_by_identifier=yes -else +else $as_nop ac_cv_lib_fcache_libfcache_cache_set_value_by_identifier=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_set_value_by_identifier" >&5 -$as_echo "$ac_cv_lib_fcache_libfcache_cache_set_value_by_identifier" >&6; } -if test "x$ac_cv_lib_fcache_libfcache_cache_set_value_by_identifier" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_set_value_by_identifier" >&5 +printf "%s\n" "$ac_cv_lib_fcache_libfcache_cache_set_value_by_identifier" >&6; } +if test "x$ac_cv_lib_fcache_libfcache_cache_set_value_by_identifier" = xyes +then : ac_cv_libfcache_dummy=yes -else +else $as_nop ac_cv_libfcache=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_set_value_by_index in -lfcache" >&5 -$as_echo_n "checking for libfcache_cache_set_value_by_index in -lfcache... " >&6; } -if ${ac_cv_lib_fcache_libfcache_cache_set_value_by_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_set_value_by_index in -lfcache" >&5 +printf %s "checking for libfcache_cache_set_value_by_index in -lfcache... " >&6; } +if test ${ac_cv_lib_fcache_libfcache_cache_set_value_by_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfcache $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -40573,41 +46191,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfcache_cache_set_value_by_index (); int -main () +main (void) { return libfcache_cache_set_value_by_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fcache_libfcache_cache_set_value_by_index=yes -else +else $as_nop ac_cv_lib_fcache_libfcache_cache_set_value_by_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_set_value_by_index" >&5 -$as_echo "$ac_cv_lib_fcache_libfcache_cache_set_value_by_index" >&6; } -if test "x$ac_cv_lib_fcache_libfcache_cache_set_value_by_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_set_value_by_index" >&5 +printf "%s\n" "$ac_cv_lib_fcache_libfcache_cache_set_value_by_index" >&6; } +if test "x$ac_cv_lib_fcache_libfcache_cache_set_value_by_index" = xyes +then : ac_cv_libfcache_dummy=yes -else +else $as_nop ac_cv_libfcache=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_value_free in -lfcache" >&5 -$as_echo_n "checking for libfcache_cache_value_free in -lfcache... " >&6; } -if ${ac_cv_lib_fcache_libfcache_cache_value_free+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_value_free in -lfcache" >&5 +printf %s "checking for libfcache_cache_value_free in -lfcache... " >&6; } +if test ${ac_cv_lib_fcache_libfcache_cache_value_free+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfcache $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -40616,40 +46234,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfcache_cache_value_free (); int -main () +main (void) { return libfcache_cache_value_free (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fcache_libfcache_cache_value_free=yes -else +else $as_nop ac_cv_lib_fcache_libfcache_cache_value_free=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_value_free" >&5 -$as_echo "$ac_cv_lib_fcache_libfcache_cache_value_free" >&6; } -if test "x$ac_cv_lib_fcache_libfcache_cache_value_free" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_value_free" >&5 +printf "%s\n" "$ac_cv_lib_fcache_libfcache_cache_value_free" >&6; } +if test "x$ac_cv_lib_fcache_libfcache_cache_value_free" = xyes +then : ac_cv_libfcache_dummy=yes -else +else $as_nop ac_cv_libfcache=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_value_clear in -lfcache" >&5 -$as_echo_n "checking for libfcache_cache_value_clear in -lfcache... " >&6; } -if ${ac_cv_lib_fcache_libfcache_cache_value_clear+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_value_clear in -lfcache" >&5 +printf %s "checking for libfcache_cache_value_clear in -lfcache... " >&6; } +if test ${ac_cv_lib_fcache_libfcache_cache_value_clear+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfcache $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -40658,40 +46276,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfcache_cache_value_clear (); int -main () +main (void) { return libfcache_cache_value_clear (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fcache_libfcache_cache_value_clear=yes -else +else $as_nop ac_cv_lib_fcache_libfcache_cache_value_clear=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_value_clear" >&5 -$as_echo "$ac_cv_lib_fcache_libfcache_cache_value_clear" >&6; } -if test "x$ac_cv_lib_fcache_libfcache_cache_value_clear" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_value_clear" >&5 +printf "%s\n" "$ac_cv_lib_fcache_libfcache_cache_value_clear" >&6; } +if test "x$ac_cv_lib_fcache_libfcache_cache_value_clear" = xyes +then : ac_cv_libfcache_dummy=yes -else +else $as_nop ac_cv_libfcache=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_value_get_identifier in -lfcache" >&5 -$as_echo_n "checking for libfcache_cache_value_get_identifier in -lfcache... " >&6; } -if ${ac_cv_lib_fcache_libfcache_cache_value_get_identifier+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_value_get_identifier in -lfcache" >&5 +printf %s "checking for libfcache_cache_value_get_identifier in -lfcache... " >&6; } +if test ${ac_cv_lib_fcache_libfcache_cache_value_get_identifier+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfcache $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -40700,40 +46318,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfcache_cache_value_get_identifier (); int -main () +main (void) { return libfcache_cache_value_get_identifier (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fcache_libfcache_cache_value_get_identifier=yes -else +else $as_nop ac_cv_lib_fcache_libfcache_cache_value_get_identifier=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_value_get_identifier" >&5 -$as_echo "$ac_cv_lib_fcache_libfcache_cache_value_get_identifier" >&6; } -if test "x$ac_cv_lib_fcache_libfcache_cache_value_get_identifier" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_value_get_identifier" >&5 +printf "%s\n" "$ac_cv_lib_fcache_libfcache_cache_value_get_identifier" >&6; } +if test "x$ac_cv_lib_fcache_libfcache_cache_value_get_identifier" = xyes +then : ac_cv_libfcache_dummy=yes -else +else $as_nop ac_cv_libfcache=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_value_set_identifier in -lfcache" >&5 -$as_echo_n "checking for libfcache_cache_value_set_identifier in -lfcache... " >&6; } -if ${ac_cv_lib_fcache_libfcache_cache_value_set_identifier+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_value_set_identifier in -lfcache" >&5 +printf %s "checking for libfcache_cache_value_set_identifier in -lfcache... " >&6; } +if test ${ac_cv_lib_fcache_libfcache_cache_value_set_identifier+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfcache $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -40742,40 +46360,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfcache_cache_value_set_identifier (); int -main () +main (void) { return libfcache_cache_value_set_identifier (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fcache_libfcache_cache_value_set_identifier=yes -else +else $as_nop ac_cv_lib_fcache_libfcache_cache_value_set_identifier=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_value_set_identifier" >&5 -$as_echo "$ac_cv_lib_fcache_libfcache_cache_value_set_identifier" >&6; } -if test "x$ac_cv_lib_fcache_libfcache_cache_value_set_identifier" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_value_set_identifier" >&5 +printf "%s\n" "$ac_cv_lib_fcache_libfcache_cache_value_set_identifier" >&6; } +if test "x$ac_cv_lib_fcache_libfcache_cache_value_set_identifier" = xyes +then : ac_cv_libfcache_dummy=yes -else +else $as_nop ac_cv_libfcache=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_value_get_value in -lfcache" >&5 -$as_echo_n "checking for libfcache_cache_value_get_value in -lfcache... " >&6; } -if ${ac_cv_lib_fcache_libfcache_cache_value_get_value+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_value_get_value in -lfcache" >&5 +printf %s "checking for libfcache_cache_value_get_value in -lfcache... " >&6; } +if test ${ac_cv_lib_fcache_libfcache_cache_value_get_value+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfcache $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -40784,40 +46402,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfcache_cache_value_get_value (); int -main () +main (void) { return libfcache_cache_value_get_value (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fcache_libfcache_cache_value_get_value=yes -else +else $as_nop ac_cv_lib_fcache_libfcache_cache_value_get_value=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_value_get_value" >&5 -$as_echo "$ac_cv_lib_fcache_libfcache_cache_value_get_value" >&6; } -if test "x$ac_cv_lib_fcache_libfcache_cache_value_get_value" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_value_get_value" >&5 +printf "%s\n" "$ac_cv_lib_fcache_libfcache_cache_value_get_value" >&6; } +if test "x$ac_cv_lib_fcache_libfcache_cache_value_get_value" = xyes +then : ac_cv_libfcache_dummy=yes -else +else $as_nop ac_cv_libfcache=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_value_set_value in -lfcache" >&5 -$as_echo_n "checking for libfcache_cache_value_set_value in -lfcache... " >&6; } -if ${ac_cv_lib_fcache_libfcache_cache_value_set_value+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_value_set_value in -lfcache" >&5 +printf %s "checking for libfcache_cache_value_set_value in -lfcache... " >&6; } +if test ${ac_cv_lib_fcache_libfcache_cache_value_set_value+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfcache $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -40826,41 +46444,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfcache_cache_value_set_value (); int -main () +main (void) { return libfcache_cache_value_set_value (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fcache_libfcache_cache_value_set_value=yes -else +else $as_nop ac_cv_lib_fcache_libfcache_cache_value_set_value=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_value_set_value" >&5 -$as_echo "$ac_cv_lib_fcache_libfcache_cache_value_set_value" >&6; } -if test "x$ac_cv_lib_fcache_libfcache_cache_value_set_value" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_value_set_value" >&5 +printf "%s\n" "$ac_cv_lib_fcache_libfcache_cache_value_set_value" >&6; } +if test "x$ac_cv_lib_fcache_libfcache_cache_value_set_value" = xyes +then : ac_cv_libfcache_dummy=yes -else +else $as_nop ac_cv_libfcache=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfcache_date_time_get_timestamp in -lfcache" >&5 -$as_echo_n "checking for libfcache_date_time_get_timestamp in -lfcache... " >&6; } -if ${ac_cv_lib_fcache_libfcache_date_time_get_timestamp+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfcache_date_time_get_timestamp in -lfcache" >&5 +printf %s "checking for libfcache_date_time_get_timestamp in -lfcache... " >&6; } +if test ${ac_cv_lib_fcache_libfcache_date_time_get_timestamp+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfcache $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -40869,32 +46487,31 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfcache_date_time_get_timestamp (); int -main () +main (void) { return libfcache_date_time_get_timestamp (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fcache_libfcache_date_time_get_timestamp=yes -else +else $as_nop ac_cv_lib_fcache_libfcache_date_time_get_timestamp=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_date_time_get_timestamp" >&5 -$as_echo "$ac_cv_lib_fcache_libfcache_date_time_get_timestamp" >&6; } -if test "x$ac_cv_lib_fcache_libfcache_date_time_get_timestamp" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_date_time_get_timestamp" >&5 +printf "%s\n" "$ac_cv_lib_fcache_libfcache_date_time_get_timestamp" >&6; } +if test "x$ac_cv_lib_fcache_libfcache_date_time_get_timestamp" = xyes +then : ac_cv_libfcache_dummy=yes -else +else $as_nop ac_cv_libfcache=no fi @@ -40903,9 +46520,10 @@ fi fi - if test "x$ac_cv_with_libfcache" != x && test "x$ac_cv_with_libfcache" != xauto-detect && test "x$ac_cv_libfcache" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_with_libfcache" != x && test "x$ac_cv_with_libfcache" != xauto-detect && test "x$ac_cv_libfcache" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "unable to find supported libfcache in directory: $ac_cv_with_libfcache See \`config.log' for more details" "$LINENO" 5; } @@ -40913,36 +46531,40 @@ fi - if test "x$ac_cv_libfcache" = xyes; then : + if test "x$ac_cv_libfcache" = xyes +then : -$as_echo "#define HAVE_LIBFCACHE 1" >>confdefs.h +printf "%s\n" "#define HAVE_LIBFCACHE 1" >>confdefs.h fi - if test "x$ac_cv_libfcache" = xyes; then : + if test "x$ac_cv_libfcache" = xyes +then : HAVE_LIBFCACHE=1 -else +else $as_nop HAVE_LIBFCACHE=0 fi - if test "x$ac_cv_libfcache" != xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 -$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } -if ${ac_cv_struct_tm+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test "x$ac_cv_libfcache" != xyes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 +printf %s "checking whether struct tm is in sys/time.h or time.h... " >&6; } +if test ${ac_cv_struct_tm+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int -main () +main (void) { struct tm tm; int *p = &tm.tm_sec; @@ -40951,74 +46573,49 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_struct_tm=time.h -else +else $as_nop ac_cv_struct_tm=sys/time.h fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 -$as_echo "$ac_cv_struct_tm" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 +printf "%s\n" "$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then -$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h +printf "%s\n" "#define TM_IN_SYS_TIME 1" >>confdefs.h fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 -$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } -if ${ac_cv_header_time+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include + ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_time_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h -int -main () -{ -if ((struct tm *) 0) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_time=yes -else - ac_cv_header_time=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 -$as_echo "$ac_cv_header_time" >&6; } -if test $ac_cv_header_time = yes; then - -$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h -fi + ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime" +if test "x$ac_cv_func_clock_gettime" = xyes +then : + printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h - for ac_func in clock_gettime time -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF +fi +ac_fn_c_check_func "$LINENO" "time" "ac_cv_func_time" +if test "x$ac_cv_func_time" = xyes +then : + printf "%s\n" "#define HAVE_TIME 1" >>confdefs.h fi -done - if test "x$ac_cv_func_time" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_time" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: time See \`config.log' for more details" "$LINENO" 5; } @@ -41031,7 +46628,7 @@ -$as_echo "#define HAVE_LOCAL_LIBFCACHE 1" >>confdefs.h +printf "%s\n" "#define HAVE_LOCAL_LIBFCACHE 1" >>confdefs.h HAVE_LOCAL_LIBFCACHE=1 @@ -41046,24 +46643,28 @@ HAVE_LOCAL_LIBFCACHE_FALSE= fi - if test "x$ac_cv_libfcache_CPPFLAGS" != "x"; then : + if test "x$ac_cv_libfcache_CPPFLAGS" != "x" +then : LIBFCACHE_CPPFLAGS=$ac_cv_libfcache_CPPFLAGS fi - if test "x$ac_cv_libfcache_LIBADD" != "x"; then : + if test "x$ac_cv_libfcache_LIBADD" != "x" +then : LIBFCACHE_LIBADD=$ac_cv_libfcache_LIBADD fi - if test "x$ac_cv_libfcache" = xyes; then : + if test "x$ac_cv_libfcache" = xyes +then : ax_libfcache_pc_libs_private=-lfcache fi - if test "x$ac_cv_libfcache" = xyes; then : + if test "x$ac_cv_libfcache" = xyes +then : ax_libfcache_spec_requires=libfcache ax_libfcache_spec_build_requires=libfcache-devel @@ -41075,55 +46676,61 @@ # Check whether --with-libfdata was given. -if test "${with_libfdata+set}" = set; then : +if test ${with_libfdata+y} +then : withval=$with_libfdata; ac_cv_with_libfdata=$withval -else +else $as_nop ac_cv_with_libfdata=auto-detect fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libfdata in includedir and libdir or in the specified DIR, or no if to use local version" >&5 -$as_echo_n "checking whether to use search for libfdata in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } -if ${ac_cv_with_libfdata+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use search for libfdata in includedir and libdir or in the specified DIR, or no if to use local version" >&5 +printf %s "checking whether to use search for libfdata in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } +if test ${ac_cv_with_libfdata+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_with_libfdata=auto-detect fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libfdata" >&5 -$as_echo "$ac_cv_with_libfdata" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libfdata" >&5 +printf "%s\n" "$ac_cv_with_libfdata" >&6; } - if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libfdata" = xno; then : + if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libfdata" = xno +then : ac_cv_libfdata=no -else +else $as_nop ac_cv_libfdata=check - if test "x$ac_cv_with_libfdata" != x && test "x$ac_cv_with_libfdata" != xauto-detect; then : - if test -d "$ac_cv_with_libfdata"; then : + if test "x$ac_cv_with_libfdata" != x && test "x$ac_cv_with_libfdata" != xauto-detect +then : + if test -d "$ac_cv_with_libfdata" +then : CFLAGS="$CFLAGS -I${ac_cv_with_libfdata}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libfdata}/lib" -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "no such directory: $ac_cv_with_libfdata See \`config.log' for more details" "$LINENO" 5; } fi -else - if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : +else $as_nop + if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x" +then : pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata" >&5 -$as_echo_n "checking for libfdata... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata >= 20201129" >&5 +printf %s "checking for libfdata >= 20201129... " >&6; } if test -n "$libfdata_CFLAGS"; then pkg_cv_libfdata_CFLAGS="$libfdata_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfdata >= 20190811\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libfdata >= 20190811") 2>&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfdata >= 20201129\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libfdata >= 20201129") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_libfdata_CFLAGS=`$PKG_CONFIG --cflags "libfdata >= 20190811" 2>/dev/null` + pkg_cv_libfdata_CFLAGS=`$PKG_CONFIG --cflags "libfdata >= 20201129" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -41135,12 +46742,12 @@ pkg_cv_libfdata_LIBS="$libfdata_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfdata >= 20190811\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libfdata >= 20190811") 2>&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfdata >= 20201129\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libfdata >= 20201129") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_libfdata_LIBS=`$PKG_CONFIG --libs "libfdata >= 20190811" 2>/dev/null` + pkg_cv_libfdata_LIBS=`$PKG_CONFIG --libs "libfdata >= 20201129" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -41152,8 +46759,8 @@ if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -41161,58 +46768,57 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - libfdata_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libfdata >= 20190811" 2>&1` + libfdata_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libfdata >= 20201129" 2>&1` else - libfdata_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libfdata >= 20190811" 2>&1` + libfdata_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libfdata >= 20201129" 2>&1` fi - # Put the nasty error message in config.log where it belongs - echo "$libfdata_PKG_ERRORS" >&5 + # Put the nasty error message in config.log where it belongs + echo "$libfdata_PKG_ERRORS" >&5 - ac_cv_libfdata=check + ac_cv_libfdata=check elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ac_cv_libfdata=check + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ac_cv_libfdata=check else - libfdata_CFLAGS=$pkg_cv_libfdata_CFLAGS - libfdata_LIBS=$pkg_cv_libfdata_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ac_cv_libfdata=yes + libfdata_CFLAGS=$pkg_cv_libfdata_CFLAGS + libfdata_LIBS=$pkg_cv_libfdata_LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + ac_cv_libfdata=yes fi fi - if test "x$ac_cv_libfdata" = xyes; then : + if test "x$ac_cv_libfdata" = xyes +then : ac_cv_libfdata_CPPFLAGS="$pkg_cv_libfdata_CFLAGS" ac_cv_libfdata_LIBADD="$pkg_cv_libfdata_LIBS" fi fi - if test "x$ac_cv_libfdata" = xcheck; then : - for ac_header in libfdata.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "libfdata.h" "ac_cv_header_libfdata_h" "$ac_includes_default" -if test "x$ac_cv_header_libfdata_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBFDATA_H 1 -_ACEOF + if test "x$ac_cv_libfdata" = xcheck +then : + ac_fn_c_check_header_compile "$LINENO" "libfdata.h" "ac_cv_header_libfdata_h" "$ac_includes_default" +if test "x$ac_cv_header_libfdata_h" = xyes +then : + printf "%s\n" "#define HAVE_LIBFDATA_H 1" >>confdefs.h fi -done - - if test "x$ac_cv_header_libfdata_h" = xno; then : + if test "x$ac_cv_header_libfdata_h" = xno +then : ac_cv_libfdata=no -else +else $as_nop ac_cv_libfdata=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_get_version in -lfdata" >&5 -$as_echo_n "checking for libfdata_get_version in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_get_version+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_get_version in -lfdata" >&5 +printf %s "checking for libfdata_get_version in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_get_version+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -41221,41 +46827,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_get_version (); int -main () +main (void) { return libfdata_get_version (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_get_version=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_get_version=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_get_version" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_get_version" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_get_version" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_get_version" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_get_version" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_get_version" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_area_initialize in -lfdata" >&5 -$as_echo_n "checking for libfdata_area_initialize in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_area_initialize+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_area_initialize in -lfdata" >&5 +printf %s "checking for libfdata_area_initialize in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_area_initialize+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -41264,40 +46870,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_area_initialize (); int -main () +main (void) { return libfdata_area_initialize (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_area_initialize=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_area_initialize=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_area_initialize" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_area_initialize" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_area_initialize" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_area_initialize" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_area_initialize" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_area_initialize" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_area_free in -lfdata" >&5 -$as_echo_n "checking for libfdata_area_free in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_area_free+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_area_free in -lfdata" >&5 +printf %s "checking for libfdata_area_free in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_area_free+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -41306,40 +46912,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_area_free (); int -main () +main (void) { return libfdata_area_free (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_area_free=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_area_free=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_area_free" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_area_free" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_area_free" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_area_free" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_area_free" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_area_free" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_area_clone in -lfdata" >&5 -$as_echo_n "checking for libfdata_area_clone in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_area_clone+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_area_clone in -lfdata" >&5 +printf %s "checking for libfdata_area_clone in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_area_clone+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -41348,40 +46954,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_area_clone (); int -main () +main (void) { return libfdata_area_clone (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_area_clone=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_area_clone=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_area_clone" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_area_clone" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_area_clone" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_area_clone" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_area_clone" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_area_clone" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_area_empty in -lfdata" >&5 -$as_echo_n "checking for libfdata_area_empty in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_area_empty+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_area_empty in -lfdata" >&5 +printf %s "checking for libfdata_area_empty in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_area_empty+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -41390,40 +46996,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_area_empty (); int -main () +main (void) { return libfdata_area_empty (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_area_empty=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_area_empty=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_area_empty" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_area_empty" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_area_empty" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_area_empty" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_area_empty" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_area_empty" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_area_resize in -lfdata" >&5 -$as_echo_n "checking for libfdata_area_resize in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_area_resize+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_area_resize in -lfdata" >&5 +printf %s "checking for libfdata_area_resize in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_area_resize+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -41432,40 +47038,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_area_resize (); int -main () +main (void) { return libfdata_area_resize (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_area_resize=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_area_resize=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_area_resize" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_area_resize" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_area_resize" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_area_resize" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_area_resize" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_area_resize" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_area_get_number_of_segments in -lfdata" >&5 -$as_echo_n "checking for libfdata_area_get_number_of_segments in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_area_get_number_of_segments+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_area_get_number_of_segments in -lfdata" >&5 +printf %s "checking for libfdata_area_get_number_of_segments in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_area_get_number_of_segments+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -41474,40 +47080,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_area_get_number_of_segments (); int -main () +main (void) { return libfdata_area_get_number_of_segments (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_area_get_number_of_segments=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_area_get_number_of_segments=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_area_get_number_of_segments" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_area_get_number_of_segments" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_area_get_number_of_segments" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_area_get_number_of_segments" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_area_get_number_of_segments" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_area_get_number_of_segments" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_area_get_segment_by_index in -lfdata" >&5 -$as_echo_n "checking for libfdata_area_get_segment_by_index in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_area_get_segment_by_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_area_get_segment_by_index in -lfdata" >&5 +printf %s "checking for libfdata_area_get_segment_by_index in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_area_get_segment_by_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -41516,40 +47122,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_area_get_segment_by_index (); int -main () +main (void) { return libfdata_area_get_segment_by_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_area_get_segment_by_index=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_area_get_segment_by_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_area_get_segment_by_index" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_area_get_segment_by_index" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_area_get_segment_by_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_area_get_segment_by_index" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_area_get_segment_by_index" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_area_get_segment_by_index" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_area_set_segment_by_index in -lfdata" >&5 -$as_echo_n "checking for libfdata_area_set_segment_by_index in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_area_set_segment_by_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_area_set_segment_by_index in -lfdata" >&5 +printf %s "checking for libfdata_area_set_segment_by_index in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_area_set_segment_by_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -41558,40 +47164,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_area_set_segment_by_index (); int -main () +main (void) { return libfdata_area_set_segment_by_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_area_set_segment_by_index=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_area_set_segment_by_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_area_set_segment_by_index" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_area_set_segment_by_index" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_area_set_segment_by_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_area_set_segment_by_index" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_area_set_segment_by_index" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_area_set_segment_by_index" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_area_prepend_segment in -lfdata" >&5 -$as_echo_n "checking for libfdata_area_prepend_segment in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_area_prepend_segment+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_area_prepend_segment in -lfdata" >&5 +printf %s "checking for libfdata_area_prepend_segment in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_area_prepend_segment+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -41600,40 +47206,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_area_prepend_segment (); int -main () +main (void) { return libfdata_area_prepend_segment (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_area_prepend_segment=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_area_prepend_segment=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_area_prepend_segment" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_area_prepend_segment" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_area_prepend_segment" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_area_prepend_segment" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_area_prepend_segment" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_area_prepend_segment" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_area_append_segment in -lfdata" >&5 -$as_echo_n "checking for libfdata_area_append_segment in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_area_append_segment+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_area_append_segment in -lfdata" >&5 +printf %s "checking for libfdata_area_append_segment in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_area_append_segment+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -41642,40 +47248,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_area_append_segment (); int -main () +main (void) { return libfdata_area_append_segment (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_area_append_segment=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_area_append_segment=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_area_append_segment" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_area_append_segment" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_area_append_segment" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_area_append_segment" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_area_append_segment" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_area_append_segment" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_area_get_element_data_size in -lfdata" >&5 -$as_echo_n "checking for libfdata_area_get_element_data_size in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_area_get_element_data_size+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_area_get_element_data_size in -lfdata" >&5 +printf %s "checking for libfdata_area_get_element_data_size in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_area_get_element_data_size+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -41684,40 +47290,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_area_get_element_data_size (); int -main () +main (void) { return libfdata_area_get_element_data_size (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_area_get_element_data_size=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_area_get_element_data_size=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_area_get_element_data_size" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_area_get_element_data_size" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_area_get_element_data_size" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_area_get_element_data_size" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_area_get_element_data_size" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_area_get_element_data_size" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_area_get_element_value_at_offset in -lfdata" >&5 -$as_echo_n "checking for libfdata_area_get_element_value_at_offset in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_area_get_element_value_at_offset+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_area_get_element_value_at_offset in -lfdata" >&5 +printf %s "checking for libfdata_area_get_element_value_at_offset in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_area_get_element_value_at_offset+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -41726,40 +47332,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_area_get_element_value_at_offset (); int -main () +main (void) { return libfdata_area_get_element_value_at_offset (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_area_get_element_value_at_offset=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_area_get_element_value_at_offset=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_area_get_element_value_at_offset" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_area_get_element_value_at_offset" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_area_get_element_value_at_offset" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_area_get_element_value_at_offset" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_area_get_element_value_at_offset" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_area_get_element_value_at_offset" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_area_set_element_value_at_offset in -lfdata" >&5 -$as_echo_n "checking for libfdata_area_set_element_value_at_offset in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_area_set_element_value_at_offset+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_area_set_element_value_at_offset in -lfdata" >&5 +printf %s "checking for libfdata_area_set_element_value_at_offset in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_area_set_element_value_at_offset+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -41768,40 +47374,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_area_set_element_value_at_offset (); int -main () +main (void) { return libfdata_area_set_element_value_at_offset (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_area_set_element_value_at_offset=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_area_set_element_value_at_offset=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_area_set_element_value_at_offset" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_area_set_element_value_at_offset" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_area_set_element_value_at_offset" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_area_set_element_value_at_offset" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_area_set_element_value_at_offset" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_area_set_element_value_at_offset" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_area_get_size in -lfdata" >&5 -$as_echo_n "checking for libfdata_area_get_size in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_area_get_size+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_area_get_size in -lfdata" >&5 +printf %s "checking for libfdata_area_get_size in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_area_get_size+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -41810,42 +47416,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_area_get_size (); int -main () +main (void) { return libfdata_area_get_size (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_area_get_size=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_area_get_size=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_area_get_size" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_area_get_size" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_area_get_size" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_area_get_size" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_area_get_size" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_area_get_size" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_initialize in -lfdata" >&5 -$as_echo_n "checking for libfdata_list_initialize in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_list_initialize+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_initialize in -lfdata" >&5 +printf %s "checking for libfdata_list_initialize in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_list_initialize+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -41854,40 +47459,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_list_initialize (); int -main () +main (void) { return libfdata_list_initialize (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_list_initialize=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_list_initialize=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_initialize" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_list_initialize" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_list_initialize" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_initialize" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_initialize" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_list_initialize" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_free in -lfdata" >&5 -$as_echo_n "checking for libfdata_list_free in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_list_free+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_free in -lfdata" >&5 +printf %s "checking for libfdata_list_free in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_list_free+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -41896,40 +47501,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_list_free (); int -main () +main (void) { return libfdata_list_free (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_list_free=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_list_free=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_free" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_list_free" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_list_free" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_free" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_free" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_list_free" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_clone in -lfdata" >&5 -$as_echo_n "checking for libfdata_list_clone in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_list_clone+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_clone in -lfdata" >&5 +printf %s "checking for libfdata_list_clone in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_list_clone+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -41938,40 +47543,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_list_clone (); int -main () +main (void) { return libfdata_list_clone (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_list_clone=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_list_clone=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_clone" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_list_clone" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_list_clone" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_clone" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_clone" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_list_clone" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_empty in -lfdata" >&5 -$as_echo_n "checking for libfdata_list_empty in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_list_empty+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_empty in -lfdata" >&5 +printf %s "checking for libfdata_list_empty in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_list_empty+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -41980,40 +47585,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_list_empty (); int -main () +main (void) { return libfdata_list_empty (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_list_empty=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_list_empty=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_empty" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_list_empty" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_list_empty" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_empty" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_empty" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_list_empty" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_resize in -lfdata" >&5 -$as_echo_n "checking for libfdata_list_resize in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_list_resize+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_resize in -lfdata" >&5 +printf %s "checking for libfdata_list_resize in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_list_resize+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -42022,41 +47627,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_list_resize (); int -main () +main (void) { return libfdata_list_resize (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_list_resize=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_list_resize=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_resize" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_list_resize" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_list_resize" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_resize" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_resize" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_list_resize" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_reverse in -lfdata" >&5 -$as_echo_n "checking for libfdata_list_reverse in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_list_reverse+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_reverse in -lfdata" >&5 +printf %s "checking for libfdata_list_reverse in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_list_reverse+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -42065,41 +47670,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_list_reverse (); int -main () +main (void) { return libfdata_list_reverse (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_list_reverse=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_list_reverse=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_reverse" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_list_reverse" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_list_reverse" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_reverse" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_reverse" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_list_reverse" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_number_of_elements in -lfdata" >&5 -$as_echo_n "checking for libfdata_list_get_number_of_elements in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_list_get_number_of_elements+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_number_of_elements in -lfdata" >&5 +printf %s "checking for libfdata_list_get_number_of_elements in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_list_get_number_of_elements+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -42108,40 +47713,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_list_get_number_of_elements (); int -main () +main (void) { return libfdata_list_get_number_of_elements (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_list_get_number_of_elements=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_list_get_number_of_elements=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_number_of_elements" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_list_get_number_of_elements" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_list_get_number_of_elements" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_number_of_elements" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_get_number_of_elements" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_list_get_number_of_elements" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_list_element_by_index in -lfdata" >&5 -$as_echo_n "checking for libfdata_list_get_list_element_by_index in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_list_get_list_element_by_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_list_element_by_index in -lfdata" >&5 +printf %s "checking for libfdata_list_get_list_element_by_index in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_list_get_list_element_by_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -42150,40 +47755,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_list_get_list_element_by_index (); int -main () +main (void) { return libfdata_list_get_list_element_by_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_list_get_list_element_by_index=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_list_get_list_element_by_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_list_element_by_index" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_list_get_list_element_by_index" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_list_get_list_element_by_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_list_element_by_index" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_get_list_element_by_index" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_list_get_list_element_by_index" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_element_by_index in -lfdata" >&5 -$as_echo_n "checking for libfdata_list_get_element_by_index in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_list_get_element_by_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_element_by_index in -lfdata" >&5 +printf %s "checking for libfdata_list_get_element_by_index in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_list_get_element_by_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -42192,40 +47797,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_list_get_element_by_index (); int -main () +main (void) { return libfdata_list_get_element_by_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_list_get_element_by_index=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_list_get_element_by_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_element_by_index" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_list_get_element_by_index" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_list_get_element_by_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_element_by_index" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_get_element_by_index" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_list_get_element_by_index" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_set_element_by_index in -lfdata" >&5 -$as_echo_n "checking for libfdata_list_set_element_by_index in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_list_set_element_by_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_set_element_by_index in -lfdata" >&5 +printf %s "checking for libfdata_list_set_element_by_index in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_list_set_element_by_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -42234,40 +47839,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_list_set_element_by_index (); int -main () +main (void) { return libfdata_list_set_element_by_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_list_set_element_by_index=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_list_set_element_by_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_set_element_by_index" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_list_set_element_by_index" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_list_set_element_by_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_set_element_by_index" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_set_element_by_index" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_list_set_element_by_index" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_prepend_element in -lfdata" >&5 -$as_echo_n "checking for libfdata_list_prepend_element in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_list_prepend_element+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_prepend_element in -lfdata" >&5 +printf %s "checking for libfdata_list_prepend_element in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_list_prepend_element+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -42276,40 +47881,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_list_prepend_element (); int -main () +main (void) { return libfdata_list_prepend_element (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_list_prepend_element=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_list_prepend_element=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_prepend_element" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_list_prepend_element" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_list_prepend_element" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_prepend_element" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_prepend_element" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_list_prepend_element" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_append_element in -lfdata" >&5 -$as_echo_n "checking for libfdata_list_append_element in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_list_append_element+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_append_element in -lfdata" >&5 +printf %s "checking for libfdata_list_append_element in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_list_append_element+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -42318,40 +47923,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_list_append_element (); int -main () +main (void) { return libfdata_list_append_element (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_list_append_element=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_list_append_element=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_append_element" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_list_append_element" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_list_append_element" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_append_element" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_append_element" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_list_append_element" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_append_list in -lfdata" >&5 -$as_echo_n "checking for libfdata_list_append_list in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_list_append_list+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_append_list in -lfdata" >&5 +printf %s "checking for libfdata_list_append_list in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_list_append_list+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -42360,40 +47965,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_list_append_list (); int -main () +main (void) { return libfdata_list_append_list (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_list_append_list=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_list_append_list=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_append_list" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_list_append_list" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_list_append_list" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_append_list" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_append_list" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_list_append_list" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_is_element_set in -lfdata" >&5 -$as_echo_n "checking for libfdata_list_is_element_set in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_list_is_element_set+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_is_element_set in -lfdata" >&5 +printf %s "checking for libfdata_list_is_element_set in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_list_is_element_set+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -42402,41 +48007,83 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_list_is_element_set (); int -main () +main (void) { return libfdata_list_is_element_set (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_list_is_element_set=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_list_is_element_set=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_is_element_set" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_list_is_element_set" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_list_is_element_set" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_is_element_set" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_is_element_set" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_list_is_element_set" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_mapped_offset in -lfdata" >&5 -$as_echo_n "checking for libfdata_list_get_mapped_offset in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_list_get_mapped_offset+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_element_mapped_range in -lfdata" >&5 +printf %s "checking for libfdata_list_get_element_mapped_range in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_list_get_element_mapped_range+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lfdata $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libfdata_list_get_element_mapped_range (); +int +main (void) +{ +return libfdata_list_get_element_mapped_range (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_fdata_libfdata_list_get_element_mapped_range=yes +else $as_nop + ac_cv_lib_fdata_libfdata_list_get_element_mapped_range=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_element_mapped_range" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_get_element_mapped_range" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_list_get_element_mapped_range" = xyes +then : + ac_cv_libfdata_dummy=yes +else $as_nop + ac_cv_libfdata=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_mapped_offset in -lfdata" >&5 +printf %s "checking for libfdata_list_get_mapped_offset in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_list_get_mapped_offset+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -42445,40 +48092,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_list_get_mapped_offset (); int -main () +main (void) { return libfdata_list_get_mapped_offset (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_list_get_mapped_offset=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_list_get_mapped_offset=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_mapped_offset" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_list_get_mapped_offset" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_list_get_mapped_offset" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_mapped_offset" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_get_mapped_offset" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_list_get_mapped_offset" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_set_mapped_offset in -lfdata" >&5 -$as_echo_n "checking for libfdata_list_set_mapped_offset in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_list_set_mapped_offset+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_set_mapped_offset in -lfdata" >&5 +printf %s "checking for libfdata_list_set_mapped_offset in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_list_set_mapped_offset+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -42487,41 +48134,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_list_set_mapped_offset (); int -main () +main (void) { return libfdata_list_set_mapped_offset (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_list_set_mapped_offset=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_list_set_mapped_offset=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_set_mapped_offset" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_list_set_mapped_offset" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_list_set_mapped_offset" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_set_mapped_offset" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_set_mapped_offset" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_list_set_mapped_offset" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_mapped_size_by_index in -lfdata" >&5 -$as_echo_n "checking for libfdata_list_get_mapped_size_by_index in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_list_get_mapped_size_by_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_mapped_size_by_index in -lfdata" >&5 +printf %s "checking for libfdata_list_get_mapped_size_by_index in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_list_get_mapped_size_by_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -42530,40 +48177,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_list_get_mapped_size_by_index (); int -main () +main (void) { return libfdata_list_get_mapped_size_by_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_list_get_mapped_size_by_index=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_list_get_mapped_size_by_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_mapped_size_by_index" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_list_get_mapped_size_by_index" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_list_get_mapped_size_by_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_mapped_size_by_index" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_get_mapped_size_by_index" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_list_get_mapped_size_by_index" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_set_mapped_size_by_index in -lfdata" >&5 -$as_echo_n "checking for libfdata_list_set_mapped_size_by_index in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_list_set_mapped_size_by_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_set_mapped_size_by_index in -lfdata" >&5 +printf %s "checking for libfdata_list_set_mapped_size_by_index in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_list_set_mapped_size_by_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -42572,40 +48219,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_list_set_mapped_size_by_index (); int -main () +main (void) { return libfdata_list_set_mapped_size_by_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_list_set_mapped_size_by_index=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_list_set_mapped_size_by_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_set_mapped_size_by_index" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_list_set_mapped_size_by_index" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_list_set_mapped_size_by_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_set_mapped_size_by_index" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_set_mapped_size_by_index" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_list_set_mapped_size_by_index" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_element_by_index_with_mapped_size in -lfdata" >&5 -$as_echo_n "checking for libfdata_list_get_element_by_index_with_mapped_size in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_list_get_element_by_index_with_mapped_size+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_element_by_index_with_mapped_size in -lfdata" >&5 +printf %s "checking for libfdata_list_get_element_by_index_with_mapped_size in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_list_get_element_by_index_with_mapped_size+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -42614,40 +48261,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_list_get_element_by_index_with_mapped_size (); int -main () +main (void) { return libfdata_list_get_element_by_index_with_mapped_size (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_list_get_element_by_index_with_mapped_size=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_list_get_element_by_index_with_mapped_size=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_element_by_index_with_mapped_size" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_list_get_element_by_index_with_mapped_size" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_list_get_element_by_index_with_mapped_size" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_element_by_index_with_mapped_size" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_get_element_by_index_with_mapped_size" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_list_get_element_by_index_with_mapped_size" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_set_element_by_index_with_mapped_size in -lfdata" >&5 -$as_echo_n "checking for libfdata_list_set_element_by_index_with_mapped_size in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_list_set_element_by_index_with_mapped_size+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_set_element_by_index_with_mapped_size in -lfdata" >&5 +printf %s "checking for libfdata_list_set_element_by_index_with_mapped_size in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_list_set_element_by_index_with_mapped_size+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -42656,40 +48303,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_list_set_element_by_index_with_mapped_size (); int -main () +main (void) { return libfdata_list_set_element_by_index_with_mapped_size (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_list_set_element_by_index_with_mapped_size=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_list_set_element_by_index_with_mapped_size=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_set_element_by_index_with_mapped_size" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_list_set_element_by_index_with_mapped_size" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_list_set_element_by_index_with_mapped_size" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_set_element_by_index_with_mapped_size" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_set_element_by_index_with_mapped_size" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_list_set_element_by_index_with_mapped_size" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_append_element_with_mapped_size in -lfdata" >&5 -$as_echo_n "checking for libfdata_list_append_element_with_mapped_size in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_list_append_element_with_mapped_size+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_append_element_with_mapped_size in -lfdata" >&5 +printf %s "checking for libfdata_list_append_element_with_mapped_size in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_list_append_element_with_mapped_size+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -42698,41 +48345,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_list_append_element_with_mapped_size (); int -main () +main (void) { return libfdata_list_append_element_with_mapped_size (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_list_append_element_with_mapped_size=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_list_append_element_with_mapped_size=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_append_element_with_mapped_size" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_list_append_element_with_mapped_size" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_list_append_element_with_mapped_size" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_append_element_with_mapped_size" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_append_element_with_mapped_size" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_list_append_element_with_mapped_size" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_element_index_at_offset in -lfdata" >&5 -$as_echo_n "checking for libfdata_list_get_element_index_at_offset in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_list_get_element_index_at_offset+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_element_index_at_offset in -lfdata" >&5 +printf %s "checking for libfdata_list_get_element_index_at_offset in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_list_get_element_index_at_offset+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -42741,40 +48388,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_list_get_element_index_at_offset (); int -main () +main (void) { return libfdata_list_get_element_index_at_offset (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_list_get_element_index_at_offset=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_list_get_element_index_at_offset=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_element_index_at_offset" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_list_get_element_index_at_offset" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_list_get_element_index_at_offset" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_element_index_at_offset" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_get_element_index_at_offset" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_list_get_element_index_at_offset" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_list_element_at_offset in -lfdata" >&5 -$as_echo_n "checking for libfdata_list_get_list_element_at_offset in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_list_get_list_element_at_offset+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_list_element_at_offset in -lfdata" >&5 +printf %s "checking for libfdata_list_get_list_element_at_offset in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_list_get_list_element_at_offset+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -42783,40 +48430,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_list_get_list_element_at_offset (); int -main () +main (void) { return libfdata_list_get_list_element_at_offset (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_list_get_list_element_at_offset=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_list_get_list_element_at_offset=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_list_element_at_offset" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_list_get_list_element_at_offset" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_list_get_list_element_at_offset" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_list_element_at_offset" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_get_list_element_at_offset" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_list_get_list_element_at_offset" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_element_at_offset in -lfdata" >&5 -$as_echo_n "checking for libfdata_list_get_element_at_offset in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_list_get_element_at_offset+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_element_at_offset in -lfdata" >&5 +printf %s "checking for libfdata_list_get_element_at_offset in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_list_get_element_at_offset+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -42825,41 +48472,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_list_get_element_at_offset (); int -main () +main (void) { return libfdata_list_get_element_at_offset (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_list_get_element_at_offset=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_list_get_element_at_offset=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_element_at_offset" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_list_get_element_at_offset" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_list_get_element_at_offset" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_element_at_offset" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_get_element_at_offset" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_list_get_element_at_offset" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_cache_element_value in -lfdata" >&5 -$as_echo_n "checking for libfdata_list_cache_element_value in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_list_cache_element_value+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_cache_element_value in -lfdata" >&5 +printf %s "checking for libfdata_list_cache_element_value in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_list_cache_element_value+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -42868,40 +48515,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_list_cache_element_value (); int -main () +main (void) { return libfdata_list_cache_element_value (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_list_cache_element_value=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_list_cache_element_value=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_cache_element_value" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_list_cache_element_value" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_list_cache_element_value" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_cache_element_value" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_cache_element_value" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_list_cache_element_value" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_element_value_by_index in -lfdata" >&5 -$as_echo_n "checking for libfdata_list_get_element_value_by_index in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_list_get_element_value_by_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_element_value_by_index in -lfdata" >&5 +printf %s "checking for libfdata_list_get_element_value_by_index in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_list_get_element_value_by_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -42910,40 +48557,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_list_get_element_value_by_index (); int -main () +main (void) { return libfdata_list_get_element_value_by_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_list_get_element_value_by_index=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_list_get_element_value_by_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_element_value_by_index" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_list_get_element_value_by_index" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_list_get_element_value_by_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_element_value_by_index" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_get_element_value_by_index" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_list_get_element_value_by_index" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_element_value_at_offset in -lfdata" >&5 -$as_echo_n "checking for libfdata_list_get_element_value_at_offset in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_list_get_element_value_at_offset+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_element_value_at_offset in -lfdata" >&5 +printf %s "checking for libfdata_list_get_element_value_at_offset in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_list_get_element_value_at_offset+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -42952,40 +48599,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_list_get_element_value_at_offset (); int -main () +main (void) { return libfdata_list_get_element_value_at_offset (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_list_get_element_value_at_offset=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_list_get_element_value_at_offset=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_element_value_at_offset" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_list_get_element_value_at_offset" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_list_get_element_value_at_offset" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_element_value_at_offset" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_get_element_value_at_offset" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_list_get_element_value_at_offset" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_set_element_value_by_index in -lfdata" >&5 -$as_echo_n "checking for libfdata_list_set_element_value_by_index in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_list_set_element_value_by_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_set_element_value_by_index in -lfdata" >&5 +printf %s "checking for libfdata_list_set_element_value_by_index in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_list_set_element_value_by_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -42994,41 +48641,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_list_set_element_value_by_index (); int -main () +main (void) { return libfdata_list_set_element_value_by_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_list_set_element_value_by_index=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_list_set_element_value_by_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_set_element_value_by_index" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_list_set_element_value_by_index" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_list_set_element_value_by_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_set_element_value_by_index" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_set_element_value_by_index" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_list_set_element_value_by_index" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_set_element_value_at_offset in -lfdata" >&5 -$as_echo_n "checking for libfdata_list_set_element_value_at_offset in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_list_set_element_value_at_offset+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_set_element_value_at_offset in -lfdata" >&5 +printf %s "checking for libfdata_list_set_element_value_at_offset in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_list_set_element_value_at_offset+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -43037,40 +48684,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_list_set_element_value_at_offset (); int -main () +main (void) { return libfdata_list_set_element_value_at_offset (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_list_set_element_value_at_offset=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_list_set_element_value_at_offset=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_set_element_value_at_offset" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_list_set_element_value_at_offset" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_list_set_element_value_at_offset" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_set_element_value_at_offset" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_set_element_value_at_offset" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_list_set_element_value_at_offset" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_size in -lfdata" >&5 -$as_echo_n "checking for libfdata_list_get_size in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_list_get_size+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_size in -lfdata" >&5 +printf %s "checking for libfdata_list_get_size in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_list_get_size+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -43079,41 +48726,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_list_get_size (); int -main () +main (void) { return libfdata_list_get_size (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_list_get_size=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_list_get_size=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_size" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_list_get_size" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_list_get_size" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_size" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_get_size" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_list_get_size" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_element_get_mapped_size in -lfdata" >&5 -$as_echo_n "checking for libfdata_list_element_get_mapped_size in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_list_element_get_mapped_size+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_element_get_mapped_size in -lfdata" >&5 +printf %s "checking for libfdata_list_element_get_mapped_size in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_list_element_get_mapped_size+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -43122,40 +48769,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_list_element_get_mapped_size (); int -main () +main (void) { return libfdata_list_element_get_mapped_size (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_list_element_get_mapped_size=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_list_element_get_mapped_size=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_element_get_mapped_size" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_list_element_get_mapped_size" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_list_element_get_mapped_size" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_element_get_mapped_size" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_element_get_mapped_size" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_list_element_get_mapped_size" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_element_set_mapped_size in -lfdata" >&5 -$as_echo_n "checking for libfdata_list_element_set_mapped_size in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_list_element_set_mapped_size+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_element_set_mapped_size in -lfdata" >&5 +printf %s "checking for libfdata_list_element_set_mapped_size in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_list_element_set_mapped_size+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -43164,40 +48811,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_list_element_set_mapped_size (); int -main () +main (void) { return libfdata_list_element_set_mapped_size (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_list_element_set_mapped_size=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_list_element_set_mapped_size=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_element_set_mapped_size" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_list_element_set_mapped_size" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_list_element_set_mapped_size" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_element_set_mapped_size" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_element_set_mapped_size" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_list_element_set_mapped_size" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_element_get_element_value in -lfdata" >&5 -$as_echo_n "checking for libfdata_list_element_get_element_value in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_list_element_get_element_value+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_element_get_element_value in -lfdata" >&5 +printf %s "checking for libfdata_list_element_get_element_value in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_list_element_get_element_value+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -43206,40 +48853,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_list_element_get_element_value (); int -main () +main (void) { return libfdata_list_element_get_element_value (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_list_element_get_element_value=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_list_element_get_element_value=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_element_get_element_value" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_list_element_get_element_value" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_list_element_get_element_value" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_element_get_element_value" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_element_get_element_value" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_list_element_get_element_value" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_element_set_element_value in -lfdata" >&5 -$as_echo_n "checking for libfdata_list_element_set_element_value in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_list_element_set_element_value+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_element_set_element_value in -lfdata" >&5 +printf %s "checking for libfdata_list_element_set_element_value in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_list_element_set_element_value+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -43248,41 +48895,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_list_element_set_element_value (); int -main () +main (void) { return libfdata_list_element_set_element_value (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_list_element_set_element_value=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_list_element_set_element_value=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_element_set_element_value" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_list_element_set_element_value" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_list_element_set_element_value" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_element_set_element_value" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_element_set_element_value" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_list_element_set_element_value" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_element_get_mapped_size in -lfdata" >&5 -$as_echo_n "checking for libfdata_list_element_get_mapped_size in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_list_element_get_mapped_size+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_element_get_mapped_size in -lfdata" >&5 +printf %s "checking for libfdata_list_element_get_mapped_size in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_list_element_get_mapped_size+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -43291,40 +48938,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_list_element_get_mapped_size (); int -main () +main (void) { return libfdata_list_element_get_mapped_size (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_list_element_get_mapped_size=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_list_element_get_mapped_size=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_element_get_mapped_size" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_list_element_get_mapped_size" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_list_element_get_mapped_size" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_element_get_mapped_size" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_element_get_mapped_size" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_list_element_get_mapped_size" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_element_set_mapped_size in -lfdata" >&5 -$as_echo_n "checking for libfdata_list_element_set_mapped_size in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_list_element_set_mapped_size+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_element_set_mapped_size in -lfdata" >&5 +printf %s "checking for libfdata_list_element_set_mapped_size in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_list_element_set_mapped_size+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -43333,40 +48980,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_list_element_set_mapped_size (); int -main () +main (void) { return libfdata_list_element_set_mapped_size (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_list_element_set_mapped_size=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_list_element_set_mapped_size=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_element_set_mapped_size" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_list_element_set_mapped_size" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_list_element_set_mapped_size" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_element_set_mapped_size" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_element_set_mapped_size" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_list_element_set_mapped_size" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_element_get_element_value in -lfdata" >&5 -$as_echo_n "checking for libfdata_list_element_get_element_value in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_list_element_get_element_value+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_element_get_element_value in -lfdata" >&5 +printf %s "checking for libfdata_list_element_get_element_value in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_list_element_get_element_value+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -43375,40 +49022,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_list_element_get_element_value (); int -main () +main (void) { return libfdata_list_element_get_element_value (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_list_element_get_element_value=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_list_element_get_element_value=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_element_get_element_value" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_list_element_get_element_value" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_list_element_get_element_value" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_element_get_element_value" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_element_get_element_value" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_list_element_get_element_value" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_element_set_element_value in -lfdata" >&5 -$as_echo_n "checking for libfdata_list_element_set_element_value in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_list_element_set_element_value+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_element_set_element_value in -lfdata" >&5 +printf %s "checking for libfdata_list_element_set_element_value in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_list_element_set_element_value+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -43417,42 +49064,42 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_list_element_set_element_value (); int -main () +main (void) { return libfdata_list_element_set_element_value (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_list_element_set_element_value=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_list_element_set_element_value=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_element_set_element_value" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_list_element_set_element_value" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_list_element_set_element_value" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_element_set_element_value" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_element_set_element_value" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_list_element_set_element_value" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_initialize in -lfdata" >&5 -$as_echo_n "checking for libfdata_stream_initialize in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_stream_initialize+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_initialize in -lfdata" >&5 +printf %s "checking for libfdata_stream_initialize in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_stream_initialize+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -43461,40 +49108,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_stream_initialize (); int -main () +main (void) { return libfdata_stream_initialize (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_stream_initialize=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_stream_initialize=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_initialize" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_stream_initialize" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_stream_initialize" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_initialize" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_stream_initialize" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_stream_initialize" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_free in -lfdata" >&5 -$as_echo_n "checking for libfdata_stream_free in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_stream_free+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_free in -lfdata" >&5 +printf %s "checking for libfdata_stream_free in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_stream_free+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -43503,40 +49150,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_stream_free (); int -main () +main (void) { return libfdata_stream_free (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_stream_free=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_stream_free=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_free" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_stream_free" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_stream_free" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_free" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_stream_free" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_stream_free" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_clone in -lfdata" >&5 -$as_echo_n "checking for libfdata_stream_clone in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_stream_clone+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_clone in -lfdata" >&5 +printf %s "checking for libfdata_stream_clone in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_stream_clone+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -43545,41 +49192,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_stream_clone (); int -main () +main (void) { return libfdata_stream_clone (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_stream_clone=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_stream_clone=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_clone" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_stream_clone" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_stream_clone" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_clone" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_stream_clone" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_stream_clone" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_empty in -lfdata" >&5 -$as_echo_n "checking for libfdata_stream_empty in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_stream_empty+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_empty in -lfdata" >&5 +printf %s "checking for libfdata_stream_empty in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_stream_empty+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -43588,40 +49235,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_stream_empty (); int -main () +main (void) { return libfdata_stream_empty (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_stream_empty=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_stream_empty=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_empty" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_stream_empty" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_stream_empty" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_empty" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_stream_empty" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_stream_empty" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_resize in -lfdata" >&5 -$as_echo_n "checking for libfdata_stream_resize in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_stream_resize+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_resize in -lfdata" >&5 +printf %s "checking for libfdata_stream_resize in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_stream_resize+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -43630,40 +49277,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_stream_resize (); int -main () +main (void) { return libfdata_stream_resize (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_stream_resize=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_stream_resize=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_resize" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_stream_resize" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_stream_resize" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_resize" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_stream_resize" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_stream_resize" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_reverse in -lfdata" >&5 -$as_echo_n "checking for libfdata_stream_reverse in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_stream_reverse+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_reverse in -lfdata" >&5 +printf %s "checking for libfdata_stream_reverse in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_stream_reverse+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -43672,41 +49319,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_stream_reverse (); int -main () +main (void) { return libfdata_stream_reverse (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_stream_reverse=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_stream_reverse=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_reverse" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_stream_reverse" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_stream_reverse" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_reverse" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_stream_reverse" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_stream_reverse" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_get_number_of_segments in -lfdata" >&5 -$as_echo_n "checking for libfdata_stream_get_number_of_segments in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_stream_get_number_of_segments+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_get_number_of_segments in -lfdata" >&5 +printf %s "checking for libfdata_stream_get_number_of_segments in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_stream_get_number_of_segments+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -43715,40 +49362,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_stream_get_number_of_segments (); int -main () +main (void) { return libfdata_stream_get_number_of_segments (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_stream_get_number_of_segments=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_stream_get_number_of_segments=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_get_number_of_segments" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_stream_get_number_of_segments" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_stream_get_number_of_segments" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_get_number_of_segments" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_stream_get_number_of_segments" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_stream_get_number_of_segments" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_get_segment_by_index in -lfdata" >&5 -$as_echo_n "checking for libfdata_stream_get_segment_by_index in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_stream_get_segment_by_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_get_segment_by_index in -lfdata" >&5 +printf %s "checking for libfdata_stream_get_segment_by_index in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_stream_get_segment_by_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -43757,40 +49404,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_stream_get_segment_by_index (); int -main () +main (void) { return libfdata_stream_get_segment_by_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_stream_get_segment_by_index=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_stream_get_segment_by_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_get_segment_by_index" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_stream_get_segment_by_index" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_stream_get_segment_by_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_get_segment_by_index" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_stream_get_segment_by_index" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_stream_get_segment_by_index" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_set_segment_by_index in -lfdata" >&5 -$as_echo_n "checking for libfdata_stream_set_segment_by_index in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_stream_set_segment_by_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_set_segment_by_index in -lfdata" >&5 +printf %s "checking for libfdata_stream_set_segment_by_index in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_stream_set_segment_by_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -43799,40 +49446,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_stream_set_segment_by_index (); int -main () +main (void) { return libfdata_stream_set_segment_by_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_stream_set_segment_by_index=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_stream_set_segment_by_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_set_segment_by_index" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_stream_set_segment_by_index" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_stream_set_segment_by_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_set_segment_by_index" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_stream_set_segment_by_index" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_stream_set_segment_by_index" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_prepend_segment in -lfdata" >&5 -$as_echo_n "checking for libfdata_stream_prepend_segment in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_stream_prepend_segment+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_prepend_segment in -lfdata" >&5 +printf %s "checking for libfdata_stream_prepend_segment in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_stream_prepend_segment+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -43841,40 +49488,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_stream_prepend_segment (); int -main () +main (void) { return libfdata_stream_prepend_segment (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_stream_prepend_segment=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_stream_prepend_segment=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_prepend_segment" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_stream_prepend_segment" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_stream_prepend_segment" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_prepend_segment" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_stream_prepend_segment" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_stream_prepend_segment" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_append_segment in -lfdata" >&5 -$as_echo_n "checking for libfdata_stream_append_segment in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_stream_append_segment+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_append_segment in -lfdata" >&5 +printf %s "checking for libfdata_stream_append_segment in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_stream_append_segment+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -43883,40 +49530,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_stream_append_segment (); int -main () +main (void) { return libfdata_stream_append_segment (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_stream_append_segment=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_stream_append_segment=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_append_segment" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_stream_append_segment" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_stream_append_segment" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_append_segment" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_stream_append_segment" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_stream_append_segment" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_set_mapped_size in -lfdata" >&5 -$as_echo_n "checking for libfdata_stream_set_mapped_size in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_stream_set_mapped_size+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_set_mapped_size in -lfdata" >&5 +printf %s "checking for libfdata_stream_set_mapped_size in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_stream_set_mapped_size+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -43925,41 +49572,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_stream_set_mapped_size (); int -main () +main (void) { return libfdata_stream_set_mapped_size (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_stream_set_mapped_size=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_stream_set_mapped_size=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_set_mapped_size" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_stream_set_mapped_size" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_stream_set_mapped_size" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_set_mapped_size" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_stream_set_mapped_size" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_stream_set_mapped_size" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_get_segment_mapped_range in -lfdata" >&5 -$as_echo_n "checking for libfdata_stream_get_segment_mapped_range in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_stream_get_segment_mapped_range+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_get_segment_mapped_range in -lfdata" >&5 +printf %s "checking for libfdata_stream_get_segment_mapped_range in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_stream_get_segment_mapped_range+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -43968,40 +49615,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_stream_get_segment_mapped_range (); int -main () +main (void) { return libfdata_stream_get_segment_mapped_range (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_stream_get_segment_mapped_range=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_stream_get_segment_mapped_range=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_get_segment_mapped_range" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_stream_get_segment_mapped_range" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_stream_get_segment_mapped_range" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_get_segment_mapped_range" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_stream_get_segment_mapped_range" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_stream_get_segment_mapped_range" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_get_segment_index_at_offset in -lfdata" >&5 -$as_echo_n "checking for libfdata_stream_get_segment_index_at_offset in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_stream_get_segment_index_at_offset+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_get_segment_index_at_offset in -lfdata" >&5 +printf %s "checking for libfdata_stream_get_segment_index_at_offset in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_stream_get_segment_index_at_offset+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -44010,40 +49657,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_stream_get_segment_index_at_offset (); int -main () +main (void) { return libfdata_stream_get_segment_index_at_offset (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_stream_get_segment_index_at_offset=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_stream_get_segment_index_at_offset=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_get_segment_index_at_offset" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_stream_get_segment_index_at_offset" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_stream_get_segment_index_at_offset" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_get_segment_index_at_offset" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_stream_get_segment_index_at_offset" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_stream_get_segment_index_at_offset" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_get_segment_at_offset in -lfdata" >&5 -$as_echo_n "checking for libfdata_stream_get_segment_at_offset in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_stream_get_segment_at_offset+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_get_segment_at_offset in -lfdata" >&5 +printf %s "checking for libfdata_stream_get_segment_at_offset in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_stream_get_segment_at_offset+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -44052,41 +49699,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_stream_get_segment_at_offset (); int -main () +main (void) { return libfdata_stream_get_segment_at_offset (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_stream_get_segment_at_offset=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_stream_get_segment_at_offset=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_get_segment_at_offset" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_stream_get_segment_at_offset" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_stream_get_segment_at_offset" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_get_segment_at_offset" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_stream_get_segment_at_offset" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_stream_get_segment_at_offset" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_read_buffer in -lfdata" >&5 -$as_echo_n "checking for libfdata_stream_read_buffer in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_stream_read_buffer+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_read_buffer in -lfdata" >&5 +printf %s "checking for libfdata_stream_read_buffer in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_stream_read_buffer+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -44095,40 +49742,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_stream_read_buffer (); int -main () +main (void) { return libfdata_stream_read_buffer (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_stream_read_buffer=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_stream_read_buffer=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_read_buffer" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_stream_read_buffer" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_stream_read_buffer" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_read_buffer" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_stream_read_buffer" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_stream_read_buffer" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_read_buffer_at_offset in -lfdata" >&5 -$as_echo_n "checking for libfdata_stream_read_buffer_at_offset in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_stream_read_buffer_at_offset+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_read_buffer_at_offset in -lfdata" >&5 +printf %s "checking for libfdata_stream_read_buffer_at_offset in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_stream_read_buffer_at_offset+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -44137,40 +49784,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_stream_read_buffer_at_offset (); int -main () +main (void) { return libfdata_stream_read_buffer_at_offset (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_stream_read_buffer_at_offset=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_stream_read_buffer_at_offset=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_read_buffer_at_offset" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_stream_read_buffer_at_offset" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_stream_read_buffer_at_offset" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_read_buffer_at_offset" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_stream_read_buffer_at_offset" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_stream_read_buffer_at_offset" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_write_buffer in -lfdata" >&5 -$as_echo_n "checking for libfdata_stream_write_buffer in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_stream_write_buffer+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_write_buffer in -lfdata" >&5 +printf %s "checking for libfdata_stream_write_buffer in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_stream_write_buffer+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -44179,40 +49826,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_stream_write_buffer (); int -main () +main (void) { return libfdata_stream_write_buffer (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_stream_write_buffer=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_stream_write_buffer=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_write_buffer" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_stream_write_buffer" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_stream_write_buffer" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_write_buffer" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_stream_write_buffer" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_stream_write_buffer" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_seek_offset in -lfdata" >&5 -$as_echo_n "checking for libfdata_stream_seek_offset in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_stream_seek_offset+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_seek_offset in -lfdata" >&5 +printf %s "checking for libfdata_stream_seek_offset in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_stream_seek_offset+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -44221,40 +49868,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_stream_seek_offset (); int -main () +main (void) { return libfdata_stream_seek_offset (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_stream_seek_offset=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_stream_seek_offset=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_seek_offset" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_stream_seek_offset" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_stream_seek_offset" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_seek_offset" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_stream_seek_offset" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_stream_seek_offset" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_get_offset in -lfdata" >&5 -$as_echo_n "checking for libfdata_stream_get_offset in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_stream_get_offset+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_get_offset in -lfdata" >&5 +printf %s "checking for libfdata_stream_get_offset in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_stream_get_offset+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -44263,40 +49910,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_stream_get_offset (); int -main () +main (void) { return libfdata_stream_get_offset (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_stream_get_offset=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_stream_get_offset=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_get_offset" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_stream_get_offset" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_stream_get_offset" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_get_offset" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_stream_get_offset" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_stream_get_offset" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_get_size in -lfdata" >&5 -$as_echo_n "checking for libfdata_stream_get_size in -lfdata... " >&6; } -if ${ac_cv_lib_fdata_libfdata_stream_get_size+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_get_size in -lfdata" >&5 +printf %s "checking for libfdata_stream_get_size in -lfdata... " >&6; } +if test ${ac_cv_lib_fdata_libfdata_stream_get_size+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -44305,32 +49952,31 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdata_stream_get_size (); int -main () +main (void) { return libfdata_stream_get_size (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdata_libfdata_stream_get_size=yes -else +else $as_nop ac_cv_lib_fdata_libfdata_stream_get_size=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_get_size" >&5 -$as_echo "$ac_cv_lib_fdata_libfdata_stream_get_size" >&6; } -if test "x$ac_cv_lib_fdata_libfdata_stream_get_size" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_get_size" >&5 +printf "%s\n" "$ac_cv_lib_fdata_libfdata_stream_get_size" >&6; } +if test "x$ac_cv_lib_fdata_libfdata_stream_get_size" = xyes +then : ac_cv_libfdata_dummy=yes -else +else $as_nop ac_cv_libfdata=no fi @@ -44341,9 +49987,10 @@ fi fi - if test "x$ac_cv_with_libfdata" != x && test "x$ac_cv_with_libfdata" != xauto-detect && test "x$ac_cv_libfdata" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_with_libfdata" != x && test "x$ac_cv_with_libfdata" != xauto-detect && test "x$ac_cv_libfdata" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "unable to find supported libfdata in directory: $ac_cv_with_libfdata See \`config.log' for more details" "$LINENO" 5; } @@ -44351,24 +49998,27 @@ fi - if test "x$ac_cv_libfdata" = xyes; then : + if test "x$ac_cv_libfdata" = xyes +then : -$as_echo "#define HAVE_LIBFDATA 1" >>confdefs.h +printf "%s\n" "#define HAVE_LIBFDATA 1" >>confdefs.h fi - if test "x$ac_cv_libfdata" = xyes; then : + if test "x$ac_cv_libfdata" = xyes +then : HAVE_LIBFDATA=1 -else +else $as_nop HAVE_LIBFDATA=0 fi - if test "x$ac_cv_libfdata" != xyes; then : + if test "x$ac_cv_libfdata" != xyes +then : ac_cv_libfdata_CPPFLAGS="-I../libfdata"; ac_cv_libfdata_LIBADD="../libfdata/libfdata.la"; @@ -44377,7 +50027,7 @@ -$as_echo "#define HAVE_LOCAL_LIBFDATA 1" >>confdefs.h +printf "%s\n" "#define HAVE_LOCAL_LIBFDATA 1" >>confdefs.h HAVE_LOCAL_LIBFDATA=1 @@ -44392,24 +50042,28 @@ HAVE_LOCAL_LIBFDATA_FALSE= fi - if test "x$ac_cv_libfdata_CPPFLAGS" != "x"; then : + if test "x$ac_cv_libfdata_CPPFLAGS" != "x" +then : LIBFDATA_CPPFLAGS=$ac_cv_libfdata_CPPFLAGS fi - if test "x$ac_cv_libfdata_LIBADD" != "x"; then : + if test "x$ac_cv_libfdata_LIBADD" != "x" +then : LIBFDATA_LIBADD=$ac_cv_libfdata_LIBADD fi - if test "x$ac_cv_libfdata" = xyes; then : + if test "x$ac_cv_libfdata" = xyes +then : ax_libfdata_pc_libs_private=-lfdata fi - if test "x$ac_cv_libfdata" = xyes; then : + if test "x$ac_cv_libfdata" = xyes +then : ax_libfdata_spec_requires=libfdata ax_libfdata_spec_build_requires=libfdata-devel @@ -44421,53 +50075,59 @@ # Check whether --with-libfdatetime was given. -if test "${with_libfdatetime+set}" = set; then : +if test ${with_libfdatetime+y} +then : withval=$with_libfdatetime; ac_cv_with_libfdatetime=$withval -else +else $as_nop ac_cv_with_libfdatetime=auto-detect fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libfdatetime in includedir and libdir or in the specified DIR, or no if to use local version" >&5 -$as_echo_n "checking whether to use search for libfdatetime in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } -if ${ac_cv_with_libfdatetime+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use search for libfdatetime in includedir and libdir or in the specified DIR, or no if to use local version" >&5 +printf %s "checking whether to use search for libfdatetime in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } +if test ${ac_cv_with_libfdatetime+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_with_libfdatetime=auto-detect fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libfdatetime" >&5 -$as_echo "$ac_cv_with_libfdatetime" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libfdatetime" >&5 +printf "%s\n" "$ac_cv_with_libfdatetime" >&6; } - if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libfdatetime" = xno; then : + if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libfdatetime" = xno +then : ac_cv_libfdatetime=no -else +else $as_nop ac_cv_libfdatetime=check - if test "x$ac_cv_with_libfdatetime" != x && test "x$ac_cv_with_libfdatetime" != xauto-detect; then : - if test -d "$ac_cv_with_libfdatetime"; then : + if test "x$ac_cv_with_libfdatetime" != x && test "x$ac_cv_with_libfdatetime" != xauto-detect +then : + if test -d "$ac_cv_with_libfdatetime" +then : CFLAGS="$CFLAGS -I${ac_cv_with_libfdatetime}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libfdatetime}/lib" -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "no such directory: $ac_cv_with_libfdatetime See \`config.log' for more details" "$LINENO" 5; } fi -else - if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : +else $as_nop + if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x" +then : pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime" >&5 -$as_echo_n "checking for libfdatetime... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime >= 20180910" >&5 +printf %s "checking for libfdatetime >= 20180910... " >&6; } if test -n "$libfdatetime_CFLAGS"; then pkg_cv_libfdatetime_CFLAGS="$libfdatetime_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfdatetime >= 20180910\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfdatetime >= 20180910\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfdatetime >= 20180910") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libfdatetime_CFLAGS=`$PKG_CONFIG --cflags "libfdatetime >= 20180910" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -44481,10 +50141,10 @@ pkg_cv_libfdatetime_LIBS="$libfdatetime_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfdatetime >= 20180910\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfdatetime >= 20180910\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfdatetime >= 20180910") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libfdatetime_LIBS=`$PKG_CONFIG --libs "libfdatetime >= 20180910" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -44498,8 +50158,8 @@ if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -44507,58 +50167,57 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - libfdatetime_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libfdatetime >= 20180910" 2>&1` + libfdatetime_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libfdatetime >= 20180910" 2>&1` else - libfdatetime_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libfdatetime >= 20180910" 2>&1` + libfdatetime_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libfdatetime >= 20180910" 2>&1` fi - # Put the nasty error message in config.log where it belongs - echo "$libfdatetime_PKG_ERRORS" >&5 + # Put the nasty error message in config.log where it belongs + echo "$libfdatetime_PKG_ERRORS" >&5 - ac_cv_libfdatetime=check + ac_cv_libfdatetime=check elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ac_cv_libfdatetime=check + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ac_cv_libfdatetime=check else - libfdatetime_CFLAGS=$pkg_cv_libfdatetime_CFLAGS - libfdatetime_LIBS=$pkg_cv_libfdatetime_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ac_cv_libfdatetime=yes + libfdatetime_CFLAGS=$pkg_cv_libfdatetime_CFLAGS + libfdatetime_LIBS=$pkg_cv_libfdatetime_LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + ac_cv_libfdatetime=yes fi fi - if test "x$ac_cv_libfdatetime" = xyes; then : + if test "x$ac_cv_libfdatetime" = xyes +then : ac_cv_libfdatetime_CPPFLAGS="$pkg_cv_libfdatetime_CFLAGS" ac_cv_libfdatetime_LIBADD="$pkg_cv_libfdatetime_LIBS" fi fi - if test "x$ac_cv_libfdatetime" = xcheck; then : - for ac_header in libfdatetime.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "libfdatetime.h" "ac_cv_header_libfdatetime_h" "$ac_includes_default" -if test "x$ac_cv_header_libfdatetime_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBFDATETIME_H 1 -_ACEOF + if test "x$ac_cv_libfdatetime" = xcheck +then : + ac_fn_c_check_header_compile "$LINENO" "libfdatetime.h" "ac_cv_header_libfdatetime_h" "$ac_includes_default" +if test "x$ac_cv_header_libfdatetime_h" = xyes +then : + printf "%s\n" "#define HAVE_LIBFDATETIME_H 1" >>confdefs.h fi -done - - if test "x$ac_cv_header_libfdatetime_h" = xno; then : + if test "x$ac_cv_header_libfdatetime_h" = xno +then : ac_cv_libfdatetime=no -else +else $as_nop ac_cv_libfdatetime=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_get_version in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_get_version in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_get_version+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_get_version in -lfdatetime" >&5 +printf %s "checking for libfdatetime_get_version in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_get_version+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -44567,41 +50226,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_get_version (); int -main () +main (void) { return libfdatetime_get_version (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_get_version=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_get_version=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_get_version" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_get_version" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_get_version" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_get_version" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_get_version" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_get_version" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_initialize in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_fat_date_time_initialize in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_initialize+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_initialize in -lfdatetime" >&5 +printf %s "checking for libfdatetime_fat_date_time_initialize in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_initialize+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -44610,40 +50269,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_fat_date_time_initialize (); int -main () +main (void) { return libfdatetime_fat_date_time_initialize (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_fat_date_time_initialize=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_fat_date_time_initialize=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_initialize" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_initialize" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_initialize" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_initialize" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_initialize" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_initialize" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_free in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_fat_date_time_free in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_free+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_free in -lfdatetime" >&5 +printf %s "checking for libfdatetime_fat_date_time_free in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_free+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -44652,40 +50311,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_fat_date_time_free (); int -main () +main (void) { return libfdatetime_fat_date_time_free (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_fat_date_time_free=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_fat_date_time_free=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_free" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_free" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_free" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_free" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_free" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_free" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_copy_from_byte_stream in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_fat_date_time_copy_from_byte_stream in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_byte_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_copy_from_byte_stream in -lfdatetime" >&5 +printf %s "checking for libfdatetime_fat_date_time_copy_from_byte_stream in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_byte_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -44694,40 +50353,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_fat_date_time_copy_from_byte_stream (); int -main () +main (void) { return libfdatetime_fat_date_time_copy_from_byte_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_byte_stream=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_byte_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_byte_stream" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_byte_stream" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_byte_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_byte_stream" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_byte_stream" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_byte_stream" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_copy_from_32bit in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_fat_date_time_copy_from_32bit in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_32bit+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_copy_from_32bit in -lfdatetime" >&5 +printf %s "checking for libfdatetime_fat_date_time_copy_from_32bit in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_32bit+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -44736,40 +50395,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_fat_date_time_copy_from_32bit (); int -main () +main (void) { return libfdatetime_fat_date_time_copy_from_32bit (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_32bit=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_32bit=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_32bit" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_32bit" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_32bit" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_32bit" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_32bit" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_32bit" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_copy_to_32bit in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_fat_date_time_copy_to_32bit in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_32bit+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_copy_to_32bit in -lfdatetime" >&5 +printf %s "checking for libfdatetime_fat_date_time_copy_to_32bit in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_32bit+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -44778,40 +50437,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_fat_date_time_copy_to_32bit (); int -main () +main (void) { return libfdatetime_fat_date_time_copy_to_32bit (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_32bit=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_32bit=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_32bit" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_32bit" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_32bit" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_32bit" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_32bit" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_32bit" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_copy_to_utf8_string in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_fat_date_time_copy_to_utf8_string in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_copy_to_utf8_string in -lfdatetime" >&5 +printf %s "checking for libfdatetime_fat_date_time_copy_to_utf8_string in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -44820,40 +50479,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_fat_date_time_copy_to_utf8_string (); int -main () +main (void) { return libfdatetime_fat_date_time_copy_to_utf8_string (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_copy_to_utf8_string_with_index in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_fat_date_time_copy_to_utf8_string_with_index in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string_with_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_copy_to_utf8_string_with_index in -lfdatetime" >&5 +printf %s "checking for libfdatetime_fat_date_time_copy_to_utf8_string_with_index in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string_with_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -44862,40 +50521,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_fat_date_time_copy_to_utf8_string_with_index (); int -main () +main (void) { return libfdatetime_fat_date_time_copy_to_utf8_string_with_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string_with_index=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string_with_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string_with_index" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string_with_index" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string_with_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string_with_index" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string_with_index" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string_with_index" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_copy_to_utf16_string in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_fat_date_time_copy_to_utf16_string in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_copy_to_utf16_string in -lfdatetime" >&5 +printf %s "checking for libfdatetime_fat_date_time_copy_to_utf16_string in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -44904,40 +50563,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_fat_date_time_copy_to_utf16_string (); int -main () +main (void) { return libfdatetime_fat_date_time_copy_to_utf16_string (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_copy_to_utf16_string_with_index in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_fat_date_time_copy_to_utf16_string_with_index in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string_with_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_copy_to_utf16_string_with_index in -lfdatetime" >&5 +printf %s "checking for libfdatetime_fat_date_time_copy_to_utf16_string_with_index in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string_with_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -44946,40 +50605,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_fat_date_time_copy_to_utf16_string_with_index (); int -main () +main (void) { return libfdatetime_fat_date_time_copy_to_utf16_string_with_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string_with_index=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string_with_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string_with_index" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string_with_index" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string_with_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string_with_index" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string_with_index" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string_with_index" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_copy_to_utf32_string in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_fat_date_time_copy_to_utf32_string in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_copy_to_utf32_string in -lfdatetime" >&5 +printf %s "checking for libfdatetime_fat_date_time_copy_to_utf32_string in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -44988,40 +50647,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_fat_date_time_copy_to_utf32_string (); int -main () +main (void) { return libfdatetime_fat_date_time_copy_to_utf32_string (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_copy_to_utf32_string_with_index in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_fat_date_time_copy_to_utf32_string_with_index in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string_with_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_copy_to_utf32_string_with_index in -lfdatetime" >&5 +printf %s "checking for libfdatetime_fat_date_time_copy_to_utf32_string_with_index in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string_with_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -45030,41 +50689,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_fat_date_time_copy_to_utf32_string_with_index (); int -main () +main (void) { return libfdatetime_fat_date_time_copy_to_utf32_string_with_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string_with_index=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string_with_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string_with_index" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string_with_index" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string_with_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string_with_index" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string_with_index" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string_with_index" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_initialize in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_filetime_initialize in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_filetime_initialize+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_initialize in -lfdatetime" >&5 +printf %s "checking for libfdatetime_filetime_initialize in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_filetime_initialize+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -45073,40 +50732,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_filetime_initialize (); int -main () +main (void) { return libfdatetime_filetime_initialize (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_filetime_initialize=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_filetime_initialize=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_initialize" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_filetime_initialize" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_filetime_initialize" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_initialize" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_filetime_initialize" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_filetime_initialize" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_free in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_filetime_free in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_filetime_free+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_free in -lfdatetime" >&5 +printf %s "checking for libfdatetime_filetime_free in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_filetime_free+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -45115,40 +50774,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_filetime_free (); int -main () +main (void) { return libfdatetime_filetime_free (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_filetime_free=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_filetime_free=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_free" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_filetime_free" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_filetime_free" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_free" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_filetime_free" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_filetime_free" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_copy_from_byte_stream in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_filetime_copy_from_byte_stream in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_byte_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_copy_from_byte_stream in -lfdatetime" >&5 +printf %s "checking for libfdatetime_filetime_copy_from_byte_stream in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_byte_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -45157,40 +50816,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_filetime_copy_from_byte_stream (); int -main () +main (void) { return libfdatetime_filetime_copy_from_byte_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_byte_stream=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_byte_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_byte_stream" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_byte_stream" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_byte_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_byte_stream" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_byte_stream" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_byte_stream" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_copy_from_64bit in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_filetime_copy_from_64bit in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_64bit+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_copy_from_64bit in -lfdatetime" >&5 +printf %s "checking for libfdatetime_filetime_copy_from_64bit in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_64bit+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -45199,40 +50858,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_filetime_copy_from_64bit (); int -main () +main (void) { return libfdatetime_filetime_copy_from_64bit (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_64bit=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_64bit=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_64bit" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_64bit" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_64bit" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_64bit" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_64bit" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_64bit" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_copy_to_64bit in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_filetime_copy_to_64bit in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_64bit+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_copy_to_64bit in -lfdatetime" >&5 +printf %s "checking for libfdatetime_filetime_copy_to_64bit in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_64bit+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -45241,40 +50900,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_filetime_copy_to_64bit (); int -main () +main (void) { return libfdatetime_filetime_copy_to_64bit (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_64bit=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_64bit=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_64bit" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_64bit" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_64bit" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_64bit" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_64bit" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_64bit" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_copy_to_utf8_string in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_filetime_copy_to_utf8_string in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_copy_to_utf8_string in -lfdatetime" >&5 +printf %s "checking for libfdatetime_filetime_copy_to_utf8_string in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -45283,40 +50942,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_filetime_copy_to_utf8_string (); int -main () +main (void) { return libfdatetime_filetime_copy_to_utf8_string (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_copy_to_utf8_string_with_index in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_filetime_copy_to_utf8_string_with_index in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string_with_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_copy_to_utf8_string_with_index in -lfdatetime" >&5 +printf %s "checking for libfdatetime_filetime_copy_to_utf8_string_with_index in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string_with_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -45325,40 +50984,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_filetime_copy_to_utf8_string_with_index (); int -main () +main (void) { return libfdatetime_filetime_copy_to_utf8_string_with_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string_with_index=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string_with_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string_with_index" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string_with_index" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string_with_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string_with_index" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string_with_index" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string_with_index" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_copy_to_utf16_string in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_filetime_copy_to_utf16_string in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_copy_to_utf16_string in -lfdatetime" >&5 +printf %s "checking for libfdatetime_filetime_copy_to_utf16_string in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -45367,40 +51026,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_filetime_copy_to_utf16_string (); int -main () +main (void) { return libfdatetime_filetime_copy_to_utf16_string (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_copy_to_utf16_string_with_index in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_filetime_copy_to_utf16_string_with_index in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string_with_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_copy_to_utf16_string_with_index in -lfdatetime" >&5 +printf %s "checking for libfdatetime_filetime_copy_to_utf16_string_with_index in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string_with_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -45409,40 +51068,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_filetime_copy_to_utf16_string_with_index (); int -main () +main (void) { return libfdatetime_filetime_copy_to_utf16_string_with_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string_with_index=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string_with_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string_with_index" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string_with_index" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string_with_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string_with_index" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string_with_index" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string_with_index" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_copy_to_utf32_string in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_filetime_copy_to_utf32_string in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_copy_to_utf32_string in -lfdatetime" >&5 +printf %s "checking for libfdatetime_filetime_copy_to_utf32_string in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -45451,40 +51110,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_filetime_copy_to_utf32_string (); int -main () +main (void) { return libfdatetime_filetime_copy_to_utf32_string (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_copy_to_utf32_string_with_index in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_filetime_copy_to_utf32_string_with_index in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string_with_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_copy_to_utf32_string_with_index in -lfdatetime" >&5 +printf %s "checking for libfdatetime_filetime_copy_to_utf32_string_with_index in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string_with_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -45493,40 +51152,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_filetime_copy_to_utf32_string_with_index (); int -main () +main (void) { return libfdatetime_filetime_copy_to_utf32_string_with_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string_with_index=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string_with_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string_with_index" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string_with_index" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string_with_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string_with_index" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string_with_index" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string_with_index" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_add in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_filetime_add in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_filetime_add+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_add in -lfdatetime" >&5 +printf %s "checking for libfdatetime_filetime_add in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_filetime_add+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -45535,41 +51194,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_filetime_add (); int -main () +main (void) { return libfdatetime_filetime_add (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_filetime_add=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_filetime_add=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_add" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_filetime_add" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_filetime_add" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_add" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_filetime_add" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_filetime_add" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_initialize in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_floatingtime_initialize in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_initialize+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_initialize in -lfdatetime" >&5 +printf %s "checking for libfdatetime_floatingtime_initialize in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_initialize+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -45578,40 +51237,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_floatingtime_initialize (); int -main () +main (void) { return libfdatetime_floatingtime_initialize (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_floatingtime_initialize=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_floatingtime_initialize=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_initialize" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_floatingtime_initialize" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_floatingtime_initialize" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_initialize" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_floatingtime_initialize" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_floatingtime_initialize" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_free in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_floatingtime_free in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_free+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_free in -lfdatetime" >&5 +printf %s "checking for libfdatetime_floatingtime_free in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_free+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -45620,40 +51279,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_floatingtime_free (); int -main () +main (void) { return libfdatetime_floatingtime_free (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_floatingtime_free=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_floatingtime_free=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_free" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_floatingtime_free" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_floatingtime_free" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_free" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_floatingtime_free" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_floatingtime_free" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_copy_from_byte_stream in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_floatingtime_copy_from_byte_stream in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_byte_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_copy_from_byte_stream in -lfdatetime" >&5 +printf %s "checking for libfdatetime_floatingtime_copy_from_byte_stream in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_byte_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -45662,40 +51321,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_floatingtime_copy_from_byte_stream (); int -main () +main (void) { return libfdatetime_floatingtime_copy_from_byte_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_byte_stream=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_byte_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_byte_stream" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_byte_stream" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_byte_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_byte_stream" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_byte_stream" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_byte_stream" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_copy_from_64bit in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_floatingtime_copy_from_64bit in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_64bit+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_copy_from_64bit in -lfdatetime" >&5 +printf %s "checking for libfdatetime_floatingtime_copy_from_64bit in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_64bit+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -45704,40 +51363,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_floatingtime_copy_from_64bit (); int -main () +main (void) { return libfdatetime_floatingtime_copy_from_64bit (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_64bit=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_64bit=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_64bit" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_64bit" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_64bit" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_64bit" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_64bit" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_64bit" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_copy_to_64bit in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_floatingtime_copy_to_64bit in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_64bit+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_copy_to_64bit in -lfdatetime" >&5 +printf %s "checking for libfdatetime_floatingtime_copy_to_64bit in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_64bit+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -45746,40 +51405,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_floatingtime_copy_to_64bit (); int -main () +main (void) { return libfdatetime_floatingtime_copy_to_64bit (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_64bit=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_64bit=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_64bit" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_64bit" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_64bit" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_64bit" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_64bit" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_64bit" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_copy_to_utf8_string in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_floatingtime_copy_to_utf8_string in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_copy_to_utf8_string in -lfdatetime" >&5 +printf %s "checking for libfdatetime_floatingtime_copy_to_utf8_string in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -45788,40 +51447,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_floatingtime_copy_to_utf8_string (); int -main () +main (void) { return libfdatetime_floatingtime_copy_to_utf8_string (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_copy_to_utf8_string_with_index in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_floatingtime_copy_to_utf8_string_with_index in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string_with_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_copy_to_utf8_string_with_index in -lfdatetime" >&5 +printf %s "checking for libfdatetime_floatingtime_copy_to_utf8_string_with_index in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string_with_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -45830,40 +51489,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_floatingtime_copy_to_utf8_string_with_index (); int -main () +main (void) { return libfdatetime_floatingtime_copy_to_utf8_string_with_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string_with_index=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string_with_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string_with_index" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string_with_index" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string_with_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string_with_index" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string_with_index" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string_with_index" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_copy_to_utf16_string in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_floatingtime_copy_to_utf16_string in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_copy_to_utf16_string in -lfdatetime" >&5 +printf %s "checking for libfdatetime_floatingtime_copy_to_utf16_string in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -45872,40 +51531,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_floatingtime_copy_to_utf16_string (); int -main () +main (void) { return libfdatetime_floatingtime_copy_to_utf16_string (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_copy_to_utf16_string_with_index in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_floatingtime_copy_to_utf16_string_with_index in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string_with_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_copy_to_utf16_string_with_index in -lfdatetime" >&5 +printf %s "checking for libfdatetime_floatingtime_copy_to_utf16_string_with_index in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string_with_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -45914,40 +51573,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_floatingtime_copy_to_utf16_string_with_index (); int -main () +main (void) { return libfdatetime_floatingtime_copy_to_utf16_string_with_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string_with_index=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string_with_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string_with_index" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string_with_index" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string_with_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string_with_index" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string_with_index" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string_with_index" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_copy_to_utf32_string in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_floatingtime_copy_to_utf32_string in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_copy_to_utf32_string in -lfdatetime" >&5 +printf %s "checking for libfdatetime_floatingtime_copy_to_utf32_string in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -45956,40 +51615,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_floatingtime_copy_to_utf32_string (); int -main () +main (void) { return libfdatetime_floatingtime_copy_to_utf32_string (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_copy_to_utf32_string_with_index in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_floatingtime_copy_to_utf32_string_with_index in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string_with_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_copy_to_utf32_string_with_index in -lfdatetime" >&5 +printf %s "checking for libfdatetime_floatingtime_copy_to_utf32_string_with_index in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string_with_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -45998,41 +51657,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_floatingtime_copy_to_utf32_string_with_index (); int -main () +main (void) { return libfdatetime_floatingtime_copy_to_utf32_string_with_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string_with_index=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string_with_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string_with_index" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string_with_index" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string_with_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string_with_index" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string_with_index" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string_with_index" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_hfs_time_initialize in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_hfs_time_initialize in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_hfs_time_initialize+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_hfs_time_initialize in -lfdatetime" >&5 +printf %s "checking for libfdatetime_hfs_time_initialize in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_hfs_time_initialize+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -46041,40 +51700,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_hfs_time_initialize (); int -main () +main (void) { return libfdatetime_hfs_time_initialize (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_hfs_time_initialize=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_hfs_time_initialize=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_hfs_time_initialize" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_hfs_time_initialize" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_hfs_time_initialize" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_hfs_time_initialize" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_hfs_time_initialize" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_hfs_time_initialize" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_hfs_time_free in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_hfs_time_free in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_hfs_time_free+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_hfs_time_free in -lfdatetime" >&5 +printf %s "checking for libfdatetime_hfs_time_free in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_hfs_time_free+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -46083,40 +51742,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_hfs_time_free (); int -main () +main (void) { return libfdatetime_hfs_time_free (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_hfs_time_free=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_hfs_time_free=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_hfs_time_free" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_hfs_time_free" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_hfs_time_free" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_hfs_time_free" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_hfs_time_free" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_hfs_time_free" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_hfs_time_copy_from_byte_stream in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_hfs_time_copy_from_byte_stream in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_from_byte_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_hfs_time_copy_from_byte_stream in -lfdatetime" >&5 +printf %s "checking for libfdatetime_hfs_time_copy_from_byte_stream in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_from_byte_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -46125,40 +51784,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_hfs_time_copy_from_byte_stream (); int -main () +main (void) { return libfdatetime_hfs_time_copy_from_byte_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_from_byte_stream=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_from_byte_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_from_byte_stream" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_from_byte_stream" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_from_byte_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_from_byte_stream" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_from_byte_stream" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_from_byte_stream" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_hfs_time_copy_from_32bit in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_hfs_time_copy_from_32bit in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_from_32bit+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_hfs_time_copy_from_32bit in -lfdatetime" >&5 +printf %s "checking for libfdatetime_hfs_time_copy_from_32bit in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_from_32bit+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -46167,40 +51826,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_hfs_time_copy_from_32bit (); int -main () +main (void) { return libfdatetime_hfs_time_copy_from_32bit (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_from_32bit=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_from_32bit=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_from_32bit" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_from_32bit" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_from_32bit" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_from_32bit" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_from_32bit" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_from_32bit" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_hfs_time_copy_to_32bit in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_hfs_time_copy_to_32bit in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_32bit+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_hfs_time_copy_to_32bit in -lfdatetime" >&5 +printf %s "checking for libfdatetime_hfs_time_copy_to_32bit in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_32bit+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -46209,40 +51868,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_hfs_time_copy_to_32bit (); int -main () +main (void) { return libfdatetime_hfs_time_copy_to_32bit (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_32bit=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_32bit=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_32bit" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_32bit" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_32bit" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_32bit" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_32bit" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_32bit" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_hfs_time_copy_to_utf8_string in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_hfs_time_copy_to_utf8_string in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf8_string+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_hfs_time_copy_to_utf8_string in -lfdatetime" >&5 +printf %s "checking for libfdatetime_hfs_time_copy_to_utf8_string in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf8_string+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -46251,40 +51910,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_hfs_time_copy_to_utf8_string (); int -main () +main (void) { return libfdatetime_hfs_time_copy_to_utf8_string (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf8_string=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf8_string=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf8_string" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf8_string" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf8_string" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf8_string" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf8_string" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf8_string" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_hfs_time_copy_to_utf8_string_with_index in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_hfs_time_copy_to_utf8_string_with_index in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf8_string_with_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_hfs_time_copy_to_utf8_string_with_index in -lfdatetime" >&5 +printf %s "checking for libfdatetime_hfs_time_copy_to_utf8_string_with_index in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf8_string_with_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -46293,40 +51952,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_hfs_time_copy_to_utf8_string_with_index (); int -main () +main (void) { return libfdatetime_hfs_time_copy_to_utf8_string_with_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf8_string_with_index=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf8_string_with_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf8_string_with_index" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf8_string_with_index" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf8_string_with_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf8_string_with_index" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf8_string_with_index" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf8_string_with_index" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_hfs_time_copy_to_utf16_string in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_hfs_time_copy_to_utf16_string in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf16_string+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_hfs_time_copy_to_utf16_string in -lfdatetime" >&5 +printf %s "checking for libfdatetime_hfs_time_copy_to_utf16_string in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf16_string+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -46335,40 +51994,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_hfs_time_copy_to_utf16_string (); int -main () +main (void) { return libfdatetime_hfs_time_copy_to_utf16_string (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf16_string=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf16_string=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf16_string" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf16_string" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf16_string" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf16_string" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf16_string" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf16_string" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_hfs_time_copy_to_utf16_string_with_index in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_hfs_time_copy_to_utf16_string_with_index in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf16_string_with_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_hfs_time_copy_to_utf16_string_with_index in -lfdatetime" >&5 +printf %s "checking for libfdatetime_hfs_time_copy_to_utf16_string_with_index in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf16_string_with_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -46377,40 +52036,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_hfs_time_copy_to_utf16_string_with_index (); int -main () +main (void) { return libfdatetime_hfs_time_copy_to_utf16_string_with_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf16_string_with_index=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf16_string_with_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf16_string_with_index" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf16_string_with_index" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf16_string_with_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf16_string_with_index" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf16_string_with_index" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf16_string_with_index" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_hfs_time_copy_to_utf32_string in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_hfs_time_copy_to_utf32_string in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf32_string+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_hfs_time_copy_to_utf32_string in -lfdatetime" >&5 +printf %s "checking for libfdatetime_hfs_time_copy_to_utf32_string in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf32_string+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -46419,40 +52078,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_hfs_time_copy_to_utf32_string (); int -main () +main (void) { return libfdatetime_hfs_time_copy_to_utf32_string (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf32_string=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf32_string=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf32_string" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf32_string" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf32_string" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf32_string" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf32_string" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf32_string" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_hfs_time_copy_to_utf32_string_with_index in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_hfs_time_copy_to_utf32_string_with_index in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf32_string_with_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_hfs_time_copy_to_utf32_string_with_index in -lfdatetime" >&5 +printf %s "checking for libfdatetime_hfs_time_copy_to_utf32_string_with_index in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf32_string_with_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -46461,41 +52120,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_hfs_time_copy_to_utf32_string_with_index (); int -main () +main (void) { return libfdatetime_hfs_time_copy_to_utf32_string_with_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf32_string_with_index=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf32_string_with_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf32_string_with_index" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf32_string_with_index" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf32_string_with_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf32_string_with_index" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf32_string_with_index" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf32_string_with_index" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_initialize in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_nsf_timedate_initialize in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_initialize+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_initialize in -lfdatetime" >&5 +printf %s "checking for libfdatetime_nsf_timedate_initialize in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_initialize+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -46504,40 +52163,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_nsf_timedate_initialize (); int -main () +main (void) { return libfdatetime_nsf_timedate_initialize (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_initialize=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_initialize=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_initialize" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_initialize" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_initialize" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_initialize" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_initialize" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_initialize" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_free in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_nsf_timedate_free in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_free+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_free in -lfdatetime" >&5 +printf %s "checking for libfdatetime_nsf_timedate_free in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_free+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -46546,40 +52205,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_nsf_timedate_free (); int -main () +main (void) { return libfdatetime_nsf_timedate_free (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_free=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_free=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_free" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_free" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_free" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_free" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_free" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_free" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_copy_from_byte_stream in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_nsf_timedate_copy_from_byte_stream in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_byte_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_copy_from_byte_stream in -lfdatetime" >&5 +printf %s "checking for libfdatetime_nsf_timedate_copy_from_byte_stream in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_byte_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -46588,40 +52247,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_nsf_timedate_copy_from_byte_stream (); int -main () +main (void) { return libfdatetime_nsf_timedate_copy_from_byte_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_byte_stream=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_byte_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_byte_stream" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_byte_stream" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_byte_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_byte_stream" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_byte_stream" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_byte_stream" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_copy_from_64bit in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_nsf_timedate_copy_from_64bit in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_64bit+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_copy_from_64bit in -lfdatetime" >&5 +printf %s "checking for libfdatetime_nsf_timedate_copy_from_64bit in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_64bit+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -46630,40 +52289,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_nsf_timedate_copy_from_64bit (); int -main () +main (void) { return libfdatetime_nsf_timedate_copy_from_64bit (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_64bit=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_64bit=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_64bit" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_64bit" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_64bit" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_64bit" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_64bit" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_64bit" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_copy_to_64bit in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_nsf_timedate_copy_to_64bit in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_64bit+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_copy_to_64bit in -lfdatetime" >&5 +printf %s "checking for libfdatetime_nsf_timedate_copy_to_64bit in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_64bit+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -46672,40 +52331,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_nsf_timedate_copy_to_64bit (); int -main () +main (void) { return libfdatetime_nsf_timedate_copy_to_64bit (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_64bit=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_64bit=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_64bit" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_64bit" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_64bit" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_64bit" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_64bit" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_64bit" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_copy_to_utf8_string in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_nsf_timedate_copy_to_utf8_string in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_copy_to_utf8_string in -lfdatetime" >&5 +printf %s "checking for libfdatetime_nsf_timedate_copy_to_utf8_string in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -46714,40 +52373,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_nsf_timedate_copy_to_utf8_string (); int -main () +main (void) { return libfdatetime_nsf_timedate_copy_to_utf8_string (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_copy_to_utf8_string_with_index in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_nsf_timedate_copy_to_utf8_string_with_index in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string_with_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_copy_to_utf8_string_with_index in -lfdatetime" >&5 +printf %s "checking for libfdatetime_nsf_timedate_copy_to_utf8_string_with_index in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string_with_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -46756,40 +52415,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_nsf_timedate_copy_to_utf8_string_with_index (); int -main () +main (void) { return libfdatetime_nsf_timedate_copy_to_utf8_string_with_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string_with_index=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string_with_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string_with_index" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string_with_index" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string_with_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string_with_index" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string_with_index" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string_with_index" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_copy_to_utf16_string in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_nsf_timedate_copy_to_utf16_string in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_copy_to_utf16_string in -lfdatetime" >&5 +printf %s "checking for libfdatetime_nsf_timedate_copy_to_utf16_string in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -46798,40 +52457,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_nsf_timedate_copy_to_utf16_string (); int -main () +main (void) { return libfdatetime_nsf_timedate_copy_to_utf16_string (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_copy_to_utf16_string_with_index in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_nsf_timedate_copy_to_utf16_string_with_index in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string_with_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_copy_to_utf16_string_with_index in -lfdatetime" >&5 +printf %s "checking for libfdatetime_nsf_timedate_copy_to_utf16_string_with_index in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string_with_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -46840,40 +52499,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_nsf_timedate_copy_to_utf16_string_with_index (); int -main () +main (void) { return libfdatetime_nsf_timedate_copy_to_utf16_string_with_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string_with_index=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string_with_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string_with_index" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string_with_index" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string_with_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string_with_index" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string_with_index" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string_with_index" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_copy_to_utf32_string in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_nsf_timedate_copy_to_utf32_string in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_copy_to_utf32_string in -lfdatetime" >&5 +printf %s "checking for libfdatetime_nsf_timedate_copy_to_utf32_string in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -46882,40 +52541,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_nsf_timedate_copy_to_utf32_string (); int -main () +main (void) { return libfdatetime_nsf_timedate_copy_to_utf32_string (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_copy_to_utf32_string_with_index in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_nsf_timedate_copy_to_utf32_string_with_index in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string_with_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_copy_to_utf32_string_with_index in -lfdatetime" >&5 +printf %s "checking for libfdatetime_nsf_timedate_copy_to_utf32_string_with_index in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string_with_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -46924,41 +52583,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_nsf_timedate_copy_to_utf32_string_with_index (); int -main () +main (void) { return libfdatetime_nsf_timedate_copy_to_utf32_string_with_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string_with_index=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string_with_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string_with_index" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string_with_index" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string_with_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string_with_index" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string_with_index" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string_with_index" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_initialize in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_posix_time_initialize in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_posix_time_initialize+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_initialize in -lfdatetime" >&5 +printf %s "checking for libfdatetime_posix_time_initialize in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_posix_time_initialize+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -46967,40 +52626,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_posix_time_initialize (); int -main () +main (void) { return libfdatetime_posix_time_initialize (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_posix_time_initialize=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_posix_time_initialize=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_initialize" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_posix_time_initialize" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_initialize" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_initialize" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_posix_time_initialize" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_initialize" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_free in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_posix_time_free in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_posix_time_free+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_free in -lfdatetime" >&5 +printf %s "checking for libfdatetime_posix_time_free in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_posix_time_free+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -47009,40 +52668,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_posix_time_free (); int -main () +main (void) { return libfdatetime_posix_time_free (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_posix_time_free=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_posix_time_free=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_free" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_posix_time_free" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_free" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_free" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_posix_time_free" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_free" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_from_byte_stream in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_posix_time_copy_from_byte_stream in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_byte_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_from_byte_stream in -lfdatetime" >&5 +printf %s "checking for libfdatetime_posix_time_copy_from_byte_stream in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_byte_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -47051,40 +52710,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_posix_time_copy_from_byte_stream (); int -main () +main (void) { return libfdatetime_posix_time_copy_from_byte_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_byte_stream=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_byte_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_byte_stream" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_byte_stream" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_byte_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_byte_stream" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_byte_stream" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_byte_stream" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_from_32bit in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_posix_time_copy_from_32bit in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_32bit+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_from_32bit in -lfdatetime" >&5 +printf %s "checking for libfdatetime_posix_time_copy_from_32bit in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_32bit+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -47093,40 +52752,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_posix_time_copy_from_32bit (); int -main () +main (void) { return libfdatetime_posix_time_copy_from_32bit (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_32bit=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_32bit=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_32bit" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_32bit" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_32bit" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_32bit" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_32bit" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_32bit" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_to_32bit in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_posix_time_copy_to_32bit in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_32bit+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_to_32bit in -lfdatetime" >&5 +printf %s "checking for libfdatetime_posix_time_copy_to_32bit in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_32bit+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -47135,40 +52794,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_posix_time_copy_to_32bit (); int -main () +main (void) { return libfdatetime_posix_time_copy_to_32bit (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_32bit=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_32bit=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_32bit" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_32bit" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_32bit" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_32bit" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_32bit" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_32bit" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_from_64bit in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_posix_time_copy_from_64bit in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_64bit+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_from_64bit in -lfdatetime" >&5 +printf %s "checking for libfdatetime_posix_time_copy_from_64bit in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_64bit+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -47177,40 +52836,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_posix_time_copy_from_64bit (); int -main () +main (void) { return libfdatetime_posix_time_copy_from_64bit (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_64bit=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_64bit=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_64bit" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_64bit" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_64bit" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_64bit" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_64bit" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_64bit" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_to_64bit in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_posix_time_copy_to_64bit in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_64bit+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_to_64bit in -lfdatetime" >&5 +printf %s "checking for libfdatetime_posix_time_copy_to_64bit in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_64bit+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -47219,40 +52878,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_posix_time_copy_to_64bit (); int -main () +main (void) { return libfdatetime_posix_time_copy_to_64bit (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_64bit=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_64bit=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_64bit" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_64bit" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_64bit" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_64bit" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_64bit" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_64bit" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_to_utf8_string in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_posix_time_copy_to_utf8_string in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_to_utf8_string in -lfdatetime" >&5 +printf %s "checking for libfdatetime_posix_time_copy_to_utf8_string in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -47261,40 +52920,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_posix_time_copy_to_utf8_string (); int -main () +main (void) { return libfdatetime_posix_time_copy_to_utf8_string (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_to_utf8_string_with_index in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_posix_time_copy_to_utf8_string_with_index in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string_with_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_to_utf8_string_with_index in -lfdatetime" >&5 +printf %s "checking for libfdatetime_posix_time_copy_to_utf8_string_with_index in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string_with_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -47303,40 +52962,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_posix_time_copy_to_utf8_string_with_index (); int -main () +main (void) { return libfdatetime_posix_time_copy_to_utf8_string_with_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string_with_index=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string_with_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string_with_index" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string_with_index" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string_with_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string_with_index" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string_with_index" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string_with_index" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_to_utf16_string in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_posix_time_copy_to_utf16_string in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_to_utf16_string in -lfdatetime" >&5 +printf %s "checking for libfdatetime_posix_time_copy_to_utf16_string in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -47345,40 +53004,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_posix_time_copy_to_utf16_string (); int -main () +main (void) { return libfdatetime_posix_time_copy_to_utf16_string (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_to_utf16_string_with_index in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_posix_time_copy_to_utf16_string_with_index in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string_with_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_to_utf16_string_with_index in -lfdatetime" >&5 +printf %s "checking for libfdatetime_posix_time_copy_to_utf16_string_with_index in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string_with_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -47387,40 +53046,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_posix_time_copy_to_utf16_string_with_index (); int -main () +main (void) { return libfdatetime_posix_time_copy_to_utf16_string_with_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string_with_index=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string_with_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string_with_index" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string_with_index" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string_with_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string_with_index" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string_with_index" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string_with_index" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_to_utf32_string in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_posix_time_copy_to_utf32_string in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_to_utf32_string in -lfdatetime" >&5 +printf %s "checking for libfdatetime_posix_time_copy_to_utf32_string in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -47429,40 +53088,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_posix_time_copy_to_utf32_string (); int -main () +main (void) { return libfdatetime_posix_time_copy_to_utf32_string (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_to_utf32_string_with_index in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_posix_time_copy_to_utf32_string_with_index in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string_with_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_to_utf32_string_with_index in -lfdatetime" >&5 +printf %s "checking for libfdatetime_posix_time_copy_to_utf32_string_with_index in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string_with_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -47471,41 +53130,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_posix_time_copy_to_utf32_string_with_index (); int -main () +main (void) { return libfdatetime_posix_time_copy_to_utf32_string_with_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string_with_index=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string_with_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string_with_index" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string_with_index" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string_with_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string_with_index" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string_with_index" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string_with_index" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_systemetime_initialize in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_systemetime_initialize in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_systemetime_initialize+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_systemetime_initialize in -lfdatetime" >&5 +printf %s "checking for libfdatetime_systemetime_initialize in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_systemetime_initialize+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -47514,40 +53173,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_systemetime_initialize (); int -main () +main (void) { return libfdatetime_systemetime_initialize (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_systemetime_initialize=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_systemetime_initialize=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_systemetime_initialize" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_systemetime_initialize" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_systemetime_initialize" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_systemetime_initialize" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_systemetime_initialize" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_systemetime_initialize" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_systemetime_free in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_systemetime_free in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_systemetime_free+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_systemetime_free in -lfdatetime" >&5 +printf %s "checking for libfdatetime_systemetime_free in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_systemetime_free+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -47556,40 +53215,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_systemetime_free (); int -main () +main (void) { return libfdatetime_systemetime_free (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_systemetime_free=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_systemetime_free=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_systemetime_free" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_systemetime_free" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_systemetime_free" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_systemetime_free" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_systemetime_free" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_systemetime_free" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_systemetime_copy_from_byte_stream in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_systemetime_copy_from_byte_stream in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_from_byte_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_systemetime_copy_from_byte_stream in -lfdatetime" >&5 +printf %s "checking for libfdatetime_systemetime_copy_from_byte_stream in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_from_byte_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -47598,40 +53257,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_systemetime_copy_from_byte_stream (); int -main () +main (void) { return libfdatetime_systemetime_copy_from_byte_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_from_byte_stream=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_from_byte_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_from_byte_stream" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_from_byte_stream" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_from_byte_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_from_byte_stream" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_from_byte_stream" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_from_byte_stream" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_systemetime_copy_to_utf8_string in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_systemetime_copy_to_utf8_string in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_systemetime_copy_to_utf8_string in -lfdatetime" >&5 +printf %s "checking for libfdatetime_systemetime_copy_to_utf8_string in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -47640,40 +53299,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_systemetime_copy_to_utf8_string (); int -main () +main (void) { return libfdatetime_systemetime_copy_to_utf8_string (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_systemetime_copy_to_utf8_string_with_index in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_systemetime_copy_to_utf8_string_with_index in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string_with_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_systemetime_copy_to_utf8_string_with_index in -lfdatetime" >&5 +printf %s "checking for libfdatetime_systemetime_copy_to_utf8_string_with_index in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string_with_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -47682,40 +53341,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_systemetime_copy_to_utf8_string_with_index (); int -main () +main (void) { return libfdatetime_systemetime_copy_to_utf8_string_with_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string_with_index=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string_with_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string_with_index" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string_with_index" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string_with_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string_with_index" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string_with_index" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string_with_index" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_systemetime_copy_to_utf16_string in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_systemetime_copy_to_utf16_string in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_systemetime_copy_to_utf16_string in -lfdatetime" >&5 +printf %s "checking for libfdatetime_systemetime_copy_to_utf16_string in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -47724,40 +53383,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_systemetime_copy_to_utf16_string (); int -main () +main (void) { return libfdatetime_systemetime_copy_to_utf16_string (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_systemetime_copy_to_utf16_string_with_index in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_systemetime_copy_to_utf16_string_with_index in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string_with_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_systemetime_copy_to_utf16_string_with_index in -lfdatetime" >&5 +printf %s "checking for libfdatetime_systemetime_copy_to_utf16_string_with_index in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string_with_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -47766,40 +53425,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_systemetime_copy_to_utf16_string_with_index (); int -main () +main (void) { return libfdatetime_systemetime_copy_to_utf16_string_with_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string_with_index=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string_with_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string_with_index" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string_with_index" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string_with_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string_with_index" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string_with_index" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string_with_index" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_systemetime_copy_to_utf32_string in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_systemetime_copy_to_utf32_string in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_systemetime_copy_to_utf32_string in -lfdatetime" >&5 +printf %s "checking for libfdatetime_systemetime_copy_to_utf32_string in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -47808,40 +53467,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_systemetime_copy_to_utf32_string (); int -main () +main (void) { return libfdatetime_systemetime_copy_to_utf32_string (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_systemetime_copy_to_utf32_string_with_index in -lfdatetime" >&5 -$as_echo_n "checking for libfdatetime_systemetime_copy_to_utf32_string_with_index in -lfdatetime... " >&6; } -if ${ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string_with_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_systemetime_copy_to_utf32_string_with_index in -lfdatetime" >&5 +printf %s "checking for libfdatetime_systemetime_copy_to_utf32_string_with_index in -lfdatetime... " >&6; } +if test ${ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string_with_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -47850,32 +53509,31 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfdatetime_systemetime_copy_to_utf32_string_with_index (); int -main () +main (void) { return libfdatetime_systemetime_copy_to_utf32_string_with_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string_with_index=yes -else +else $as_nop ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string_with_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string_with_index" >&5 -$as_echo "$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string_with_index" >&6; } -if test "x$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string_with_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string_with_index" >&5 +printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string_with_index" >&6; } +if test "x$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string_with_index" = xyes +then : ac_cv_libfdatetime_dummy=yes -else +else $as_nop ac_cv_libfdatetime=no fi @@ -47884,9 +53542,10 @@ fi fi - if test "x$ac_cv_with_libfdatetime" != x && test "x$ac_cv_with_libfdatetime" != xauto-detect && test "x$ac_cv_libfdatetime" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_with_libfdatetime" != x && test "x$ac_cv_with_libfdatetime" != xauto-detect && test "x$ac_cv_libfdatetime" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "unable to find supported libfdatetime in directory: $ac_cv_with_libfdatetime See \`config.log' for more details" "$LINENO" 5; } @@ -47894,24 +53553,27 @@ fi - if test "x$ac_cv_libfdatetime" = xyes; then : + if test "x$ac_cv_libfdatetime" = xyes +then : -$as_echo "#define HAVE_LIBFDATETIME 1" >>confdefs.h +printf "%s\n" "#define HAVE_LIBFDATETIME 1" >>confdefs.h fi - if test "x$ac_cv_libfdatetime" = xyes; then : + if test "x$ac_cv_libfdatetime" = xyes +then : HAVE_LIBFDATETIME=1 -else +else $as_nop HAVE_LIBFDATETIME=0 fi - if test "x$ac_cv_libfdatetime" != xyes; then : + if test "x$ac_cv_libfdatetime" != xyes +then : ac_cv_libfdatetime_CPPFLAGS="-I../libfdatetime"; ac_cv_libfdatetime_LIBADD="../libfdatetime/libfdatetime.la"; @@ -47920,7 +53582,7 @@ -$as_echo "#define HAVE_LOCAL_LIBFDATETIME 1" >>confdefs.h +printf "%s\n" "#define HAVE_LOCAL_LIBFDATETIME 1" >>confdefs.h HAVE_LOCAL_LIBFDATETIME=1 @@ -47935,24 +53597,28 @@ HAVE_LOCAL_LIBFDATETIME_FALSE= fi - if test "x$ac_cv_libfdatetime_CPPFLAGS" != "x"; then : + if test "x$ac_cv_libfdatetime_CPPFLAGS" != "x" +then : LIBFDATETIME_CPPFLAGS=$ac_cv_libfdatetime_CPPFLAGS fi - if test "x$ac_cv_libfdatetime_LIBADD" != "x"; then : + if test "x$ac_cv_libfdatetime_LIBADD" != "x" +then : LIBFDATETIME_LIBADD=$ac_cv_libfdatetime_LIBADD fi - if test "x$ac_cv_libfdatetime" = xyes; then : + if test "x$ac_cv_libfdatetime" = xyes +then : ax_libfdatetime_pc_libs_private=-lfdatetime fi - if test "x$ac_cv_libfdatetime" = xyes; then : + if test "x$ac_cv_libfdatetime" = xyes +then : ax_libfdatetime_spec_requires=libfdatetime ax_libfdatetime_spec_build_requires=libfdatetime-devel @@ -47964,53 +53630,59 @@ # Check whether --with-libfguid was given. -if test "${with_libfguid+set}" = set; then : +if test ${with_libfguid+y} +then : withval=$with_libfguid; ac_cv_with_libfguid=$withval -else +else $as_nop ac_cv_with_libfguid=auto-detect fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libfguid in includedir and libdir or in the specified DIR, or no if to use local version" >&5 -$as_echo_n "checking whether to use search for libfguid in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } -if ${ac_cv_with_libfguid+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use search for libfguid in includedir and libdir or in the specified DIR, or no if to use local version" >&5 +printf %s "checking whether to use search for libfguid in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } +if test ${ac_cv_with_libfguid+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_with_libfguid=auto-detect fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libfguid" >&5 -$as_echo "$ac_cv_with_libfguid" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libfguid" >&5 +printf "%s\n" "$ac_cv_with_libfguid" >&6; } - if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libfguid" = xno; then : + if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libfguid" = xno +then : ac_cv_libfguid=no -else +else $as_nop ac_cv_libfguid=check - if test "x$ac_cv_with_libfguid" != x && test "x$ac_cv_with_libfguid" != xauto-detect; then : - if test -d "$ac_cv_with_libfguid"; then : + if test "x$ac_cv_with_libfguid" != x && test "x$ac_cv_with_libfguid" != xauto-detect +then : + if test -d "$ac_cv_with_libfguid" +then : CFLAGS="$CFLAGS -I${ac_cv_with_libfguid}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libfguid}/lib" -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "no such directory: $ac_cv_with_libfguid See \`config.log' for more details" "$LINENO" 5; } fi -else - if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : +else $as_nop + if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x" +then : pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfguid" >&5 -$as_echo_n "checking for libfguid... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfguid >= 20120426" >&5 +printf %s "checking for libfguid >= 20120426... " >&6; } if test -n "$libfguid_CFLAGS"; then pkg_cv_libfguid_CFLAGS="$libfguid_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfguid >= 20120426\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfguid >= 20120426\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfguid >= 20120426") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libfguid_CFLAGS=`$PKG_CONFIG --cflags "libfguid >= 20120426" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -48024,10 +53696,10 @@ pkg_cv_libfguid_LIBS="$libfguid_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfguid >= 20120426\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfguid >= 20120426\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfguid >= 20120426") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libfguid_LIBS=`$PKG_CONFIG --libs "libfguid >= 20120426" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -48041,8 +53713,8 @@ if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -48050,58 +53722,57 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - libfguid_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libfguid >= 20120426" 2>&1` + libfguid_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libfguid >= 20120426" 2>&1` else - libfguid_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libfguid >= 20120426" 2>&1` + libfguid_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libfguid >= 20120426" 2>&1` fi - # Put the nasty error message in config.log where it belongs - echo "$libfguid_PKG_ERRORS" >&5 + # Put the nasty error message in config.log where it belongs + echo "$libfguid_PKG_ERRORS" >&5 - ac_cv_libfguid=check + ac_cv_libfguid=check elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ac_cv_libfguid=check + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ac_cv_libfguid=check else - libfguid_CFLAGS=$pkg_cv_libfguid_CFLAGS - libfguid_LIBS=$pkg_cv_libfguid_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ac_cv_libfguid=yes + libfguid_CFLAGS=$pkg_cv_libfguid_CFLAGS + libfguid_LIBS=$pkg_cv_libfguid_LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + ac_cv_libfguid=yes fi fi - if test "x$ac_cv_libfguid" = xyes; then : + if test "x$ac_cv_libfguid" = xyes +then : ac_cv_libfguid_CPPFLAGS="$pkg_cv_libfguid_CFLAGS" ac_cv_libfguid_LIBADD="$pkg_cv_libfguid_LIBS" fi fi - if test "x$ac_cv_libfguid" = xcheck; then : - for ac_header in libfguid.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "libfguid.h" "ac_cv_header_libfguid_h" "$ac_includes_default" -if test "x$ac_cv_header_libfguid_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBFGUID_H 1 -_ACEOF + if test "x$ac_cv_libfguid" = xcheck +then : + ac_fn_c_check_header_compile "$LINENO" "libfguid.h" "ac_cv_header_libfguid_h" "$ac_includes_default" +if test "x$ac_cv_header_libfguid_h" = xyes +then : + printf "%s\n" "#define HAVE_LIBFGUID_H 1" >>confdefs.h fi -done - - if test "x$ac_cv_header_libfguid_h" = xno; then : + if test "x$ac_cv_header_libfguid_h" = xno +then : ac_cv_libfguid=no -else +else $as_nop ac_cv_libfguid=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfguid_get_version in -lfguid" >&5 -$as_echo_n "checking for libfguid_get_version in -lfguid... " >&6; } -if ${ac_cv_lib_fguid_libfguid_get_version+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfguid_get_version in -lfguid" >&5 +printf %s "checking for libfguid_get_version in -lfguid... " >&6; } +if test ${ac_cv_lib_fguid_libfguid_get_version+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfguid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -48110,41 +53781,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfguid_get_version (); int -main () +main (void) { return libfguid_get_version (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fguid_libfguid_get_version=yes -else +else $as_nop ac_cv_lib_fguid_libfguid_get_version=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_get_version" >&5 -$as_echo "$ac_cv_lib_fguid_libfguid_get_version" >&6; } -if test "x$ac_cv_lib_fguid_libfguid_get_version" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_get_version" >&5 +printf "%s\n" "$ac_cv_lib_fguid_libfguid_get_version" >&6; } +if test "x$ac_cv_lib_fguid_libfguid_get_version" = xyes +then : ac_cv_libfguid_dummy=yes -else +else $as_nop ac_cv_libfguid=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_initialize in -lfguid" >&5 -$as_echo_n "checking for libfguid_identifier_initialize in -lfguid... " >&6; } -if ${ac_cv_lib_fguid_libfguid_identifier_initialize+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_initialize in -lfguid" >&5 +printf %s "checking for libfguid_identifier_initialize in -lfguid... " >&6; } +if test ${ac_cv_lib_fguid_libfguid_identifier_initialize+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfguid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -48153,40 +53824,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfguid_identifier_initialize (); int -main () +main (void) { return libfguid_identifier_initialize (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fguid_libfguid_identifier_initialize=yes -else +else $as_nop ac_cv_lib_fguid_libfguid_identifier_initialize=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_initialize" >&5 -$as_echo "$ac_cv_lib_fguid_libfguid_identifier_initialize" >&6; } -if test "x$ac_cv_lib_fguid_libfguid_identifier_initialize" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_initialize" >&5 +printf "%s\n" "$ac_cv_lib_fguid_libfguid_identifier_initialize" >&6; } +if test "x$ac_cv_lib_fguid_libfguid_identifier_initialize" = xyes +then : ac_cv_libfguid_dummy=yes -else +else $as_nop ac_cv_libfguid=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_free in -lfguid" >&5 -$as_echo_n "checking for libfguid_identifier_free in -lfguid... " >&6; } -if ${ac_cv_lib_fguid_libfguid_identifier_free+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_free in -lfguid" >&5 +printf %s "checking for libfguid_identifier_free in -lfguid... " >&6; } +if test ${ac_cv_lib_fguid_libfguid_identifier_free+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfguid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -48195,40 +53866,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfguid_identifier_free (); int -main () +main (void) { return libfguid_identifier_free (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fguid_libfguid_identifier_free=yes -else +else $as_nop ac_cv_lib_fguid_libfguid_identifier_free=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_free" >&5 -$as_echo "$ac_cv_lib_fguid_libfguid_identifier_free" >&6; } -if test "x$ac_cv_lib_fguid_libfguid_identifier_free" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_free" >&5 +printf "%s\n" "$ac_cv_lib_fguid_libfguid_identifier_free" >&6; } +if test "x$ac_cv_lib_fguid_libfguid_identifier_free" = xyes +then : ac_cv_libfguid_dummy=yes -else +else $as_nop ac_cv_libfguid=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_copy_from_byte_stream in -lfguid" >&5 -$as_echo_n "checking for libfguid_identifier_copy_from_byte_stream in -lfguid... " >&6; } -if ${ac_cv_lib_fguid_libfguid_identifier_copy_from_byte_stream+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_copy_from_byte_stream in -lfguid" >&5 +printf %s "checking for libfguid_identifier_copy_from_byte_stream in -lfguid... " >&6; } +if test ${ac_cv_lib_fguid_libfguid_identifier_copy_from_byte_stream+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfguid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -48237,40 +53908,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfguid_identifier_copy_from_byte_stream (); int -main () +main (void) { return libfguid_identifier_copy_from_byte_stream (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fguid_libfguid_identifier_copy_from_byte_stream=yes -else +else $as_nop ac_cv_lib_fguid_libfguid_identifier_copy_from_byte_stream=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_copy_from_byte_stream" >&5 -$as_echo "$ac_cv_lib_fguid_libfguid_identifier_copy_from_byte_stream" >&6; } -if test "x$ac_cv_lib_fguid_libfguid_identifier_copy_from_byte_stream" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_copy_from_byte_stream" >&5 +printf "%s\n" "$ac_cv_lib_fguid_libfguid_identifier_copy_from_byte_stream" >&6; } +if test "x$ac_cv_lib_fguid_libfguid_identifier_copy_from_byte_stream" = xyes +then : ac_cv_libfguid_dummy=yes -else +else $as_nop ac_cv_libfguid=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_get_string_size in -lfguid" >&5 -$as_echo_n "checking for libfguid_identifier_get_string_size in -lfguid... " >&6; } -if ${ac_cv_lib_fguid_libfguid_identifier_get_string_size+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_get_string_size in -lfguid" >&5 +printf %s "checking for libfguid_identifier_get_string_size in -lfguid... " >&6; } +if test ${ac_cv_lib_fguid_libfguid_identifier_get_string_size+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfguid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -48279,40 +53950,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfguid_identifier_get_string_size (); int -main () +main (void) { return libfguid_identifier_get_string_size (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fguid_libfguid_identifier_get_string_size=yes -else +else $as_nop ac_cv_lib_fguid_libfguid_identifier_get_string_size=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_get_string_size" >&5 -$as_echo "$ac_cv_lib_fguid_libfguid_identifier_get_string_size" >&6; } -if test "x$ac_cv_lib_fguid_libfguid_identifier_get_string_size" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_get_string_size" >&5 +printf "%s\n" "$ac_cv_lib_fguid_libfguid_identifier_get_string_size" >&6; } +if test "x$ac_cv_lib_fguid_libfguid_identifier_get_string_size" = xyes +then : ac_cv_libfguid_dummy=yes -else +else $as_nop ac_cv_libfguid=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_copy_to_utf8_string in -lfguid" >&5 -$as_echo_n "checking for libfguid_identifier_copy_to_utf8_string in -lfguid... " >&6; } -if ${ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_copy_to_utf8_string in -lfguid" >&5 +printf %s "checking for libfguid_identifier_copy_to_utf8_string in -lfguid... " >&6; } +if test ${ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfguid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -48321,40 +53992,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfguid_identifier_copy_to_utf8_string (); int -main () +main (void) { return libfguid_identifier_copy_to_utf8_string (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string=yes -else +else $as_nop ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string" >&5 -$as_echo "$ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string" >&6; } -if test "x$ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string" >&5 +printf "%s\n" "$ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string" >&6; } +if test "x$ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string" = xyes +then : ac_cv_libfguid_dummy=yes -else +else $as_nop ac_cv_libfguid=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_copy_to_utf8_string_with_index in -lfguid" >&5 -$as_echo_n "checking for libfguid_identifier_copy_to_utf8_string_with_index in -lfguid... " >&6; } -if ${ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string_with_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_copy_to_utf8_string_with_index in -lfguid" >&5 +printf %s "checking for libfguid_identifier_copy_to_utf8_string_with_index in -lfguid... " >&6; } +if test ${ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string_with_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfguid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -48363,40 +54034,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfguid_identifier_copy_to_utf8_string_with_index (); int -main () +main (void) { return libfguid_identifier_copy_to_utf8_string_with_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string_with_index=yes -else +else $as_nop ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string_with_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string_with_index" >&5 -$as_echo "$ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string_with_index" >&6; } -if test "x$ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string_with_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string_with_index" >&5 +printf "%s\n" "$ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string_with_index" >&6; } +if test "x$ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string_with_index" = xyes +then : ac_cv_libfguid_dummy=yes -else +else $as_nop ac_cv_libfguid=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_copy_to_utf16_string in -lfguid" >&5 -$as_echo_n "checking for libfguid_identifier_copy_to_utf16_string in -lfguid... " >&6; } -if ${ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_copy_to_utf16_string in -lfguid" >&5 +printf %s "checking for libfguid_identifier_copy_to_utf16_string in -lfguid... " >&6; } +if test ${ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfguid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -48405,40 +54076,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfguid_identifier_copy_to_utf16_string (); int -main () +main (void) { return libfguid_identifier_copy_to_utf16_string (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string=yes -else +else $as_nop ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string" >&5 -$as_echo "$ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string" >&6; } -if test "x$ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string" >&5 +printf "%s\n" "$ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string" >&6; } +if test "x$ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string" = xyes +then : ac_cv_libfguid_dummy=yes -else +else $as_nop ac_cv_libfguid=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_copy_to_utf16_string_with_index in -lfguid" >&5 -$as_echo_n "checking for libfguid_identifier_copy_to_utf16_string_with_index in -lfguid... " >&6; } -if ${ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string_with_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_copy_to_utf16_string_with_index in -lfguid" >&5 +printf %s "checking for libfguid_identifier_copy_to_utf16_string_with_index in -lfguid... " >&6; } +if test ${ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string_with_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfguid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -48447,40 +54118,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfguid_identifier_copy_to_utf16_string_with_index (); int -main () +main (void) { return libfguid_identifier_copy_to_utf16_string_with_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string_with_index=yes -else +else $as_nop ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string_with_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string_with_index" >&5 -$as_echo "$ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string_with_index" >&6; } -if test "x$ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string_with_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string_with_index" >&5 +printf "%s\n" "$ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string_with_index" >&6; } +if test "x$ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string_with_index" = xyes +then : ac_cv_libfguid_dummy=yes -else +else $as_nop ac_cv_libfguid=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_copy_to_utf32_string in -lfguid" >&5 -$as_echo_n "checking for libfguid_identifier_copy_to_utf32_string in -lfguid... " >&6; } -if ${ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_copy_to_utf32_string in -lfguid" >&5 +printf %s "checking for libfguid_identifier_copy_to_utf32_string in -lfguid... " >&6; } +if test ${ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfguid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -48489,40 +54160,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfguid_identifier_copy_to_utf32_string (); int -main () +main (void) { return libfguid_identifier_copy_to_utf32_string (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string=yes -else +else $as_nop ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string" >&5 -$as_echo "$ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string" >&6; } -if test "x$ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string" >&5 +printf "%s\n" "$ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string" >&6; } +if test "x$ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string" = xyes +then : ac_cv_libfguid_dummy=yes -else +else $as_nop ac_cv_libfguid=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_copy_to_utf32_string_with_index in -lfguid" >&5 -$as_echo_n "checking for libfguid_identifier_copy_to_utf32_string_with_index in -lfguid... " >&6; } -if ${ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string_with_index+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_copy_to_utf32_string_with_index in -lfguid" >&5 +printf %s "checking for libfguid_identifier_copy_to_utf32_string_with_index in -lfguid... " >&6; } +if test ${ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string_with_index+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfguid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -48531,32 +54202,31 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libfguid_identifier_copy_to_utf32_string_with_index (); int -main () +main (void) { return libfguid_identifier_copy_to_utf32_string_with_index (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string_with_index=yes -else +else $as_nop ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string_with_index=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string_with_index" >&5 -$as_echo "$ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string_with_index" >&6; } -if test "x$ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string_with_index" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string_with_index" >&5 +printf "%s\n" "$ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string_with_index" >&6; } +if test "x$ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string_with_index" = xyes +then : ac_cv_libfguid_dummy=yes -else +else $as_nop ac_cv_libfguid=no fi @@ -48565,9 +54235,10 @@ fi fi - if test "x$ac_cv_with_libfguid" != x && test "x$ac_cv_with_libfguid" != xauto-detect && test "x$ac_cv_libfguid" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_with_libfguid" != x && test "x$ac_cv_with_libfguid" != xauto-detect && test "x$ac_cv_libfguid" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "unable to find supported libfguid in directory: $ac_cv_with_libfguid See \`config.log' for more details" "$LINENO" 5; } @@ -48575,24 +54246,27 @@ fi - if test "x$ac_cv_libfguid" = xyes; then : + if test "x$ac_cv_libfguid" = xyes +then : -$as_echo "#define HAVE_LIBFGUID 1" >>confdefs.h +printf "%s\n" "#define HAVE_LIBFGUID 1" >>confdefs.h fi - if test "x$ac_cv_libfguid" = xyes; then : + if test "x$ac_cv_libfguid" = xyes +then : HAVE_LIBFGUID=1 -else +else $as_nop HAVE_LIBFGUID=0 fi - if test "x$ac_cv_libfguid" != xyes; then : + if test "x$ac_cv_libfguid" != xyes +then : ac_cv_libfguid_CPPFLAGS="-I../libfguid"; ac_cv_libfguid_LIBADD="../libfguid/libfguid.la"; @@ -48601,7 +54275,7 @@ -$as_echo "#define HAVE_LOCAL_LIBFGUID 1" >>confdefs.h +printf "%s\n" "#define HAVE_LOCAL_LIBFGUID 1" >>confdefs.h HAVE_LOCAL_LIBFGUID=1 @@ -48616,24 +54290,28 @@ HAVE_LOCAL_LIBFGUID_FALSE= fi - if test "x$ac_cv_libfguid_CPPFLAGS" != "x"; then : + if test "x$ac_cv_libfguid_CPPFLAGS" != "x" +then : LIBFGUID_CPPFLAGS=$ac_cv_libfguid_CPPFLAGS fi - if test "x$ac_cv_libfguid_LIBADD" != "x"; then : + if test "x$ac_cv_libfguid_LIBADD" != "x" +then : LIBFGUID_LIBADD=$ac_cv_libfguid_LIBADD fi - if test "x$ac_cv_libfguid" = xyes; then : + if test "x$ac_cv_libfguid" = xyes +then : ax_libfguid_pc_libs_private=-lfguid fi - if test "x$ac_cv_libfguid" = xyes; then : + if test "x$ac_cv_libfguid" = xyes +then : ax_libfguid_spec_requires=libfguid ax_libfguid_spec_build_requires=libfguid-devel @@ -48644,54 +54322,461 @@ +# Check whether --with-libfmos was given. +if test ${with_libfmos+y} +then : + withval=$with_libfmos; ac_cv_with_libfmos=$withval +else $as_nop + ac_cv_with_libfmos=auto-detect +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use search for libfmos in includedir and libdir or in the specified DIR, or no if to use local version" >&5 +printf %s "checking whether to use search for libfmos in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } +if test ${ac_cv_with_libfmos+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_with_libfmos=auto-detect +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libfmos" >&5 +printf "%s\n" "$ac_cv_with_libfmos" >&6; } + + if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libfmos" = xno +then : + ac_cv_libfmos=no +else $as_nop + ac_cv_libfmos=check + if test "x$ac_cv_with_libfmos" != x && test "x$ac_cv_with_libfmos" != xauto-detect +then : + if test -d "$ac_cv_with_libfmos" +then : + CFLAGS="$CFLAGS -I${ac_cv_with_libfmos}/include" + LDFLAGS="$LDFLAGS -L${ac_cv_with_libfmos}/lib" +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 1 "no such directory: $ac_cv_with_libfmos +See \`config.log' for more details" "$LINENO" 5; } + +fi + +else $as_nop + if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x" +then : + +pkg_failed=no +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfmos >= 20191217" >&5 +printf %s "checking for libfmos >= 20191217... " >&6; } + +if test -n "$libfmos_CFLAGS"; then + pkg_cv_libfmos_CFLAGS="$libfmos_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfmos >= 20191217\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libfmos >= 20191217") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_libfmos_CFLAGS=`$PKG_CONFIG --cflags "libfmos >= 20191217" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$libfmos_LIBS"; then + pkg_cv_libfmos_LIBS="$libfmos_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfmos >= 20191217\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libfmos >= 20191217") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_libfmos_LIBS=`$PKG_CONFIG --libs "libfmos >= 20191217" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + libfmos_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libfmos >= 20191217" 2>&1` + else + libfmos_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libfmos >= 20191217" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$libfmos_PKG_ERRORS" >&5 + + ac_cv_libfmos=check +elif test $pkg_failed = untried; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ac_cv_libfmos=check +else + libfmos_CFLAGS=$pkg_cv_libfmos_CFLAGS + libfmos_LIBS=$pkg_cv_libfmos_LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + ac_cv_libfmos=yes +fi + +fi + if test "x$ac_cv_libfmos" = xyes +then : + ac_cv_libfmos_CPPFLAGS="$pkg_cv_libfmos_CFLAGS" + ac_cv_libfmos_LIBADD="$pkg_cv_libfmos_LIBS" +fi + +fi + + if test "x$ac_cv_libfmos" = xcheck +then : + ac_fn_c_check_header_compile "$LINENO" "libfmos.h" "ac_cv_header_libfmos_h" "$ac_includes_default" +if test "x$ac_cv_header_libfmos_h" = xyes +then : + printf "%s\n" "#define HAVE_LIBFMOS_H 1" >>confdefs.h + +fi + + + if test "x$ac_cv_header_libfmos_h" = xno +then : + ac_cv_libfmos=no +else $as_nop + ac_cv_libfmos=yes + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfmos_get_version in -lfmos" >&5 +printf %s "checking for libfmos_get_version in -lfmos... " >&6; } +if test ${ac_cv_lib_fmos_libfmos_get_version+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lfmos $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libfmos_get_version (); +int +main (void) +{ +return libfmos_get_version (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_fmos_libfmos_get_version=yes +else $as_nop + ac_cv_lib_fmos_libfmos_get_version=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fmos_libfmos_get_version" >&5 +printf "%s\n" "$ac_cv_lib_fmos_libfmos_get_version" >&6; } +if test "x$ac_cv_lib_fmos_libfmos_get_version" = xyes +then : + ac_cv_libfmos_dummy=yes +else $as_nop + ac_cv_libfmos=no +fi + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfmos_adc_decompress in -lfmos" >&5 +printf %s "checking for libfmos_adc_decompress in -lfmos... " >&6; } +if test ${ac_cv_lib_fmos_libfmos_adc_decompress+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lfmos $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libfmos_adc_decompress (); +int +main (void) +{ +return libfmos_adc_decompress (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_fmos_libfmos_adc_decompress=yes +else $as_nop + ac_cv_lib_fmos_libfmos_adc_decompress=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fmos_libfmos_adc_decompress" >&5 +printf "%s\n" "$ac_cv_lib_fmos_libfmos_adc_decompress" >&6; } +if test "x$ac_cv_lib_fmos_libfmos_adc_decompress" = xyes +then : + ac_cv_libfmos_dummy=yes +else $as_nop + ac_cv_libfmos=no +fi + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfmos_lzfse_decompress in -lfmos" >&5 +printf %s "checking for libfmos_lzfse_decompress in -lfmos... " >&6; } +if test ${ac_cv_lib_fmos_libfmos_lzfse_decompress+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lfmos $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libfmos_lzfse_decompress (); +int +main (void) +{ +return libfmos_lzfse_decompress (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_fmos_libfmos_lzfse_decompress=yes +else $as_nop + ac_cv_lib_fmos_libfmos_lzfse_decompress=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fmos_libfmos_lzfse_decompress" >&5 +printf "%s\n" "$ac_cv_lib_fmos_libfmos_lzfse_decompress" >&6; } +if test "x$ac_cv_lib_fmos_libfmos_lzfse_decompress" = xyes +then : + ac_cv_libfmos_dummy=yes +else $as_nop + ac_cv_libfmos=no +fi + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfmos_lzvn_decompress in -lfmos" >&5 +printf %s "checking for libfmos_lzvn_decompress in -lfmos... " >&6; } +if test ${ac_cv_lib_fmos_libfmos_lzvn_decompress+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lfmos $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char libfmos_lzvn_decompress (); +int +main (void) +{ +return libfmos_lzvn_decompress (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_fmos_libfmos_lzvn_decompress=yes +else $as_nop + ac_cv_lib_fmos_libfmos_lzvn_decompress=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fmos_libfmos_lzvn_decompress" >&5 +printf "%s\n" "$ac_cv_lib_fmos_libfmos_lzvn_decompress" >&6; } +if test "x$ac_cv_lib_fmos_libfmos_lzvn_decompress" = xyes +then : + ac_cv_libfmos_dummy=yes +else $as_nop + ac_cv_libfmos=no +fi + + + ac_cv_libfmos_LIBADD="-lfmos" +fi + +fi + if test "x$ac_cv_with_libfmos" != x && test "x$ac_cv_with_libfmos" != xauto-detect && test "x$ac_cv_libfmos" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 1 "unable to find supported libfmos in directory: $ac_cv_with_libfmos +See \`config.log' for more details" "$LINENO" 5; } + +fi + +fi + + if test "x$ac_cv_libfmos" = xyes +then : + +printf "%s\n" "#define HAVE_LIBFMOS 1" >>confdefs.h + + +fi + + if test "x$ac_cv_libfmos" = xyes +then : + HAVE_LIBFMOS=1 + +else $as_nop + HAVE_LIBFMOS=0 + + +fi + + + if test "x$ac_cv_libfmos" != xyes +then : + + ac_cv_libfmos_CPPFLAGS="-I../libfmos"; + ac_cv_libfmos_LIBADD="../libfmos/libfmos.la"; + + ac_cv_libfmos=local + + + +printf "%s\n" "#define HAVE_LOCAL_LIBFMOS 1" >>confdefs.h + + HAVE_LOCAL_LIBFMOS=1 + + +fi + + if test "x$ac_cv_libfmos" = xlocal; then + HAVE_LOCAL_LIBFMOS_TRUE= + HAVE_LOCAL_LIBFMOS_FALSE='#' +else + HAVE_LOCAL_LIBFMOS_TRUE='#' + HAVE_LOCAL_LIBFMOS_FALSE= +fi + + if test "x$ac_cv_libfmos_CPPFLAGS" != "x" +then : + LIBFMOS_CPPFLAGS=$ac_cv_libfmos_CPPFLAGS + + +fi + if test "x$ac_cv_libfmos_LIBADD" != "x" +then : + LIBFMOS_LIBADD=$ac_cv_libfmos_LIBADD + + +fi + + if test "x$ac_cv_libfmos" = xyes +then : + ax_libfmos_pc_libs_private=-lfmos + + +fi + + if test "x$ac_cv_libfmos" = xyes +then : + ax_libfmos_spec_requires=libfmos + + ax_libfmos_spec_build_requires=libfmos-devel + + +fi + + + + # Check whether --with-zlib was given. -if test "${with_zlib+set}" = set; then : +if test ${with_zlib+y} +then : withval=$with_zlib; ac_cv_with_zlib=$withval -else +else $as_nop ac_cv_with_zlib=auto-detect fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for zlib in includedir and libdir or in the specified DIR, or no if not to use zlib" >&5 -$as_echo_n "checking whether to use search for zlib in includedir and libdir or in the specified DIR, or no if not to use zlib... " >&6; } -if ${ac_cv_with_zlib+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use search for zlib in includedir and libdir or in the specified DIR, or no if not to use zlib" >&5 +printf %s "checking whether to use search for zlib in includedir and libdir or in the specified DIR, or no if not to use zlib... " >&6; } +if test ${ac_cv_with_zlib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_with_zlib=auto-detect fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_zlib" >&5 -$as_echo "$ac_cv_with_zlib" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_zlib" >&5 +printf "%s\n" "$ac_cv_with_zlib" >&6; } - if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_zlib" = xno; then : + if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_zlib" = xno +then : ac_cv_zlib=no -else +else $as_nop ac_cv_zlib=check - if test "x$ac_cv_with_zlib" != x && test "x$ac_cv_with_zlib" != xauto-detect; then : - if test -d "$ac_cv_with_zlib"; then : + if test "x$ac_cv_with_zlib" != x && test "x$ac_cv_with_zlib" != xauto-detect +then : + if test -d "$ac_cv_with_zlib" +then : CFLAGS="$CFLAGS -I${ac_cv_with_zlib}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_zlib}/lib" -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "no such directory: $ac_cv_with_zlib See \`config.log' for more details" "$LINENO" 5; } fi -else - if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : +else $as_nop + if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x" +then : pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlib" >&5 -$as_echo_n "checking for zlib... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for zlib >= 1.2.5" >&5 +printf %s "checking for zlib >= 1.2.5... " >&6; } if test -n "$zlib_CFLAGS"; then pkg_cv_zlib_CFLAGS="$zlib_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib >= 1.2.5\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib >= 1.2.5\""; } >&5 ($PKG_CONFIG --exists --print-errors "zlib >= 1.2.5") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_zlib_CFLAGS=`$PKG_CONFIG --cflags "zlib >= 1.2.5" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -48705,10 +54790,10 @@ pkg_cv_zlib_LIBS="$zlib_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib >= 1.2.5\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib >= 1.2.5\""; } >&5 ($PKG_CONFIG --exists --print-errors "zlib >= 1.2.5") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_zlib_LIBS=`$PKG_CONFIG --libs "zlib >= 1.2.5" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -48722,8 +54807,8 @@ if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -48731,58 +54816,57 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - zlib_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "zlib >= 1.2.5" 2>&1` + zlib_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "zlib >= 1.2.5" 2>&1` else - zlib_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "zlib >= 1.2.5" 2>&1` + zlib_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "zlib >= 1.2.5" 2>&1` fi - # Put the nasty error message in config.log where it belongs - echo "$zlib_PKG_ERRORS" >&5 + # Put the nasty error message in config.log where it belongs + echo "$zlib_PKG_ERRORS" >&5 - ac_cv_zlib=check + ac_cv_zlib=check elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ac_cv_zlib=check + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ac_cv_zlib=check else - zlib_CFLAGS=$pkg_cv_zlib_CFLAGS - zlib_LIBS=$pkg_cv_zlib_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ac_cv_zlib=zlib + zlib_CFLAGS=$pkg_cv_zlib_CFLAGS + zlib_LIBS=$pkg_cv_zlib_LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + ac_cv_zlib=zlib fi fi - if test "x$ac_cv_zlib" = xzlib; then : + if test "x$ac_cv_zlib" = xzlib +then : ac_cv_zlib_CPPFLAGS="$pkg_cv_zlib_CFLAGS" ac_cv_zlib_LIBADD="$pkg_cv_zlib_LIBS" fi fi - if test "x$ac_cv_zlib" = xcheck; then : - for ac_header in zlib.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" -if test "x$ac_cv_header_zlib_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_ZLIB_H 1 -_ACEOF + if test "x$ac_cv_zlib" = xcheck +then : + ac_fn_c_check_header_compile "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" +if test "x$ac_cv_header_zlib_h" = xyes +then : + printf "%s\n" "#define HAVE_ZLIB_H 1" >>confdefs.h fi -done - - if test "x$ac_cv_header_zlib_h" = xno; then : + if test "x$ac_cv_header_zlib_h" = xno +then : ac_cv_zlib=no -else +else $as_nop ac_cv_zlib=zlib - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlibVersion in -lz" >&5 -$as_echo_n "checking for zlibVersion in -lz... " >&6; } -if ${ac_cv_lib_z_zlibVersion+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for zlibVersion in -lz" >&5 +printf %s "checking for zlibVersion in -lz... " >&6; } +if test ${ac_cv_lib_z_zlibVersion+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -48791,44 +54875,42 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char zlibVersion (); int -main () +main (void) { return zlibVersion (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_z_zlibVersion=yes -else +else $as_nop ac_cv_lib_z_zlibVersion=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_zlibVersion" >&5 -$as_echo "$ac_cv_lib_z_zlibVersion" >&6; } -if test "x$ac_cv_lib_z_zlibVersion" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBZ 1 -_ACEOF +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_zlibVersion" >&5 +printf "%s\n" "$ac_cv_lib_z_zlibVersion" >&6; } +if test "x$ac_cv_lib_z_zlibVersion" = xyes +then : + printf "%s\n" "#define HAVE_LIBZ 1" >>confdefs.h LIBS="-lz $LIBS" -else +else $as_nop ac_cv_zlib=no fi - if test "x$ac_cv_lib_z_zlibVersion" = xno; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_lib_z_zlibVersion" = xno +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: zlibVersion in library: zlib. See \`config.log' for more details" "$LINENO" 5; } @@ -48842,41 +54924,47 @@ fi - if test "x$ac_cv_zlib" = xzlib; then : + if test "x$ac_cv_zlib" = xzlib +then : -$as_echo "#define HAVE_ZLIB 1" >>confdefs.h +printf "%s\n" "#define HAVE_ZLIB 1" >>confdefs.h fi - if test "x$ac_cv_zlib" != xno; then : + if test "x$ac_cv_zlib" != xno +then : HAVE_ZLIB=1 -else +else $as_nop HAVE_ZLIB=0 fi - if test "x$ac_cv_zlib_CPPFLAGS" != "x"; then : + if test "x$ac_cv_zlib_CPPFLAGS" != "x" +then : ZLIB_CPPFLAGS=$ac_cv_zlib_CPPFLAGS fi - if test "x$ac_cv_zlib_LIBADD" != "x"; then : + if test "x$ac_cv_zlib_LIBADD" != "x" +then : ZLIB_LIBADD=$ac_cv_zlib_LIBADD fi - if test "x$ac_cv_zlib" = xzlib; then : + if test "x$ac_cv_zlib" = xzlib +then : ax_zlib_pc_libs_private=-lz fi - if test "x$ac_cv_zlib" = xzlib; then : + if test "x$ac_cv_zlib" = xzlib +then : ax_zlib_spec_requires=zlib ax_zlib_spec_build_requires=zlib-devel @@ -48888,14 +54976,16 @@ fi -if test "x$ac_cv_zlib" != xzlib; then : +if test "x$ac_cv_zlib" != xzlib +then : ac_cv_uncompress=local -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uncompress in -lz" >&5 -$as_echo_n "checking for uncompress in -lz... " >&6; } -if ${ac_cv_lib_z_uncompress+:} false; then : - $as_echo_n "(cached) " >&6 -else +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uncompress in -lz" >&5 +printf %s "checking for uncompress in -lz... " >&6; } +if test ${ac_cv_lib_z_uncompress+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -48904,39 +54994,39 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char uncompress (); int -main () +main (void) { return uncompress (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_z_uncompress=yes -else +else $as_nop ac_cv_lib_z_uncompress=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_uncompress" >&5 -$as_echo "$ac_cv_lib_z_uncompress" >&6; } -if test "x$ac_cv_lib_z_uncompress" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_uncompress" >&5 +printf "%s\n" "$ac_cv_lib_z_uncompress" >&6; } +if test "x$ac_cv_lib_z_uncompress" = xyes +then : ac_cv_uncompress=zlib -else +else $as_nop ac_cv_uncompress=local fi - if test "x$ac_cv_uncompress" = xzlib; then : + if test "x$ac_cv_uncompress" = xzlib +then : -$as_echo "#define HAVE_ZLIB_UNCOMPRESS 1" >>confdefs.h +printf "%s\n" "#define HAVE_ZLIB_UNCOMPRESS 1" >>confdefs.h fi @@ -48944,162 +55034,95 @@ fi - for ac_func in bindtextdomain -do : ac_fn_c_check_func "$LINENO" "bindtextdomain" "ac_cv_func_bindtextdomain" -if test "x$ac_cv_func_bindtextdomain" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_BINDTEXTDOMAIN 1 -_ACEOF +if test "x$ac_cv_func_bindtextdomain" = xyes +then : + printf "%s\n" "#define HAVE_BINDTEXTDOMAIN 1" >>confdefs.h fi -done # Check whether --with-pyprefix was given. -if test "${with_pyprefix+set}" = set; then : +if test ${with_pyprefix+y} +then : withval=$with_pyprefix; ac_cv_with_pyprefix=$withval -else +else $as_nop ac_cv_with_pyprefix=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use use \`python-config --prefix' to determine the prefix of pythondir instead of --prefix" >&5 -$as_echo_n "checking whether to use use \`python-config --prefix' to determine the prefix of pythondir instead of --prefix... " >&6; } -if ${ac_cv_with_pyprefix+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use use \`python-config --prefix' to determine the prefix of pythondir instead of --prefix" >&5 +printf %s "checking whether to use use \`python-config --prefix' to determine the prefix of pythondir instead of --prefix... " >&6; } +if test ${ac_cv_with_pyprefix+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_with_pyprefix=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_pyprefix" >&5 -$as_echo "$ac_cv_with_pyprefix" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_pyprefix" >&5 +printf "%s\n" "$ac_cv_with_pyprefix" >&6; } # Check whether --enable-python was given. -if test "${enable_python+set}" = set; then : +if test ${enable_python+y} +then : enableval=$enable_python; ac_cv_enable_python=$enableval -else +else $as_nop ac_cv_enable_python=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable build Python bindings" >&5 -$as_echo_n "checking whether to enable build Python bindings... " >&6; } -if ${ac_cv_enable_python+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable build Python bindings" >&5 +printf %s "checking whether to enable build Python bindings... " >&6; } +if test ${ac_cv_enable_python+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_enable_python=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_python" >&5 -$as_echo "$ac_cv_enable_python" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_python" >&5 +printf "%s\n" "$ac_cv_enable_python" >&6; } # Check whether --with-pythondir was given. -if test "${with_pythondir+set}" = set; then : +if test ${with_pythondir+y} +then : withval=$with_pythondir; ac_cv_with_pythondir=$withval -else +else $as_nop ac_cv_with_pythondir=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use use to specify the Python directory (pythondir)" >&5 -$as_echo_n "checking whether to use use to specify the Python directory (pythondir)... " >&6; } -if ${ac_cv_with_pythondir+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use use to specify the Python directory (pythondir)" >&5 +printf %s "checking whether to use use to specify the Python directory (pythondir)... " >&6; } +if test ${ac_cv_with_pythondir+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_with_pythondir=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_pythondir" >&5 -$as_echo "$ac_cv_with_pythondir" >&6; } - - - # Check whether --enable-python2 was given. -if test "${enable_python2+set}" = set; then : - enableval=$enable_python2; ac_cv_enable_python2=$enableval -else - ac_cv_enable_python2=no -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable build Python 2 bindings" >&5 -$as_echo_n "checking whether to enable build Python 2 bindings... " >&6; } -if ${ac_cv_enable_python2+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_enable_python2=no -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_python2" >&5 -$as_echo "$ac_cv_enable_python2" >&6; } - - -# Check whether --with-pythondir2 was given. -if test "${with_pythondir2+set}" = set; then : - withval=$with_pythondir2; ac_cv_with_pythondir2=$withval -else - ac_cv_with_pythondir2=no -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use use to specify the Python 2 directory (pythondir2)" >&5 -$as_echo_n "checking whether to use use to specify the Python 2 directory (pythondir2)... " >&6; } -if ${ac_cv_with_pythondir2+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_with_pythondir2=no -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_pythondir2" >&5 -$as_echo "$ac_cv_with_pythondir2" >&6; } - - - # Check whether --enable-python3 was given. -if test "${enable_python3+set}" = set; then : - enableval=$enable_python3; ac_cv_enable_python3=$enableval -else - ac_cv_enable_python3=no -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable build Python 3 bindings" >&5 -$as_echo_n "checking whether to enable build Python 3 bindings... " >&6; } -if ${ac_cv_enable_python3+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_enable_python3=no -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_python3" >&5 -$as_echo "$ac_cv_enable_python3" >&6; } - - -# Check whether --with-pythondir3 was given. -if test "${with_pythondir3+set}" = set; then : - withval=$with_pythondir3; ac_cv_with_pythondir3=$withval -else - ac_cv_with_pythondir3=no -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use use to specify the Python 3 directory (pythondir3)" >&5 -$as_echo_n "checking whether to use use to specify the Python 3 directory (pythondir3)... " >&6; } -if ${ac_cv_with_pythondir3+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_with_pythondir3=no -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_pythondir3" >&5 -$as_echo "$ac_cv_with_pythondir3" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_pythondir" >&5 +printf "%s\n" "$ac_cv_with_pythondir" >&6; } - if test "x${ac_cv_enable_python}" != xno; then : - if test "x${PYTHON_VERSION}" != x; then : + if test "x${ac_cv_enable_python}" != xno +then : + if test "x${PYTHON_VERSION}" != x +then : ax_python_progs="python${PYTHON_VERSION}" -else - ax_python_progs="python python2 python2.7 python2.6 python2.5 python3 python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0" +else $as_nop + ax_python_progs="python python3 python3.12 python3.11 python3.10 python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2 python2.7 python2.6 python2.5" fi for ac_prog in $ax_python_progs do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_PYTHON+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_PYTHON+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$PYTHON"; then ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test. else @@ -49107,11 +55130,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_PYTHON="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -49122,40 +55149,43 @@ fi PYTHON=$ac_cv_prog_PYTHON if test -n "$PYTHON"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 -$as_echo "$PYTHON" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 +printf "%s\n" "$PYTHON" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi test -n "$PYTHON" && break done - if test "x${PYTHON}" != x; then : - ax_prog_python_version=`${PYTHON} -c "import sys; sys.stdout.write(sys.version[:3])" 2>/dev/null`; + if test "x${PYTHON}" != x +then : + ax_prog_python_version=`${PYTHON} -c "import sys; sys.stdout.write('%d.%d' % (sys.version_info[0], sys.version_info[1]))" 2>/dev/null`; ax_prog_python_platform=`${PYTHON} -c "import sys; sys.stdout.write(sys.platform)" 2>/dev/null`; PYTHON_PLATFORM=$ax_prog_python_platform -else +else $as_nop as_fn_error $? "Unable to find python" "$LINENO" 5 fi PYTHON=$PYTHON - if test "x${PYTHON_CONFIG}" = x && test "x${PYTHON_VERSION}" != x; then : + if test "x${PYTHON_CONFIG}" = x && test "x${PYTHON_VERSION}" != x +then : for ac_prog in python${PYTHON_VERSION}-config do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_PYTHON_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_PYTHON_CONFIG+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$PYTHON_CONFIG"; then ac_cv_prog_PYTHON_CONFIG="$PYTHON_CONFIG" # Let the user override the test. else @@ -49163,11 +55193,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_PYTHON_CONFIG="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -49178,11 +55212,11 @@ fi PYTHON_CONFIG=$ac_cv_prog_PYTHON_CONFIG if test -n "$PYTHON_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CONFIG" >&5 -$as_echo "$PYTHON_CONFIG" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CONFIG" >&5 +printf "%s\n" "$PYTHON_CONFIG" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -49191,16 +55225,18 @@ fi - if test "x${PYTHON_CONFIG}" = x; then : - for ac_prog in python-config + if test "x${PYTHON_CONFIG}" = x +then : + for ac_prog in python-config python3-config python3.12-config python3.11-config python3.10-config python3.9-config python3.8-config python3.7-config python3.6-config python3.5-config python3.4-config python3.3-config python3.2-config python3.1-config python3.0-config python2-config python2.7-config python2.6-config python2.5-config do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_PYTHON_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_PYTHON_CONFIG+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$PYTHON_CONFIG"; then ac_cv_prog_PYTHON_CONFIG="$PYTHON_CONFIG" # Let the user override the test. else @@ -49208,11 +55244,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_PYTHON_CONFIG="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -49223,11 +55263,11 @@ fi PYTHON_CONFIG=$ac_cv_prog_PYTHON_CONFIG if test -n "$PYTHON_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CONFIG" >&5 -$as_echo "$PYTHON_CONFIG" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CONFIG" >&5 +printf "%s\n" "$PYTHON_CONFIG" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -49236,7 +55276,8 @@ fi - if test "x${PYTHON_CONFIG}" = x; then : + if test "x${PYTHON_CONFIG}" = x +then : as_fn_error $? "Unable to find python-config" "$LINENO" 5 fi @@ -49244,20 +55285,21 @@ - if test "x${PYTHON_CONFIG}" != x; then : + if test "x${PYTHON_CONFIG}" != x +then : PYTHON_INCLUDES=`${PYTHON_CONFIG} --includes 2>/dev/null`; - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python includes" >&5 -$as_echo_n "checking for Python includes... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_INCLUDES" >&5 -$as_echo "$PYTHON_INCLUDES" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Python includes" >&5 +printf %s "checking for Python includes... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_INCLUDES" >&5 +printf "%s\n" "$PYTHON_INCLUDES" >&6; } PYTHON_LDFLAGS=`${PYTHON_CONFIG} --ldflags 2>/dev/null`; - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python libraries" >&5 -$as_echo_n "checking for Python libraries... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_LDFLAGS" >&5 -$as_echo "$PYTHON_LDFLAGS" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Python libraries" >&5 +printf %s "checking for Python libraries... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_LDFLAGS" >&5 +printf "%s\n" "$PYTHON_LDFLAGS" >&6; } case $host_os in #( cygwin*) : @@ -49271,28 +55313,27 @@ BACKUP_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${PYTHON_INCLUDES}" - for ac_header in Python.h + for ac_header in Python.h do : - ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default" -if test "x$ac_cv_header_Python_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PYTHON_H 1 -_ACEOF + ac_fn_c_check_header_compile "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default" +if test "x$ac_cv_header_Python_h" = xyes +then : + printf "%s\n" "#define HAVE_PYTHON_H 1" >>confdefs.h ac_cv_header_python_h=yes -else +else $as_nop ac_cv_header_python_h=no fi done - CPPFLAGS="${BACKUP_CPPFLAGS}" fi - if test "x${ac_cv_header_python_h}" != xyes; then : + if test "x${ac_cv_header_python_h}" != xyes +then : ac_cv_enable_python=no -else +else $as_nop ac_cv_enable_python=${ax_prog_python_version} PYTHON_CPPFLAGS=$PYTHON_INCLUDES @@ -49300,18 +55341,20 @@ PYTHON_LDFLAGS=$PYTHON_LDFLAGS - if test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno; then : + if test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno +then : ax_python_prefix="\${prefix}" -else +else $as_nop ax_python_prefix=`${PYTHON_CONFIG} --prefix 2>/dev/null` fi PYTHON_PREFIX=$ax_python_prefix - if test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno; then : + if test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno +then : ax_python_exec_prefix="\${exec_prefix}" -else +else $as_nop ax_python_exec_prefix=`${PYTHON_CONFIG} --exec-prefix 2>/dev/null` fi @@ -49320,13 +55363,15 @@ ax_python_pythondir_suffix=`${PYTHON} -c "import sys; import distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_lib(0, 0, prefix=''))" 2>/dev/null`; - if test "x${ac_cv_with_pythondir}" = x || test "x${ac_cv_with_pythondir}" = xno; then : - if test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno; then : + if test "x${ac_cv_with_pythondir}" = x || test "x${ac_cv_with_pythondir}" = xno +then : + if test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno +then : ax_python_pythondir="${ax_python_prefix}/${ax_python_pythondir_suffix}" -else +else $as_nop ax_python_pythondir=`${PYTHON} -c "import sys; import distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_lib()) " 2>/dev/null` fi -else +else $as_nop ax_python_pythondir=$ac_cv_with_pythondir fi @@ -49336,9 +55381,10 @@ ax_python_pyexecdir_suffix=`${PYTHON} -c "import sys; import distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_lib(1, 0, prefix=''))" 2>/dev/null`; ax_python_library_dir=`${PYTHON} -c "import sys; import distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_lib(True)) " 2>/dev/null`; - if test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno; then : + if test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno +then : ax_python_pyexecdir="${ax_python_exec_prefix}/${ax_python_pyexecdir_suffix}" -else +else $as_nop ax_python_pyexecdir=$ax_python_library_dir fi @@ -49355,454 +55401,6 @@ fi - if test "x${ac_cv_enable_python2}" != xno; then : - ax_python2_progs="python2 python2.7 python2.6 python2.5" - for ac_prog in $ax_python2_progs -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_PYTHON2+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$PYTHON2"; then - ac_cv_prog_PYTHON2="$PYTHON2" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_PYTHON2="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -PYTHON2=$ac_cv_prog_PYTHON2 -if test -n "$PYTHON2"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON2" >&5 -$as_echo "$PYTHON2" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$PYTHON2" && break -done - - if test "x${PYTHON2}" != x; then : - ax_prog_python2_version=`${PYTHON2} -c "import sys; sys.stdout.write(sys.version[:3])" 2>/dev/null`; - PYTHON2_VERSION=$ax_prog_python2_version - - - ax_prog_python2_platform=`${PYTHON2} -c "import sys; sys.stdout.write(sys.platform)" 2>/dev/null`; - PYTHON2_PLATFORM=$ax_prog_python2_platform - - -else - as_fn_error $? "Unable to find python2" "$LINENO" 5 - -fi - PYTHON2=$PYTHON2 - - - if test "x${PYTHON2_CONFIG}" = x; then : - for ac_prog in python2-config -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_PYTHON2_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$PYTHON2_CONFIG"; then - ac_cv_prog_PYTHON2_CONFIG="$PYTHON2_CONFIG" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_PYTHON2_CONFIG="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -PYTHON2_CONFIG=$ac_cv_prog_PYTHON2_CONFIG -if test -n "$PYTHON2_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON2_CONFIG" >&5 -$as_echo "$PYTHON2_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$PYTHON2_CONFIG" && break -done - - -fi - if test "x${PYTHON2_CONFIG}" = x; then : - as_fn_error $? "Unable to find python2-config" "$LINENO" 5 - -fi - PYTHON2_CONFIG=$PYTHON2_CONFIG - - - - if test "x${PYTHON2_CONFIG}" != x; then : - PYTHON2_INCLUDES=`${PYTHON2_CONFIG} --includes 2>/dev/null`; - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python verison 2 includes" >&5 -$as_echo_n "checking for Python verison 2 includes... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON2_INCLUDES" >&5 -$as_echo "$PYTHON2_INCLUDES" >&6; } - - PYTHON2_LDFLAGS=`${PYTHON2_CONFIG} --ldflags 2>/dev/null`; - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python 2 libraries" >&5 -$as_echo_n "checking for Python 2 libraries... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON2_LDFLAGS" >&5 -$as_echo "$PYTHON2_LDFLAGS" >&6; } - - case $host_os in #( - cygwin*) : - PYTHON2_LDFLAGS="${PYTHON2_LDFLAGS} -no-undefined" ;; #( - *) : - ;; #( - *) : - ;; -esac - - BACKUP_CPPFLAGS="${CPPFLAGS}" - CPPFLAGS="${CPPFLAGS} ${PYTHON2_INCLUDES}" - - for ac_header in Python.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default" -if test "x$ac_cv_header_Python_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PYTHON_H 1 -_ACEOF - ac_cv_header_python2_h=yes -else - ac_cv_header_python2_h=no -fi - -done - - - CPPFLAGS="${BACKUP_CPPFLAGS}" - -fi - - if test "x${ac_cv_header_python2_h}" != xyes; then : - ac_cv_enable_python2=no -else - ac_cv_enable_python2=$PYTHON2_VERSION - PYTHON2_CPPFLAGS=$PYTHON2_INCLUDES - - - PYTHON2_LDFLAGS=$PYTHON2_LDFLAGS - - - if test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno; then : - ax_python2_prefix="\${prefix}" -else - ax_python2_prefix=`${PYTHON2_CONFIG} --prefix 2>/dev/null` -fi - - PYTHON2_PREFIX=$ax_python2_prefix - - - if test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno; then : - ax_python2_exec_prefix="\${exec_prefix}" -else - ax_python2_exec_prefix=`${PYTHON2_CONFIG} --exec-prefix 2>/dev/null` -fi - - PYTHON2_EXEC_PREFIX=$ax_python2_exec_prefix - - - ax_python2_pythondir_suffix=`${PYTHON2} -c "import sys; import distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_lib(0, 0, prefix=''))" 2>/dev/null`; - - if test "x${ac_cv_with_pythondir2}" = x || test "x${ac_cv_with_pythondir2}" = xno; then : - if test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno; then : - ax_python2_pythondir="${ax_python_prefix}/${ax_python2_pythondir_suffix}" -else - ax_python2_pythondir=`${PYTHON2} -c "import sys; import distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_lib()) " 2>/dev/null` -fi -else - ax_python2_pythondir=$ac_cv_with_pythondir2 -fi - - pythondir2=$ax_python2_pythondir - - - ax_python2_pyexecdir_suffix=`${PYTHON2} -c "import sys; import distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_lib(1, 0, prefix=''))" 2>/dev/null`; - ax_python2_library_dir=`${PYTHON2} -c "import sys; import distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_lib(True)) " 2>/dev/null`; - - if test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno; then : - ax_python2_pyexecdir="${ax_python2_exec_prefix}/${ax_python2_pyexecdir_suffix}" -else - ax_python2_pyexecdir=$ax_python2_library_dir -fi - - pyexecdir2=$ax_python2_pyexecdir - - - PYTHON2_LIBRARY_DIR=$ax_python2_pyexecdir_suffix - - - PYTHON2_PACKAGE_DIR=$ax_python2_library_dir - - -fi - -fi - - if test "x${ac_cv_enable_python3}" != xno; then : - ax_python3_progs="python3 python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0" - for ac_prog in $ax_python3_progs -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_PYTHON3+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$PYTHON3"; then - ac_cv_prog_PYTHON3="$PYTHON3" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_PYTHON3="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -PYTHON3=$ac_cv_prog_PYTHON3 -if test -n "$PYTHON3"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON3" >&5 -$as_echo "$PYTHON3" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$PYTHON3" && break -done - - if test "x${PYTHON3}" != x; then : - ax_prog_python3_version=`${PYTHON3} -c "import sys; sys.stdout.write(sys.version[:3])" 2>/dev/null`; - PYTHON3_VERSION=$ax_prog_python3_version - - - ax_prog_python3_platform=`${PYTHON3} -c "import sys; sys.stdout.write(sys.platform)" 2>/dev/null`; - PYTHON3_PLATFORM=$ax_prog_python3_platform - - -else - as_fn_error $? "Unable to find python3" "$LINENO" 5 - -fi - PYTHON3=$PYTHON3 - - - if test "x${PYTHON3_CONFIG}" = x; then : - for ac_prog in python3-config -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_PYTHON3_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$PYTHON3_CONFIG"; then - ac_cv_prog_PYTHON3_CONFIG="$PYTHON3_CONFIG" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_PYTHON3_CONFIG="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -PYTHON3_CONFIG=$ac_cv_prog_PYTHON3_CONFIG -if test -n "$PYTHON3_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON3_CONFIG" >&5 -$as_echo "$PYTHON3_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$PYTHON3_CONFIG" && break -done - - -fi - if test "x${PYTHON3_CONFIG}" = x; then : - as_fn_error $? "Unable to find python3-config" "$LINENO" 5 - -fi - PYTHON3_CONFIG=$PYTHON3_CONFIG - - - - if test "x${PYTHON3_CONFIG}" != x; then : - PYTHON3_INCLUDES=`${PYTHON3_CONFIG} --includes 2>/dev/null`; - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python verison 3 includes" >&5 -$as_echo_n "checking for Python verison 3 includes... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON3_INCLUDES" >&5 -$as_echo "$PYTHON3_INCLUDES" >&6; } - - PYTHON3_LDFLAGS=`${PYTHON3_CONFIG} --ldflags 2>/dev/null`; - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python 3 libraries" >&5 -$as_echo_n "checking for Python 3 libraries... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON3_LDFLAGS" >&5 -$as_echo "$PYTHON3_LDFLAGS" >&6; } - - case $host_os in #( - cygwin*) : - PYTHON3_LDFLAGS="${PYTHON3_LDFLAGS} -no-undefined" ;; #( - *) : - ;; #( - *) : - ;; -esac - - BACKUP_CPPFLAGS="${CPPFLAGS}" - CPPFLAGS="${CPPFLAGS} ${PYTHON3_INCLUDES}" - - for ac_header in Python.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default" -if test "x$ac_cv_header_Python_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PYTHON_H 1 -_ACEOF - ac_cv_header_python3_h=yes -else - ac_cv_header_python3_h=no -fi - -done - - - CPPFLAGS="${BACKUP_CPPFLAGS}" - -fi - - if test "x${ac_cv_header_python3_h}" != xyes; then : - ac_cv_enable_python3=no -else - ac_cv_enable_python3=$PYTHON3_VERSION - PYTHON3_CPPFLAGS=$PYTHON3_INCLUDES - - - PYTHON3_LDFLAGS=$PYTHON3_LDFLAGS - - - if test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno; then : - ax_python3_prefix="\${prefix}" -else - ax_python3_prefix=`${PYTHON3_CONFIG} --prefix 2>/dev/null` -fi - - PYTHON3_PREFIX=$ax_python3_prefix - - - if test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno; then : - ax_python3_exec_prefix="\${exec_prefix}" -else - ax_python3_exec_prefix=`${PYTHON3_CONFIG} --exec-prefix 2>/dev/null` -fi - - PYTHON3_EXEC_PREFIX=$ax_python3_exec_prefix - - - ax_python3_pythondir_suffix=`${PYTHON3} -c "import sys; import distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_lib(0, 0, prefix=''))" 2>/dev/null`; - - if test "x${ac_cv_with_pythondir3}" = x || test "x${ac_cv_with_pythondir3}" = xno; then : - if test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno; then : - ax_python3_pythondir="${ax_python_prefix}/${ax_python3_pythondir_suffix}" -else - ax_python3_pythondir=`${PYTHON3} -c "import sys; import distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_lib()) " 2>/dev/null` -fi -else - ax_python3_pythondir=$ac_cv_with_pythondir3 -fi - - pythondir3=$ax_python3_pythondir - - - ax_python3_pyexecdir_suffix=`${PYTHON3} -c "import sys; import distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_lib(1, 0, prefix=''))" 2>/dev/null`; - ax_python3_library_dir=`${PYTHON3} -c "import sys; import distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_lib(True)) " 2>/dev/null`; - - if test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno; then : - ax_python3_pyexecdir="${ax_python3_exec_prefix}/${ax_python3_pyexecdir_suffix}" -else - ax_python3_pyexecdir=$ax_python3_library_dir -fi - - pyexecdir3=$ax_python3_pyexecdir - - - PYTHON3_LIBRARY_DIR=$ax_python3_pyexecdir_suffix - - - PYTHON3_PACKAGE_DIR=$ax_python3_library_dir - - -fi - -fi - if test "x${ac_cv_enable_python}" != xno; then HAVE_PYTHON_TRUE= HAVE_PYTHON_FALSE='#' @@ -49812,25 +55410,7 @@ fi - if test "x${ac_cv_enable_python2}" != xno; then - HAVE_PYTHON2_TRUE= - HAVE_PYTHON2_FALSE='#' -else - HAVE_PYTHON2_TRUE='#' - HAVE_PYTHON2_FALSE= -fi - - - if test "x${ac_cv_enable_python3}" != xno; then - HAVE_PYTHON3_TRUE= - HAVE_PYTHON3_FALSE='#' -else - HAVE_PYTHON3_TRUE='#' - HAVE_PYTHON3_FALSE= -fi - - - if test "x${ac_cv_enable_python}" != xno || test "x${ac_cv_enable_python2}" != xno || test "x${ac_cv_enable_python3}" != xno; then + if test "x${ac_cv_enable_python}" != xno; then HAVE_PYTHON_TESTS_TRUE= HAVE_PYTHON_TESTS_FALSE='#' else @@ -49839,43 +55419,27 @@ fi - if test "x${ac_cv_enable_python}" = xno; then : - if test "x${ac_cv_enable_python2}" != xno || test "x${ac_cv_enable_python3}" != xno; then : - if test "x${ac_cv_enable_python2}" != xno; then : - ac_cv_enable_python=${ac_cv_enable_python2} -else - ac_cv_enable_python="" -fi - if test "x${ac_cv_enable_python3}" != xno; then : - if test "x${ac_cv_enable_python}" != x; then : - ac_cv_enable_python="${ac_cv_enable_python}, " -fi - ac_cv_enable_python="${ac_cv_enable_python}${ac_cv_enable_python3}" -fi -fi +if test "x${ac_cv_enable_python}" != xno +then : + ac_fn_c_check_header_compile "$LINENO" "stdarg.h" "ac_cv_header_stdarg_h" "$ac_includes_default" +if test "x$ac_cv_header_stdarg_h" = xyes +then : + printf "%s\n" "#define HAVE_STDARG_H 1" >>confdefs.h fi - - -if test "x${ac_cv_enable_python}" != xno || test "x${ac_cv_enable_python2}" != xno || test "x${ac_cv_enable_python3}" != xno; then : - for ac_header in stdarg.h varargs.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +ac_fn_c_check_header_compile "$LINENO" "varargs.h" "ac_cv_header_varargs_h" "$ac_includes_default" +if test "x$ac_cv_header_varargs_h" = xyes +then : + printf "%s\n" "#define HAVE_VARARGS_H 1" >>confdefs.h fi -done - - if test "x$ac_cv_header_stdarg_h" != xyes && test "x$ac_cv_header_varargs_h" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_header_stdarg_h" != xyes && test "x$ac_cv_header_varargs_h" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing headers: stdarg.h and varargs.h See \`config.log' for more details" "$LINENO" 5; } @@ -49886,53 +55450,59 @@ # Check whether --with-libhmac was given. -if test "${with_libhmac+set}" = set; then : +if test ${with_libhmac+y} +then : withval=$with_libhmac; ac_cv_with_libhmac=$withval -else +else $as_nop ac_cv_with_libhmac=auto-detect fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libhmac in includedir and libdir or in the specified DIR, or no if to use local version" >&5 -$as_echo_n "checking whether to use search for libhmac in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } -if ${ac_cv_with_libhmac+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use search for libhmac in includedir and libdir or in the specified DIR, or no if to use local version" >&5 +printf %s "checking whether to use search for libhmac in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } +if test ${ac_cv_with_libhmac+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_with_libhmac=auto-detect fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libhmac" >&5 -$as_echo "$ac_cv_with_libhmac" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libhmac" >&5 +printf "%s\n" "$ac_cv_with_libhmac" >&6; } - if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libhmac" = xno; then : + if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libhmac" = xno +then : ac_cv_libhmac=no -else +else $as_nop ac_cv_libhmac=check - if test "x$ac_cv_with_libhmac" != x && test "x$ac_cv_with_libhmac" != xauto-detect; then : - if test -d "$ac_cv_with_libhmac"; then : + if test "x$ac_cv_with_libhmac" != x && test "x$ac_cv_with_libhmac" != xauto-detect +then : + if test -d "$ac_cv_with_libhmac" +then : CFLAGS="$CFLAGS -I${ac_cv_with_libhmac}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libhmac}/lib" -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "no such directory: $ac_cv_with_libhmac See \`config.log' for more details" "$LINENO" 5; } fi -else - if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : +else $as_nop + if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x" +then : pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhmac" >&5 -$as_echo_n "checking for libhmac... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libhmac >= 20200104" >&5 +printf %s "checking for libhmac >= 20200104... " >&6; } if test -n "$libhmac_CFLAGS"; then pkg_cv_libhmac_CFLAGS="$libhmac_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libhmac >= 20200104\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libhmac >= 20200104\""; } >&5 ($PKG_CONFIG --exists --print-errors "libhmac >= 20200104") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libhmac_CFLAGS=`$PKG_CONFIG --cflags "libhmac >= 20200104" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -49946,10 +55516,10 @@ pkg_cv_libhmac_LIBS="$libhmac_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libhmac >= 20200104\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libhmac >= 20200104\""; } >&5 ($PKG_CONFIG --exists --print-errors "libhmac >= 20200104") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libhmac_LIBS=`$PKG_CONFIG --libs "libhmac >= 20200104" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -49963,8 +55533,8 @@ if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -49972,58 +55542,57 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - libhmac_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libhmac >= 20200104" 2>&1` + libhmac_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libhmac >= 20200104" 2>&1` else - libhmac_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libhmac >= 20200104" 2>&1` + libhmac_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libhmac >= 20200104" 2>&1` fi - # Put the nasty error message in config.log where it belongs - echo "$libhmac_PKG_ERRORS" >&5 + # Put the nasty error message in config.log where it belongs + echo "$libhmac_PKG_ERRORS" >&5 - ac_cv_libhmac=check + ac_cv_libhmac=check elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ac_cv_libhmac=check + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ac_cv_libhmac=check else - libhmac_CFLAGS=$pkg_cv_libhmac_CFLAGS - libhmac_LIBS=$pkg_cv_libhmac_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ac_cv_libhmac=yes + libhmac_CFLAGS=$pkg_cv_libhmac_CFLAGS + libhmac_LIBS=$pkg_cv_libhmac_LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + ac_cv_libhmac=yes fi fi - if test "x$ac_cv_libhmac" = xyes; then : + if test "x$ac_cv_libhmac" = xyes +then : ac_cv_libhmac_CPPFLAGS="$pkg_cv_libhmac_CFLAGS" ac_cv_libhmac_LIBADD="$pkg_cv_libhmac_LIBS" fi fi - if test "x$ac_cv_libhmac" = xcheck; then : - for ac_header in libhmac.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "libhmac.h" "ac_cv_header_libhmac_h" "$ac_includes_default" -if test "x$ac_cv_header_libhmac_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBHMAC_H 1 -_ACEOF + if test "x$ac_cv_libhmac" = xcheck +then : + ac_fn_c_check_header_compile "$LINENO" "libhmac.h" "ac_cv_header_libhmac_h" "$ac_includes_default" +if test "x$ac_cv_header_libhmac_h" = xyes +then : + printf "%s\n" "#define HAVE_LIBHMAC_H 1" >>confdefs.h fi -done - - if test "x$ac_cv_header_libhmac_h" = xno; then : + if test "x$ac_cv_header_libhmac_h" = xno +then : ac_cv_libhmac=no -else +else $as_nop ac_cv_libhmac=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhmac_get_version in -lhmac" >&5 -$as_echo_n "checking for libhmac_get_version in -lhmac... " >&6; } -if ${ac_cv_lib_hmac_libhmac_get_version+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libhmac_get_version in -lhmac" >&5 +printf %s "checking for libhmac_get_version in -lhmac... " >&6; } +if test ${ac_cv_lib_hmac_libhmac_get_version+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lhmac $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -50032,41 +55601,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libhmac_get_version (); int -main () +main (void) { return libhmac_get_version (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_hmac_libhmac_get_version=yes -else +else $as_nop ac_cv_lib_hmac_libhmac_get_version=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hmac_libhmac_get_version" >&5 -$as_echo "$ac_cv_lib_hmac_libhmac_get_version" >&6; } -if test "x$ac_cv_lib_hmac_libhmac_get_version" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hmac_libhmac_get_version" >&5 +printf "%s\n" "$ac_cv_lib_hmac_libhmac_get_version" >&6; } +if test "x$ac_cv_lib_hmac_libhmac_get_version" = xyes +then : ac_cv_libhmac_dummy=yes -else +else $as_nop ac_cv_libhmac=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhmac_md5_initialize in -lhmac" >&5 -$as_echo_n "checking for libhmac_md5_initialize in -lhmac... " >&6; } -if ${ac_cv_lib_hmac_libhmac_md5_initialize+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libhmac_md5_initialize in -lhmac" >&5 +printf %s "checking for libhmac_md5_initialize in -lhmac... " >&6; } +if test ${ac_cv_lib_hmac_libhmac_md5_initialize+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lhmac $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -50075,40 +55644,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libhmac_md5_initialize (); int -main () +main (void) { return libhmac_md5_initialize (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_hmac_libhmac_md5_initialize=yes -else +else $as_nop ac_cv_lib_hmac_libhmac_md5_initialize=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hmac_libhmac_md5_initialize" >&5 -$as_echo "$ac_cv_lib_hmac_libhmac_md5_initialize" >&6; } -if test "x$ac_cv_lib_hmac_libhmac_md5_initialize" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hmac_libhmac_md5_initialize" >&5 +printf "%s\n" "$ac_cv_lib_hmac_libhmac_md5_initialize" >&6; } +if test "x$ac_cv_lib_hmac_libhmac_md5_initialize" = xyes +then : ac_cv_libhmac_dummy=yes -else +else $as_nop ac_cv_libhmac=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhmac_md5_update in -lhmac" >&5 -$as_echo_n "checking for libhmac_md5_update in -lhmac... " >&6; } -if ${ac_cv_lib_hmac_libhmac_md5_update+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libhmac_md5_update in -lhmac" >&5 +printf %s "checking for libhmac_md5_update in -lhmac... " >&6; } +if test ${ac_cv_lib_hmac_libhmac_md5_update+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lhmac $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -50117,40 +55686,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libhmac_md5_update (); int -main () +main (void) { return libhmac_md5_update (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_hmac_libhmac_md5_update=yes -else +else $as_nop ac_cv_lib_hmac_libhmac_md5_update=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hmac_libhmac_md5_update" >&5 -$as_echo "$ac_cv_lib_hmac_libhmac_md5_update" >&6; } -if test "x$ac_cv_lib_hmac_libhmac_md5_update" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hmac_libhmac_md5_update" >&5 +printf "%s\n" "$ac_cv_lib_hmac_libhmac_md5_update" >&6; } +if test "x$ac_cv_lib_hmac_libhmac_md5_update" = xyes +then : ac_cv_libhmac_dummy=yes -else +else $as_nop ac_cv_libhmac=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhmac_md5_finalize in -lhmac" >&5 -$as_echo_n "checking for libhmac_md5_finalize in -lhmac... " >&6; } -if ${ac_cv_lib_hmac_libhmac_md5_finalize+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libhmac_md5_finalize in -lhmac" >&5 +printf %s "checking for libhmac_md5_finalize in -lhmac... " >&6; } +if test ${ac_cv_lib_hmac_libhmac_md5_finalize+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lhmac $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -50159,40 +55728,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libhmac_md5_finalize (); int -main () +main (void) { return libhmac_md5_finalize (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_hmac_libhmac_md5_finalize=yes -else +else $as_nop ac_cv_lib_hmac_libhmac_md5_finalize=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hmac_libhmac_md5_finalize" >&5 -$as_echo "$ac_cv_lib_hmac_libhmac_md5_finalize" >&6; } -if test "x$ac_cv_lib_hmac_libhmac_md5_finalize" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hmac_libhmac_md5_finalize" >&5 +printf "%s\n" "$ac_cv_lib_hmac_libhmac_md5_finalize" >&6; } +if test "x$ac_cv_lib_hmac_libhmac_md5_finalize" = xyes +then : ac_cv_libhmac_dummy=yes -else +else $as_nop ac_cv_libhmac=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhmac_md5_free in -lhmac" >&5 -$as_echo_n "checking for libhmac_md5_free in -lhmac... " >&6; } -if ${ac_cv_lib_hmac_libhmac_md5_free+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libhmac_md5_free in -lhmac" >&5 +printf %s "checking for libhmac_md5_free in -lhmac... " >&6; } +if test ${ac_cv_lib_hmac_libhmac_md5_free+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lhmac $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -50201,41 +55770,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libhmac_md5_free (); int -main () +main (void) { return libhmac_md5_free (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_hmac_libhmac_md5_free=yes -else +else $as_nop ac_cv_lib_hmac_libhmac_md5_free=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hmac_libhmac_md5_free" >&5 -$as_echo "$ac_cv_lib_hmac_libhmac_md5_free" >&6; } -if test "x$ac_cv_lib_hmac_libhmac_md5_free" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hmac_libhmac_md5_free" >&5 +printf "%s\n" "$ac_cv_lib_hmac_libhmac_md5_free" >&6; } +if test "x$ac_cv_lib_hmac_libhmac_md5_free" = xyes +then : ac_cv_libhmac_dummy=yes -else +else $as_nop ac_cv_libhmac=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhmac_sha1_initialize in -lhmac" >&5 -$as_echo_n "checking for libhmac_sha1_initialize in -lhmac... " >&6; } -if ${ac_cv_lib_hmac_libhmac_sha1_initialize+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libhmac_sha1_initialize in -lhmac" >&5 +printf %s "checking for libhmac_sha1_initialize in -lhmac... " >&6; } +if test ${ac_cv_lib_hmac_libhmac_sha1_initialize+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lhmac $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -50244,40 +55813,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libhmac_sha1_initialize (); int -main () +main (void) { return libhmac_sha1_initialize (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_hmac_libhmac_sha1_initialize=yes -else +else $as_nop ac_cv_lib_hmac_libhmac_sha1_initialize=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hmac_libhmac_sha1_initialize" >&5 -$as_echo "$ac_cv_lib_hmac_libhmac_sha1_initialize" >&6; } -if test "x$ac_cv_lib_hmac_libhmac_sha1_initialize" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hmac_libhmac_sha1_initialize" >&5 +printf "%s\n" "$ac_cv_lib_hmac_libhmac_sha1_initialize" >&6; } +if test "x$ac_cv_lib_hmac_libhmac_sha1_initialize" = xyes +then : ac_cv_libhmac_dummy=yes -else +else $as_nop ac_cv_libhmac=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhmac_sha1_update in -lhmac" >&5 -$as_echo_n "checking for libhmac_sha1_update in -lhmac... " >&6; } -if ${ac_cv_lib_hmac_libhmac_sha1_update+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libhmac_sha1_update in -lhmac" >&5 +printf %s "checking for libhmac_sha1_update in -lhmac... " >&6; } +if test ${ac_cv_lib_hmac_libhmac_sha1_update+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lhmac $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -50286,40 +55855,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libhmac_sha1_update (); int -main () +main (void) { return libhmac_sha1_update (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_hmac_libhmac_sha1_update=yes -else +else $as_nop ac_cv_lib_hmac_libhmac_sha1_update=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hmac_libhmac_sha1_update" >&5 -$as_echo "$ac_cv_lib_hmac_libhmac_sha1_update" >&6; } -if test "x$ac_cv_lib_hmac_libhmac_sha1_update" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hmac_libhmac_sha1_update" >&5 +printf "%s\n" "$ac_cv_lib_hmac_libhmac_sha1_update" >&6; } +if test "x$ac_cv_lib_hmac_libhmac_sha1_update" = xyes +then : ac_cv_libhmac_dummy=yes -else +else $as_nop ac_cv_libhmac=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhmac_sha1_finalize in -lhmac" >&5 -$as_echo_n "checking for libhmac_sha1_finalize in -lhmac... " >&6; } -if ${ac_cv_lib_hmac_libhmac_sha1_finalize+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libhmac_sha1_finalize in -lhmac" >&5 +printf %s "checking for libhmac_sha1_finalize in -lhmac... " >&6; } +if test ${ac_cv_lib_hmac_libhmac_sha1_finalize+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lhmac $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -50328,40 +55897,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libhmac_sha1_finalize (); int -main () +main (void) { return libhmac_sha1_finalize (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_hmac_libhmac_sha1_finalize=yes -else +else $as_nop ac_cv_lib_hmac_libhmac_sha1_finalize=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hmac_libhmac_sha1_finalize" >&5 -$as_echo "$ac_cv_lib_hmac_libhmac_sha1_finalize" >&6; } -if test "x$ac_cv_lib_hmac_libhmac_sha1_finalize" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hmac_libhmac_sha1_finalize" >&5 +printf "%s\n" "$ac_cv_lib_hmac_libhmac_sha1_finalize" >&6; } +if test "x$ac_cv_lib_hmac_libhmac_sha1_finalize" = xyes +then : ac_cv_libhmac_dummy=yes -else +else $as_nop ac_cv_libhmac=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhmac_sha1_free in -lhmac" >&5 -$as_echo_n "checking for libhmac_sha1_free in -lhmac... " >&6; } -if ${ac_cv_lib_hmac_libhmac_sha1_free+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libhmac_sha1_free in -lhmac" >&5 +printf %s "checking for libhmac_sha1_free in -lhmac... " >&6; } +if test ${ac_cv_lib_hmac_libhmac_sha1_free+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lhmac $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -50370,41 +55939,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libhmac_sha1_free (); int -main () +main (void) { return libhmac_sha1_free (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_hmac_libhmac_sha1_free=yes -else +else $as_nop ac_cv_lib_hmac_libhmac_sha1_free=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hmac_libhmac_sha1_free" >&5 -$as_echo "$ac_cv_lib_hmac_libhmac_sha1_free" >&6; } -if test "x$ac_cv_lib_hmac_libhmac_sha1_free" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hmac_libhmac_sha1_free" >&5 +printf "%s\n" "$ac_cv_lib_hmac_libhmac_sha1_free" >&6; } +if test "x$ac_cv_lib_hmac_libhmac_sha1_free" = xyes +then : ac_cv_libhmac_dummy=yes -else +else $as_nop ac_cv_libhmac=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhmac_sha224_initialize in -lhmac" >&5 -$as_echo_n "checking for libhmac_sha224_initialize in -lhmac... " >&6; } -if ${ac_cv_lib_hmac_libhmac_sha224_initialize+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libhmac_sha224_initialize in -lhmac" >&5 +printf %s "checking for libhmac_sha224_initialize in -lhmac... " >&6; } +if test ${ac_cv_lib_hmac_libhmac_sha224_initialize+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lhmac $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -50413,40 +55982,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libhmac_sha224_initialize (); int -main () +main (void) { return libhmac_sha224_initialize (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_hmac_libhmac_sha224_initialize=yes -else +else $as_nop ac_cv_lib_hmac_libhmac_sha224_initialize=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hmac_libhmac_sha224_initialize" >&5 -$as_echo "$ac_cv_lib_hmac_libhmac_sha224_initialize" >&6; } -if test "x$ac_cv_lib_hmac_libhmac_sha224_initialize" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hmac_libhmac_sha224_initialize" >&5 +printf "%s\n" "$ac_cv_lib_hmac_libhmac_sha224_initialize" >&6; } +if test "x$ac_cv_lib_hmac_libhmac_sha224_initialize" = xyes +then : ac_cv_libhmac_dummy=yes -else +else $as_nop ac_cv_libhmac=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhmac_sha224_update in -lhmac" >&5 -$as_echo_n "checking for libhmac_sha224_update in -lhmac... " >&6; } -if ${ac_cv_lib_hmac_libhmac_sha224_update+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libhmac_sha224_update in -lhmac" >&5 +printf %s "checking for libhmac_sha224_update in -lhmac... " >&6; } +if test ${ac_cv_lib_hmac_libhmac_sha224_update+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lhmac $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -50455,40 +56024,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libhmac_sha224_update (); int -main () +main (void) { return libhmac_sha224_update (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_hmac_libhmac_sha224_update=yes -else +else $as_nop ac_cv_lib_hmac_libhmac_sha224_update=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hmac_libhmac_sha224_update" >&5 -$as_echo "$ac_cv_lib_hmac_libhmac_sha224_update" >&6; } -if test "x$ac_cv_lib_hmac_libhmac_sha224_update" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hmac_libhmac_sha224_update" >&5 +printf "%s\n" "$ac_cv_lib_hmac_libhmac_sha224_update" >&6; } +if test "x$ac_cv_lib_hmac_libhmac_sha224_update" = xyes +then : ac_cv_libhmac_dummy=yes -else +else $as_nop ac_cv_libhmac=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhmac_sha224_finalize in -lhmac" >&5 -$as_echo_n "checking for libhmac_sha224_finalize in -lhmac... " >&6; } -if ${ac_cv_lib_hmac_libhmac_sha224_finalize+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libhmac_sha224_finalize in -lhmac" >&5 +printf %s "checking for libhmac_sha224_finalize in -lhmac... " >&6; } +if test ${ac_cv_lib_hmac_libhmac_sha224_finalize+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lhmac $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -50497,40 +56066,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libhmac_sha224_finalize (); int -main () +main (void) { return libhmac_sha224_finalize (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_hmac_libhmac_sha224_finalize=yes -else +else $as_nop ac_cv_lib_hmac_libhmac_sha224_finalize=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hmac_libhmac_sha224_finalize" >&5 -$as_echo "$ac_cv_lib_hmac_libhmac_sha224_finalize" >&6; } -if test "x$ac_cv_lib_hmac_libhmac_sha224_finalize" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hmac_libhmac_sha224_finalize" >&5 +printf "%s\n" "$ac_cv_lib_hmac_libhmac_sha224_finalize" >&6; } +if test "x$ac_cv_lib_hmac_libhmac_sha224_finalize" = xyes +then : ac_cv_libhmac_dummy=yes -else +else $as_nop ac_cv_libhmac=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhmac_sha224_free in -lhmac" >&5 -$as_echo_n "checking for libhmac_sha224_free in -lhmac... " >&6; } -if ${ac_cv_lib_hmac_libhmac_sha224_free+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libhmac_sha224_free in -lhmac" >&5 +printf %s "checking for libhmac_sha224_free in -lhmac... " >&6; } +if test ${ac_cv_lib_hmac_libhmac_sha224_free+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lhmac $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -50539,41 +56108,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libhmac_sha224_free (); int -main () +main (void) { return libhmac_sha224_free (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_hmac_libhmac_sha224_free=yes -else +else $as_nop ac_cv_lib_hmac_libhmac_sha224_free=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hmac_libhmac_sha224_free" >&5 -$as_echo "$ac_cv_lib_hmac_libhmac_sha224_free" >&6; } -if test "x$ac_cv_lib_hmac_libhmac_sha224_free" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hmac_libhmac_sha224_free" >&5 +printf "%s\n" "$ac_cv_lib_hmac_libhmac_sha224_free" >&6; } +if test "x$ac_cv_lib_hmac_libhmac_sha224_free" = xyes +then : ac_cv_libhmac_dummy=yes -else +else $as_nop ac_cv_libhmac=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhmac_sha256_initialize in -lhmac" >&5 -$as_echo_n "checking for libhmac_sha256_initialize in -lhmac... " >&6; } -if ${ac_cv_lib_hmac_libhmac_sha256_initialize+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libhmac_sha256_initialize in -lhmac" >&5 +printf %s "checking for libhmac_sha256_initialize in -lhmac... " >&6; } +if test ${ac_cv_lib_hmac_libhmac_sha256_initialize+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lhmac $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -50582,40 +56151,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libhmac_sha256_initialize (); int -main () +main (void) { return libhmac_sha256_initialize (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_hmac_libhmac_sha256_initialize=yes -else +else $as_nop ac_cv_lib_hmac_libhmac_sha256_initialize=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hmac_libhmac_sha256_initialize" >&5 -$as_echo "$ac_cv_lib_hmac_libhmac_sha256_initialize" >&6; } -if test "x$ac_cv_lib_hmac_libhmac_sha256_initialize" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hmac_libhmac_sha256_initialize" >&5 +printf "%s\n" "$ac_cv_lib_hmac_libhmac_sha256_initialize" >&6; } +if test "x$ac_cv_lib_hmac_libhmac_sha256_initialize" = xyes +then : ac_cv_libhmac_dummy=yes -else +else $as_nop ac_cv_libhmac=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhmac_sha256_update in -lhmac" >&5 -$as_echo_n "checking for libhmac_sha256_update in -lhmac... " >&6; } -if ${ac_cv_lib_hmac_libhmac_sha256_update+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libhmac_sha256_update in -lhmac" >&5 +printf %s "checking for libhmac_sha256_update in -lhmac... " >&6; } +if test ${ac_cv_lib_hmac_libhmac_sha256_update+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lhmac $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -50624,40 +56193,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libhmac_sha256_update (); int -main () +main (void) { return libhmac_sha256_update (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_hmac_libhmac_sha256_update=yes -else +else $as_nop ac_cv_lib_hmac_libhmac_sha256_update=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hmac_libhmac_sha256_update" >&5 -$as_echo "$ac_cv_lib_hmac_libhmac_sha256_update" >&6; } -if test "x$ac_cv_lib_hmac_libhmac_sha256_update" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hmac_libhmac_sha256_update" >&5 +printf "%s\n" "$ac_cv_lib_hmac_libhmac_sha256_update" >&6; } +if test "x$ac_cv_lib_hmac_libhmac_sha256_update" = xyes +then : ac_cv_libhmac_dummy=yes -else +else $as_nop ac_cv_libhmac=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhmac_sha256_finalize in -lhmac" >&5 -$as_echo_n "checking for libhmac_sha256_finalize in -lhmac... " >&6; } -if ${ac_cv_lib_hmac_libhmac_sha256_finalize+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libhmac_sha256_finalize in -lhmac" >&5 +printf %s "checking for libhmac_sha256_finalize in -lhmac... " >&6; } +if test ${ac_cv_lib_hmac_libhmac_sha256_finalize+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lhmac $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -50666,40 +56235,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libhmac_sha256_finalize (); int -main () +main (void) { return libhmac_sha256_finalize (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_hmac_libhmac_sha256_finalize=yes -else +else $as_nop ac_cv_lib_hmac_libhmac_sha256_finalize=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hmac_libhmac_sha256_finalize" >&5 -$as_echo "$ac_cv_lib_hmac_libhmac_sha256_finalize" >&6; } -if test "x$ac_cv_lib_hmac_libhmac_sha256_finalize" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hmac_libhmac_sha256_finalize" >&5 +printf "%s\n" "$ac_cv_lib_hmac_libhmac_sha256_finalize" >&6; } +if test "x$ac_cv_lib_hmac_libhmac_sha256_finalize" = xyes +then : ac_cv_libhmac_dummy=yes -else +else $as_nop ac_cv_libhmac=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhmac_sha256_free in -lhmac" >&5 -$as_echo_n "checking for libhmac_sha256_free in -lhmac... " >&6; } -if ${ac_cv_lib_hmac_libhmac_sha256_free+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libhmac_sha256_free in -lhmac" >&5 +printf %s "checking for libhmac_sha256_free in -lhmac... " >&6; } +if test ${ac_cv_lib_hmac_libhmac_sha256_free+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lhmac $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -50708,41 +56277,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libhmac_sha256_free (); int -main () +main (void) { return libhmac_sha256_free (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_hmac_libhmac_sha256_free=yes -else +else $as_nop ac_cv_lib_hmac_libhmac_sha256_free=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hmac_libhmac_sha256_free" >&5 -$as_echo "$ac_cv_lib_hmac_libhmac_sha256_free" >&6; } -if test "x$ac_cv_lib_hmac_libhmac_sha256_free" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hmac_libhmac_sha256_free" >&5 +printf "%s\n" "$ac_cv_lib_hmac_libhmac_sha256_free" >&6; } +if test "x$ac_cv_lib_hmac_libhmac_sha256_free" = xyes +then : ac_cv_libhmac_dummy=yes -else +else $as_nop ac_cv_libhmac=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhmac_sha512_initialize in -lhmac" >&5 -$as_echo_n "checking for libhmac_sha512_initialize in -lhmac... " >&6; } -if ${ac_cv_lib_hmac_libhmac_sha512_initialize+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libhmac_sha512_initialize in -lhmac" >&5 +printf %s "checking for libhmac_sha512_initialize in -lhmac... " >&6; } +if test ${ac_cv_lib_hmac_libhmac_sha512_initialize+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lhmac $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -50751,40 +56320,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libhmac_sha512_initialize (); int -main () +main (void) { return libhmac_sha512_initialize (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_hmac_libhmac_sha512_initialize=yes -else +else $as_nop ac_cv_lib_hmac_libhmac_sha512_initialize=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hmac_libhmac_sha512_initialize" >&5 -$as_echo "$ac_cv_lib_hmac_libhmac_sha512_initialize" >&6; } -if test "x$ac_cv_lib_hmac_libhmac_sha512_initialize" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hmac_libhmac_sha512_initialize" >&5 +printf "%s\n" "$ac_cv_lib_hmac_libhmac_sha512_initialize" >&6; } +if test "x$ac_cv_lib_hmac_libhmac_sha512_initialize" = xyes +then : ac_cv_libhmac_dummy=yes -else +else $as_nop ac_cv_libhmac=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhmac_sha512_update in -lhmac" >&5 -$as_echo_n "checking for libhmac_sha512_update in -lhmac... " >&6; } -if ${ac_cv_lib_hmac_libhmac_sha512_update+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libhmac_sha512_update in -lhmac" >&5 +printf %s "checking for libhmac_sha512_update in -lhmac... " >&6; } +if test ${ac_cv_lib_hmac_libhmac_sha512_update+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lhmac $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -50793,40 +56362,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libhmac_sha512_update (); int -main () +main (void) { return libhmac_sha512_update (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_hmac_libhmac_sha512_update=yes -else +else $as_nop ac_cv_lib_hmac_libhmac_sha512_update=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hmac_libhmac_sha512_update" >&5 -$as_echo "$ac_cv_lib_hmac_libhmac_sha512_update" >&6; } -if test "x$ac_cv_lib_hmac_libhmac_sha512_update" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hmac_libhmac_sha512_update" >&5 +printf "%s\n" "$ac_cv_lib_hmac_libhmac_sha512_update" >&6; } +if test "x$ac_cv_lib_hmac_libhmac_sha512_update" = xyes +then : ac_cv_libhmac_dummy=yes -else +else $as_nop ac_cv_libhmac=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhmac_sha512_finalize in -lhmac" >&5 -$as_echo_n "checking for libhmac_sha512_finalize in -lhmac... " >&6; } -if ${ac_cv_lib_hmac_libhmac_sha512_finalize+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libhmac_sha512_finalize in -lhmac" >&5 +printf %s "checking for libhmac_sha512_finalize in -lhmac... " >&6; } +if test ${ac_cv_lib_hmac_libhmac_sha512_finalize+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lhmac $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -50835,40 +56404,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libhmac_sha512_finalize (); int -main () +main (void) { return libhmac_sha512_finalize (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_hmac_libhmac_sha512_finalize=yes -else +else $as_nop ac_cv_lib_hmac_libhmac_sha512_finalize=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hmac_libhmac_sha512_finalize" >&5 -$as_echo "$ac_cv_lib_hmac_libhmac_sha512_finalize" >&6; } -if test "x$ac_cv_lib_hmac_libhmac_sha512_finalize" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hmac_libhmac_sha512_finalize" >&5 +printf "%s\n" "$ac_cv_lib_hmac_libhmac_sha512_finalize" >&6; } +if test "x$ac_cv_lib_hmac_libhmac_sha512_finalize" = xyes +then : ac_cv_libhmac_dummy=yes -else +else $as_nop ac_cv_libhmac=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhmac_sha512_free in -lhmac" >&5 -$as_echo_n "checking for libhmac_sha512_free in -lhmac... " >&6; } -if ${ac_cv_lib_hmac_libhmac_sha512_free+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libhmac_sha512_free in -lhmac" >&5 +printf %s "checking for libhmac_sha512_free in -lhmac... " >&6; } +if test ${ac_cv_lib_hmac_libhmac_sha512_free+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lhmac $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -50877,32 +56446,31 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libhmac_sha512_free (); int -main () +main (void) { return libhmac_sha512_free (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_hmac_libhmac_sha512_free=yes -else +else $as_nop ac_cv_lib_hmac_libhmac_sha512_free=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hmac_libhmac_sha512_free" >&5 -$as_echo "$ac_cv_lib_hmac_libhmac_sha512_free" >&6; } -if test "x$ac_cv_lib_hmac_libhmac_sha512_free" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hmac_libhmac_sha512_free" >&5 +printf "%s\n" "$ac_cv_lib_hmac_libhmac_sha512_free" >&6; } +if test "x$ac_cv_lib_hmac_libhmac_sha512_free" = xyes +then : ac_cv_libhmac_dummy=yes -else +else $as_nop ac_cv_libhmac=no fi @@ -50911,9 +56479,10 @@ fi fi - if test "x$ac_cv_with_libhmac" != x && test "x$ac_cv_with_libhmac" != xauto-detect && test "x$ac_cv_libhmac" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_with_libhmac" != x && test "x$ac_cv_with_libhmac" != xauto-detect && test "x$ac_cv_libhmac" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "unable to find supported libhmac in directory: $ac_cv_with_libhmac See \`config.log' for more details" "$LINENO" 5; } @@ -50921,20 +56490,22 @@ fi - if test "x$ac_cv_libhmac" = xyes; then : + if test "x$ac_cv_libhmac" = xyes +then : -$as_echo "#define HAVE_LIBHMAC 1" >>confdefs.h +printf "%s\n" "#define HAVE_LIBHMAC 1" >>confdefs.h fi - if test "x$ac_cv_libhmac" = xyes; then : + if test "x$ac_cv_libhmac" = xyes +then : ac_cv_libhmac_md5=libhmac ac_cv_libhmac_sha1=libhmac ac_cv_libhmac_sha224=libhmac ac_cv_libhmac_sha256=libhmac ac_cv_libhmac_sha512=libhmac -else +else $as_nop ac_cv_libhmac_md5=no ac_cv_libhmac_sha1=no ac_cv_libhmac_sha224=no @@ -50942,102 +56513,115 @@ ac_cv_libhmac_sha512=no fi - if test "x$ac_cv_libhmac" = xyes; then : + if test "x$ac_cv_libhmac" = xyes +then : HAVE_LIBHMAC=1 -else +else $as_nop HAVE_LIBHMAC=0 fi - if test "x$ac_cv_libhmac" != xyes; then : + if test "x$ac_cv_libhmac" != xyes +then : # Check whether --with-openssl was given. -if test "${with_openssl+set}" = set; then : +if test ${with_openssl+y} +then : withval=$with_openssl; ac_cv_with_openssl=$withval -else +else $as_nop ac_cv_with_openssl=auto-detect fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for OpenSSL in includedir and libdir or in the specified DIR, or no if not to use OpenSSL" >&5 -$as_echo_n "checking whether to use search for OpenSSL in includedir and libdir or in the specified DIR, or no if not to use OpenSSL... " >&6; } -if ${ac_cv_with_openssl+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use search for OpenSSL in includedir and libdir or in the specified DIR, or no if not to use OpenSSL" >&5 +printf %s "checking whether to use search for OpenSSL in includedir and libdir or in the specified DIR, or no if not to use OpenSSL... " >&6; } +if test ${ac_cv_with_openssl+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_with_openssl=auto-detect fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_openssl" >&5 -$as_echo "$ac_cv_with_openssl" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_openssl" >&5 +printf "%s\n" "$ac_cv_with_openssl" >&6; } # Check whether --enable-openssl-evp-cipher was given. -if test "${enable_openssl_evp_cipher+set}" = set; then : +if test ${enable_openssl_evp_cipher+y} +then : enableval=$enable_openssl_evp_cipher; ac_cv_enable_openssl_evp_cipher=$enableval -else +else $as_nop ac_cv_enable_openssl_evp_cipher=auto-detect fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable enable OpenSSL EVP CIPHER support, or no to disable" >&5 -$as_echo_n "checking whether to enable enable OpenSSL EVP CIPHER support, or no to disable... " >&6; } -if ${ac_cv_enable_openssl_evp_cipher+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable enable OpenSSL EVP CIPHER support, or no to disable" >&5 +printf %s "checking whether to enable enable OpenSSL EVP CIPHER support, or no to disable... " >&6; } +if test ${ac_cv_enable_openssl_evp_cipher+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_enable_openssl_evp_cipher=auto-detect fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_openssl_evp_cipher" >&5 -$as_echo "$ac_cv_enable_openssl_evp_cipher" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_openssl_evp_cipher" >&5 +printf "%s\n" "$ac_cv_enable_openssl_evp_cipher" >&6; } # Check whether --enable-openssl-evp-md was given. -if test "${enable_openssl_evp_md+set}" = set; then : +if test ${enable_openssl_evp_md+y} +then : enableval=$enable_openssl_evp_md; ac_cv_enable_openssl_evp_md=$enableval -else +else $as_nop ac_cv_enable_openssl_evp_md=auto-detect fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable enable OpenSSL EVP MD support, or no to disable" >&5 -$as_echo_n "checking whether to enable enable OpenSSL EVP MD support, or no to disable... " >&6; } -if ${ac_cv_enable_openssl_evp_md+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable enable OpenSSL EVP MD support, or no to disable" >&5 +printf %s "checking whether to enable enable OpenSSL EVP MD support, or no to disable... " >&6; } +if test ${ac_cv_enable_openssl_evp_md+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_enable_openssl_evp_md=auto-detect fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_openssl_evp_md" >&5 -$as_echo "$ac_cv_enable_openssl_evp_md" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_openssl_evp_md" >&5 +printf "%s\n" "$ac_cv_enable_openssl_evp_md" >&6; } - if test "x$ac_cv_enable_static_executables" = xno; then : - if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_openssl" = xno; then : + if test "x$ac_cv_enable_static_executables" != xyes +then : + if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_openssl" = xno +then : ac_cv_libcrypto=no -else - if test "x$ac_cv_with_openssl" != x && test "x$ac_cv_with_openssl" != xauto-detect; then : - if test -d "$ac_cv_with_openssl"; then : +else $as_nop + if test "x$ac_cv_with_openssl" != x && test "x$ac_cv_with_openssl" != xauto-detect +then : + if test -d "$ac_cv_with_openssl" +then : CFLAGS="$CFLAGS -I${ac_cv_with_openssl}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_openssl}/lib" -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "no such directory: $ac_cv_with_openssl See \`config.log' for more details" "$LINENO" 5; } fi -else - if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : +else $as_nop + if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x" +then : pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl" >&5 -$as_echo_n "checking for openssl... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openssl >= 1.0" >&5 +printf %s "checking for openssl >= 1.0... " >&6; } if test -n "$openssl_CFLAGS"; then pkg_cv_openssl_CFLAGS="$openssl_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl >= 1.0\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl >= 1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "openssl >= 1.0") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_openssl_CFLAGS=`$PKG_CONFIG --cflags "openssl >= 1.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -51051,10 +56635,10 @@ pkg_cv_openssl_LIBS="$openssl_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl >= 1.0\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl >= 1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "openssl >= 1.0") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_openssl_LIBS=`$PKG_CONFIG --libs "openssl >= 1.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -51068,8 +56652,8 @@ if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -51077,73 +56661,67 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - openssl_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "openssl >= 1.0" 2>&1` + openssl_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "openssl >= 1.0" 2>&1` else - openssl_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "openssl >= 1.0" 2>&1` + openssl_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "openssl >= 1.0" 2>&1` fi - # Put the nasty error message in config.log where it belongs - echo "$openssl_PKG_ERRORS" >&5 + # Put the nasty error message in config.log where it belongs + echo "$openssl_PKG_ERRORS" >&5 - ac_cv_libcrypto=no + ac_cv_libcrypto=no ac_cv_libcrypto_evp=no elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ac_cv_libcrypto=no + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ac_cv_libcrypto=no ac_cv_libcrypto_evp=no else - openssl_CFLAGS=$pkg_cv_openssl_CFLAGS - openssl_LIBS=$pkg_cv_openssl_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ac_cv_libcrypto=yes + openssl_CFLAGS=$pkg_cv_openssl_CFLAGS + openssl_LIBS=$pkg_cv_openssl_LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + ac_cv_libcrypto=yes ac_cv_libcrypto_evp=yes fi fi - if test "x$ac_cv_libcrypto" = xyes; then : + if test "x$ac_cv_libcrypto" = xyes +then : ac_cv_libcrypto_CPPFLAGS="$pkg_cv_openssl_CFLAGS" ac_cv_libcrypto_LIBADD="$pkg_cv_openssl_LIBS" fi fi - if test "x$ac_cv_libcrypto" != xyes; then : - for ac_header in openssl/opensslv.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "openssl/opensslv.h" "ac_cv_header_openssl_opensslv_h" "$ac_includes_default" -if test "x$ac_cv_header_openssl_opensslv_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_OPENSSL_OPENSSLV_H 1 -_ACEOF + if test "x$ac_cv_libcrypto" != xyes +then : + ac_fn_c_check_header_compile "$LINENO" "openssl/opensslv.h" "ac_cv_header_openssl_opensslv_h" "$ac_includes_default" +if test "x$ac_cv_header_openssl_opensslv_h" = xyes +then : + printf "%s\n" "#define HAVE_OPENSSL_OPENSSLV_H 1" >>confdefs.h fi -done - - for ac_header in openssl/evp.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "openssl/evp.h" "ac_cv_header_openssl_evp_h" "$ac_includes_default" -if test "x$ac_cv_header_openssl_evp_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_OPENSSL_EVP_H 1 -_ACEOF + ac_fn_c_check_header_compile "$LINENO" "openssl/evp.h" "ac_cv_header_openssl_evp_h" "$ac_includes_default" +if test "x$ac_cv_header_openssl_evp_h" = xyes +then : + printf "%s\n" "#define HAVE_OPENSSL_EVP_H 1" >>confdefs.h fi -done - - if test "x$ac_cv_header_openssl_evp_h" = xno; then : + if test "x$ac_cv_header_openssl_evp_h" = xno +then : ac_cv_libcrypto=no ac_cv_libcrypto_evp=no -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openssl/evp.h can be used in combination with zlib.h" >&5 -$as_echo_n "checking if openssl/evp.h can be used in combination with zlib.h... " >&6; } -if ${ac_cv_openssl_evp_zlib_compatible+:} false; then : - $as_echo_n "(cached) " >&6 -else +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if openssl/evp.h can be used in combination with zlib.h" >&5 +printf %s "checking if openssl/evp.h can be used in combination with zlib.h... " >&6; } +if test ${ac_cv_openssl_evp_zlib_compatible+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -51155,19 +56733,20 @@ #include #include int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_openssl_evp_zlib_compatible=yes -else +else $as_nop ac_cv_openssl_evp_zlib_compatible=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -51176,14 +56755,15 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_openssl_evp_zlib_compatible" >&5 -$as_echo "$ac_cv_openssl_evp_zlib_compatible" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_openssl_evp_zlib_compatible" >&5 +printf "%s\n" "$ac_cv_openssl_evp_zlib_compatible" >&6; } - if test "x$ac_cv_openssl_evp_zlib_compatible" = xyes; then : + if test "x$ac_cv_openssl_evp_zlib_compatible" = xyes +then : ac_cv_libcrypto=yes ac_cv_libcrypto_evp=yes -else +else $as_nop ac_cv_libcrypto=no ac_cv_libcrypto_evp=no fi @@ -51191,43 +56771,53 @@ fi - if test "x$ac_cv_libcrypto_evp" != xyes && test "$ac_cv_header_openssl_opensslv" = xyes; then : + if test "x$ac_cv_libcrypto_evp" != xyes && test "$ac_cv_header_openssl_opensslv" = xyes +then : ac_cv_libcrypto=yes fi fi - if test "x$ac_cv_libcrypto" = xyes && test "x$ac_cv_libcrypto_evp" = xyes; then : + if test "x$ac_cv_libcrypto" = xyes && test "x$ac_cv_libcrypto_evp" = xyes +then : -$as_echo "#define HAVE_OPENSSL_EVP_H 1" >>confdefs.h +printf "%s\n" "#define HAVE_OPENSSL_EVP_H 1" >>confdefs.h HAVE_OPENSSL_EVP_H=1 -else +else $as_nop HAVE_OPENSSL_EVP_H=0 fi - if test "x$ac_cv_libcrypto" != xno; then : + if test "x$ac_cv_libcrypto" != xno +then : + +printf "%s\n" "#define HAVE_LIBCRYPTO 1" >>confdefs.h -$as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h + ac_cv_libcrypto_CPPFLAGS="$openssl_CFLAGS" + ac_cv_libcrypto_LIBADD="$openssl_LIBS" - ac_cv_libcrypto_LIBADD="-lcrypto" + if test "x$ac_cv_libcrypto_LIBADD" = x +then : + ac_cv_libcrypto_LIBADD="-lcrypto" +fi case $host in #( *cygwin*) : - ac_cv_libcrypto_LIBADD="-lcrypto -lz" ;; #( + ac_cv_libcrypto_LIBADD="$ac_cv_libcrypto_LIBADD -lz" ;; #( *) : ;; esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +printf %s "checking for dlopen in -ldl... " >&6; } +if test ${ac_cv_lib_dl_dlopen+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -51236,30 +56826,29 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char dlopen (); int -main () +main (void) { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_dl_dlopen=yes -else +else $as_nop ac_cv_lib_dl_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes +then : LIBDL_LIBADD="-ldl" fi @@ -51271,24 +56860,28 @@ fi - if test "x$ac_cv_libcrypto_CPPFLAGS" != "x"; then : + if test "x$ac_cv_libcrypto_CPPFLAGS" != "x" +then : LIBCRYPTO_CPPFLAGS=$ac_cv_libcrypto_CPPFLAGS fi - if test "x$ac_cv_libcrypto_LIBADD" != "x"; then : + if test "x$ac_cv_libcrypto_LIBADD" != "x" +then : LIBCRYPTO_LIBADD=$ac_cv_libcrypto_LIBADD fi - if test "x$ac_cv_libcrypto" != xno; then : + if test "x$ac_cv_libcrypto" != xno +then : ax_libcrypto_pc_libs_private=-lcrypto fi - if test "x$ac_cv_libcrypto" != xno; then : + if test "x$ac_cv_libcrypto" != xno +then : ax_libcrypto_spec_requires=openssl ax_libcrypto_spec_build_requires=openssl-devel @@ -51297,17 +56890,20 @@ fi - if test "x$ac_cv_libcrypto" != xno; then : + if test "x$ac_cv_libcrypto" != xno +then : ac_cv_libcrypto_md5=no - if test "x$ac_cv_libcrypto_evp" = xyes && test "x$ac_cv_libcrypto_evp_md" != xyes; then : + if test "x$ac_cv_libcrypto_evp" = xyes && test "x$ac_cv_libcrypto_evp_md" != xyes +then : ac_cv_libcrypto_evp_md=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_new in -lcrypto" >&5 -$as_echo_n "checking for EVP_MD_CTX_new in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_EVP_MD_CTX_new+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_new in -lcrypto" >&5 +printf %s "checking for EVP_MD_CTX_new in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_MD_CTX_new+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -51316,42 +56912,43 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char EVP_MD_CTX_new (); int -main () +main (void) { return EVP_MD_CTX_new (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_EVP_MD_CTX_new=yes -else +else $as_nop ac_cv_lib_crypto_EVP_MD_CTX_new=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_new" >&5 -$as_echo "$ac_cv_lib_crypto_EVP_MD_CTX_new" >&6; } -if test "x$ac_cv_lib_crypto_EVP_MD_CTX_new" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_new" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_MD_CTX_new" >&6; } +if test "x$ac_cv_lib_crypto_EVP_MD_CTX_new" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_dummy=no fi - if test "x$ac_cv_lib_crypto_EVP_MD_CTX_new" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_free in -lcrypto" >&5 -$as_echo_n "checking for EVP_MD_CTX_free in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_EVP_MD_CTX_free+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test "x$ac_cv_lib_crypto_EVP_MD_CTX_new" = xyes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_free in -lcrypto" >&5 +printf %s "checking for EVP_MD_CTX_free in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_MD_CTX_free+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -51360,42 +56957,42 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char EVP_MD_CTX_free (); int -main () +main (void) { return EVP_MD_CTX_free (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_EVP_MD_CTX_free=yes -else +else $as_nop ac_cv_lib_crypto_EVP_MD_CTX_free=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_free" >&5 -$as_echo "$ac_cv_lib_crypto_EVP_MD_CTX_free" >&6; } -if test "x$ac_cv_lib_crypto_EVP_MD_CTX_free" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_free" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_MD_CTX_free" >&6; } +if test "x$ac_cv_lib_crypto_EVP_MD_CTX_free" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_evp_md=no fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_init in -lcrypto" >&5 -$as_echo_n "checking for EVP_MD_CTX_init in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_EVP_MD_CTX_init+:} false; then : - $as_echo_n "(cached) " >&6 -else +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_init in -lcrypto" >&5 +printf %s "checking for EVP_MD_CTX_init in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_MD_CTX_init+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -51404,40 +57001,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char EVP_MD_CTX_init (); int -main () +main (void) { return EVP_MD_CTX_init (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_EVP_MD_CTX_init=yes -else +else $as_nop ac_cv_lib_crypto_EVP_MD_CTX_init=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_init" >&5 -$as_echo "$ac_cv_lib_crypto_EVP_MD_CTX_init" >&6; } -if test "x$ac_cv_lib_crypto_EVP_MD_CTX_init" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_init" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_MD_CTX_init" >&6; } +if test "x$ac_cv_lib_crypto_EVP_MD_CTX_init" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_evp_md=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_cleanup in -lcrypto" >&5 -$as_echo_n "checking for EVP_MD_CTX_cleanup in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_EVP_MD_CTX_cleanup+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_cleanup in -lcrypto" >&5 +printf %s "checking for EVP_MD_CTX_cleanup in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_MD_CTX_cleanup+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -51446,41 +57043,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char EVP_MD_CTX_cleanup (); int -main () +main (void) { return EVP_MD_CTX_cleanup (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_EVP_MD_CTX_cleanup=yes -else +else $as_nop ac_cv_lib_crypto_EVP_MD_CTX_cleanup=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_cleanup" >&5 -$as_echo "$ac_cv_lib_crypto_EVP_MD_CTX_cleanup" >&6; } -if test "x$ac_cv_lib_crypto_EVP_MD_CTX_cleanup" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_cleanup" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_MD_CTX_cleanup" >&6; } +if test "x$ac_cv_lib_crypto_EVP_MD_CTX_cleanup" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_evp_md=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ERR_remove_thread_state in -lcrypto" >&5 -$as_echo_n "checking for ERR_remove_thread_state in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_ERR_remove_thread_state+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ERR_remove_thread_state in -lcrypto" >&5 +printf %s "checking for ERR_remove_thread_state in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_ERR_remove_thread_state+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -51489,43 +57086,216 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char ERR_remove_thread_state (); int -main () +main (void) { return ERR_remove_thread_state (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_ERR_remove_thread_state=yes -else +else $as_nop ac_cv_lib_crypto_ERR_remove_thread_state=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_ERR_remove_thread_state" >&5 -$as_echo "$ac_cv_lib_crypto_ERR_remove_thread_state" >&6; } -if test "x$ac_cv_lib_crypto_ERR_remove_thread_state" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_ERR_remove_thread_state" >&5 +printf "%s\n" "$ac_cv_lib_crypto_ERR_remove_thread_state" >&6; } +if test "x$ac_cv_lib_crypto_ERR_remove_thread_state" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_evp_md=no fi fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_DigestInit_ex in -lcrypto" >&5 -$as_echo_n "checking for EVP_DigestInit_ex in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_EVP_DigestInit_ex+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_DigestInit_ex2 in -lcrypto" >&5 +printf %s "checking for EVP_DigestInit_ex2 in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_DigestInit_ex2+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypto $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char EVP_DigestInit_ex2 (); +int +main (void) +{ +return EVP_DigestInit_ex2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_crypto_EVP_DigestInit_ex2=yes +else $as_nop + ac_cv_lib_crypto_EVP_DigestInit_ex2=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_DigestInit_ex2" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_DigestInit_ex2" >&6; } +if test "x$ac_cv_lib_crypto_EVP_DigestInit_ex2" = xyes +then : + ac_cv_libcrypto_dummy=yes +else $as_nop + ac_cv_libcrypto_dummy=no +fi + + + if test "x$ac_cv_lib_crypto_EVP_DigestInit_ex2" = xyes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_reset in -lcrypto" >&5 +printf %s "checking for EVP_MD_CTX_reset in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_MD_CTX_reset+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypto $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char EVP_MD_CTX_reset (); +int +main (void) +{ +return EVP_MD_CTX_reset (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_crypto_EVP_MD_CTX_reset=yes +else $as_nop + ac_cv_lib_crypto_EVP_MD_CTX_reset=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_reset" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_MD_CTX_reset" >&6; } +if test "x$ac_cv_lib_crypto_EVP_MD_CTX_reset" = xyes +then : + ac_cv_libcrypto_dummy=yes +else $as_nop + ac_cv_libcrypto_evp_md=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_fetch in -lcrypto" >&5 +printf %s "checking for EVP_MD_fetch in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_MD_fetch+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypto $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char EVP_MD_fetch (); +int +main (void) +{ +return EVP_MD_fetch (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_crypto_EVP_MD_fetch=yes +else $as_nop + ac_cv_lib_crypto_EVP_MD_fetch=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_fetch" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_MD_fetch" >&6; } +if test "x$ac_cv_lib_crypto_EVP_MD_fetch" = xyes +then : + ac_cv_libcrypto_dummy=yes +else $as_nop + ac_cv_libcrypto_evp_md=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_free in -lcrypto" >&5 +printf %s "checking for EVP_MD_free in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_MD_free+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypto $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char EVP_MD_free (); +int +main (void) +{ +return EVP_MD_free (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_crypto_EVP_MD_free=yes +else $as_nop + ac_cv_lib_crypto_EVP_MD_free=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_free" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_MD_free" >&6; } +if test "x$ac_cv_lib_crypto_EVP_MD_free" = xyes +then : + ac_cv_libcrypto_dummy=yes +else $as_nop + ac_cv_libcrypto_evp_md=no +fi + + +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_DigestInit_ex in -lcrypto" >&5 +printf %s "checking for EVP_DigestInit_ex in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_DigestInit_ex+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -51534,40 +57304,43 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char EVP_DigestInit_ex (); int -main () +main (void) { return EVP_DigestInit_ex (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_EVP_DigestInit_ex=yes -else +else $as_nop ac_cv_lib_crypto_EVP_DigestInit_ex=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_DigestInit_ex" >&5 -$as_echo "$ac_cv_lib_crypto_EVP_DigestInit_ex" >&6; } -if test "x$ac_cv_lib_crypto_EVP_DigestInit_ex" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_DigestInit_ex" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_DigestInit_ex" >&6; } +if test "x$ac_cv_lib_crypto_EVP_DigestInit_ex" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_evp_md=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_DigestUpdate in -lcrypto" >&5 -$as_echo_n "checking for EVP_DigestUpdate in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_EVP_DigestUpdate+:} false; then : - $as_echo_n "(cached) " >&6 -else + +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_DigestUpdate in -lcrypto" >&5 +printf %s "checking for EVP_DigestUpdate in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_DigestUpdate+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -51576,40 +57349,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char EVP_DigestUpdate (); int -main () +main (void) { return EVP_DigestUpdate (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_EVP_DigestUpdate=yes -else +else $as_nop ac_cv_lib_crypto_EVP_DigestUpdate=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_DigestUpdate" >&5 -$as_echo "$ac_cv_lib_crypto_EVP_DigestUpdate" >&6; } -if test "x$ac_cv_lib_crypto_EVP_DigestUpdate" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_DigestUpdate" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_DigestUpdate" >&6; } +if test "x$ac_cv_lib_crypto_EVP_DigestUpdate" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_evp_md=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_DigestFinal_ex in -lcrypto" >&5 -$as_echo_n "checking for EVP_DigestFinal_ex in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_EVP_DigestFinal_ex+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_DigestFinal_ex in -lcrypto" >&5 +printf %s "checking for EVP_DigestFinal_ex in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_DigestFinal_ex+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -51618,66 +57391,78 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char EVP_DigestFinal_ex (); int -main () +main (void) { return EVP_DigestFinal_ex (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_EVP_DigestFinal_ex=yes -else +else $as_nop ac_cv_lib_crypto_EVP_DigestFinal_ex=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_DigestFinal_ex" >&5 -$as_echo "$ac_cv_lib_crypto_EVP_DigestFinal_ex" >&6; } -if test "x$ac_cv_lib_crypto_EVP_DigestFinal_ex" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_DigestFinal_ex" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_DigestFinal_ex" >&6; } +if test "x$ac_cv_lib_crypto_EVP_DigestFinal_ex" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_evp_md=no fi - if test "x$ac_cv_enable_openssl_evp_md" = xyes && "x$ac_cv_libcrypto_evp_md" = xno; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_enable_openssl_evp_md" = xyes && test "x$ac_cv_libcrypto_evp_md" = xno +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing OpenSSL EVP MD support See \`config.log' for more details" "$LINENO" 5; } fi - if test "x$ac_cv_lib_crypto_EVP_MD_CTX_init" = xyes; then : + if test "x$ac_cv_lib_crypto_EVP_MD_CTX_init" = xyes +then : -$as_echo "#define HAVE_EVP_MD_CTX_INIT 1" >>confdefs.h +printf "%s\n" "#define HAVE_EVP_MD_CTX_INIT 1" >>confdefs.h fi - if test "x$ac_cv_lib_crypto_EVP_MD_CTX_cleanup" = xyes; then : + if test "x$ac_cv_lib_crypto_EVP_MD_CTX_cleanup" = xyes +then : -$as_echo "#define HAVE_EVP_MD_CTX_CLEANUP 1" >>confdefs.h +printf "%s\n" "#define HAVE_EVP_MD_CTX_CLEANUP 1" >>confdefs.h fi + if test "x$ac_cv_lib_crypto_EVP_DigestInit_ex2" = xyes +then : + +printf "%s\n" "#define HAVE_EVP_DIGESTINIT_EX2 1" >>confdefs.h + + fi - if test "x$ac_cv_libcrypto_evp_md" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_md5 in -lcrypto" >&5 -$as_echo_n "checking for EVP_md5 in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_EVP_md5+:} false; then : - $as_echo_n "(cached) " >&6 -else +fi + + if test "x$ac_cv_libcrypto_evp_md" = xyes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_md5 in -lcrypto" >&5 +printf %s "checking for EVP_md5 in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_md5+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -51686,69 +57471,67 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char EVP_md5 (); int -main () +main (void) { return EVP_md5 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_EVP_md5=yes -else +else $as_nop ac_cv_lib_crypto_EVP_md5=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_md5" >&5 -$as_echo "$ac_cv_lib_crypto_EVP_md5" >&6; } -if test "x$ac_cv_lib_crypto_EVP_md5" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_md5" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_md5" >&6; } +if test "x$ac_cv_lib_crypto_EVP_md5" = xyes +then : ac_cv_libcrypto_md5=libcrypto_evp -else +else $as_nop ac_cv_libcrypto_md5=no fi - if test "x$ac_cv_libcrypto_md5" = xlibcrypto_evp; then : + if test "x$ac_cv_libcrypto_md5" = xlibcrypto_evp +then : -$as_echo "#define HAVE_EVP_MD5 1" >>confdefs.h +printf "%s\n" "#define HAVE_EVP_MD5 1" >>confdefs.h fi fi - if test "x$ac_cv_libcrypto_md5" = xno; then : - for ac_header in openssl/md5.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "openssl/md5.h" "ac_cv_header_openssl_md5_h" "$ac_includes_default" -if test "x$ac_cv_header_openssl_md5_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_OPENSSL_MD5_H 1 -_ACEOF + if test "x$ac_cv_libcrypto_md5" = xno +then : + ac_fn_c_check_header_compile "$LINENO" "openssl/md5.h" "ac_cv_header_openssl_md5_h" "$ac_includes_default" +if test "x$ac_cv_header_openssl_md5_h" = xyes +then : + printf "%s\n" "#define HAVE_OPENSSL_MD5_H 1" >>confdefs.h fi -done - - if test "x$ac_cv_header_openssl_md5_h" = xno; then : + if test "x$ac_cv_header_openssl_md5_h" = xno +then : ac_cv_libcrypto_md5=no -else +else $as_nop ac_cv_libcrypto_md5=libcrypto - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MD5_Init in -lcrypto" >&5 -$as_echo_n "checking for MD5_Init in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_MD5_Init+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MD5_Init in -lcrypto" >&5 +printf %s "checking for MD5_Init in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_MD5_Init+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -51757,40 +57540,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char MD5_Init (); int -main () +main (void) { return MD5_Init (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_MD5_Init=yes -else +else $as_nop ac_cv_lib_crypto_MD5_Init=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_MD5_Init" >&5 -$as_echo "$ac_cv_lib_crypto_MD5_Init" >&6; } -if test "x$ac_cv_lib_crypto_MD5_Init" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_MD5_Init" >&5 +printf "%s\n" "$ac_cv_lib_crypto_MD5_Init" >&6; } +if test "x$ac_cv_lib_crypto_MD5_Init" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_md5=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MD5_Update in -lcrypto" >&5 -$as_echo_n "checking for MD5_Update in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_MD5_Update+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MD5_Update in -lcrypto" >&5 +printf %s "checking for MD5_Update in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_MD5_Update+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -51799,40 +57582,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char MD5_Update (); int -main () +main (void) { return MD5_Update (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_MD5_Update=yes -else +else $as_nop ac_cv_lib_crypto_MD5_Update=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_MD5_Update" >&5 -$as_echo "$ac_cv_lib_crypto_MD5_Update" >&6; } -if test "x$ac_cv_lib_crypto_MD5_Update" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_MD5_Update" >&5 +printf "%s\n" "$ac_cv_lib_crypto_MD5_Update" >&6; } +if test "x$ac_cv_lib_crypto_MD5_Update" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_md5=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MD5_Final in -lcrypto" >&5 -$as_echo_n "checking for MD5_Final in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_MD5_Final+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MD5_Final in -lcrypto" >&5 +printf %s "checking for MD5_Final in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_MD5_Final+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -51841,39 +57624,39 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char MD5_Final (); int -main () +main (void) { return MD5_Final (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_MD5_Final=yes -else +else $as_nop ac_cv_lib_crypto_MD5_Final=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_MD5_Final" >&5 -$as_echo "$ac_cv_lib_crypto_MD5_Final" >&6; } -if test "x$ac_cv_lib_crypto_MD5_Final" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_MD5_Final" >&5 +printf "%s\n" "$ac_cv_lib_crypto_MD5_Final" >&6; } +if test "x$ac_cv_lib_crypto_MD5_Final" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_md5=no fi fi - if test "x$ac_cv_libcrypto" = xno && test "x$ac_cv_libcrypto_md5" = xlibcrypto; then : + if test "x$ac_cv_libcrypto" = xno && test "x$ac_cv_libcrypto_md5" = xlibcrypto +then : ac_cv_libcrypto=yes fi @@ -51881,14 +57664,16 @@ ac_cv_libcrypto_sha1=no - if test "x$ac_cv_libcrypto_evp" = xyes && test "x$ac_cv_enable_openssl_evp_md" != xno && test "x$ac_cv_libcrypto_evp_md" != xyes; then : + if test "x$ac_cv_libcrypto_evp" = xyes && test "x$ac_cv_enable_openssl_evp_md" != xno && test "x$ac_cv_libcrypto_evp_md" != xyes +then : ac_cv_libcrypto_evp_md=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_new in -lcrypto" >&5 -$as_echo_n "checking for EVP_MD_CTX_new in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_EVP_MD_CTX_new+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_new in -lcrypto" >&5 +printf %s "checking for EVP_MD_CTX_new in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_MD_CTX_new+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -51897,42 +57682,43 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char EVP_MD_CTX_new (); int -main () +main (void) { return EVP_MD_CTX_new (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_EVP_MD_CTX_new=yes -else +else $as_nop ac_cv_lib_crypto_EVP_MD_CTX_new=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_new" >&5 -$as_echo "$ac_cv_lib_crypto_EVP_MD_CTX_new" >&6; } -if test "x$ac_cv_lib_crypto_EVP_MD_CTX_new" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_new" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_MD_CTX_new" >&6; } +if test "x$ac_cv_lib_crypto_EVP_MD_CTX_new" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_dummy=no fi - if test "x$ac_cv_lib_crypto_EVP_MD_CTX_new" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_free in -lcrypto" >&5 -$as_echo_n "checking for EVP_MD_CTX_free in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_EVP_MD_CTX_free+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test "x$ac_cv_lib_crypto_EVP_MD_CTX_new" = xyes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_free in -lcrypto" >&5 +printf %s "checking for EVP_MD_CTX_free in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_MD_CTX_free+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -51941,42 +57727,42 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char EVP_MD_CTX_free (); int -main () +main (void) { return EVP_MD_CTX_free (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_EVP_MD_CTX_free=yes -else +else $as_nop ac_cv_lib_crypto_EVP_MD_CTX_free=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_free" >&5 -$as_echo "$ac_cv_lib_crypto_EVP_MD_CTX_free" >&6; } -if test "x$ac_cv_lib_crypto_EVP_MD_CTX_free" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_free" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_MD_CTX_free" >&6; } +if test "x$ac_cv_lib_crypto_EVP_MD_CTX_free" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_evp_md=no fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_init in -lcrypto" >&5 -$as_echo_n "checking for EVP_MD_CTX_init in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_EVP_MD_CTX_init+:} false; then : - $as_echo_n "(cached) " >&6 -else +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_init in -lcrypto" >&5 +printf %s "checking for EVP_MD_CTX_init in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_MD_CTX_init+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -51985,40 +57771,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char EVP_MD_CTX_init (); int -main () +main (void) { return EVP_MD_CTX_init (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_EVP_MD_CTX_init=yes -else +else $as_nop ac_cv_lib_crypto_EVP_MD_CTX_init=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_init" >&5 -$as_echo "$ac_cv_lib_crypto_EVP_MD_CTX_init" >&6; } -if test "x$ac_cv_lib_crypto_EVP_MD_CTX_init" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_init" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_MD_CTX_init" >&6; } +if test "x$ac_cv_lib_crypto_EVP_MD_CTX_init" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_evp_md=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_cleanup in -lcrypto" >&5 -$as_echo_n "checking for EVP_MD_CTX_cleanup in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_EVP_MD_CTX_cleanup+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_cleanup in -lcrypto" >&5 +printf %s "checking for EVP_MD_CTX_cleanup in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_MD_CTX_cleanup+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -52027,41 +57813,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char EVP_MD_CTX_cleanup (); int -main () +main (void) { return EVP_MD_CTX_cleanup (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_EVP_MD_CTX_cleanup=yes -else +else $as_nop ac_cv_lib_crypto_EVP_MD_CTX_cleanup=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_cleanup" >&5 -$as_echo "$ac_cv_lib_crypto_EVP_MD_CTX_cleanup" >&6; } -if test "x$ac_cv_lib_crypto_EVP_MD_CTX_cleanup" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_cleanup" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_MD_CTX_cleanup" >&6; } +if test "x$ac_cv_lib_crypto_EVP_MD_CTX_cleanup" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_evp_md=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ERR_remove_thread_state in -lcrypto" >&5 -$as_echo_n "checking for ERR_remove_thread_state in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_ERR_remove_thread_state+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ERR_remove_thread_state in -lcrypto" >&5 +printf %s "checking for ERR_remove_thread_state in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_ERR_remove_thread_state+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -52070,43 +57856,216 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char ERR_remove_thread_state (); int -main () +main (void) { return ERR_remove_thread_state (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_ERR_remove_thread_state=yes -else +else $as_nop ac_cv_lib_crypto_ERR_remove_thread_state=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_ERR_remove_thread_state" >&5 -$as_echo "$ac_cv_lib_crypto_ERR_remove_thread_state" >&6; } -if test "x$ac_cv_lib_crypto_ERR_remove_thread_state" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_ERR_remove_thread_state" >&5 +printf "%s\n" "$ac_cv_lib_crypto_ERR_remove_thread_state" >&6; } +if test "x$ac_cv_lib_crypto_ERR_remove_thread_state" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_evp_md=no fi fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_DigestInit_ex in -lcrypto" >&5 -$as_echo_n "checking for EVP_DigestInit_ex in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_EVP_DigestInit_ex+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_DigestInit_ex2 in -lcrypto" >&5 +printf %s "checking for EVP_DigestInit_ex2 in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_DigestInit_ex2+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypto $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char EVP_DigestInit_ex2 (); +int +main (void) +{ +return EVP_DigestInit_ex2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_crypto_EVP_DigestInit_ex2=yes +else $as_nop + ac_cv_lib_crypto_EVP_DigestInit_ex2=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_DigestInit_ex2" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_DigestInit_ex2" >&6; } +if test "x$ac_cv_lib_crypto_EVP_DigestInit_ex2" = xyes +then : + ac_cv_libcrypto_dummy=yes +else $as_nop + ac_cv_libcrypto_dummy=no +fi + + + if test "x$ac_cv_lib_crypto_EVP_DigestInit_ex2" = xyes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_reset in -lcrypto" >&5 +printf %s "checking for EVP_MD_CTX_reset in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_MD_CTX_reset+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypto $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char EVP_MD_CTX_reset (); +int +main (void) +{ +return EVP_MD_CTX_reset (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_crypto_EVP_MD_CTX_reset=yes +else $as_nop + ac_cv_lib_crypto_EVP_MD_CTX_reset=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_reset" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_MD_CTX_reset" >&6; } +if test "x$ac_cv_lib_crypto_EVP_MD_CTX_reset" = xyes +then : + ac_cv_libcrypto_dummy=yes +else $as_nop + ac_cv_libcrypto_evp_md=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_fetch in -lcrypto" >&5 +printf %s "checking for EVP_MD_fetch in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_MD_fetch+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypto $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char EVP_MD_fetch (); +int +main (void) +{ +return EVP_MD_fetch (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_crypto_EVP_MD_fetch=yes +else $as_nop + ac_cv_lib_crypto_EVP_MD_fetch=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_fetch" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_MD_fetch" >&6; } +if test "x$ac_cv_lib_crypto_EVP_MD_fetch" = xyes +then : + ac_cv_libcrypto_dummy=yes +else $as_nop + ac_cv_libcrypto_evp_md=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_free in -lcrypto" >&5 +printf %s "checking for EVP_MD_free in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_MD_free+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypto $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char EVP_MD_free (); +int +main (void) +{ +return EVP_MD_free (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_crypto_EVP_MD_free=yes +else $as_nop + ac_cv_lib_crypto_EVP_MD_free=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_free" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_MD_free" >&6; } +if test "x$ac_cv_lib_crypto_EVP_MD_free" = xyes +then : + ac_cv_libcrypto_dummy=yes +else $as_nop + ac_cv_libcrypto_evp_md=no +fi + + +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_DigestInit_ex in -lcrypto" >&5 +printf %s "checking for EVP_DigestInit_ex in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_DigestInit_ex+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -52115,40 +58074,43 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char EVP_DigestInit_ex (); int -main () +main (void) { return EVP_DigestInit_ex (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_EVP_DigestInit_ex=yes -else +else $as_nop ac_cv_lib_crypto_EVP_DigestInit_ex=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_DigestInit_ex" >&5 -$as_echo "$ac_cv_lib_crypto_EVP_DigestInit_ex" >&6; } -if test "x$ac_cv_lib_crypto_EVP_DigestInit_ex" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_DigestInit_ex" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_DigestInit_ex" >&6; } +if test "x$ac_cv_lib_crypto_EVP_DigestInit_ex" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_evp_md=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_DigestUpdate in -lcrypto" >&5 -$as_echo_n "checking for EVP_DigestUpdate in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_EVP_DigestUpdate+:} false; then : - $as_echo_n "(cached) " >&6 -else + +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_DigestUpdate in -lcrypto" >&5 +printf %s "checking for EVP_DigestUpdate in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_DigestUpdate+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -52157,40 +58119,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char EVP_DigestUpdate (); int -main () +main (void) { return EVP_DigestUpdate (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_EVP_DigestUpdate=yes -else +else $as_nop ac_cv_lib_crypto_EVP_DigestUpdate=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_DigestUpdate" >&5 -$as_echo "$ac_cv_lib_crypto_EVP_DigestUpdate" >&6; } -if test "x$ac_cv_lib_crypto_EVP_DigestUpdate" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_DigestUpdate" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_DigestUpdate" >&6; } +if test "x$ac_cv_lib_crypto_EVP_DigestUpdate" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_evp_md=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_DigestFinal_ex in -lcrypto" >&5 -$as_echo_n "checking for EVP_DigestFinal_ex in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_EVP_DigestFinal_ex+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_DigestFinal_ex in -lcrypto" >&5 +printf %s "checking for EVP_DigestFinal_ex in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_DigestFinal_ex+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -52199,66 +58161,78 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char EVP_DigestFinal_ex (); int -main () +main (void) { return EVP_DigestFinal_ex (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_EVP_DigestFinal_ex=yes -else +else $as_nop ac_cv_lib_crypto_EVP_DigestFinal_ex=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_DigestFinal_ex" >&5 -$as_echo "$ac_cv_lib_crypto_EVP_DigestFinal_ex" >&6; } -if test "x$ac_cv_lib_crypto_EVP_DigestFinal_ex" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_DigestFinal_ex" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_DigestFinal_ex" >&6; } +if test "x$ac_cv_lib_crypto_EVP_DigestFinal_ex" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_evp_md=no fi - if test "x$ac_cv_enable_openssl_evp_md" = xyes && "x$ac_cv_libcrypto_evp_md" = xno; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_enable_openssl_evp_md" = xyes && test "x$ac_cv_libcrypto_evp_md" = xno +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing OpenSSL EVP MD support See \`config.log' for more details" "$LINENO" 5; } fi - if test "x$ac_cv_lib_crypto_EVP_MD_CTX_init" = xyes; then : + if test "x$ac_cv_lib_crypto_EVP_MD_CTX_init" = xyes +then : + +printf "%s\n" "#define HAVE_EVP_MD_CTX_INIT 1" >>confdefs.h + + +fi + + if test "x$ac_cv_lib_crypto_EVP_MD_CTX_cleanup" = xyes +then : -$as_echo "#define HAVE_EVP_MD_CTX_INIT 1" >>confdefs.h +printf "%s\n" "#define HAVE_EVP_MD_CTX_CLEANUP 1" >>confdefs.h fi - if test "x$ac_cv_lib_crypto_EVP_MD_CTX_cleanup" = xyes; then : + if test "x$ac_cv_lib_crypto_EVP_DigestInit_ex2" = xyes +then : -$as_echo "#define HAVE_EVP_MD_CTX_CLEANUP 1" >>confdefs.h +printf "%s\n" "#define HAVE_EVP_DIGESTINIT_EX2 1" >>confdefs.h fi fi - if test "x$ac_cv_libcrypto_evp_md" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_sha1 in -lcrypto" >&5 -$as_echo_n "checking for EVP_sha1 in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_EVP_sha1+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test "x$ac_cv_libcrypto_evp_md" = xyes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_sha1 in -lcrypto" >&5 +printf %s "checking for EVP_sha1 in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_sha1+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -52267,69 +58241,67 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char EVP_sha1 (); int -main () +main (void) { return EVP_sha1 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_EVP_sha1=yes -else +else $as_nop ac_cv_lib_crypto_EVP_sha1=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_sha1" >&5 -$as_echo "$ac_cv_lib_crypto_EVP_sha1" >&6; } -if test "x$ac_cv_lib_crypto_EVP_sha1" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_sha1" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_sha1" >&6; } +if test "x$ac_cv_lib_crypto_EVP_sha1" = xyes +then : ac_cv_libcrypto_sha1=libcrypto_evp -else +else $as_nop ac_cv_libcrypto_sha1=no fi - if test "x$ac_cv_libcrypto_sha1" = xlibcrypto_evp; then : + if test "x$ac_cv_libcrypto_sha1" = xlibcrypto_evp +then : -$as_echo "#define HAVE_EVP_SHA1 1" >>confdefs.h +printf "%s\n" "#define HAVE_EVP_SHA1 1" >>confdefs.h fi fi - if test "x$ac_cv_libcrypto_sha1" = xno; then : - for ac_header in openssl/sha.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "openssl/sha.h" "ac_cv_header_openssl_sha_h" "$ac_includes_default" -if test "x$ac_cv_header_openssl_sha_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_OPENSSL_SHA_H 1 -_ACEOF + if test "x$ac_cv_libcrypto_sha1" = xno +then : + ac_fn_c_check_header_compile "$LINENO" "openssl/sha.h" "ac_cv_header_openssl_sha_h" "$ac_includes_default" +if test "x$ac_cv_header_openssl_sha_h" = xyes +then : + printf "%s\n" "#define HAVE_OPENSSL_SHA_H 1" >>confdefs.h fi -done - - if test "x$ac_cv_header_openssl_sha_h" = xno; then : + if test "x$ac_cv_header_openssl_sha_h" = xno +then : ac_cv_libcrypto_sha1=no -else +else $as_nop ac_cv_libcrypto_sha1=libcrypto - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SHA1_Init in -lcrypto" >&5 -$as_echo_n "checking for SHA1_Init in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_SHA1_Init+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SHA1_Init in -lcrypto" >&5 +printf %s "checking for SHA1_Init in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_SHA1_Init+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -52338,40 +58310,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char SHA1_Init (); int -main () +main (void) { return SHA1_Init (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_SHA1_Init=yes -else +else $as_nop ac_cv_lib_crypto_SHA1_Init=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_SHA1_Init" >&5 -$as_echo "$ac_cv_lib_crypto_SHA1_Init" >&6; } -if test "x$ac_cv_lib_crypto_SHA1_Init" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_SHA1_Init" >&5 +printf "%s\n" "$ac_cv_lib_crypto_SHA1_Init" >&6; } +if test "x$ac_cv_lib_crypto_SHA1_Init" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_sha1=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SHA1_Update in -lcrypto" >&5 -$as_echo_n "checking for SHA1_Update in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_SHA1_Update+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SHA1_Update in -lcrypto" >&5 +printf %s "checking for SHA1_Update in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_SHA1_Update+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -52380,40 +58352,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char SHA1_Update (); int -main () +main (void) { return SHA1_Update (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_SHA1_Update=yes -else +else $as_nop ac_cv_lib_crypto_SHA1_Update=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_SHA1_Update" >&5 -$as_echo "$ac_cv_lib_crypto_SHA1_Update" >&6; } -if test "x$ac_cv_lib_crypto_SHA1_Update" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_SHA1_Update" >&5 +printf "%s\n" "$ac_cv_lib_crypto_SHA1_Update" >&6; } +if test "x$ac_cv_lib_crypto_SHA1_Update" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_sha1=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SHA1_Final in -lcrypto" >&5 -$as_echo_n "checking for SHA1_Final in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_SHA1_Final+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SHA1_Final in -lcrypto" >&5 +printf %s "checking for SHA1_Final in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_SHA1_Final+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -52422,39 +58394,39 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char SHA1_Final (); int -main () +main (void) { return SHA1_Final (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_SHA1_Final=yes -else +else $as_nop ac_cv_lib_crypto_SHA1_Final=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_SHA1_Final" >&5 -$as_echo "$ac_cv_lib_crypto_SHA1_Final" >&6; } -if test "x$ac_cv_lib_crypto_SHA1_Final" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_SHA1_Final" >&5 +printf "%s\n" "$ac_cv_lib_crypto_SHA1_Final" >&6; } +if test "x$ac_cv_lib_crypto_SHA1_Final" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_sha1=no fi fi - if test "x$ac_cv_libcrypto" = xno && test "x$ac_cv_libcrypto_sha1" = xlibcrypto; then : + if test "x$ac_cv_libcrypto" = xno && test "x$ac_cv_libcrypto_sha1" = xlibcrypto +then : ac_cv_libcrypto=yes fi @@ -52462,14 +58434,16 @@ ac_cv_libcrypto_sha224=no - if test "x$ac_cv_libcrypto_evp" = xyes && test "x$ac_cv_enable_openssl_evp_md" != xno && test "x$ac_cv_libcrypto_evp_md" != xyes; then : + if test "x$ac_cv_libcrypto_evp" = xyes && test "x$ac_cv_enable_openssl_evp_md" != xno && test "x$ac_cv_libcrypto_evp_md" != xyes +then : ac_cv_libcrypto_evp_md=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_new in -lcrypto" >&5 -$as_echo_n "checking for EVP_MD_CTX_new in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_EVP_MD_CTX_new+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_new in -lcrypto" >&5 +printf %s "checking for EVP_MD_CTX_new in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_MD_CTX_new+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -52478,42 +58452,43 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char EVP_MD_CTX_new (); int -main () +main (void) { return EVP_MD_CTX_new (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_EVP_MD_CTX_new=yes -else +else $as_nop ac_cv_lib_crypto_EVP_MD_CTX_new=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_new" >&5 -$as_echo "$ac_cv_lib_crypto_EVP_MD_CTX_new" >&6; } -if test "x$ac_cv_lib_crypto_EVP_MD_CTX_new" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_new" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_MD_CTX_new" >&6; } +if test "x$ac_cv_lib_crypto_EVP_MD_CTX_new" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_dummy=no fi - if test "x$ac_cv_lib_crypto_EVP_MD_CTX_new" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_free in -lcrypto" >&5 -$as_echo_n "checking for EVP_MD_CTX_free in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_EVP_MD_CTX_free+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test "x$ac_cv_lib_crypto_EVP_MD_CTX_new" = xyes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_free in -lcrypto" >&5 +printf %s "checking for EVP_MD_CTX_free in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_MD_CTX_free+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -52522,42 +58497,42 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char EVP_MD_CTX_free (); int -main () +main (void) { return EVP_MD_CTX_free (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_EVP_MD_CTX_free=yes -else +else $as_nop ac_cv_lib_crypto_EVP_MD_CTX_free=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_free" >&5 -$as_echo "$ac_cv_lib_crypto_EVP_MD_CTX_free" >&6; } -if test "x$ac_cv_lib_crypto_EVP_MD_CTX_free" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_free" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_MD_CTX_free" >&6; } +if test "x$ac_cv_lib_crypto_EVP_MD_CTX_free" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_evp_md=no fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_init in -lcrypto" >&5 -$as_echo_n "checking for EVP_MD_CTX_init in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_EVP_MD_CTX_init+:} false; then : - $as_echo_n "(cached) " >&6 -else +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_init in -lcrypto" >&5 +printf %s "checking for EVP_MD_CTX_init in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_MD_CTX_init+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -52566,40 +58541,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char EVP_MD_CTX_init (); int -main () +main (void) { return EVP_MD_CTX_init (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_EVP_MD_CTX_init=yes -else +else $as_nop ac_cv_lib_crypto_EVP_MD_CTX_init=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_init" >&5 -$as_echo "$ac_cv_lib_crypto_EVP_MD_CTX_init" >&6; } -if test "x$ac_cv_lib_crypto_EVP_MD_CTX_init" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_init" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_MD_CTX_init" >&6; } +if test "x$ac_cv_lib_crypto_EVP_MD_CTX_init" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_evp_md=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_cleanup in -lcrypto" >&5 -$as_echo_n "checking for EVP_MD_CTX_cleanup in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_EVP_MD_CTX_cleanup+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_cleanup in -lcrypto" >&5 +printf %s "checking for EVP_MD_CTX_cleanup in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_MD_CTX_cleanup+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -52608,41 +58583,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char EVP_MD_CTX_cleanup (); int -main () +main (void) { return EVP_MD_CTX_cleanup (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_EVP_MD_CTX_cleanup=yes -else +else $as_nop ac_cv_lib_crypto_EVP_MD_CTX_cleanup=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_cleanup" >&5 -$as_echo "$ac_cv_lib_crypto_EVP_MD_CTX_cleanup" >&6; } -if test "x$ac_cv_lib_crypto_EVP_MD_CTX_cleanup" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_cleanup" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_MD_CTX_cleanup" >&6; } +if test "x$ac_cv_lib_crypto_EVP_MD_CTX_cleanup" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_evp_md=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ERR_remove_thread_state in -lcrypto" >&5 -$as_echo_n "checking for ERR_remove_thread_state in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_ERR_remove_thread_state+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ERR_remove_thread_state in -lcrypto" >&5 +printf %s "checking for ERR_remove_thread_state in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_ERR_remove_thread_state+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -52651,43 +58626,216 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char ERR_remove_thread_state (); int -main () +main (void) { return ERR_remove_thread_state (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_ERR_remove_thread_state=yes -else +else $as_nop ac_cv_lib_crypto_ERR_remove_thread_state=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_ERR_remove_thread_state" >&5 -$as_echo "$ac_cv_lib_crypto_ERR_remove_thread_state" >&6; } -if test "x$ac_cv_lib_crypto_ERR_remove_thread_state" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_ERR_remove_thread_state" >&5 +printf "%s\n" "$ac_cv_lib_crypto_ERR_remove_thread_state" >&6; } +if test "x$ac_cv_lib_crypto_ERR_remove_thread_state" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_evp_md=no fi fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_DigestInit_ex in -lcrypto" >&5 -$as_echo_n "checking for EVP_DigestInit_ex in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_EVP_DigestInit_ex+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_DigestInit_ex2 in -lcrypto" >&5 +printf %s "checking for EVP_DigestInit_ex2 in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_DigestInit_ex2+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypto $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char EVP_DigestInit_ex2 (); +int +main (void) +{ +return EVP_DigestInit_ex2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_crypto_EVP_DigestInit_ex2=yes +else $as_nop + ac_cv_lib_crypto_EVP_DigestInit_ex2=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_DigestInit_ex2" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_DigestInit_ex2" >&6; } +if test "x$ac_cv_lib_crypto_EVP_DigestInit_ex2" = xyes +then : + ac_cv_libcrypto_dummy=yes +else $as_nop + ac_cv_libcrypto_dummy=no +fi + + + if test "x$ac_cv_lib_crypto_EVP_DigestInit_ex2" = xyes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_reset in -lcrypto" >&5 +printf %s "checking for EVP_MD_CTX_reset in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_MD_CTX_reset+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypto $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char EVP_MD_CTX_reset (); +int +main (void) +{ +return EVP_MD_CTX_reset (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_crypto_EVP_MD_CTX_reset=yes +else $as_nop + ac_cv_lib_crypto_EVP_MD_CTX_reset=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_reset" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_MD_CTX_reset" >&6; } +if test "x$ac_cv_lib_crypto_EVP_MD_CTX_reset" = xyes +then : + ac_cv_libcrypto_dummy=yes +else $as_nop + ac_cv_libcrypto_evp_md=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_fetch in -lcrypto" >&5 +printf %s "checking for EVP_MD_fetch in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_MD_fetch+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypto $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char EVP_MD_fetch (); +int +main (void) +{ +return EVP_MD_fetch (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_crypto_EVP_MD_fetch=yes +else $as_nop + ac_cv_lib_crypto_EVP_MD_fetch=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_fetch" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_MD_fetch" >&6; } +if test "x$ac_cv_lib_crypto_EVP_MD_fetch" = xyes +then : + ac_cv_libcrypto_dummy=yes +else $as_nop + ac_cv_libcrypto_evp_md=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_free in -lcrypto" >&5 +printf %s "checking for EVP_MD_free in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_MD_free+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypto $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char EVP_MD_free (); +int +main (void) +{ +return EVP_MD_free (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_crypto_EVP_MD_free=yes +else $as_nop + ac_cv_lib_crypto_EVP_MD_free=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_free" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_MD_free" >&6; } +if test "x$ac_cv_lib_crypto_EVP_MD_free" = xyes +then : + ac_cv_libcrypto_dummy=yes +else $as_nop + ac_cv_libcrypto_evp_md=no +fi + + +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_DigestInit_ex in -lcrypto" >&5 +printf %s "checking for EVP_DigestInit_ex in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_DigestInit_ex+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -52696,40 +58844,43 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char EVP_DigestInit_ex (); int -main () +main (void) { return EVP_DigestInit_ex (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_EVP_DigestInit_ex=yes -else +else $as_nop ac_cv_lib_crypto_EVP_DigestInit_ex=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_DigestInit_ex" >&5 -$as_echo "$ac_cv_lib_crypto_EVP_DigestInit_ex" >&6; } -if test "x$ac_cv_lib_crypto_EVP_DigestInit_ex" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_DigestInit_ex" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_DigestInit_ex" >&6; } +if test "x$ac_cv_lib_crypto_EVP_DigestInit_ex" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_evp_md=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_DigestUpdate in -lcrypto" >&5 -$as_echo_n "checking for EVP_DigestUpdate in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_EVP_DigestUpdate+:} false; then : - $as_echo_n "(cached) " >&6 -else + +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_DigestUpdate in -lcrypto" >&5 +printf %s "checking for EVP_DigestUpdate in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_DigestUpdate+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -52738,40 +58889,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char EVP_DigestUpdate (); int -main () +main (void) { return EVP_DigestUpdate (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_EVP_DigestUpdate=yes -else +else $as_nop ac_cv_lib_crypto_EVP_DigestUpdate=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_DigestUpdate" >&5 -$as_echo "$ac_cv_lib_crypto_EVP_DigestUpdate" >&6; } -if test "x$ac_cv_lib_crypto_EVP_DigestUpdate" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_DigestUpdate" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_DigestUpdate" >&6; } +if test "x$ac_cv_lib_crypto_EVP_DigestUpdate" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_evp_md=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_DigestFinal_ex in -lcrypto" >&5 -$as_echo_n "checking for EVP_DigestFinal_ex in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_EVP_DigestFinal_ex+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_DigestFinal_ex in -lcrypto" >&5 +printf %s "checking for EVP_DigestFinal_ex in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_DigestFinal_ex+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -52780,66 +58931,78 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char EVP_DigestFinal_ex (); int -main () +main (void) { return EVP_DigestFinal_ex (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_EVP_DigestFinal_ex=yes -else +else $as_nop ac_cv_lib_crypto_EVP_DigestFinal_ex=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_DigestFinal_ex" >&5 -$as_echo "$ac_cv_lib_crypto_EVP_DigestFinal_ex" >&6; } -if test "x$ac_cv_lib_crypto_EVP_DigestFinal_ex" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_DigestFinal_ex" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_DigestFinal_ex" >&6; } +if test "x$ac_cv_lib_crypto_EVP_DigestFinal_ex" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_evp_md=no fi - if test "x$ac_cv_enable_openssl_evp_md" = xyes && "x$ac_cv_libcrypto_evp_md" = xno; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_enable_openssl_evp_md" = xyes && test "x$ac_cv_libcrypto_evp_md" = xno +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing OpenSSL EVP MD support See \`config.log' for more details" "$LINENO" 5; } fi - if test "x$ac_cv_lib_crypto_EVP_MD_CTX_init" = xyes; then : + if test "x$ac_cv_lib_crypto_EVP_MD_CTX_init" = xyes +then : -$as_echo "#define HAVE_EVP_MD_CTX_INIT 1" >>confdefs.h +printf "%s\n" "#define HAVE_EVP_MD_CTX_INIT 1" >>confdefs.h fi - if test "x$ac_cv_lib_crypto_EVP_MD_CTX_cleanup" = xyes; then : + if test "x$ac_cv_lib_crypto_EVP_MD_CTX_cleanup" = xyes +then : -$as_echo "#define HAVE_EVP_MD_CTX_CLEANUP 1" >>confdefs.h +printf "%s\n" "#define HAVE_EVP_MD_CTX_CLEANUP 1" >>confdefs.h fi + if test "x$ac_cv_lib_crypto_EVP_DigestInit_ex2" = xyes +then : + +printf "%s\n" "#define HAVE_EVP_DIGESTINIT_EX2 1" >>confdefs.h + + fi - if test "x$ac_cv_libcrypto_evp_md" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_sha224 in -lcrypto" >&5 -$as_echo_n "checking for EVP_sha224 in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_EVP_sha224+:} false; then : - $as_echo_n "(cached) " >&6 -else +fi + + if test "x$ac_cv_libcrypto_evp_md" = xyes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_sha224 in -lcrypto" >&5 +printf %s "checking for EVP_sha224 in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_sha224+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -52848,69 +59011,67 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char EVP_sha224 (); int -main () +main (void) { return EVP_sha224 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_EVP_sha224=yes -else +else $as_nop ac_cv_lib_crypto_EVP_sha224=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_sha224" >&5 -$as_echo "$ac_cv_lib_crypto_EVP_sha224" >&6; } -if test "x$ac_cv_lib_crypto_EVP_sha224" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_sha224" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_sha224" >&6; } +if test "x$ac_cv_lib_crypto_EVP_sha224" = xyes +then : ac_cv_libcrypto_sha224=libcrypto_evp -else +else $as_nop ac_cv_libcrypto_sha224=no fi - if test "x$ac_cv_libcrypto_sha224" = xlibcrypto_evp; then : + if test "x$ac_cv_libcrypto_sha224" = xlibcrypto_evp +then : -$as_echo "#define HAVE_EVP_SHA224 1" >>confdefs.h +printf "%s\n" "#define HAVE_EVP_SHA224 1" >>confdefs.h fi fi - if test "x$ac_cv_libcrypto_sha224" = xno; then : - for ac_header in openssl/sha.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "openssl/sha.h" "ac_cv_header_openssl_sha_h" "$ac_includes_default" -if test "x$ac_cv_header_openssl_sha_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_OPENSSL_SHA_H 1 -_ACEOF + if test "x$ac_cv_libcrypto_sha224" = xno +then : + ac_fn_c_check_header_compile "$LINENO" "openssl/sha.h" "ac_cv_header_openssl_sha_h" "$ac_includes_default" +if test "x$ac_cv_header_openssl_sha_h" = xyes +then : + printf "%s\n" "#define HAVE_OPENSSL_SHA_H 1" >>confdefs.h fi -done - - if test "x$ac_cv_header_openssl_sha_h" = xno; then : + if test "x$ac_cv_header_openssl_sha_h" = xno +then : ac_cv_libcrypto_sha224=no -else +else $as_nop ac_cv_libcrypto_sha224=libcrypto - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SHA224_Init in -lcrypto" >&5 -$as_echo_n "checking for SHA224_Init in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_SHA224_Init+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SHA224_Init in -lcrypto" >&5 +printf %s "checking for SHA224_Init in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_SHA224_Init+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -52919,40 +59080,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char SHA224_Init (); int -main () +main (void) { return SHA224_Init (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_SHA224_Init=yes -else +else $as_nop ac_cv_lib_crypto_SHA224_Init=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_SHA224_Init" >&5 -$as_echo "$ac_cv_lib_crypto_SHA224_Init" >&6; } -if test "x$ac_cv_lib_crypto_SHA224_Init" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_SHA224_Init" >&5 +printf "%s\n" "$ac_cv_lib_crypto_SHA224_Init" >&6; } +if test "x$ac_cv_lib_crypto_SHA224_Init" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_sha224=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SHA224_Update in -lcrypto" >&5 -$as_echo_n "checking for SHA224_Update in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_SHA224_Update+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SHA224_Update in -lcrypto" >&5 +printf %s "checking for SHA224_Update in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_SHA224_Update+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -52961,40 +59122,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char SHA224_Update (); int -main () +main (void) { return SHA224_Update (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_SHA224_Update=yes -else +else $as_nop ac_cv_lib_crypto_SHA224_Update=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_SHA224_Update" >&5 -$as_echo "$ac_cv_lib_crypto_SHA224_Update" >&6; } -if test "x$ac_cv_lib_crypto_SHA224_Update" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_SHA224_Update" >&5 +printf "%s\n" "$ac_cv_lib_crypto_SHA224_Update" >&6; } +if test "x$ac_cv_lib_crypto_SHA224_Update" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_sha224=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SHA224_Final in -lcrypto" >&5 -$as_echo_n "checking for SHA224_Final in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_SHA224_Final+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SHA224_Final in -lcrypto" >&5 +printf %s "checking for SHA224_Final in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_SHA224_Final+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -53003,39 +59164,39 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char SHA224_Final (); int -main () +main (void) { return SHA224_Final (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_SHA224_Final=yes -else +else $as_nop ac_cv_lib_crypto_SHA224_Final=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_SHA224_Final" >&5 -$as_echo "$ac_cv_lib_crypto_SHA224_Final" >&6; } -if test "x$ac_cv_lib_crypto_SHA224_Final" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_SHA224_Final" >&5 +printf "%s\n" "$ac_cv_lib_crypto_SHA224_Final" >&6; } +if test "x$ac_cv_lib_crypto_SHA224_Final" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_sha224=no fi fi - if test "x$ac_cv_libcrypto" = xno && test "x$ac_cv_libcrypto_sha224" = xlibcrypto; then : + if test "x$ac_cv_libcrypto" = xno && test "x$ac_cv_libcrypto_sha224" = xlibcrypto +then : ac_cv_libcrypto=yes fi @@ -53043,14 +59204,16 @@ ac_cv_libcrypto_sha256=no - if test "x$ac_cv_libcrypto_evp" = xyes && test "x$ac_cv_enable_openssl_evp_md" != xno && test "x$ac_cv_libcrypto_evp_md" != xyes; then : + if test "x$ac_cv_libcrypto_evp" = xyes && test "x$ac_cv_enable_openssl_evp_md" != xno && test "x$ac_cv_libcrypto_evp_md" != xyes +then : ac_cv_libcrypto_evp_md=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_new in -lcrypto" >&5 -$as_echo_n "checking for EVP_MD_CTX_new in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_EVP_MD_CTX_new+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_new in -lcrypto" >&5 +printf %s "checking for EVP_MD_CTX_new in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_MD_CTX_new+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -53059,42 +59222,43 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char EVP_MD_CTX_new (); int -main () +main (void) { return EVP_MD_CTX_new (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_EVP_MD_CTX_new=yes -else +else $as_nop ac_cv_lib_crypto_EVP_MD_CTX_new=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_new" >&5 -$as_echo "$ac_cv_lib_crypto_EVP_MD_CTX_new" >&6; } -if test "x$ac_cv_lib_crypto_EVP_MD_CTX_new" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_new" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_MD_CTX_new" >&6; } +if test "x$ac_cv_lib_crypto_EVP_MD_CTX_new" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_dummy=no fi - if test "x$ac_cv_lib_crypto_EVP_MD_CTX_new" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_free in -lcrypto" >&5 -$as_echo_n "checking for EVP_MD_CTX_free in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_EVP_MD_CTX_free+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test "x$ac_cv_lib_crypto_EVP_MD_CTX_new" = xyes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_free in -lcrypto" >&5 +printf %s "checking for EVP_MD_CTX_free in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_MD_CTX_free+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -53103,42 +59267,42 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char EVP_MD_CTX_free (); int -main () +main (void) { return EVP_MD_CTX_free (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_EVP_MD_CTX_free=yes -else +else $as_nop ac_cv_lib_crypto_EVP_MD_CTX_free=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_free" >&5 -$as_echo "$ac_cv_lib_crypto_EVP_MD_CTX_free" >&6; } -if test "x$ac_cv_lib_crypto_EVP_MD_CTX_free" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_free" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_MD_CTX_free" >&6; } +if test "x$ac_cv_lib_crypto_EVP_MD_CTX_free" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_evp_md=no fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_init in -lcrypto" >&5 -$as_echo_n "checking for EVP_MD_CTX_init in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_EVP_MD_CTX_init+:} false; then : - $as_echo_n "(cached) " >&6 -else +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_init in -lcrypto" >&5 +printf %s "checking for EVP_MD_CTX_init in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_MD_CTX_init+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -53147,40 +59311,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char EVP_MD_CTX_init (); int -main () +main (void) { return EVP_MD_CTX_init (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_EVP_MD_CTX_init=yes -else +else $as_nop ac_cv_lib_crypto_EVP_MD_CTX_init=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_init" >&5 -$as_echo "$ac_cv_lib_crypto_EVP_MD_CTX_init" >&6; } -if test "x$ac_cv_lib_crypto_EVP_MD_CTX_init" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_init" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_MD_CTX_init" >&6; } +if test "x$ac_cv_lib_crypto_EVP_MD_CTX_init" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_evp_md=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_cleanup in -lcrypto" >&5 -$as_echo_n "checking for EVP_MD_CTX_cleanup in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_EVP_MD_CTX_cleanup+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_cleanup in -lcrypto" >&5 +printf %s "checking for EVP_MD_CTX_cleanup in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_MD_CTX_cleanup+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -53189,41 +59353,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char EVP_MD_CTX_cleanup (); int -main () +main (void) { return EVP_MD_CTX_cleanup (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_EVP_MD_CTX_cleanup=yes -else +else $as_nop ac_cv_lib_crypto_EVP_MD_CTX_cleanup=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_cleanup" >&5 -$as_echo "$ac_cv_lib_crypto_EVP_MD_CTX_cleanup" >&6; } -if test "x$ac_cv_lib_crypto_EVP_MD_CTX_cleanup" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_cleanup" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_MD_CTX_cleanup" >&6; } +if test "x$ac_cv_lib_crypto_EVP_MD_CTX_cleanup" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_evp_md=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ERR_remove_thread_state in -lcrypto" >&5 -$as_echo_n "checking for ERR_remove_thread_state in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_ERR_remove_thread_state+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ERR_remove_thread_state in -lcrypto" >&5 +printf %s "checking for ERR_remove_thread_state in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_ERR_remove_thread_state+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -53232,43 +59396,216 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char ERR_remove_thread_state (); int -main () +main (void) { return ERR_remove_thread_state (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_ERR_remove_thread_state=yes -else +else $as_nop ac_cv_lib_crypto_ERR_remove_thread_state=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_ERR_remove_thread_state" >&5 -$as_echo "$ac_cv_lib_crypto_ERR_remove_thread_state" >&6; } -if test "x$ac_cv_lib_crypto_ERR_remove_thread_state" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_ERR_remove_thread_state" >&5 +printf "%s\n" "$ac_cv_lib_crypto_ERR_remove_thread_state" >&6; } +if test "x$ac_cv_lib_crypto_ERR_remove_thread_state" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_evp_md=no fi fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_DigestInit_ex in -lcrypto" >&5 -$as_echo_n "checking for EVP_DigestInit_ex in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_EVP_DigestInit_ex+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_DigestInit_ex2 in -lcrypto" >&5 +printf %s "checking for EVP_DigestInit_ex2 in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_DigestInit_ex2+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypto $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char EVP_DigestInit_ex2 (); +int +main (void) +{ +return EVP_DigestInit_ex2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_crypto_EVP_DigestInit_ex2=yes +else $as_nop + ac_cv_lib_crypto_EVP_DigestInit_ex2=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_DigestInit_ex2" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_DigestInit_ex2" >&6; } +if test "x$ac_cv_lib_crypto_EVP_DigestInit_ex2" = xyes +then : + ac_cv_libcrypto_dummy=yes +else $as_nop + ac_cv_libcrypto_dummy=no +fi + + + if test "x$ac_cv_lib_crypto_EVP_DigestInit_ex2" = xyes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_reset in -lcrypto" >&5 +printf %s "checking for EVP_MD_CTX_reset in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_MD_CTX_reset+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypto $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char EVP_MD_CTX_reset (); +int +main (void) +{ +return EVP_MD_CTX_reset (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_crypto_EVP_MD_CTX_reset=yes +else $as_nop + ac_cv_lib_crypto_EVP_MD_CTX_reset=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_reset" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_MD_CTX_reset" >&6; } +if test "x$ac_cv_lib_crypto_EVP_MD_CTX_reset" = xyes +then : + ac_cv_libcrypto_dummy=yes +else $as_nop + ac_cv_libcrypto_evp_md=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_fetch in -lcrypto" >&5 +printf %s "checking for EVP_MD_fetch in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_MD_fetch+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypto $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char EVP_MD_fetch (); +int +main (void) +{ +return EVP_MD_fetch (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_crypto_EVP_MD_fetch=yes +else $as_nop + ac_cv_lib_crypto_EVP_MD_fetch=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_fetch" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_MD_fetch" >&6; } +if test "x$ac_cv_lib_crypto_EVP_MD_fetch" = xyes +then : + ac_cv_libcrypto_dummy=yes +else $as_nop + ac_cv_libcrypto_evp_md=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_free in -lcrypto" >&5 +printf %s "checking for EVP_MD_free in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_MD_free+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypto $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char EVP_MD_free (); +int +main (void) +{ +return EVP_MD_free (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_crypto_EVP_MD_free=yes +else $as_nop + ac_cv_lib_crypto_EVP_MD_free=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_free" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_MD_free" >&6; } +if test "x$ac_cv_lib_crypto_EVP_MD_free" = xyes +then : + ac_cv_libcrypto_dummy=yes +else $as_nop + ac_cv_libcrypto_evp_md=no +fi + + +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_DigestInit_ex in -lcrypto" >&5 +printf %s "checking for EVP_DigestInit_ex in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_DigestInit_ex+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -53277,40 +59614,43 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char EVP_DigestInit_ex (); int -main () +main (void) { return EVP_DigestInit_ex (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_EVP_DigestInit_ex=yes -else +else $as_nop ac_cv_lib_crypto_EVP_DigestInit_ex=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_DigestInit_ex" >&5 -$as_echo "$ac_cv_lib_crypto_EVP_DigestInit_ex" >&6; } -if test "x$ac_cv_lib_crypto_EVP_DigestInit_ex" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_DigestInit_ex" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_DigestInit_ex" >&6; } +if test "x$ac_cv_lib_crypto_EVP_DigestInit_ex" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_evp_md=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_DigestUpdate in -lcrypto" >&5 -$as_echo_n "checking for EVP_DigestUpdate in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_EVP_DigestUpdate+:} false; then : - $as_echo_n "(cached) " >&6 -else + +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_DigestUpdate in -lcrypto" >&5 +printf %s "checking for EVP_DigestUpdate in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_DigestUpdate+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -53319,40 +59659,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char EVP_DigestUpdate (); int -main () +main (void) { return EVP_DigestUpdate (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_EVP_DigestUpdate=yes -else +else $as_nop ac_cv_lib_crypto_EVP_DigestUpdate=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_DigestUpdate" >&5 -$as_echo "$ac_cv_lib_crypto_EVP_DigestUpdate" >&6; } -if test "x$ac_cv_lib_crypto_EVP_DigestUpdate" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_DigestUpdate" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_DigestUpdate" >&6; } +if test "x$ac_cv_lib_crypto_EVP_DigestUpdate" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_evp_md=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_DigestFinal_ex in -lcrypto" >&5 -$as_echo_n "checking for EVP_DigestFinal_ex in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_EVP_DigestFinal_ex+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_DigestFinal_ex in -lcrypto" >&5 +printf %s "checking for EVP_DigestFinal_ex in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_DigestFinal_ex+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -53361,66 +59701,78 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char EVP_DigestFinal_ex (); int -main () +main (void) { return EVP_DigestFinal_ex (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_EVP_DigestFinal_ex=yes -else +else $as_nop ac_cv_lib_crypto_EVP_DigestFinal_ex=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_DigestFinal_ex" >&5 -$as_echo "$ac_cv_lib_crypto_EVP_DigestFinal_ex" >&6; } -if test "x$ac_cv_lib_crypto_EVP_DigestFinal_ex" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_DigestFinal_ex" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_DigestFinal_ex" >&6; } +if test "x$ac_cv_lib_crypto_EVP_DigestFinal_ex" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_evp_md=no fi - if test "x$ac_cv_enable_openssl_evp_md" = xyes && "x$ac_cv_libcrypto_evp_md" = xno; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_enable_openssl_evp_md" = xyes && test "x$ac_cv_libcrypto_evp_md" = xno +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing OpenSSL EVP MD support See \`config.log' for more details" "$LINENO" 5; } fi - if test "x$ac_cv_lib_crypto_EVP_MD_CTX_init" = xyes; then : + if test "x$ac_cv_lib_crypto_EVP_MD_CTX_init" = xyes +then : -$as_echo "#define HAVE_EVP_MD_CTX_INIT 1" >>confdefs.h +printf "%s\n" "#define HAVE_EVP_MD_CTX_INIT 1" >>confdefs.h fi - if test "x$ac_cv_lib_crypto_EVP_MD_CTX_cleanup" = xyes; then : + if test "x$ac_cv_lib_crypto_EVP_MD_CTX_cleanup" = xyes +then : -$as_echo "#define HAVE_EVP_MD_CTX_CLEANUP 1" >>confdefs.h +printf "%s\n" "#define HAVE_EVP_MD_CTX_CLEANUP 1" >>confdefs.h fi + if test "x$ac_cv_lib_crypto_EVP_DigestInit_ex2" = xyes +then : + +printf "%s\n" "#define HAVE_EVP_DIGESTINIT_EX2 1" >>confdefs.h + + fi - if test "x$ac_cv_libcrypto_evp_md" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_sha256 in -lcrypto" >&5 -$as_echo_n "checking for EVP_sha256 in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_EVP_sha256+:} false; then : - $as_echo_n "(cached) " >&6 -else +fi + + if test "x$ac_cv_libcrypto_evp_md" = xyes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_sha256 in -lcrypto" >&5 +printf %s "checking for EVP_sha256 in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_sha256+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -53429,69 +59781,67 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char EVP_sha256 (); int -main () +main (void) { return EVP_sha256 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_EVP_sha256=yes -else +else $as_nop ac_cv_lib_crypto_EVP_sha256=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_sha256" >&5 -$as_echo "$ac_cv_lib_crypto_EVP_sha256" >&6; } -if test "x$ac_cv_lib_crypto_EVP_sha256" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_sha256" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_sha256" >&6; } +if test "x$ac_cv_lib_crypto_EVP_sha256" = xyes +then : ac_cv_libcrypto_sha256=libcrypto_evp -else +else $as_nop ac_cv_libcrypto_sha256=no fi - if test "x$ac_cv_libcrypto_sha256" = xlibcrypto_evp; then : + if test "x$ac_cv_libcrypto_sha256" = xlibcrypto_evp +then : -$as_echo "#define HAVE_EVP_SHA256 1" >>confdefs.h +printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h fi fi - if test "x$ac_cv_libcrypto_sha256" = xno; then : - for ac_header in openssl/sha.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "openssl/sha.h" "ac_cv_header_openssl_sha_h" "$ac_includes_default" -if test "x$ac_cv_header_openssl_sha_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_OPENSSL_SHA_H 1 -_ACEOF + if test "x$ac_cv_libcrypto_sha256" = xno +then : + ac_fn_c_check_header_compile "$LINENO" "openssl/sha.h" "ac_cv_header_openssl_sha_h" "$ac_includes_default" +if test "x$ac_cv_header_openssl_sha_h" = xyes +then : + printf "%s\n" "#define HAVE_OPENSSL_SHA_H 1" >>confdefs.h fi -done - - if test "x$ac_cv_header_openssl_sha_h" = xno; then : + if test "x$ac_cv_header_openssl_sha_h" = xno +then : ac_cv_libcrypto_sha256=no -else +else $as_nop ac_cv_libcrypto_sha256=libcrypto - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SHA256_Init in -lcrypto" >&5 -$as_echo_n "checking for SHA256_Init in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_SHA256_Init+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SHA256_Init in -lcrypto" >&5 +printf %s "checking for SHA256_Init in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_SHA256_Init+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -53500,40 +59850,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char SHA256_Init (); int -main () +main (void) { return SHA256_Init (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_SHA256_Init=yes -else +else $as_nop ac_cv_lib_crypto_SHA256_Init=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_SHA256_Init" >&5 -$as_echo "$ac_cv_lib_crypto_SHA256_Init" >&6; } -if test "x$ac_cv_lib_crypto_SHA256_Init" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_SHA256_Init" >&5 +printf "%s\n" "$ac_cv_lib_crypto_SHA256_Init" >&6; } +if test "x$ac_cv_lib_crypto_SHA256_Init" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_sha256=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SHA256_Update in -lcrypto" >&5 -$as_echo_n "checking for SHA256_Update in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_SHA256_Update+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SHA256_Update in -lcrypto" >&5 +printf %s "checking for SHA256_Update in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_SHA256_Update+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -53542,40 +59892,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char SHA256_Update (); int -main () +main (void) { return SHA256_Update (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_SHA256_Update=yes -else +else $as_nop ac_cv_lib_crypto_SHA256_Update=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_SHA256_Update" >&5 -$as_echo "$ac_cv_lib_crypto_SHA256_Update" >&6; } -if test "x$ac_cv_lib_crypto_SHA256_Update" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_SHA256_Update" >&5 +printf "%s\n" "$ac_cv_lib_crypto_SHA256_Update" >&6; } +if test "x$ac_cv_lib_crypto_SHA256_Update" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_sha256=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SHA256_Final in -lcrypto" >&5 -$as_echo_n "checking for SHA256_Final in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_SHA256_Final+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SHA256_Final in -lcrypto" >&5 +printf %s "checking for SHA256_Final in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_SHA256_Final+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -53584,39 +59934,39 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char SHA256_Final (); int -main () +main (void) { return SHA256_Final (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_SHA256_Final=yes -else +else $as_nop ac_cv_lib_crypto_SHA256_Final=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_SHA256_Final" >&5 -$as_echo "$ac_cv_lib_crypto_SHA256_Final" >&6; } -if test "x$ac_cv_lib_crypto_SHA256_Final" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_SHA256_Final" >&5 +printf "%s\n" "$ac_cv_lib_crypto_SHA256_Final" >&6; } +if test "x$ac_cv_lib_crypto_SHA256_Final" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_sha256=no fi fi - if test "x$ac_cv_libcrypto" = xno && test "x$ac_cv_libcrypto_sha256" = xlibcrypto; then : + if test "x$ac_cv_libcrypto" = xno && test "x$ac_cv_libcrypto_sha256" = xlibcrypto +then : ac_cv_libcrypto=yes fi @@ -53624,14 +59974,16 @@ ac_cv_libcrypto_sha512=no - if test "x$ac_cv_libcrypto_evp" = xyes && test "x$ac_cv_enable_openssl_evp_md" != xno && test "x$ac_cv_libcrypto_evp_md" != xyes; then : + if test "x$ac_cv_libcrypto_evp" = xyes && test "x$ac_cv_enable_openssl_evp_md" != xno && test "x$ac_cv_libcrypto_evp_md" != xyes +then : ac_cv_libcrypto_evp_md=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_new in -lcrypto" >&5 -$as_echo_n "checking for EVP_MD_CTX_new in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_EVP_MD_CTX_new+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_new in -lcrypto" >&5 +printf %s "checking for EVP_MD_CTX_new in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_MD_CTX_new+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -53640,42 +59992,43 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char EVP_MD_CTX_new (); int -main () +main (void) { return EVP_MD_CTX_new (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_EVP_MD_CTX_new=yes -else +else $as_nop ac_cv_lib_crypto_EVP_MD_CTX_new=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_new" >&5 -$as_echo "$ac_cv_lib_crypto_EVP_MD_CTX_new" >&6; } -if test "x$ac_cv_lib_crypto_EVP_MD_CTX_new" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_new" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_MD_CTX_new" >&6; } +if test "x$ac_cv_lib_crypto_EVP_MD_CTX_new" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_dummy=no fi - if test "x$ac_cv_lib_crypto_EVP_MD_CTX_new" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_free in -lcrypto" >&5 -$as_echo_n "checking for EVP_MD_CTX_free in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_EVP_MD_CTX_free+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test "x$ac_cv_lib_crypto_EVP_MD_CTX_new" = xyes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_free in -lcrypto" >&5 +printf %s "checking for EVP_MD_CTX_free in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_MD_CTX_free+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -53684,42 +60037,42 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char EVP_MD_CTX_free (); int -main () +main (void) { return EVP_MD_CTX_free (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_EVP_MD_CTX_free=yes -else +else $as_nop ac_cv_lib_crypto_EVP_MD_CTX_free=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_free" >&5 -$as_echo "$ac_cv_lib_crypto_EVP_MD_CTX_free" >&6; } -if test "x$ac_cv_lib_crypto_EVP_MD_CTX_free" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_free" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_MD_CTX_free" >&6; } +if test "x$ac_cv_lib_crypto_EVP_MD_CTX_free" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_evp_md=no fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_init in -lcrypto" >&5 -$as_echo_n "checking for EVP_MD_CTX_init in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_EVP_MD_CTX_init+:} false; then : - $as_echo_n "(cached) " >&6 -else +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_init in -lcrypto" >&5 +printf %s "checking for EVP_MD_CTX_init in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_MD_CTX_init+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -53728,40 +60081,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char EVP_MD_CTX_init (); int -main () +main (void) { return EVP_MD_CTX_init (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_EVP_MD_CTX_init=yes -else +else $as_nop ac_cv_lib_crypto_EVP_MD_CTX_init=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_init" >&5 -$as_echo "$ac_cv_lib_crypto_EVP_MD_CTX_init" >&6; } -if test "x$ac_cv_lib_crypto_EVP_MD_CTX_init" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_init" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_MD_CTX_init" >&6; } +if test "x$ac_cv_lib_crypto_EVP_MD_CTX_init" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_evp_md=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_cleanup in -lcrypto" >&5 -$as_echo_n "checking for EVP_MD_CTX_cleanup in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_EVP_MD_CTX_cleanup+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_cleanup in -lcrypto" >&5 +printf %s "checking for EVP_MD_CTX_cleanup in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_MD_CTX_cleanup+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -53770,41 +60123,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char EVP_MD_CTX_cleanup (); int -main () +main (void) { return EVP_MD_CTX_cleanup (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_EVP_MD_CTX_cleanup=yes -else +else $as_nop ac_cv_lib_crypto_EVP_MD_CTX_cleanup=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_cleanup" >&5 -$as_echo "$ac_cv_lib_crypto_EVP_MD_CTX_cleanup" >&6; } -if test "x$ac_cv_lib_crypto_EVP_MD_CTX_cleanup" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_cleanup" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_MD_CTX_cleanup" >&6; } +if test "x$ac_cv_lib_crypto_EVP_MD_CTX_cleanup" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_evp_md=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ERR_remove_thread_state in -lcrypto" >&5 -$as_echo_n "checking for ERR_remove_thread_state in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_ERR_remove_thread_state+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ERR_remove_thread_state in -lcrypto" >&5 +printf %s "checking for ERR_remove_thread_state in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_ERR_remove_thread_state+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -53813,43 +60166,216 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char ERR_remove_thread_state (); int -main () +main (void) { return ERR_remove_thread_state (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_ERR_remove_thread_state=yes -else +else $as_nop ac_cv_lib_crypto_ERR_remove_thread_state=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_ERR_remove_thread_state" >&5 -$as_echo "$ac_cv_lib_crypto_ERR_remove_thread_state" >&6; } -if test "x$ac_cv_lib_crypto_ERR_remove_thread_state" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_ERR_remove_thread_state" >&5 +printf "%s\n" "$ac_cv_lib_crypto_ERR_remove_thread_state" >&6; } +if test "x$ac_cv_lib_crypto_ERR_remove_thread_state" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_evp_md=no fi fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_DigestInit_ex in -lcrypto" >&5 -$as_echo_n "checking for EVP_DigestInit_ex in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_EVP_DigestInit_ex+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_DigestInit_ex2 in -lcrypto" >&5 +printf %s "checking for EVP_DigestInit_ex2 in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_DigestInit_ex2+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypto $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char EVP_DigestInit_ex2 (); +int +main (void) +{ +return EVP_DigestInit_ex2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_crypto_EVP_DigestInit_ex2=yes +else $as_nop + ac_cv_lib_crypto_EVP_DigestInit_ex2=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_DigestInit_ex2" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_DigestInit_ex2" >&6; } +if test "x$ac_cv_lib_crypto_EVP_DigestInit_ex2" = xyes +then : + ac_cv_libcrypto_dummy=yes +else $as_nop + ac_cv_libcrypto_dummy=no +fi + + + if test "x$ac_cv_lib_crypto_EVP_DigestInit_ex2" = xyes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_reset in -lcrypto" >&5 +printf %s "checking for EVP_MD_CTX_reset in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_MD_CTX_reset+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypto $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char EVP_MD_CTX_reset (); +int +main (void) +{ +return EVP_MD_CTX_reset (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_crypto_EVP_MD_CTX_reset=yes +else $as_nop + ac_cv_lib_crypto_EVP_MD_CTX_reset=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_reset" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_MD_CTX_reset" >&6; } +if test "x$ac_cv_lib_crypto_EVP_MD_CTX_reset" = xyes +then : + ac_cv_libcrypto_dummy=yes +else $as_nop + ac_cv_libcrypto_evp_md=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_fetch in -lcrypto" >&5 +printf %s "checking for EVP_MD_fetch in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_MD_fetch+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypto $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char EVP_MD_fetch (); +int +main (void) +{ +return EVP_MD_fetch (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_crypto_EVP_MD_fetch=yes +else $as_nop + ac_cv_lib_crypto_EVP_MD_fetch=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_fetch" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_MD_fetch" >&6; } +if test "x$ac_cv_lib_crypto_EVP_MD_fetch" = xyes +then : + ac_cv_libcrypto_dummy=yes +else $as_nop + ac_cv_libcrypto_evp_md=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_free in -lcrypto" >&5 +printf %s "checking for EVP_MD_free in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_MD_free+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypto $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char EVP_MD_free (); +int +main (void) +{ +return EVP_MD_free (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_crypto_EVP_MD_free=yes +else $as_nop + ac_cv_lib_crypto_EVP_MD_free=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_free" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_MD_free" >&6; } +if test "x$ac_cv_lib_crypto_EVP_MD_free" = xyes +then : + ac_cv_libcrypto_dummy=yes +else $as_nop + ac_cv_libcrypto_evp_md=no +fi + + +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_DigestInit_ex in -lcrypto" >&5 +printf %s "checking for EVP_DigestInit_ex in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_DigestInit_ex+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -53858,40 +60384,43 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char EVP_DigestInit_ex (); int -main () +main (void) { return EVP_DigestInit_ex (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_EVP_DigestInit_ex=yes -else +else $as_nop ac_cv_lib_crypto_EVP_DigestInit_ex=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_DigestInit_ex" >&5 -$as_echo "$ac_cv_lib_crypto_EVP_DigestInit_ex" >&6; } -if test "x$ac_cv_lib_crypto_EVP_DigestInit_ex" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_DigestInit_ex" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_DigestInit_ex" >&6; } +if test "x$ac_cv_lib_crypto_EVP_DigestInit_ex" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_evp_md=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_DigestUpdate in -lcrypto" >&5 -$as_echo_n "checking for EVP_DigestUpdate in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_EVP_DigestUpdate+:} false; then : - $as_echo_n "(cached) " >&6 -else + +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_DigestUpdate in -lcrypto" >&5 +printf %s "checking for EVP_DigestUpdate in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_DigestUpdate+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -53900,40 +60429,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char EVP_DigestUpdate (); int -main () +main (void) { return EVP_DigestUpdate (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_EVP_DigestUpdate=yes -else +else $as_nop ac_cv_lib_crypto_EVP_DigestUpdate=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_DigestUpdate" >&5 -$as_echo "$ac_cv_lib_crypto_EVP_DigestUpdate" >&6; } -if test "x$ac_cv_lib_crypto_EVP_DigestUpdate" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_DigestUpdate" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_DigestUpdate" >&6; } +if test "x$ac_cv_lib_crypto_EVP_DigestUpdate" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_evp_md=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_DigestFinal_ex in -lcrypto" >&5 -$as_echo_n "checking for EVP_DigestFinal_ex in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_EVP_DigestFinal_ex+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_DigestFinal_ex in -lcrypto" >&5 +printf %s "checking for EVP_DigestFinal_ex in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_DigestFinal_ex+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -53942,66 +60471,78 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char EVP_DigestFinal_ex (); int -main () +main (void) { return EVP_DigestFinal_ex (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_EVP_DigestFinal_ex=yes -else +else $as_nop ac_cv_lib_crypto_EVP_DigestFinal_ex=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_DigestFinal_ex" >&5 -$as_echo "$ac_cv_lib_crypto_EVP_DigestFinal_ex" >&6; } -if test "x$ac_cv_lib_crypto_EVP_DigestFinal_ex" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_DigestFinal_ex" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_DigestFinal_ex" >&6; } +if test "x$ac_cv_lib_crypto_EVP_DigestFinal_ex" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_evp_md=no fi - if test "x$ac_cv_enable_openssl_evp_md" = xyes && "x$ac_cv_libcrypto_evp_md" = xno; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_enable_openssl_evp_md" = xyes && test "x$ac_cv_libcrypto_evp_md" = xno +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing OpenSSL EVP MD support See \`config.log' for more details" "$LINENO" 5; } fi - if test "x$ac_cv_lib_crypto_EVP_MD_CTX_init" = xyes; then : + if test "x$ac_cv_lib_crypto_EVP_MD_CTX_init" = xyes +then : -$as_echo "#define HAVE_EVP_MD_CTX_INIT 1" >>confdefs.h +printf "%s\n" "#define HAVE_EVP_MD_CTX_INIT 1" >>confdefs.h fi - if test "x$ac_cv_lib_crypto_EVP_MD_CTX_cleanup" = xyes; then : + if test "x$ac_cv_lib_crypto_EVP_MD_CTX_cleanup" = xyes +then : -$as_echo "#define HAVE_EVP_MD_CTX_CLEANUP 1" >>confdefs.h +printf "%s\n" "#define HAVE_EVP_MD_CTX_CLEANUP 1" >>confdefs.h fi + if test "x$ac_cv_lib_crypto_EVP_DigestInit_ex2" = xyes +then : + +printf "%s\n" "#define HAVE_EVP_DIGESTINIT_EX2 1" >>confdefs.h + + fi - if test "x$ac_cv_libcrypto_evp_md" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_sha512 in -lcrypto" >&5 -$as_echo_n "checking for EVP_sha512 in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_EVP_sha512+:} false; then : - $as_echo_n "(cached) " >&6 -else +fi + + if test "x$ac_cv_libcrypto_evp_md" = xyes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_sha512 in -lcrypto" >&5 +printf %s "checking for EVP_sha512 in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_sha512+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -54010,69 +60551,67 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char EVP_sha512 (); int -main () +main (void) { return EVP_sha512 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_EVP_sha512=yes -else +else $as_nop ac_cv_lib_crypto_EVP_sha512=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_sha512" >&5 -$as_echo "$ac_cv_lib_crypto_EVP_sha512" >&6; } -if test "x$ac_cv_lib_crypto_EVP_sha512" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_sha512" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_sha512" >&6; } +if test "x$ac_cv_lib_crypto_EVP_sha512" = xyes +then : ac_cv_libcrypto_sha512=libcrypto_evp -else +else $as_nop ac_cv_libcrypto_sha512=no fi - if test "x$ac_cv_libcrypto_sha512" = xlibcrypto_evp; then : + if test "x$ac_cv_libcrypto_sha512" = xlibcrypto_evp +then : -$as_echo "#define HAVE_EVP_SHA512 1" >>confdefs.h +printf "%s\n" "#define HAVE_EVP_SHA512 1" >>confdefs.h fi fi - if test "x$ac_cv_libcrypto_sha512" = xno; then : - for ac_header in openssl/sha.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "openssl/sha.h" "ac_cv_header_openssl_sha_h" "$ac_includes_default" -if test "x$ac_cv_header_openssl_sha_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_OPENSSL_SHA_H 1 -_ACEOF + if test "x$ac_cv_libcrypto_sha512" = xno +then : + ac_fn_c_check_header_compile "$LINENO" "openssl/sha.h" "ac_cv_header_openssl_sha_h" "$ac_includes_default" +if test "x$ac_cv_header_openssl_sha_h" = xyes +then : + printf "%s\n" "#define HAVE_OPENSSL_SHA_H 1" >>confdefs.h fi -done - - if test "x$ac_cv_header_openssl_sha_h" = xno; then : + if test "x$ac_cv_header_openssl_sha_h" = xno +then : ac_cv_libcrypto_sha512=no -else +else $as_nop ac_cv_libcrypto_sha512=libcrypto - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SHA512_Init in -lcrypto" >&5 -$as_echo_n "checking for SHA512_Init in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_SHA512_Init+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SHA512_Init in -lcrypto" >&5 +printf %s "checking for SHA512_Init in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_SHA512_Init+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -54081,40 +60620,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char SHA512_Init (); int -main () +main (void) { return SHA512_Init (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_SHA512_Init=yes -else +else $as_nop ac_cv_lib_crypto_SHA512_Init=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_SHA512_Init" >&5 -$as_echo "$ac_cv_lib_crypto_SHA512_Init" >&6; } -if test "x$ac_cv_lib_crypto_SHA512_Init" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_SHA512_Init" >&5 +printf "%s\n" "$ac_cv_lib_crypto_SHA512_Init" >&6; } +if test "x$ac_cv_lib_crypto_SHA512_Init" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_sha512=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SHA512_Update in -lcrypto" >&5 -$as_echo_n "checking for SHA512_Update in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_SHA512_Update+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SHA512_Update in -lcrypto" >&5 +printf %s "checking for SHA512_Update in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_SHA512_Update+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -54123,40 +60662,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char SHA512_Update (); int -main () +main (void) { return SHA512_Update (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_SHA512_Update=yes -else +else $as_nop ac_cv_lib_crypto_SHA512_Update=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_SHA512_Update" >&5 -$as_echo "$ac_cv_lib_crypto_SHA512_Update" >&6; } -if test "x$ac_cv_lib_crypto_SHA512_Update" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_SHA512_Update" >&5 +printf "%s\n" "$ac_cv_lib_crypto_SHA512_Update" >&6; } +if test "x$ac_cv_lib_crypto_SHA512_Update" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_sha512=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SHA512_Final in -lcrypto" >&5 -$as_echo_n "checking for SHA512_Final in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_SHA512_Final+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SHA512_Final in -lcrypto" >&5 +printf %s "checking for SHA512_Final in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_SHA512_Final+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -54165,39 +60704,39 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char SHA512_Final (); int -main () +main (void) { return SHA512_Final (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_SHA512_Final=yes -else +else $as_nop ac_cv_lib_crypto_SHA512_Final=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_SHA512_Final" >&5 -$as_echo "$ac_cv_lib_crypto_SHA512_Final" >&6; } -if test "x$ac_cv_lib_crypto_SHA512_Final" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_SHA512_Final" >&5 +printf "%s\n" "$ac_cv_lib_crypto_SHA512_Final" >&6; } +if test "x$ac_cv_lib_crypto_SHA512_Final" = xyes +then : ac_cv_libcrypto_dummy=yes -else +else $as_nop ac_cv_libcrypto_sha512=no fi fi - if test "x$ac_cv_libcrypto" = xno && test "x$ac_cv_libcrypto_sha512" = xlibcrypto; then : + if test "x$ac_cv_libcrypto" = xno && test "x$ac_cv_libcrypto_sha512" = xlibcrypto +then : ac_cv_libcrypto=yes fi @@ -54205,33 +60744,38 @@ fi - if test "x$ac_cv_libcrypto" = xno || test "x$ac_cv_libcrypto_md5" = xno; then : + if test "x$ac_cv_libcrypto" = xno || test "x$ac_cv_libcrypto_md5" = xno +then : ac_cv_libhmac_md5=local -else +else $as_nop ac_cv_libhmac_md5=$ac_cv_libcrypto_md5 fi - if test "x$ac_cv_libcrypto" = xno || test "x$ac_cv_libcrypto_sha1" = xno; then : + if test "x$ac_cv_libcrypto" = xno || test "x$ac_cv_libcrypto_sha1" = xno +then : ac_cv_libhmac_sha1=local -else +else $as_nop ac_cv_libhmac_sha1=$ac_cv_libcrypto_sha1 fi - if test "x$ac_cv_libcrypto" = xno || test "x$ac_cv_libcrypto_sha224" = xno; then : + if test "x$ac_cv_libcrypto" = xno || test "x$ac_cv_libcrypto_sha224" = xno +then : ac_cv_libhmac_sha224=local -else +else $as_nop ac_cv_libhmac_sha224=$ac_cv_libcrypto_sha224 fi - if test "x$ac_cv_libcrypto" = xno || test "x$ac_cv_libcrypto_sha256" = xno; then : + if test "x$ac_cv_libcrypto" = xno || test "x$ac_cv_libcrypto_sha256" = xno +then : ac_cv_libhmac_sha256=local -else +else $as_nop ac_cv_libhmac_sha256=$ac_cv_libcrypto_sha256 fi - if test "x$ac_cv_libcrypto" = xno || test "x$ac_cv_libcrypto_sha512" = xno; then : + if test "x$ac_cv_libcrypto" = xno || test "x$ac_cv_libcrypto_sha512" = xno +then : ac_cv_libhmac_sha512=local -else +else $as_nop ac_cv_libhmac_sha512=$ac_cv_libcrypto_sha512 fi @@ -54242,7 +60786,7 @@ -$as_echo "#define HAVE_LOCAL_LIBHMAC 1" >>confdefs.h +printf "%s\n" "#define HAVE_LOCAL_LIBHMAC 1" >>confdefs.h HAVE_LOCAL_LIBHMAC=1 @@ -54257,24 +60801,28 @@ HAVE_LOCAL_LIBHMAC_FALSE= fi - if test "x$ac_cv_libhmac_CPPFLAGS" != "x"; then : + if test "x$ac_cv_libhmac_CPPFLAGS" != "x" +then : LIBHMAC_CPPFLAGS=$ac_cv_libhmac_CPPFLAGS fi - if test "x$ac_cv_libhmac_LIBADD" != "x"; then : + if test "x$ac_cv_libhmac_LIBADD" != "x" +then : LIBHMAC_LIBADD=$ac_cv_libhmac_LIBADD fi - if test "x$ac_cv_libhmac" = xyes; then : + if test "x$ac_cv_libhmac" = xyes +then : ax_libhmac_pc_libs_private=-lhmac fi - if test "x$ac_cv_libhmac" = xyes; then : + if test "x$ac_cv_libhmac" = xyes +then : ax_libhmac_spec_requires=libhmac ax_libhmac_spec_build_requires=libhmac-devel @@ -54283,47 +60831,704 @@ fi -for ac_header in signal.h sys/signal.h unistd.h + + +# Check whether --with-libfuse was given. +if test ${with_libfuse+y} +then : + withval=$with_libfuse; ac_cv_with_libfuse=$withval +else $as_nop + ac_cv_with_libfuse=auto-detect +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use search for libfuse in includedir and libdir or in the specified DIR, or no if not to use libfuse" >&5 +printf %s "checking whether to use search for libfuse in includedir and libdir or in the specified DIR, or no if not to use libfuse... " >&6; } +if test ${ac_cv_with_libfuse+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_with_libfuse=auto-detect +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libfuse" >&5 +printf "%s\n" "$ac_cv_with_libfuse" >&6; } + + if test "x$ac_cv_with_libfuse" != x && test "x$ac_cv_with_libfuse" != xno && test "x$ac_cv_with_libfuse" != xauto-detect +then : + if test -d "$ac_cv_with_libfuse" +then : + CFLAGS="$CFLAGS -I${ac_cv_with_libfuse}/include" + LDFLAGS="$LDFLAGS -L${ac_cv_with_libfuse}/lib" +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: no such directory: $ac_cv_with_libfuse" >&5 +printf "%s\n" "$as_me: WARNING: no such directory: $ac_cv_with_libfuse" >&2;} + +fi + +fi + + if test "x$ac_cv_with_libfuse" = xno +then : + ac_cv_libfuse=no +else $as_nop + if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x" +then : + +pkg_failed=no +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fuse >= 2.6" >&5 +printf %s "checking for fuse >= 2.6... " >&6; } + +if test -n "$fuse_CFLAGS"; then + pkg_cv_fuse_CFLAGS="$fuse_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fuse >= 2.6\""; } >&5 + ($PKG_CONFIG --exists --print-errors "fuse >= 2.6") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_fuse_CFLAGS=`$PKG_CONFIG --cflags "fuse >= 2.6" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$fuse_LIBS"; then + pkg_cv_fuse_LIBS="$fuse_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fuse >= 2.6\""; } >&5 + ($PKG_CONFIG --exists --print-errors "fuse >= 2.6") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_fuse_LIBS=`$PKG_CONFIG --libs "fuse >= 2.6" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + fuse_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "fuse >= 2.6" 2>&1` + else + fuse_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "fuse >= 2.6" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$fuse_PKG_ERRORS" >&5 + + ac_cv_libfuse=no +elif test $pkg_failed = untried; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ac_cv_libfuse=no +else + fuse_CFLAGS=$pkg_cv_fuse_CFLAGS + fuse_LIBS=$pkg_cv_fuse_LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + ac_cv_libfuse=libfuse +fi + +fi + + if test "x$ac_cv_libfuse" = xlibfuse +then : + ac_cv_libfuse_CPPFLAGS="$pkg_cv_fuse_CFLAGS" + ac_cv_libfuse_LIBADD="$pkg_cv_fuse_LIBS" +else $as_nop + for ac_header in fuse.h do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 + ac_fn_c_check_header_compile "$LINENO" "fuse.h" "ac_cv_header_fuse_h" "$ac_includes_default" +if test "x$ac_cv_header_fuse_h" = xyes +then : + printf "%s\n" "#define HAVE_FUSE_H 1" >>confdefs.h + ac_cv_header_fuse_h=yes +else $as_nop + ac_cv_header_fuse_h=no +fi + +done + + if test "x$ac_cv_header_fuse_h" = xno +then : + { ac_cv_header_fuse_h=; unset ac_cv_header_fuse_h;} + CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=26" + ac_fn_c_check_header_compile "$LINENO" "fuse.h" "ac_cv_header_fuse_h" "$ac_includes_default" +if test "x$ac_cv_header_fuse_h" = xyes +then : + printf "%s\n" "#define HAVE_FUSE_H 1" >>confdefs.h + +fi + + +fi + + if test "x$ac_cv_header_fuse_h" = xno +then : + ac_cv_libfuse=no +else $as_nop + ac_cv_libfuse=libfuse + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fuse_daemonize in -lfuse" >&5 +printf %s "checking for fuse_daemonize in -lfuse... " >&6; } +if test ${ac_cv_lib_fuse_fuse_daemonize+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lfuse $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char fuse_daemonize (); +int +main (void) +{ +return fuse_daemonize (); + ; + return 0; +} _ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_fuse_fuse_daemonize=yes +else $as_nop + ac_cv_lib_fuse_fuse_daemonize=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fuse_fuse_daemonize" >&5 +printf "%s\n" "$ac_cv_lib_fuse_fuse_daemonize" >&6; } +if test "x$ac_cv_lib_fuse_fuse_daemonize" = xyes +then : + ac_cv_libfuse_dummy=yes +else $as_nop + ac_cv_libfuse=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fuse_destroy in -lfuse" >&5 +printf %s "checking for fuse_destroy in -lfuse... " >&6; } +if test ${ac_cv_lib_fuse_fuse_destroy+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lfuse $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char fuse_destroy (); +int +main (void) +{ +return fuse_destroy (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_fuse_fuse_destroy=yes +else $as_nop + ac_cv_lib_fuse_fuse_destroy=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fuse_fuse_destroy" >&5 +printf "%s\n" "$ac_cv_lib_fuse_fuse_destroy" >&6; } +if test "x$ac_cv_lib_fuse_fuse_destroy" = xyes +then : + ac_cv_libfuse_dummy=yes +else $as_nop + ac_cv_libfuse=no fi -done + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fuse_mount in -lfuse" >&5 +printf %s "checking for fuse_mount in -lfuse... " >&6; } +if test ${ac_cv_lib_fuse_fuse_mount+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lfuse $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char fuse_mount (); +int +main (void) +{ +return fuse_mount (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_fuse_fuse_mount=yes +else $as_nop + ac_cv_lib_fuse_fuse_mount=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fuse_fuse_mount" >&5 +printf "%s\n" "$ac_cv_lib_fuse_fuse_mount" >&6; } +if test "x$ac_cv_lib_fuse_fuse_mount" = xyes +then : + ac_cv_libfuse_dummy=yes +else $as_nop + ac_cv_libfuse=no +fi - for ac_func in close getopt setvbuf -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fuse_new in -lfuse" >&5 +printf %s "checking for fuse_new in -lfuse... " >&6; } +if test ${ac_cv_lib_fuse_fuse_new+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lfuse $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char fuse_new (); +int +main (void) +{ +return fuse_new (); + ; + return 0; +} _ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_fuse_fuse_new=yes +else $as_nop + ac_cv_lib_fuse_fuse_new=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fuse_fuse_new" >&5 +printf "%s\n" "$ac_cv_lib_fuse_fuse_new" >&6; } +if test "x$ac_cv_lib_fuse_fuse_new" = xyes +then : + ac_cv_libfuse_dummy=yes +else $as_nop + ac_cv_libfuse=no +fi + + + ac_cv_libfuse_LIBADD="-lfuse"; + +fi + +fi + + if test "x$ac_cv_with_libfuse" != xno && test "x$ac_cv_header_fuse_h" = xno +then : + CPPFLAGS="$CPPFLAGS -DFUSE_USE_VERSION=26" + ac_fn_c_check_header_compile "$LINENO" "osxfuse/fuse.h" "ac_cv_header_osxfuse_fuse_h" "$ac_includes_default" +if test "x$ac_cv_header_osxfuse_fuse_h" = xyes +then : + printf "%s\n" "#define HAVE_OSXFUSE_FUSE_H 1" >>confdefs.h + +fi + + + if test "x$ac_cv_header_osxfuse_fuse_h" = xno +then : + { ac_cv_header_osxfuse_fuse_h=; unset ac_cv_header_osxfuse_fuse_h;} + CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=64" + ac_fn_c_check_header_compile "$LINENO" "osxfuse/fuse.h" "ac_cv_header_osxfuse_fuse_h" "$ac_includes_default" +if test "x$ac_cv_header_osxfuse_fuse_h" = xyes +then : + printf "%s\n" "#define HAVE_OSXFUSE_FUSE_H 1" >>confdefs.h + +fi + + +fi + + if test "x$ac_cv_header_osxfuse_fuse_h" = xno +then : + ac_cv_libfuse=no +else $as_nop + ac_cv_libfuse=libosxfuse + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fuse_daemonize in -losxfuse" >&5 +printf %s "checking for fuse_daemonize in -losxfuse... " >&6; } +if test ${ac_cv_lib_osxfuse_fuse_daemonize+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-losxfuse $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char fuse_daemonize (); +int +main (void) +{ +return fuse_daemonize (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_osxfuse_fuse_daemonize=yes +else $as_nop + ac_cv_lib_osxfuse_fuse_daemonize=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_osxfuse_fuse_daemonize" >&5 +printf "%s\n" "$ac_cv_lib_osxfuse_fuse_daemonize" >&6; } +if test "x$ac_cv_lib_osxfuse_fuse_daemonize" = xyes +then : + ac_cv_libfuse_dummy=yes +else $as_nop + ac_cv_libfuse=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fuse_destroy in -losxfuse" >&5 +printf %s "checking for fuse_destroy in -losxfuse... " >&6; } +if test ${ac_cv_lib_osxfuse_fuse_destroy+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-losxfuse $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char fuse_destroy (); +int +main (void) +{ +return fuse_destroy (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_osxfuse_fuse_destroy=yes +else $as_nop + ac_cv_lib_osxfuse_fuse_destroy=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_osxfuse_fuse_destroy" >&5 +printf "%s\n" "$ac_cv_lib_osxfuse_fuse_destroy" >&6; } +if test "x$ac_cv_lib_osxfuse_fuse_destroy" = xyes +then : + ac_cv_libfuse_dummy=yes +else $as_nop + ac_cv_libfuse=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fuse_mount in -losxfuse" >&5 +printf %s "checking for fuse_mount in -losxfuse... " >&6; } +if test ${ac_cv_lib_osxfuse_fuse_mount+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-losxfuse $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char fuse_mount (); +int +main (void) +{ +return fuse_mount (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_osxfuse_fuse_mount=yes +else $as_nop + ac_cv_lib_osxfuse_fuse_mount=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_osxfuse_fuse_mount" >&5 +printf "%s\n" "$ac_cv_lib_osxfuse_fuse_mount" >&6; } +if test "x$ac_cv_lib_osxfuse_fuse_mount" = xyes +then : + ac_cv_libfuse_dummy=yes +else $as_nop + ac_cv_libfuse=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fuse_new in -losxfuse" >&5 +printf %s "checking for fuse_new in -losxfuse... " >&6; } +if test ${ac_cv_lib_osxfuse_fuse_new+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-losxfuse $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char fuse_new (); +int +main (void) +{ +return fuse_new (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_osxfuse_fuse_new=yes +else $as_nop + ac_cv_lib_osxfuse_fuse_new=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_osxfuse_fuse_new" >&5 +printf "%s\n" "$ac_cv_lib_osxfuse_fuse_new" >&6; } +if test "x$ac_cv_lib_osxfuse_fuse_new" = xyes +then : + ac_cv_libfuse_dummy=yes +else $as_nop + ac_cv_libfuse=no +fi + + + ac_cv_libfuse_LIBADD="-losxfuse"; + +fi + +fi + +fi + + if test "x$ac_cv_libfuse" = xlibfuse +then : + +printf "%s\n" "#define HAVE_LIBFUSE 1" >>confdefs.h + + +fi + if test "x$ac_cv_libfuse" = xlibosxfuse +then : + +printf "%s\n" "#define HAVE_LIBOSXFUSE 1" >>confdefs.h + + +fi + + if test "x$ac_cv_libfuse" != xno +then : + HAVE_LIBFUSE=1 + +else $as_nop + HAVE_LIBFUSE=0 + + +fi + + + if test "x$ac_cv_libfuse_CPPFLAGS" != "x" +then : + LIBFUSE_CPPFLAGS=$ac_cv_libfuse_CPPFLAGS + + +fi + if test "x$ac_cv_libfuse_LIBADD" != "x" +then : + LIBFUSE_LIBADD=$ac_cv_libfuse_LIBADD + + +fi + + if test "x$ac_cv_libfuse" = xlibfuse +then : + ax_libfuse_pc_libs_private=-lfuse + + +fi + if test "x$ac_cv_libfuse" = xlibosxfuse +then : + ax_libfuse_pc_libs_private=-losxfuse + + +fi + + if test "x$ac_cv_libfuse" = xlibfuse +then : + ax_libfuse_spec_requires=fuse-libs + + ax_libfuse_spec_build_requires=fuse-devel + + +fi + + +ac_fn_c_check_header_compile "$LINENO" "signal.h" "ac_cv_header_signal_h" "$ac_includes_default" +if test "x$ac_cv_header_signal_h" = xyes +then : + printf "%s\n" "#define HAVE_SIGNAL_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/signal.h" "ac_cv_header_sys_signal_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_signal_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_SIGNAL_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" +if test "x$ac_cv_header_unistd_h" = xyes +then : + printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h + +fi + + + ac_fn_c_check_func "$LINENO" "close" "ac_cv_func_close" +if test "x$ac_cv_func_close" = xyes +then : + printf "%s\n" "#define HAVE_CLOSE 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt" +if test "x$ac_cv_func_getopt" = xyes +then : + printf "%s\n" "#define HAVE_GETOPT 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "setvbuf" "ac_cv_func_setvbuf" +if test "x$ac_cv_func_setvbuf" = xyes +then : + printf "%s\n" "#define HAVE_SETVBUF 1" >>confdefs.h fi -done - if test "x$ac_cv_func_close" != xyes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_cv_func_close" != xyes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: close See \`config.log' for more details" "$LINENO" 5; } fi + ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default" +if test "x$ac_cv_header_errno_h" = xyes +then : + printf "%s\n" "#define HAVE_ERRNO_H 1" >>confdefs.h -if test "x$enable_shared" = xyes && test "x$ac_cv_enable_static_executables" = xno; then : +fi +ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_time_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h + +fi + + + if test "x$ac_cv_enable_winapi" = xno +then : + ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime" +if test "x$ac_cv_func_clock_gettime" = xyes +then : + printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "getegid" "ac_cv_func_getegid" +if test "x$ac_cv_func_getegid" = xyes +then : + printf "%s\n" "#define HAVE_GETEGID 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "geteuid" "ac_cv_func_geteuid" +if test "x$ac_cv_func_geteuid" = xyes +then : + printf "%s\n" "#define HAVE_GETEUID 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "time" "ac_cv_func_time" +if test "x$ac_cv_func_time" = xyes +then : + printf "%s\n" "#define HAVE_TIME 1" >>confdefs.h + +fi + + +fi + + +if test "x$enable_shared" = xyes && test "x$ac_cv_enable_static_executables" = xno +then : case $host in #( *cygwin* | *mingw* | *msys*) : -$as_echo "#define HAVE_DLLMAIN 1" >>confdefs.h +printf "%s\n" "#define HAVE_DLLMAIN 1" >>confdefs.h HAVE_DLLMAIN=1 @@ -54341,37 +61546,58 @@ fi -for ac_header in dlfcn.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default" -if test "x$ac_cv_header_dlfcn_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DLFCN_H 1 -_ACEOF +ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default" +if test "x$ac_cv_header_dlfcn_h" = xyes +then : + printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h fi -done + ac_fn_c_check_func "$LINENO" "fmemopen" "ac_cv_func_fmemopen" +if test "x$ac_cv_func_fmemopen" = xyes +then : + printf "%s\n" "#define HAVE_FMEMOPEN 1" >>confdefs.h - for ac_func in fmemopen getopt mkstemp setenv tzset unlink -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF +fi +ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt" +if test "x$ac_cv_func_getopt" = xyes +then : + printf "%s\n" "#define HAVE_GETOPT 1" >>confdefs.h fi -done +ac_fn_c_check_func "$LINENO" "mkstemp" "ac_cv_func_mkstemp" +if test "x$ac_cv_func_mkstemp" = xyes +then : + printf "%s\n" "#define HAVE_MKSTEMP 1" >>confdefs.h +fi +ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv" +if test "x$ac_cv_func_setenv" = xyes +then : + printf "%s\n" "#define HAVE_SETENV 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlsym in -ldl" >&5 -$as_echo_n "checking for dlsym in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlsym+:} false; then : - $as_echo_n "(cached) " >&6 -else +fi +ac_fn_c_check_func "$LINENO" "tzset" "ac_cv_func_tzset" +if test "x$ac_cv_func_tzset" = xyes +then : + printf "%s\n" "#define HAVE_TZSET 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "unlink" "ac_cv_func_unlink" +if test "x$ac_cv_func_unlink" = xyes +then : + printf "%s\n" "#define HAVE_UNLINK 1" >>confdefs.h + +fi + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlsym in -ldl" >&5 +printf %s "checking for dlsym in -ldl... " >&6; } +if test ${ac_cv_lib_dl_dlsym+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -54380,42 +61606,40 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char dlsym (); int -main () +main (void) { return dlsym (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_dl_dlsym=yes -else +else $as_nop ac_cv_lib_dl_dlsym=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlsym" >&5 -$as_echo "$ac_cv_lib_dl_dlsym" >&6; } -if test "x$ac_cv_lib_dl_dlsym" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBDL 1 -_ACEOF +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlsym" >&5 +printf "%s\n" "$ac_cv_lib_dl_dlsym" >&6; } +if test "x$ac_cv_lib_dl_dlsym" = xyes +then : + printf "%s\n" "#define HAVE_LIBDL 1" >>confdefs.h LIBS="-ldl $LIBS" fi - if test "x$lt_cv_prog_gnu_ld" = xyes && test "x$ac_cv_lib_dl_dlsym" = xyes; then : + if test "x$lt_cv_prog_gnu_ld" = xyes && test "x$ac_cv_lib_dl_dlsym" = xyes +then : -$as_echo "#define HAVE_GNU_DL_DLSYM 1" >>confdefs.h +printf "%s\n" "#define HAVE_GNU_DL_DLSYM 1" >>confdefs.h fi @@ -54434,13 +61658,15 @@ CFLAGS="$CFLAGS -Wall"; -if test "x$ac_cv_libcerror" = xyes || test "x$ac_cv_libcthreads" = xyes || test "x$ac_cv_libcdata" = xyes || test "x$ac_cv_libclocale" = xyes || test "x$ac_cv_libcnotify" = xyes || test "x$ac_cv_libcsplit" = xyes || test "x$ac_cv_libuna" = xyes || test "x$ac_cv_libcfile" = xyes || test "x$ac_cv_libcpath" = xyes || test "x$ac_cv_libbfio" = xyes || test "x$ac_cv_libfcache" = xyes || test "x$ac_cv_libfdata" = xyes || test "x$ac_cv_libfdatetime" = xyes || test "x$ac_cv_libfguid" = xyes || test "x$ac_cv_zlib" != xno; then : +if test "x$ac_cv_libcerror" = xyes || test "x$ac_cv_libcthreads" = xyes || test "x$ac_cv_libcdata" = xyes || test "x$ac_cv_libclocale" = xyes || test "x$ac_cv_libcnotify" = xyes || test "x$ac_cv_libcsplit" = xyes || test "x$ac_cv_libuna" = xyes || test "x$ac_cv_libcfile" = xyes || test "x$ac_cv_libcpath" = xyes || test "x$ac_cv_libbfio" = xyes || test "x$ac_cv_libfcache" = xyes || test "x$ac_cv_libfdata" = xyes || test "x$ac_cv_libfdatetime" = xyes || test "x$ac_cv_libfguid" = xyes || test "x$ac_cv_libfmos" = xyes || test "x$ac_cv_zlib" != xno +then : libfshfs_spec_requires=Requires: fi -if test "x$ac_cv_libhmac" = xyes || test "x$ac_cv_libcrypto" != xno; then : +if test "x$ac_cv_libhmac" = xyes || test "x$ac_cv_libcrypto" != xno || test "x$ac_cv_libfuse" != xno +then : libfshfs_spec_tools_build_requires=BuildRequires: @@ -54486,14 +61712,12 @@ ac_config_files="$ac_config_files libfguid/Makefile" +ac_config_files="$ac_config_files libfmos/Makefile" + ac_config_files="$ac_config_files libfshfs/Makefile" ac_config_files="$ac_config_files pyfshfs/Makefile" -ac_config_files="$ac_config_files pyfshfs-python2/Makefile" - -ac_config_files="$ac_config_files pyfshfs-python3/Makefile" - ac_config_files="$ac_config_files libhmac/Makefile" ac_config_files="$ac_config_files fshfstools/Makefile" @@ -54530,6 +61754,8 @@ ac_config_files="$ac_config_files libfshfs.spec" +ac_config_files="$ac_config_files setup.cfg" + ac_config_headers="$ac_config_headers common/config.h" @@ -54560,8 +61786,8 @@ case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -54591,15 +61817,15 @@ /^ac_cv_env_/b end t clear :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +printf "%s\n" "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else @@ -54613,8 +61839,8 @@ fi fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -54631,7 +61857,7 @@ for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" @@ -54642,14 +61868,14 @@ LTLIBOBJS=$ac_ltlibobjs -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 -$as_echo_n "checking that generated files are newer than configure... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 +printf %s "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 -$as_echo "done" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5 +printf "%s\n" "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' @@ -54666,6 +61892,10 @@ as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -54726,16 +61956,12 @@ as_fn_error $? "conditional \"HAVE_LOCAL_LIBFGUID\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then - as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined. +if test -z "${HAVE_LOCAL_LIBFMOS_TRUE}" && test -z "${HAVE_LOCAL_LIBFMOS_FALSE}"; then + as_fn_error $? "conditional \"HAVE_LOCAL_LIBFMOS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${HAVE_PYTHON2_TRUE}" && test -z "${HAVE_PYTHON2_FALSE}"; then - as_fn_error $? "conditional \"HAVE_PYTHON2\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${HAVE_PYTHON3_TRUE}" && test -z "${HAVE_PYTHON3_FALSE}"; then - as_fn_error $? "conditional \"HAVE_PYTHON3\" was never defined. +if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then + as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_PYTHON_TESTS_TRUE}" && test -z "${HAVE_PYTHON_TESTS_FALSE}"; then @@ -54755,8 +61981,8 @@ ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL @@ -54779,14 +62005,16 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : +as_nop=: +if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else +else $as_nop case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -54796,46 +62024,46 @@ fi + +# Reset variables that may have inherited troublesome values from +# the environment. + +# IFS needs to be set, to space, tab, and newline, in precisely that order. +# (If _AS_PATH_WALK were called with IFS unset, it would have the +# side effect of setting IFS to empty, thus disabling word splitting.) +# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi +IFS=" "" $as_nl" + +PS1='$ ' +PS2='> ' +PS4='+ ' + +# Ensure predictable behavior from utilities with locale-dependent output. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# We cannot yet rely on "unset" to work, but we need these variables +# to be unset--not just set to an empty or harmless value--now, to +# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct +# also avoids known problems related to "unset" and subshell syntax +# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). +for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH +do eval test \${$as_var+y} \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done + +# Ensure that fds 0, 1, and 2 are open. +if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi +if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then +if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -54844,13 +62072,6 @@ fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -54859,8 +62080,12 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS @@ -54872,30 +62097,10 @@ as_myself=$0 fi if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] @@ -54908,13 +62113,14 @@ as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $2" >&2 + printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error + # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -54941,18 +62147,20 @@ { eval $1=; unset $1;} } as_unset=as_fn_unset + # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null +then : eval 'as_fn_append () { eval $1+=\$2 }' -else +else $as_nop as_fn_append () { eval $1=\$$1\$2 @@ -54964,12 +62172,13 @@ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null +then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else +else $as_nop as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` @@ -55000,7 +62209,7 @@ $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | +printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -55022,6 +62231,10 @@ as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits + +# Determine whether it's possible to make 'echo' print without a newline. +# These variables are no longer used directly by Autoconf, but are AC_SUBSTed +# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -55035,6 +62248,12 @@ ECHO_N='-n';; esac +# For backward compatibility with old third-party macros, we provide +# the shell variables $as_echo and $as_echo_n. New code should use +# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. +as_echo='printf %s\n' +as_echo_n='printf %s' + rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -55076,7 +62295,7 @@ as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -55085,7 +62304,7 @@ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | +printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -55147,8 +62366,8 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libfshfs $as_me 20201104, which was -generated by GNU Autoconf 2.69. Invocation command line was +This file was extended by libfshfs $as_me 20240221, which was +generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -55210,14 +62429,16 @@ Report bugs to ." _ACEOF +ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` +ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -libfshfs config.status 20201104 -configured by $0, generated by GNU Autoconf 2.69, +libfshfs config.status 20240221 +configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" -Copyright (C) 2012 Free Software Foundation, Inc. +Copyright (C) 2021 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -55257,15 +62478,15 @@ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; + printf "%s\n" "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; + printf "%s\n" "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" @@ -55273,7 +62494,7 @@ --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; @@ -55282,7 +62503,7 @@ as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; + printf "%s\n" "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; @@ -55310,7 +62531,7 @@ if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" @@ -55324,7 +62545,7 @@ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX - $as_echo "$ac_log" + printf "%s\n" "$ac_log" } >&5 _ACEOF @@ -55342,11 +62563,11 @@ sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' +macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' +macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' -macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' -macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' @@ -55379,12 +62600,14 @@ lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' +FILECMD='`$ECHO "$FILECMD" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' +lt_ar_flags='`$ECHO "$lt_ar_flags" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' @@ -55562,13 +62785,13 @@ lt_SP2NL \ lt_NL2SP \ reload_flag \ +FILECMD \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ sharedlib_from_linklib_cmd \ AR \ -AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ @@ -55717,9 +62940,8 @@ # Capture the value of obsolete ALL_LINGUAS because we need it to compute - # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it - # from automake < 1.5. - eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' + # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. + OBSOLETE_ALL_LINGUAS="$ALL_LINGUAS" # Capture the value of LINGUAS because we need it to compute CATALOGS. LINGUAS="${LINGUAS-%UNSET%}" @@ -55752,10 +62974,9 @@ "libfdata/Makefile") CONFIG_FILES="$CONFIG_FILES libfdata/Makefile" ;; "libfdatetime/Makefile") CONFIG_FILES="$CONFIG_FILES libfdatetime/Makefile" ;; "libfguid/Makefile") CONFIG_FILES="$CONFIG_FILES libfguid/Makefile" ;; + "libfmos/Makefile") CONFIG_FILES="$CONFIG_FILES libfmos/Makefile" ;; "libfshfs/Makefile") CONFIG_FILES="$CONFIG_FILES libfshfs/Makefile" ;; "pyfshfs/Makefile") CONFIG_FILES="$CONFIG_FILES pyfshfs/Makefile" ;; - "pyfshfs-python2/Makefile") CONFIG_FILES="$CONFIG_FILES pyfshfs-python2/Makefile" ;; - "pyfshfs-python3/Makefile") CONFIG_FILES="$CONFIG_FILES pyfshfs-python3/Makefile" ;; "libhmac/Makefile") CONFIG_FILES="$CONFIG_FILES libhmac/Makefile" ;; "fshfstools/Makefile") CONFIG_FILES="$CONFIG_FILES fshfstools/Makefile" ;; "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; @@ -55774,6 +62995,7 @@ "libfshfs/libfshfs.rc") CONFIG_FILES="$CONFIG_FILES libfshfs/libfshfs.rc" ;; "libfshfs.pc") CONFIG_FILES="$CONFIG_FILES libfshfs.pc" ;; "libfshfs.spec") CONFIG_FILES="$CONFIG_FILES libfshfs.spec" ;; + "setup.cfg") CONFIG_FILES="$CONFIG_FILES setup.cfg" ;; "common/config.h") CONFIG_HEADERS="$CONFIG_HEADERS common/config.h" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; @@ -55786,9 +63008,9 @@ # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands + test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files + test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers + test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree @@ -56124,7 +63346,7 @@ esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done @@ -56132,17 +63354,17 @@ # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +printf "%s\n" "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | + ac_sed_conf_input=`printf "%s\n" "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac @@ -56159,7 +63381,7 @@ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | +printf "%s\n" X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -56183,9 +63405,9 @@ case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -56247,8 +63469,8 @@ case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' @@ -56292,9 +63514,9 @@ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" @@ -56310,20 +63532,20 @@ # if test x"$ac_file" != x-; then { - $as_echo "/* $configure_input */" \ + printf "%s\n" "/* $configure_input */" >&1 \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +printf "%s\n" "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else - $as_echo "/* $configure_input */" \ + printf "%s\n" "/* $configure_input */" >&1 \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi @@ -56343,7 +63565,7 @@ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$_am_arg" | +printf "%s\n" X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -56363,8 +63585,8 @@ s/.*/./; q'`/stamp-h$_am_stamp_count ;; - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} + :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +printf "%s\n" "$as_me: executing $ac_file commands" >&6;} ;; esac @@ -56390,7 +63612,7 @@ for am_mf do # Strip MF so we end up with the name of the file. - am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'` + am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile which includes # dependency-tracking related rules and includes. # Grep'ing the whole file directly is not great: AIX grep has a line @@ -56402,7 +63624,7 @@ X"$am_mf" : 'X\(//\)[^/]' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$am_mf" | +printf "%s\n" X"$am_mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -56424,7 +63646,7 @@ $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$am_mf" | +printf "%s\n" X/"$am_mf" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -56449,10 +63671,12 @@ (exit $ac_status); } || am_rc=$? done if test $am_rc -ne 0; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. Try re-running configure with the + for automatic dependency tracking. If GNU make was not used, consider + re-running the configure script with MAKE=\"gmake\" (or whatever is + necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking). See \`config.log' for more details" "$LINENO" 5; } @@ -56516,6 +63740,10 @@ # ### BEGIN LIBTOOL CONFIG +# Which release of libtool.m4 was used? +macro_version=$macro_version +macro_revision=$macro_revision + # Assembler program. AS=$lt_AS @@ -56525,10 +63753,6 @@ # Object dumper program. OBJDUMP=$lt_OBJDUMP -# Which release of libtool.m4 was used? -macro_version=$macro_version -macro_revision=$macro_revision - # Whether or not to build shared libraries. build_libtool_libs=$enable_shared @@ -56608,6 +63832,9 @@ # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd +# A file(cmd) program that detects file types. +FILECMD=$lt_FILECMD + # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method @@ -56626,8 +63853,11 @@ # The archiver. AR=$lt_AR +# Flags to create an archive (by configure). +lt_ar_flags=$lt_ar_flags + # Flags to create an archive. -AR_FLAGS=$lt_AR_FLAGS +AR_FLAGS=\${ARFLAGS-"\$lt_ar_flags"} # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec @@ -57009,6 +64239,7 @@ esac + ltmain=$ac_aux_dir/ltmain.sh @@ -57016,7 +64247,7 @@ # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ + $SED '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || @@ -57187,7 +64418,7 @@ case "$ac_file" in */Makefile.in) # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` - ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" + ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. @@ -57203,7 +64434,8 @@ if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then rm -f "$ac_dir/POTFILES" test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" - cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" + gt_tab=`printf '\t'` + cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" POMAKEFILEDEPS="POTFILES.in" # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend # on $ac_dir but don't depend on user-specified configuration @@ -57213,14 +64445,11 @@ if test -n "$OBSOLETE_ALL_LINGUAS"; then test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi - ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` - # Hide the ALL_LINGUAS assigment from automake < 1.5. - eval 'ALL_LINGUAS''=$ALL_LINGUAS_' + ALL_LINGUAS=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # The set of available languages was given in configure.in. - # Hide the ALL_LINGUAS assigment from automake < 1.5. - eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' + ALL_LINGUAS=$OBSOLETE_ALL_LINGUAS fi # Compute POFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) @@ -57324,12 +64553,12 @@ $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Building: libcerror support: $ac_cv_libcerror libcthreads support: $ac_cv_libcthreads @@ -57345,9 +64574,11 @@ libfdata support: $ac_cv_libfdata libfdatetime support: $ac_cv_libfdatetime libfguid support: $ac_cv_libfguid - DEFLATE compression support: $ac_cv_uncompress + libfmos support: $ac_cv_libfmos libhmac support: $ac_cv_libhmac MD5 support: $ac_cv_libhmac_md5 + DEFLATE compression support: $ac_cv_inflate + FUSE support: $ac_cv_libfuse Features: Multi-threading support: $ac_cv_libcthreads_multi_threading @@ -57357,7 +64588,7 @@ Verbose output: $ac_cv_enable_verbose_output Debug output: $ac_cv_enable_debug_output " >&5 -$as_echo "$as_me: +printf "%s\n" "$as_me: Building: libcerror support: $ac_cv_libcerror libcthreads support: $ac_cv_libcthreads @@ -57373,9 +64604,11 @@ libfdata support: $ac_cv_libfdata libfdatetime support: $ac_cv_libfdatetime libfguid support: $ac_cv_libfguid - DEFLATE compression support: $ac_cv_uncompress + libfmos support: $ac_cv_libfmos libhmac support: $ac_cv_libhmac MD5 support: $ac_cv_libhmac_md5 + DEFLATE compression support: $ac_cv_inflate + FUSE support: $ac_cv_libfuse Features: Multi-threading support: $ac_cv_libcthreads_multi_threading @@ -57386,3 +64619,4 @@ Debug output: $ac_cv_enable_debug_output " >&6;}; + diff -Nru libfshfs-20201104/configure.ac libfshfs-20240221/configure.ac --- libfshfs-20201104/configure.ac 2020-11-04 04:23:10.000000000 +0000 +++ libfshfs-20240221/configure.ac 2024-02-21 05:48:48.000000000 +0000 @@ -1,14 +1,15 @@ -AC_PREREQ( 2.59 ) +AC_PREREQ([2.71]) AC_INIT( [libfshfs], - [20201104], + [20240221], [joachim.metz@gmail.com]) AC_CONFIG_SRCDIR( [include/libfshfs.h.in]) AM_INIT_AUTOMAKE([gnu 1.6 tar-ustar]) +AM_EXTRA_RECURSIVE_TARGETS([sources splint]) AC_CONFIG_MACRO_DIR([m4]) @@ -16,7 +17,7 @@ AC_CANONICAL_HOST dnl Check for libtool DLL support -AC_LIBTOOL_WIN32_DLL +LT_INIT([win32-dll]) dnl Checks for programs AC_PROG_CC @@ -26,7 +27,6 @@ AC_PROG_INSTALL dnl Check for libtool -AC_PROG_LIBTOOL AC_SUBST(LIBTOOL_DEPS) dnl Check for pkg-config @@ -34,7 +34,7 @@ dnl Support of internationalization (i18n) AM_GNU_GETTEXT([external]) -AM_GNU_GETTEXT_VERSION([0.18.1]) +AM_GNU_GETTEXT_VERSION([0.21]) dnl Check for compiler language support AC_C_CONST @@ -109,6 +109,9 @@ dnl Check if libfguid or required headers and functions are available AX_LIBFGUID_CHECK_ENABLE +dnl Check if libfmos or required headers and functions are available +AX_LIBFMOS_CHECK_ENABLE + dnl Check if zlib or required headers and functions are available AX_ZLIB_CHECK_ENABLE AX_ZLIB_CHECK_UNCOMPRESS @@ -120,7 +123,7 @@ AX_PYTHON_CHECK_ENABLE AS_IF( - [test "x${ac_cv_enable_python}" != xno || test "x${ac_cv_enable_python2}" != xno || test "x${ac_cv_enable_python3}" != xno], + [test "x${ac_cv_enable_python}" != xno], [dnl Headers included in pyfshfs/pyfshfs_error.c AC_CHECK_HEADERS([stdarg.h varargs.h]) @@ -135,6 +138,9 @@ dnl Check if libhmac or required headers and functions are available AX_LIBHMAC_CHECK_ENABLE +dnl Check if libfuse or required headers and functions are available +AX_LIBFUSE_CHECK_ENABLE + dnl Check if fshfstools required headers and functions are available AX_FSHFSTOOLS_CHECK_LOCAL @@ -150,14 +156,14 @@ dnl Check if requires and build requires should be set in spec file AS_IF( - [test "x$ac_cv_libcerror" = xyes || test "x$ac_cv_libcthreads" = xyes || test "x$ac_cv_libcdata" = xyes || test "x$ac_cv_libclocale" = xyes || test "x$ac_cv_libcnotify" = xyes || test "x$ac_cv_libcsplit" = xyes || test "x$ac_cv_libuna" = xyes || test "x$ac_cv_libcfile" = xyes || test "x$ac_cv_libcpath" = xyes || test "x$ac_cv_libbfio" = xyes || test "x$ac_cv_libfcache" = xyes || test "x$ac_cv_libfdata" = xyes || test "x$ac_cv_libfdatetime" = xyes || test "x$ac_cv_libfguid" = xyes || test "x$ac_cv_zlib" != xno], + [test "x$ac_cv_libcerror" = xyes || test "x$ac_cv_libcthreads" = xyes || test "x$ac_cv_libcdata" = xyes || test "x$ac_cv_libclocale" = xyes || test "x$ac_cv_libcnotify" = xyes || test "x$ac_cv_libcsplit" = xyes || test "x$ac_cv_libuna" = xyes || test "x$ac_cv_libcfile" = xyes || test "x$ac_cv_libcpath" = xyes || test "x$ac_cv_libbfio" = xyes || test "x$ac_cv_libfcache" = xyes || test "x$ac_cv_libfdata" = xyes || test "x$ac_cv_libfdatetime" = xyes || test "x$ac_cv_libfguid" = xyes || test "x$ac_cv_libfmos" = xyes || test "x$ac_cv_zlib" != xno], [AC_SUBST( [libfshfs_spec_requires], [Requires:]) ]) AS_IF( - [test "x$ac_cv_libhmac" = xyes || test "x$ac_cv_libcrypto" != xno], + [test "x$ac_cv_libhmac" = xyes || test "x$ac_cv_libcrypto" != xno || test "x$ac_cv_libfuse" != xno], [AC_SUBST( [libfshfs_spec_tools_build_requires], [BuildRequires:]) @@ -191,10 +197,9 @@ AC_CONFIG_FILES([libfdata/Makefile]) AC_CONFIG_FILES([libfdatetime/Makefile]) AC_CONFIG_FILES([libfguid/Makefile]) +AC_CONFIG_FILES([libfmos/Makefile]) AC_CONFIG_FILES([libfshfs/Makefile]) AC_CONFIG_FILES([pyfshfs/Makefile]) -AC_CONFIG_FILES([pyfshfs-python2/Makefile]) -AC_CONFIG_FILES([pyfshfs-python3/Makefile]) AC_CONFIG_FILES([libhmac/Makefile]) AC_CONFIG_FILES([fshfstools/Makefile]) AC_CONFIG_FILES([po/Makefile.in]) @@ -215,6 +220,7 @@ AC_CONFIG_FILES([libfshfs/libfshfs.rc]) AC_CONFIG_FILES([libfshfs.pc]) AC_CONFIG_FILES([libfshfs.spec]) +AC_CONFIG_FILES([setup.cfg]) dnl Generate a source configuration file AC_CONFIG_HEADERS([common/config.h]) @@ -237,9 +243,11 @@ libfdata support: $ac_cv_libfdata libfdatetime support: $ac_cv_libfdatetime libfguid support: $ac_cv_libfguid - DEFLATE compression support: $ac_cv_uncompress + libfmos support: $ac_cv_libfmos libhmac support: $ac_cv_libhmac MD5 support: $ac_cv_libhmac_md5 + DEFLATE compression support: $ac_cv_inflate + FUSE support: $ac_cv_libfuse Features: Multi-threading support: $ac_cv_libcthreads_multi_threading diff -Nru libfshfs-20201104/debian/changelog libfshfs-20240221/debian/changelog --- libfshfs-20201104/debian/changelog 2024-02-28 12:07:43.000000000 +0000 +++ libfshfs-20240221/debian/changelog 2024-03-03 13:24:28.000000000 +0000 @@ -1,12 +1,11 @@ -libfshfs (20201104-1.1) unstable; urgency=medium +libfshfs (20240221-1ppa1~noble) noble; urgency=low - * Non-maintainer upload. - * Rename libraries for 64-bit time_t transition. Closes: #1062301 + * Modifications for PPA release. - -- Benjamin Drung Wed, 28 Feb 2024 12:07:43 +0000 + -- Joachim Metz Sun, 03 Mar 2024 14:24:28 +0100 -libfshfs (20201104-1) unstable; urgency=low +libfshfs (20240221-1) unstable; urgency=low - * Initial release (Closes: #976460) + * Auto-generated - -- Hilko Bengen Sat, 05 Dec 2020 13:12:12 +0100 + -- Joachim Metz Wed, 21 Feb 2024 07:04:36 +0100 diff -Nru libfshfs-20201104/debian/changelog.in libfshfs-20240221/debian/changelog.in --- libfshfs-20201104/debian/changelog.in 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/debian/changelog.in 2024-02-21 05:48:48.000000000 +0000 @@ -0,0 +1,5 @@ +libfshfs (@VERSION@-1) unstable; urgency=low + + * Auto-generated + + -- Joachim Metz @DPKG_DATE@ diff -Nru libfshfs-20201104/debian/compat libfshfs-20240221/debian/compat --- libfshfs-20201104/debian/compat 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/debian/compat 2024-02-21 05:48:48.000000000 +0000 @@ -0,0 +1 @@ +10 diff -Nru libfshfs-20201104/debian/control libfshfs-20240221/debian/control --- libfshfs-20201104/debian/control 2024-02-28 12:07:42.000000000 +0000 +++ libfshfs-20240221/debian/control 2024-02-21 05:48:48.000000000 +0000 @@ -1,55 +1,65 @@ Source: libfshfs -Priority: optional -Maintainer: Debian Security Tools -Uploaders: Hilko Bengen -Build-Depends: dpkg-dev (>= 1.22.5), debhelper-compat (= 11), pkg-config, dh-python, python3-dev, libbfio-dev, -Standards-Version: 4.5.0 +Priority: extra +Maintainer: Joachim Metz +Build-Depends: debhelper (>= 9), dh-autoreconf, dh-python, pkg-config, zlib1g-dev, libssl-dev, python3-dev, python3-setuptools, libfuse-dev +Standards-Version: 4.1.4 Section: libs Homepage: https://github.com/libyal/libfshfs -Vcs-Git: https://salsa.debian.org/pkg-security-team/libfshfs.git -Vcs-Browser: https://salsa.debian.org/pkg-security-team/libfshfs +Vcs-Git: https://github.com/libyal/libfshfs.git + +Package: libfshfs +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Conflicts: libfshfs1 +Replaces: libfshfs1 +Suggests: libfshfs-dbg +Description: Library to access the Hierarchical File System (HFS) format + libfshfs is a library to access the Hierarchical File System (HFS) format. + +Package: libfshfs-dbg +Architecture: any +Section: debug +Depends: libfshfs (= ${binary:Version}), ${misc:Depends} +Description: Debugging symbols for libfshfs + Debugging symbols for libfshfs. Package: libfshfs-dev Section: libdevel Architecture: any -Multi-Arch: same -Depends: ${shlibs:Depends}, ${misc:Depends}, - libfshfs1t64 (= ${binary:Version}) -Description: library to access the Mac OS Hierarchical File System -- development files - libfshfs is a library to access the Mac OS Hierarchical File System (HFS). - . - This package includes the development support files. +Depends: libfshfs (= ${binary:Version}), ${misc:Depends} +Description: Header files and libraries for developing applications for libfshfs + Header files and libraries for developing applications for libfshfs. -Package: libfshfs1t64 -Provides: ${t64:Provides} -Replaces: libfshfs1 -Breaks: libfshfs1 (<< ${source:Version}) -Section: libs +Package: libfshfs-tools +Section: utils Architecture: any -Multi-Arch: same -Pre-Depends: ${misc:Pre-Depends} -Depends: ${shlibs:Depends}, ${misc:Depends} -Description: library to access the Mac OS Hierarchical File System - libfshfs is a library to access the Mac OS Hierarchical File System (HFS). - . - This package contains the shared library. - -Package: libfshfs-utils -Section: otherosfs -Architecture: any -Multi-Arch: foreign -Depends: ${shlibs:Depends}, ${misc:Depends}, - libfshfs1t64, -Description: library to access the Mac OS Hierarchical File System -- Utilities - libfshfs is a library to access the Mac OS Hierarchical File System (HFS). - . - This package contains tools to access data ... +Depends: libfshfs (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} +Conflicts: libfshfs-utils +Replaces: libfshfs-utils +Description: Several tools for reading Hierarchical File System (HFS) volumes + Several tools for reading Hierarchical File System (HFS) volumes. + +Package: libfshfs-tools-dbg +Section: debug +Architecture: any +Depends: libfshfs-tools (= ${binary:Version}), ${misc:Depends} +Description: Debugging symbols for libfshfs-tools + Debugging symbols for libfshfs-tools. -Package: python3-libfshfs +Package: libfshfs-python3 Section: python Architecture: any -Depends: libfshfs1t64 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}, ${python3:Depends} -Description: library to access the Mac OS Hierarchical File System -- Python 3 bindings - libfshfs is a library to access the Mac OS Hierarchical File System (HFS). - . - This package contains Python 3 bindings for libfshfs. +Depends: libfshfs (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} +Conflicts: python3-libfshfs +Replaces: python3-libfshfs +Suggests: libfshfs-python3-dbg +Description: Python 3 bindings for libfshfs + Python 3 bindings for libfshfs. + +Package: libfshfs-python3-dbg +Section: debug +Architecture: any +Depends: libfshfs-python3 (= ${binary:Version}), ${misc:Depends} +Description: Debugging symbols for libfshfs-python3 + Debugging symbols for libfshfs-python3. + diff -Nru libfshfs-20201104/debian/copyright libfshfs-20240221/debian/copyright --- libfshfs-20201104/debian/copyright 2020-12-05 12:09:04.000000000 +0000 +++ libfshfs-20240221/debian/copyright 2024-02-21 05:48:50.000000000 +0000 @@ -1,13 +1,9 @@ -Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: libfshfs Source: https://github.com/libyal/libfshfs Files: * -Copyright: 2008-2020, Joachim Metz -License: LGPL-3.0+ - -Files: debian/* -Copyright: 2020 Hilko Bengen +Copyright: 2009-2024, Joachim Metz License: LGPL-3.0+ License: LGPL-3.0+ @@ -26,3 +22,4 @@ . On Debian systems, the complete text of the GNU Lesser General Public License can be found in "/usr/share/common-licenses/LGPL-3". + diff -Nru libfshfs-20201104/debian/gbp.conf libfshfs-20240221/debian/gbp.conf --- libfshfs-20201104/debian/gbp.conf 2020-12-05 12:09:04.000000000 +0000 +++ libfshfs-20240221/debian/gbp.conf 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -[DEFAULT] -debian-branch = debian/master -pristine-tar = True - -[buildpackage] -sign-tags = True - -[import-orig] -filter-pristine-tar = True - -[pq] -patch-numbers = False - -[dch] -multimaint-merge = True diff -Nru libfshfs-20201104/debian/libfshfs-python3.install libfshfs-20240221/debian/libfshfs-python3.install --- libfshfs-20201104/debian/libfshfs-python3.install 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/debian/libfshfs-python3.install 2024-02-21 05:48:48.000000000 +0000 @@ -0,0 +1 @@ +/usr/lib/python3* diff -Nru libfshfs-20201104/debian/libfshfs-tools.install libfshfs-20240221/debian/libfshfs-tools.install --- libfshfs-20201104/debian/libfshfs-tools.install 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/debian/libfshfs-tools.install 2024-02-21 05:48:48.000000000 +0000 @@ -0,0 +1,2 @@ +usr/bin +usr/share/man/man1 diff -Nru libfshfs-20201104/debian/libfshfs-utils.install libfshfs-20240221/debian/libfshfs-utils.install --- libfshfs-20201104/debian/libfshfs-utils.install 2020-12-05 12:09:04.000000000 +0000 +++ libfshfs-20240221/debian/libfshfs-utils.install 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -usr/bin -usr/share/man/man1 diff -Nru libfshfs-20201104/debian/libfshfs.install libfshfs-20240221/debian/libfshfs.install --- libfshfs-20201104/debian/libfshfs.install 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/debian/libfshfs.install 2024-02-21 05:48:48.000000000 +0000 @@ -0,0 +1 @@ +usr/lib/*-*/lib*.so.* diff -Nru libfshfs-20201104/debian/libfshfs1t64.install libfshfs-20240221/debian/libfshfs1t64.install --- libfshfs-20201104/debian/libfshfs1t64.install 2020-12-05 12:09:04.000000000 +0000 +++ libfshfs-20240221/debian/libfshfs1t64.install 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -usr/lib/*-*/lib*.so.* diff -Nru libfshfs-20201104/debian/libfshfs1t64.lintian-overrides libfshfs-20240221/debian/libfshfs1t64.lintian-overrides --- libfshfs-20201104/debian/libfshfs1t64.lintian-overrides 2024-02-28 12:07:38.000000000 +0000 +++ libfshfs-20240221/debian/libfshfs1t64.lintian-overrides 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -libfshfs1t64: package-name-doesnt-match-sonames libfshfs1 diff -Nru libfshfs-20201104/debian/libfshfs1t64.symbols libfshfs-20240221/debian/libfshfs1t64.symbols --- libfshfs-20201104/debian/libfshfs1t64.symbols 2024-02-28 12:07:38.000000000 +0000 +++ libfshfs-20240221/debian/libfshfs1t64.symbols 1970-01-01 00:00:00.000000000 +0000 @@ -1,335 +0,0 @@ -libfshfs.so.1 libfshfs1t64 #MINVER# - (optional|regex)^libcdata_.* 0 - (optional|regex)^libcerror_.* 0 - (optional|regex)^libcfile_.* 0 - (optional|regex)^libclocale_.* 0 - (optional|regex)^libcnotify_.* 0 - (optional|regex)^libcpath_.* 0 - (optional|regex)^libcsplit_.* 0 - (optional|regex)^libcthreads_.* 0 - (optional|regex)^libfcache_.* 0 - (optional|regex)^libfdata_.* 0 - (optional|regex)^libfdatetime_.* 0 - (optional|regex)^libfguid_.* 0 - (optional|regex)^libhmac_.* 0 - (optional|regex)^libuna_.* 0 - (optional|regex)^libuna_.* 0 - (optional|regex)^libfshfs_internal.* 0 - fshfs_volume_signature_hfsplus@Base 20201104 - fshfs_volume_signature_hfsx@Base 20201104 - libfshfs_attribute_record_compare_name_with_utf16_string@Base 20201104 - libfshfs_attribute_record_compare_name_with_utf8_string@Base 20201104 - libfshfs_attribute_record_free@Base 20201104 - libfshfs_attribute_record_get_utf16_name@Base 20201104 - libfshfs_attribute_record_get_utf16_name_size@Base 20201104 - libfshfs_attribute_record_get_utf8_name@Base 20201104 - libfshfs_attribute_record_get_utf8_name_size@Base 20201104 - libfshfs_attribute_record_initialize@Base 20201104 - libfshfs_attribute_record_read_data@Base 20201104 - libfshfs_attribute_record_set_name@Base 20201104 - libfshfs_attributes_btree_file_get_attribute_from_record_data@Base 20201104 - libfshfs_attributes_btree_file_get_attributes@Base 20201104 - libfshfs_attributes_btree_file_get_attributes_from_branch_node@Base 20201104 - libfshfs_attributes_btree_file_get_attributes_from_leaf_node@Base 20201104 - libfshfs_attributes_btree_file_get_key_from_node_by_index@Base 20201104 - libfshfs_attributes_btree_file_get_sub_node_number_from_key@Base 20201104 - libfshfs_attributes_btree_key_compare_name_with_utf16_string@Base 20201104 - libfshfs_attributes_btree_key_compare_name_with_utf8_string@Base 20201104 - libfshfs_attributes_btree_key_free@Base 20201104 - libfshfs_attributes_btree_key_initialize@Base 20201104 - libfshfs_attributes_btree_key_read_data@Base 20201104 - libfshfs_block_data_handle_read_segment_data@Base 20201104 - libfshfs_block_data_handle_seek_segment_offset@Base 20201104 - libfshfs_btree_file_free@Base 20201104 - libfshfs_btree_file_get_node_by_number@Base 20201104 - libfshfs_btree_file_get_root_node@Base 20201104 - libfshfs_btree_file_initialize@Base 20201104 - libfshfs_btree_file_read_file_io_handle@Base 20201104 - libfshfs_btree_header_free@Base 20201104 - libfshfs_btree_header_initialize@Base 20201104 - libfshfs_btree_header_read_data@Base 20201104 - libfshfs_btree_node_descriptor_free@Base 20201104 - libfshfs_btree_node_descriptor_initialize@Base 20201104 - libfshfs_btree_node_descriptor_read_data@Base 20201104 - libfshfs_btree_node_free@Base 20201104 - libfshfs_btree_node_get_node_type@Base 20201104 - libfshfs_btree_node_get_record_by_index@Base 20201104 - libfshfs_btree_node_get_record_data_by_index@Base 20201104 - libfshfs_btree_node_initialize@Base 20201104 - libfshfs_btree_node_is_branch_node@Base 20201104 - libfshfs_btree_node_is_leaf_node@Base 20201104 - libfshfs_btree_node_read_data@Base 20201104 - libfshfs_btree_node_read_file_io_handle@Base 20201104 - libfshfs_btree_node_record_free@Base 20201104 - libfshfs_btree_node_record_initialize@Base 20201104 - libfshfs_btree_node_vector_free@Base 20201104 - libfshfs_btree_node_vector_get_node_by_number@Base 20201104 - libfshfs_btree_node_vector_initialize@Base 20201104 - libfshfs_buffer_data_handle_free@Base 20201104 - libfshfs_buffer_data_handle_initialize@Base 20201104 - libfshfs_buffer_data_handle_read_segment_data@Base 20201104 - libfshfs_buffer_data_handle_seek_segment_offset@Base 20201104 - libfshfs_catalog_btree_file_get_directory_entries@Base 20201104 - libfshfs_catalog_btree_file_get_directory_entries_from_branch_node@Base 20201104 - libfshfs_catalog_btree_file_get_directory_entries_from_leaf_node@Base 20201104 - libfshfs_catalog_btree_file_get_directory_entry_by_identifier@Base 20201104 - libfshfs_catalog_btree_file_get_directory_entry_by_utf16_name@Base 20201104 - libfshfs_catalog_btree_file_get_directory_entry_by_utf16_path@Base 20201104 - libfshfs_catalog_btree_file_get_directory_entry_by_utf8_name@Base 20201104 - libfshfs_catalog_btree_file_get_directory_entry_by_utf8_path@Base 20201104 - libfshfs_catalog_btree_file_get_directory_entry_from_branch_node_by_thread_record@Base 20201104 - libfshfs_catalog_btree_file_get_directory_entry_from_branch_node_by_utf16_name@Base 20201104 - libfshfs_catalog_btree_file_get_directory_entry_from_branch_node_by_utf8_name@Base 20201104 - libfshfs_catalog_btree_file_get_directory_entry_from_key@Base 20201104 - libfshfs_catalog_btree_file_get_directory_entry_from_leaf_node_by_thread_record@Base 20201104 - libfshfs_catalog_btree_file_get_directory_entry_from_leaf_node_by_utf16_name@Base 20201104 - libfshfs_catalog_btree_file_get_directory_entry_from_leaf_node_by_utf8_name@Base 20201104 - libfshfs_catalog_btree_file_get_key_from_node_by_index@Base 20201104 - libfshfs_catalog_btree_file_get_sub_node_number_from_key@Base 20201104 - libfshfs_catalog_btree_file_get_thread_record@Base 20201104 - libfshfs_catalog_btree_file_get_thread_record_from_branch_node@Base 20201104 - libfshfs_catalog_btree_file_get_thread_record_from_key@Base 20201104 - libfshfs_catalog_btree_file_get_thread_record_from_leaf_node@Base 20201104 - libfshfs_catalog_btree_key_compare_name@Base 20201104 - libfshfs_catalog_btree_key_compare_name_with_utf16_string@Base 20201104 - libfshfs_catalog_btree_key_compare_name_with_utf8_string@Base 20201104 - libfshfs_catalog_btree_key_free@Base 20201104 - libfshfs_catalog_btree_key_initialize@Base 20201104 - libfshfs_catalog_btree_key_read_data@Base 20201104 - libfshfs_check_volume_signature@Base 20201104 - libfshfs_check_volume_signature_file_io_handle@Base 20201104 - libfshfs_compressed_data_handle_free@Base 20201104 - libfshfs_compressed_data_handle_get_compressed_block_offsets@Base 20201104 - libfshfs_compressed_data_handle_initialize@Base 20201104 - libfshfs_compressed_data_handle_read_segment_data@Base 20201104 - libfshfs_compressed_data_handle_seek_segment_offset@Base 20201104 - libfshfs_compressed_data_header_free@Base 20201104 - libfshfs_compressed_data_header_initialize@Base 20201104 - libfshfs_compressed_data_header_read_data@Base 20201104 - libfshfs_data_stream_initialize_from_compressed_data_stream@Base 20201104 - libfshfs_data_stream_initialize_from_data@Base 20201104 - libfshfs_data_stream_initialize_from_extents@Base 20201104 - libfshfs_data_stream_initialize_from_fork_descriptor@Base 20201104 - libfshfs_decompress_data@Base 20201104 - libfshfs_deflate_bit_stream_get_huffman_encoded_value@Base 20201104 - libfshfs_deflate_bit_stream_get_value@Base 20201104 - libfshfs_deflate_calculate_adler32@Base 20201104 - libfshfs_deflate_decode_huffman@Base 20201104 - libfshfs_deflate_decompress@Base 20201104 - libfshfs_deflate_decompress_zlib@Base 20201104 - libfshfs_deflate_fixed_huffman_distances_table@Base 20201104 - libfshfs_deflate_fixed_huffman_literals_table@Base 20201104 - libfshfs_deflate_fixed_huffman_tables_initialized@Base 20201104 - libfshfs_deflate_huffman_table_construct@Base 20201104 - libfshfs_deflate_initialize_dynamic_huffman_tables@Base 20201104 - libfshfs_deflate_initialize_fixed_huffman_tables@Base 20201104 - libfshfs_deflate_read_block@Base 20201104 - libfshfs_deflate_read_data_header@Base 20201104 - libfshfs_directory_entry_clone@Base 20201104 - libfshfs_directory_entry_free@Base 20201104 - libfshfs_directory_entry_get_access_time@Base 20201104 - libfshfs_directory_entry_get_added_time@Base 20201104 - libfshfs_directory_entry_get_backup_time@Base 20201104 - libfshfs_directory_entry_get_creation_time@Base 20201104 - libfshfs_directory_entry_get_data_fork_descriptor@Base 20201104 - libfshfs_directory_entry_get_entry_modification_time@Base 20201104 - libfshfs_directory_entry_get_file_mode@Base 20201104 - libfshfs_directory_entry_get_group_identifier@Base 20201104 - libfshfs_directory_entry_get_identifier@Base 20201104 - libfshfs_directory_entry_get_link_identifier@Base 20201104 - libfshfs_directory_entry_get_link_reference@Base 20201104 - libfshfs_directory_entry_get_modification_time@Base 20201104 - libfshfs_directory_entry_get_owner_identifier@Base 20201104 - libfshfs_directory_entry_get_parent_identifier@Base 20201104 - libfshfs_directory_entry_get_resource_fork_descriptor@Base 20201104 - libfshfs_directory_entry_get_utf16_name@Base 20201104 - libfshfs_directory_entry_get_utf16_name_size@Base 20201104 - libfshfs_directory_entry_get_utf8_name@Base 20201104 - libfshfs_directory_entry_get_utf8_name_size@Base 20201104 - libfshfs_directory_entry_initialize@Base 20201104 - libfshfs_directory_entry_set_catalog_record@Base 20201104 - libfshfs_directory_entry_set_name@Base 20201104 - libfshfs_directory_record_clone@Base 20201104 - libfshfs_directory_record_free@Base 20201104 - libfshfs_directory_record_get_access_time@Base 20201104 - libfshfs_directory_record_get_added_time@Base 20201104 - libfshfs_directory_record_get_backup_time@Base 20201104 - libfshfs_directory_record_get_creation_time@Base 20201104 - libfshfs_directory_record_get_entry_modification_time@Base 20201104 - libfshfs_directory_record_get_file_mode@Base 20201104 - libfshfs_directory_record_get_group_identifier@Base 20201104 - libfshfs_directory_record_get_identifier@Base 20201104 - libfshfs_directory_record_get_modification_time@Base 20201104 - libfshfs_directory_record_get_owner_identifier@Base 20201104 - libfshfs_directory_record_initialize@Base 20201104 - libfshfs_directory_record_read_data@Base 20201104 - libfshfs_error_backtrace_fprint@Base 20201104 - libfshfs_error_backtrace_sprint@Base 20201104 - libfshfs_error_fprint@Base 20201104 - libfshfs_error_free@Base 20201104 - libfshfs_error_sprint@Base 20201104 - libfshfs_extended_attribute_free@Base 20201104 - libfshfs_extended_attribute_get_utf16_name@Base 20201104 - libfshfs_extended_attribute_get_utf16_name_size@Base 20201104 - libfshfs_extended_attribute_get_utf8_name@Base 20201104 - libfshfs_extended_attribute_get_utf8_name_size@Base 20201104 - libfshfs_extended_attribute_initialize@Base 20201104 - libfshfs_extent_free@Base 20201104 - libfshfs_extent_initialize@Base 20201104 - libfshfs_extents_btree_file_get_extents@Base 20201104 - libfshfs_extents_btree_file_get_extents_from_branch_node@Base 20201104 - libfshfs_extents_btree_file_get_extents_from_leaf_node@Base 20201104 - libfshfs_extents_btree_file_get_extents_from_record_data@Base 20201104 - libfshfs_extents_btree_file_get_key_from_node_by_index@Base 20201104 - libfshfs_extents_btree_file_get_sub_node_number_from_key@Base 20201104 - libfshfs_extents_btree_key_free@Base 20201104 - libfshfs_extents_btree_key_initialize@Base 20201104 - libfshfs_extents_btree_key_read_data@Base 20201104 - libfshfs_file_entry_free@Base 20201104 - libfshfs_file_entry_get_access_time@Base 20201104 - libfshfs_file_entry_get_added_time@Base 20201104 - libfshfs_file_entry_get_backup_time@Base 20201104 - libfshfs_file_entry_get_creation_time@Base 20201104 - libfshfs_file_entry_get_entry_modification_time@Base 20201104 - libfshfs_file_entry_get_extended_attribute_by_index@Base 20201104 - libfshfs_file_entry_get_extended_attribute_by_utf16_name@Base 20201104 - libfshfs_file_entry_get_extended_attribute_by_utf8_name@Base 20201104 - libfshfs_file_entry_get_file_mode@Base 20201104 - libfshfs_file_entry_get_group_identifier@Base 20201104 - libfshfs_file_entry_get_identifier@Base 20201104 - libfshfs_file_entry_get_link_identifier@Base 20201104 - libfshfs_file_entry_get_modification_time@Base 20201104 - libfshfs_file_entry_get_number_of_extended_attributes@Base 20201104 - libfshfs_file_entry_get_number_of_sub_file_entries@Base 20201104 - libfshfs_file_entry_get_offset@Base 20201104 - libfshfs_file_entry_get_owner_identifier@Base 20201104 - libfshfs_file_entry_get_parent_identifier@Base 20201104 - libfshfs_file_entry_get_size@Base 20201104 - libfshfs_file_entry_get_sub_file_entry_by_index@Base 20201104 - libfshfs_file_entry_get_sub_file_entry_by_utf16_name@Base 20201104 - libfshfs_file_entry_get_sub_file_entry_by_utf8_name@Base 20201104 - libfshfs_file_entry_get_utf16_name@Base 20201104 - libfshfs_file_entry_get_utf16_name_size@Base 20201104 - libfshfs_file_entry_get_utf16_symbolic_link_target@Base 20201104 - libfshfs_file_entry_get_utf16_symbolic_link_target_size@Base 20201104 - libfshfs_file_entry_get_utf8_name@Base 20201104 - libfshfs_file_entry_get_utf8_name_size@Base 20201104 - libfshfs_file_entry_get_utf8_symbolic_link_target@Base 20201104 - libfshfs_file_entry_get_utf8_symbolic_link_target_size@Base 20201104 - libfshfs_file_entry_has_extended_attribute_by_utf16_name@Base 20201104 - libfshfs_file_entry_has_extended_attribute_by_utf8_name@Base 20201104 - libfshfs_file_entry_initialize@Base 20201104 - libfshfs_file_entry_read_buffer@Base 20201104 - libfshfs_file_entry_read_buffer_at_offset@Base 20201104 - libfshfs_file_entry_seek_offset@Base 20201104 - libfshfs_file_record_clone@Base 20201104 - libfshfs_file_record_free@Base 20201104 - libfshfs_file_record_get_access_time@Base 20201104 - libfshfs_file_record_get_added_time@Base 20201104 - libfshfs_file_record_get_backup_time@Base 20201104 - libfshfs_file_record_get_creation_time@Base 20201104 - libfshfs_file_record_get_data_fork_descriptor@Base 20201104 - libfshfs_file_record_get_entry_modification_time@Base 20201104 - libfshfs_file_record_get_file_mode@Base 20201104 - libfshfs_file_record_get_group_identifier@Base 20201104 - libfshfs_file_record_get_identifier@Base 20201104 - libfshfs_file_record_get_link_reference@Base 20201104 - libfshfs_file_record_get_modification_time@Base 20201104 - libfshfs_file_record_get_owner_identifier@Base 20201104 - libfshfs_file_record_get_resource_fork_descriptor@Base 20201104 - libfshfs_file_record_initialize@Base 20201104 - libfshfs_file_record_read_data@Base 20201104 - libfshfs_file_system_free@Base 20201104 - libfshfs_file_system_get_attributes@Base 20201104 - libfshfs_file_system_get_directory_entries@Base 20201104 - libfshfs_file_system_get_directory_entry_by_identifier@Base 20201104 - libfshfs_file_system_get_directory_entry_by_utf16_name@Base 20201104 - libfshfs_file_system_get_directory_entry_by_utf16_path@Base 20201104 - libfshfs_file_system_get_directory_entry_by_utf8_name@Base 20201104 - libfshfs_file_system_get_directory_entry_by_utf8_path@Base 20201104 - libfshfs_file_system_get_extents@Base 20201104 - libfshfs_file_system_initialize@Base 20201104 - libfshfs_file_system_read_attributes_file@Base 20201104 - libfshfs_file_system_read_catalog_file@Base 20201104 - libfshfs_file_system_read_extents_file@Base 20201104 - libfshfs_file_system_resolve_indirect_node_directory_entry@Base 20201104 - libfshfs_fork_descriptor_clone@Base 20201104 - libfshfs_fork_descriptor_free@Base 20201104 - libfshfs_fork_descriptor_get_extents@Base 20201104 - libfshfs_fork_descriptor_has_extents_overflow@Base 20201104 - libfshfs_fork_descriptor_initialize@Base 20201104 - libfshfs_fork_descriptor_read_data@Base 20201104 - libfshfs_get_access_flags_read@Base 20201104 - libfshfs_get_codepage@Base 20201104 - libfshfs_get_version@Base 20201104 - libfshfs_io_handle_clear@Base 20201104 - libfshfs_io_handle_free@Base 20201104 - libfshfs_io_handle_initialize@Base 20201104 - libfshfs_lzvn_decompress@Base 20201104 - libfshfs_name_case_folding_mappings_0x00000040@Base 20201104 - libfshfs_name_case_folding_mappings_0x00000340@Base 20201104 - libfshfs_name_case_folding_mappings_0x000010a0@Base 20201104 - libfshfs_name_case_folding_mappings_0x000013f8@Base 20201104 - libfshfs_name_case_folding_mappings_0x00001c80@Base 20201104 - libfshfs_name_case_folding_mappings_0x00001e00@Base 20201104 - libfshfs_name_case_folding_mappings_0x00002120@Base 20201104 - libfshfs_name_case_folding_mappings_0x000024b0@Base 20201104 - libfshfs_name_case_folding_mappings_0x00002c00@Base 20201104 - libfshfs_name_case_folding_mappings_0x0000a640@Base 20201104 - libfshfs_name_case_folding_mappings_0x0000a720@Base 20201104 - libfshfs_name_case_folding_mappings_0x0000ab70@Base 20201104 - libfshfs_name_case_folding_mappings_0x0000ff20@Base 20201104 - libfshfs_name_case_folding_mappings_0x00010400@Base 20201104 - libfshfs_name_case_folding_mappings_0x000104b0@Base 20201104 - libfshfs_name_case_folding_mappings_0x00010c80@Base 20201104 - libfshfs_name_case_folding_mappings_0x000118a0@Base 20201104 - libfshfs_name_case_folding_mappings_0x0001e900@Base 20201104 - libfshfs_name_compare_with_utf16_string@Base 20201104 - libfshfs_name_compare_with_utf8_string@Base 20201104 - libfshfs_name_decomposition_mappings_0x000000c0@Base 20201104 - libfshfs_name_decomposition_mappings_0x000001a0@Base 20201104 - libfshfs_name_decomposition_mappings_0x00000340@Base 20201104 - libfshfs_name_decomposition_mappings_0x00000400@Base 20201104 - libfshfs_name_decomposition_mappings_0x00000620@Base 20201104 - libfshfs_name_decomposition_mappings_0x00000928@Base 20201104 - libfshfs_name_decomposition_mappings_0x00000a30@Base 20201104 - libfshfs_name_decomposition_mappings_0x00000b48@Base 20201104 - libfshfs_name_decomposition_mappings_0x00000c48@Base 20201104 - libfshfs_name_decomposition_mappings_0x00000d48@Base 20201104 - libfshfs_name_decomposition_mappings_0x00000f40@Base 20201104 - libfshfs_name_decomposition_mappings_0x00001e00@Base 20201104 - libfshfs_name_decomposition_mappings_0x00003048@Base 20201104 - libfshfs_name_decomposition_mappings_0x0000ac00@Base 20201104 - libfshfs_name_decomposition_mappings_0x0000d7a0@Base 20201104 - libfshfs_name_decomposition_mappings_0x0000fb18@Base 20201104 - libfshfs_name_get_utf16_string@Base 20201104 - libfshfs_name_get_utf16_string_size@Base 20201104 - libfshfs_name_get_utf8_string@Base 20201104 - libfshfs_name_get_utf8_string_size@Base 20201104 - libfshfs_notify_set_stream@Base 20201104 - libfshfs_notify_set_verbose@Base 20201104 - libfshfs_notify_stream_close@Base 20201104 - libfshfs_notify_stream_open@Base 20201104 - libfshfs_set_codepage@Base 20201104 - libfshfs_thread_record_free@Base 20201104 - libfshfs_thread_record_initialize@Base 20201104 - libfshfs_thread_record_read_data@Base 20201104 - libfshfs_volume_close@Base 20201104 - libfshfs_volume_free@Base 20201104 - libfshfs_volume_get_file_entry_by_identifier@Base 20201104 - libfshfs_volume_get_file_entry_by_utf16_path@Base 20201104 - libfshfs_volume_get_file_entry_by_utf8_path@Base 20201104 - libfshfs_volume_get_root_directory@Base 20201104 - libfshfs_volume_get_utf16_name@Base 20201104 - libfshfs_volume_get_utf16_name_size@Base 20201104 - libfshfs_volume_get_utf8_name@Base 20201104 - libfshfs_volume_get_utf8_name_size@Base 20201104 - libfshfs_volume_header_free@Base 20201104 - libfshfs_volume_header_initialize@Base 20201104 - libfshfs_volume_header_read_data@Base 20201104 - libfshfs_volume_header_read_file_io_handle@Base 20201104 - libfshfs_volume_initialize@Base 20201104 - libfshfs_volume_open@Base 20201104 - libfshfs_volume_open_file_io_handle@Base 20201104 - libfshfs_volume_signal_abort@Base 20201104 - lzvn_oppcode_types@Base 20201104 \ No newline at end of file diff -Nru libfshfs-20201104/debian/python3-libfshfs.install libfshfs-20240221/debian/python3-libfshfs.install --- libfshfs-20201104/debian/python3-libfshfs.install 2020-12-05 12:09:04.000000000 +0000 +++ libfshfs-20240221/debian/python3-libfshfs.install 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -/usr/lib/python3* diff -Nru libfshfs-20201104/debian/rules libfshfs-20240221/debian/rules --- libfshfs-20201104/debian/rules 2020-12-05 12:12:12.000000000 +0000 +++ libfshfs-20240221/debian/rules 2024-02-21 05:48:48.000000000 +0000 @@ -1,23 +1,31 @@ #!/usr/bin/make -f # -*- makefile -*- -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -export DEB_BUILD_MAINT_OPTIONS = hardening=+all -export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed +# Uncomment for debhelper verbose output. +# export DH_VERBOSE=1 export SKIP_PYTHON_TESTS=1 %: - dh $@ --with autoreconf,python3 --buildsystem=autoconf + dh $@ --buildsystem=autoconf --with=autoreconf,python3 +.PHONY: override_dh_auto_configure override_dh_auto_configure: - dh_auto_configure -- --disable-python2 --enable-python3 + dh_auto_configure -- --enable-python CFLAGS="-g" + +.PHONY: override_dh_install +override_dh_install: + dh_install --fail-missing -X.la -X/pyfshfs.a +.PHONY: override_dh_missing override_dh_missing: dh_missing -X.la -X/pyfshfs.a --fail-missing -override_dh_install: - dh_install -X.la -X/pyfshfs.a +.PHONY: override_dh_strip +override_dh_strip: +ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS))) + dh_strip -plibfshfs --dbg-package=libfshfs-dbg + dh_strip -plibfshfs-tools --dbg-package=libfshfs-tools-dbg + dh_strip -plibfshfs-python3 --dbg-package=libfshfs-python3-dbg +endif diff -Nru libfshfs-20201104/debian/salsa-ci.yml libfshfs-20240221/debian/salsa-ci.yml --- libfshfs-20201104/debian/salsa-ci.yml 2020-12-05 12:09:04.000000000 +0000 +++ libfshfs-20240221/debian/salsa-ci.yml 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ ---- -include: - - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml - - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml diff -Nru libfshfs-20201104/debian/watch libfshfs-20240221/debian/watch --- libfshfs-20201104/debian/watch 2020-12-05 12:09:04.000000000 +0000 +++ libfshfs-20240221/debian/watch 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -version=3 -https://github.com/libyal/libfshfs/releases /.*/libfshfs-alpha-(.*)\.tar\.gz diff -Nru libfshfs-20201104/depcomp libfshfs-20240221/depcomp --- libfshfs-20201104/depcomp 2020-11-04 11:56:32.000000000 +0000 +++ libfshfs-20240221/depcomp 2024-02-21 06:04:26.000000000 +0000 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2021 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff -Nru libfshfs-20201104/dpkg/changelog libfshfs-20240221/dpkg/changelog --- libfshfs-20201104/dpkg/changelog 2020-11-04 11:56:45.000000000 +0000 +++ libfshfs-20240221/dpkg/changelog 2024-02-21 06:04:37.000000000 +0000 @@ -1,5 +1,5 @@ -libfshfs (20201104-1) unstable; urgency=low +libfshfs (20240221-1) unstable; urgency=low * Auto-generated - -- Joachim Metz Wed, 04 Nov 2020 12:56:43 +0100 + -- Joachim Metz Wed, 21 Feb 2024 07:04:36 +0100 diff -Nru libfshfs-20201104/dpkg/compat libfshfs-20240221/dpkg/compat --- libfshfs-20201104/dpkg/compat 2020-11-04 04:19:36.000000000 +0000 +++ libfshfs-20240221/dpkg/compat 2024-02-21 05:48:48.000000000 +0000 @@ -1 +1 @@ -9 +10 diff -Nru libfshfs-20201104/dpkg/control libfshfs-20240221/dpkg/control --- libfshfs-20201104/dpkg/control 2020-11-04 04:19:36.000000000 +0000 +++ libfshfs-20240221/dpkg/control 2024-02-21 05:48:48.000000000 +0000 @@ -1,7 +1,7 @@ Source: libfshfs Priority: extra Maintainer: Joachim Metz -Build-Depends: debhelper (>= 9), dh-autoreconf, pkg-config, zlib1g-dev, libssl-dev, python-dev, python-setuptools, python3-dev, python3-setuptools +Build-Depends: debhelper (>= 9), dh-autoreconf, dh-python, pkg-config, zlib1g-dev, libssl-dev, python3-dev, python3-setuptools, libfuse-dev Standards-Version: 4.1.4 Section: libs Homepage: https://github.com/libyal/libfshfs @@ -46,23 +46,6 @@ Description: Debugging symbols for libfshfs-tools Debugging symbols for libfshfs-tools. -Package: libfshfs-python -Section: python -Architecture: any -Depends: libfshfs (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} -Conflicts: python-libfshfs -Replaces: python-libfshfs -Suggests: libfshfs-python-dbg -Description: Python 2 bindings for libfshfs - Python 2 bindings for libfshfs. - -Package: libfshfs-python-dbg -Section: debug -Architecture: any -Depends: libfshfs-python (= ${binary:Version}), ${misc:Depends} -Description: Debugging symbols for libfshfs-python - Debugging symbols for libfshfs-python. - Package: libfshfs-python3 Section: python Architecture: any diff -Nru libfshfs-20201104/dpkg/copyright libfshfs-20240221/dpkg/copyright --- libfshfs-20201104/dpkg/copyright 2020-11-04 04:19:45.000000000 +0000 +++ libfshfs-20240221/dpkg/copyright 2024-02-21 05:48:50.000000000 +0000 @@ -3,7 +3,7 @@ Source: https://github.com/libyal/libfshfs Files: * -Copyright: 2009-2020, Joachim Metz +Copyright: 2009-2024, Joachim Metz License: LGPL-3.0+ License: LGPL-3.0+ diff -Nru libfshfs-20201104/dpkg/libfshfs-python.install libfshfs-20240221/dpkg/libfshfs-python.install --- libfshfs-20201104/dpkg/libfshfs-python.install 2020-11-04 04:19:36.000000000 +0000 +++ libfshfs-20240221/dpkg/libfshfs-python.install 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -/usr/lib/python2* diff -Nru libfshfs-20201104/dpkg/rules libfshfs-20240221/dpkg/rules --- libfshfs-20201104/dpkg/rules 2020-11-04 04:19:36.000000000 +0000 +++ libfshfs-20240221/dpkg/rules 2024-02-21 05:48:48.000000000 +0000 @@ -7,22 +7,25 @@ export SKIP_PYTHON_TESTS=1 %: - dh $@ --with=autoreconf + dh $@ --buildsystem=autoconf --with=autoreconf,python3 .PHONY: override_dh_auto_configure override_dh_auto_configure: - dh_auto_configure -- --enable-python2 --enable-python3 CFLAGS="-g" + dh_auto_configure -- --enable-python CFLAGS="-g" .PHONY: override_dh_install override_dh_install: dh_install --fail-missing -X.la -X/pyfshfs.a +.PHONY: override_dh_missing +override_dh_missing: + dh_missing -X.la -X/pyfshfs.a --fail-missing + .PHONY: override_dh_strip override_dh_strip: ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS))) dh_strip -plibfshfs --dbg-package=libfshfs-dbg dh_strip -plibfshfs-tools --dbg-package=libfshfs-tools-dbg - dh_strip -plibfshfs-python --dbg-package=libfshfs-python-dbg dh_strip -plibfshfs-python3 --dbg-package=libfshfs-python3-dbg endif diff -Nru libfshfs-20201104/fshfstools/Makefile.am libfshfs-20240221/fshfstools/Makefile.am --- libfshfs-20201104/fshfstools/Makefile.am 2020-11-01 07:42:13.000000000 +0000 +++ libfshfs-20240221/fshfstools/Makefile.am 2023-12-03 09:06:51.000000000 +0000 @@ -14,15 +14,18 @@ @LIBFDATA_CPPFLAGS@ \ @LIBFDATETIME_CPPFLAGS@ \ @LIBFGUID_CPPFLAGS@ \ + @LIBFMOS_CPPFLAGS@ \ @LIBHMAC_CPPFLAGS@ \ @LIBCRYPTO_CPPFLAGS@ \ + @LIBFUSE_CPPFLAGS@ \ @PTHREAD_CPPFLAGS@ \ @LIBFSHFS_DLL_IMPORT@ AM_LDFLAGS = @STATIC_LDFLAGS@ bin_PROGRAMS = \ - fshfsinfo + fshfsinfo \ + fshfsmount fshfsinfo_SOURCES = \ digest_hash.c digest_hash.h \ @@ -64,13 +67,47 @@ @LIBINTL@ \ @PTHREAD_LIBADD@ +fshfsmount_SOURCES = \ + fshfsmount.c \ + fshfstools_getopt.c fshfstools_getopt.h \ + fshfstools_i18n.h \ + fshfstools_libbfio.h \ + fshfstools_libcerror.h \ + fshfstools_libclocale.h \ + fshfstools_libcnotify.h \ + fshfstools_libcpath.h \ + fshfstools_libfshfs.h \ + fshfstools_libuna.h \ + fshfstools_output.c fshfstools_output.h \ + fshfstools_signal.c fshfstools_signal.h \ + fshfstools_unused.h \ + mount_dokan.c mount_dokan.h \ + mount_file_entry.c mount_file_entry.h \ + mount_file_system.c mount_file_system.h \ + mount_fuse.c mount_fuse.h \ + mount_handle.c mount_handle.h + +fshfsmount_LDADD = \ + @LIBFUSE_LIBADD@ \ + @LIBBFIO_LIBADD@ \ + @LIBCPATH_LIBADD@ \ + @LIBCFILE_LIBADD@ \ + @LIBUNA_LIBADD@ \ + @LIBCSPLIT_LIBADD@ \ + @LIBCNOTIFY_LIBADD@ \ + @LIBCLOCALE_LIBADD@ \ + @LIBCDATA_LIBADD@ \ + ../libfshfs/libfshfs.la \ + @LIBCERROR_LIBADD@ \ + @LIBINTL@ + MAINTAINERCLEANFILES = \ Makefile.in distclean: clean - /bin/rm -f Makefile + -rm -f Makefile -splint: +splint-local: @echo "Running splint on fshfsinfo ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(fshfsinfo_SOURCES) diff -Nru libfshfs-20201104/fshfstools/Makefile.in libfshfs-20240221/fshfstools/Makefile.in --- libfshfs-20201104/fshfstools/Makefile.in 2020-11-04 11:56:31.000000000 +0000 +++ libfshfs-20240221/fshfstools/Makefile.in 2024-02-21 06:04:25.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -88,29 +88,30 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -bin_PROGRAMS = fshfsinfo$(EXEEXT) +bin_PROGRAMS = fshfsinfo$(EXEEXT) fshfsmount$(EXEEXT) subdir = fshfstools ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcdata.m4 \ - $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \ - $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \ - $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcrypto.m4 \ - $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcthreads.m4 \ - $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ - $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ - $(top_srcdir)/m4/libhmac.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/libuna.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \ - $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \ - $(top_srcdir)/m4/zlib.m4 $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libbfio.m4 \ + $(top_srcdir)/m4/libcdata.m4 $(top_srcdir)/m4/libcerror.m4 \ + $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ + $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ + $(top_srcdir)/m4/libcrypto.m4 $(top_srcdir)/m4/libcsplit.m4 \ + $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \ + $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ + $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmos.m4 \ + $(top_srcdir)/m4/libfuse.m4 $(top_srcdir)/m4/libhmac.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/pthread.m4 \ + $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ + $(top_srcdir)/m4/types.m4 $(top_srcdir)/m4/zlib.m4 \ + $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) @@ -129,6 +130,13 @@ am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = +am_fshfsmount_OBJECTS = fshfsmount.$(OBJEXT) \ + fshfstools_getopt.$(OBJEXT) fshfstools_output.$(OBJEXT) \ + fshfstools_signal.$(OBJEXT) mount_dokan.$(OBJEXT) \ + mount_file_entry.$(OBJEXT) mount_file_system.$(OBJEXT) \ + mount_fuse.$(OBJEXT) mount_handle.$(OBJEXT) +fshfsmount_OBJECTS = $(am_fshfsmount_OBJECTS) +fshfsmount_DEPENDENCIES = ../libfshfs/libfshfs.la AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false @@ -145,9 +153,13 @@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/digest_hash.Po \ - ./$(DEPDIR)/fshfsinfo.Po ./$(DEPDIR)/fshfstools_getopt.Po \ + ./$(DEPDIR)/fshfsinfo.Po ./$(DEPDIR)/fshfsmount.Po \ + ./$(DEPDIR)/fshfstools_getopt.Po \ ./$(DEPDIR)/fshfstools_output.Po \ - ./$(DEPDIR)/fshfstools_signal.Po ./$(DEPDIR)/info_handle.Po + ./$(DEPDIR)/fshfstools_signal.Po ./$(DEPDIR)/info_handle.Po \ + ./$(DEPDIR)/mount_dokan.Po ./$(DEPDIR)/mount_file_entry.Po \ + ./$(DEPDIR)/mount_file_system.Po ./$(DEPDIR)/mount_fuse.Po \ + ./$(DEPDIR)/mount_handle.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -167,13 +179,14 @@ am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = -SOURCES = $(fshfsinfo_SOURCES) -DIST_SOURCES = $(fshfsinfo_SOURCES) +SOURCES = $(fshfsinfo_SOURCES) $(fshfsmount_SOURCES) +DIST_SOURCES = $(fshfsinfo_SOURCES) $(fshfsmount_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -191,8 +204,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ @@ -209,6 +220,8 @@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ @@ -224,8 +237,10 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -245,6 +260,8 @@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ +HAVE_LIBFMOS = @HAVE_LIBFMOS@ +HAVE_LIBFUSE = @HAVE_LIBFUSE@ HAVE_LIBHMAC = @HAVE_LIBHMAC@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ @@ -260,6 +277,7 @@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ +HAVE_LOCAL_LIBFMOS = @HAVE_LOCAL_LIBFMOS@ HAVE_LOCAL_LIBHMAC = @HAVE_LOCAL_LIBHMAC@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ @@ -313,8 +331,12 @@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ +LIBFMOS_CPPFLAGS = @LIBFMOS_CPPFLAGS@ +LIBFMOS_LIBADD = @LIBFMOS_LIBADD@ LIBFSHFS_DLL_EXPORT = @LIBFSHFS_DLL_EXPORT@ LIBFSHFS_DLL_IMPORT = @LIBFSHFS_DLL_IMPORT@ +LIBFUSE_CPPFLAGS = @LIBFUSE_CPPFLAGS@ +LIBFUSE_LIBADD = @LIBFUSE_LIBADD@ LIBHMAC_CPPFLAGS = @LIBHMAC_CPPFLAGS@ LIBHMAC_LIBADD = @LIBHMAC_LIBADD@ LIBICONV = @LIBICONV@ @@ -336,8 +358,8 @@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ @@ -360,26 +382,6 @@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ -PYTHON2 = @PYTHON2@ -PYTHON2_CONFIG = @PYTHON2_CONFIG@ -PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ -PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ -PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ -PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ -PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ -PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ -PYTHON2_PREFIX = @PYTHON2_PREFIX@ -PYTHON2_VERSION = @PYTHON2_VERSION@ -PYTHON3 = @PYTHON3@ -PYTHON3_CONFIG = @PYTHON3_CONFIG@ -PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ -PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ -PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ -PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ -PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ -PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ -PYTHON3_PREFIX = @PYTHON3_PREFIX@ -PYTHON3_VERSION = @PYTHON3_VERSION@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ @@ -457,6 +459,12 @@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ +ax_libfmos_pc_libs_private = @ax_libfmos_pc_libs_private@ +ax_libfmos_spec_build_requires = @ax_libfmos_spec_build_requires@ +ax_libfmos_spec_requires = @ax_libfmos_spec_requires@ +ax_libfuse_pc_libs_private = @ax_libfuse_pc_libs_private@ +ax_libfuse_spec_build_requires = @ax_libfuse_spec_build_requires@ +ax_libfuse_spec_requires = @ax_libfuse_spec_requires@ ax_libhmac_pc_libs_private = @ax_libhmac_pc_libs_private@ ax_libhmac_spec_build_requires = @ax_libhmac_spec_build_requires@ ax_libhmac_spec_requires = @ax_libhmac_spec_requires@ @@ -481,6 +489,8 @@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +fuse_CFLAGS = @fuse_CFLAGS@ +fuse_LIBS = @fuse_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -518,6 +528,8 @@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ +libfmos_CFLAGS = @libfmos_CFLAGS@ +libfmos_LIBS = @libfmos_LIBS@ libfshfs_spec_requires = @libfshfs_spec_requires@ libfshfs_spec_tools_build_requires = @libfshfs_spec_tools_build_requires@ libhmac_CFLAGS = @libhmac_CFLAGS@ @@ -536,11 +548,8 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ -pyexecdir2 = @pyexecdir2@ -pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ -pythondir2 = @pythondir2@ -pythondir3 = @pythondir3@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -567,8 +576,10 @@ @LIBFDATA_CPPFLAGS@ \ @LIBFDATETIME_CPPFLAGS@ \ @LIBFGUID_CPPFLAGS@ \ + @LIBFMOS_CPPFLAGS@ \ @LIBHMAC_CPPFLAGS@ \ @LIBCRYPTO_CPPFLAGS@ \ + @LIBFUSE_CPPFLAGS@ \ @PTHREAD_CPPFLAGS@ \ @LIBFSHFS_DLL_IMPORT@ @@ -613,6 +624,40 @@ @LIBINTL@ \ @PTHREAD_LIBADD@ +fshfsmount_SOURCES = \ + fshfsmount.c \ + fshfstools_getopt.c fshfstools_getopt.h \ + fshfstools_i18n.h \ + fshfstools_libbfio.h \ + fshfstools_libcerror.h \ + fshfstools_libclocale.h \ + fshfstools_libcnotify.h \ + fshfstools_libcpath.h \ + fshfstools_libfshfs.h \ + fshfstools_libuna.h \ + fshfstools_output.c fshfstools_output.h \ + fshfstools_signal.c fshfstools_signal.h \ + fshfstools_unused.h \ + mount_dokan.c mount_dokan.h \ + mount_file_entry.c mount_file_entry.h \ + mount_file_system.c mount_file_system.h \ + mount_fuse.c mount_fuse.h \ + mount_handle.c mount_handle.h + +fshfsmount_LDADD = \ + @LIBFUSE_LIBADD@ \ + @LIBBFIO_LIBADD@ \ + @LIBCPATH_LIBADD@ \ + @LIBCFILE_LIBADD@ \ + @LIBUNA_LIBADD@ \ + @LIBCSPLIT_LIBADD@ \ + @LIBCNOTIFY_LIBADD@ \ + @LIBCLOCALE_LIBADD@ \ + @LIBCDATA_LIBADD@ \ + ../libfshfs/libfshfs.la \ + @LIBCERROR_LIBADD@ \ + @LIBINTL@ + MAINTAINERCLEANFILES = \ Makefile.in @@ -703,6 +748,10 @@ @rm -f fshfsinfo$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fshfsinfo_OBJECTS) $(fshfsinfo_LDADD) $(LIBS) +fshfsmount$(EXEEXT): $(fshfsmount_OBJECTS) $(fshfsmount_DEPENDENCIES) $(EXTRA_fshfsmount_DEPENDENCIES) + @rm -f fshfsmount$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fshfsmount_OBJECTS) $(fshfsmount_LDADD) $(LIBS) + mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -711,10 +760,16 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/digest_hash.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fshfsinfo.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fshfsmount.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fshfstools_getopt.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fshfstools_output.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fshfstools_signal.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/info_handle.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mount_dokan.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mount_file_entry.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mount_file_system.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mount_fuse.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mount_handle.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @@ -748,6 +803,8 @@ clean-libtool: -rm -rf .libs _libs +sources-local: +splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique @@ -800,7 +857,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am @@ -922,10 +978,16 @@ maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/digest_hash.Po -rm -f ./$(DEPDIR)/fshfsinfo.Po + -rm -f ./$(DEPDIR)/fshfsmount.Po -rm -f ./$(DEPDIR)/fshfstools_getopt.Po -rm -f ./$(DEPDIR)/fshfstools_output.Po -rm -f ./$(DEPDIR)/fshfstools_signal.Po -rm -f ./$(DEPDIR)/info_handle.Po + -rm -f ./$(DEPDIR)/mount_dokan.Po + -rm -f ./$(DEPDIR)/mount_file_entry.Po + -rm -f ./$(DEPDIR)/mount_file_system.Po + -rm -f ./$(DEPDIR)/mount_fuse.Po + -rm -f ./$(DEPDIR)/mount_handle.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -942,6 +1004,14 @@ ps-am: +sources: sources-am + +sources-am: sources-local + +splint: splint-am + +splint-am: splint-local + uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip @@ -958,15 +1028,16 @@ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am uninstall-binPROGRAMS + sources-am sources-local splint-am splint-local tags tags-am \ + uninstall uninstall-am uninstall-binPROGRAMS .PRECIOUS: Makefile distclean: clean - /bin/rm -f Makefile + -rm -f Makefile -splint: +splint-local: @echo "Running splint on fshfsinfo ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(fshfsinfo_SOURCES) diff -Nru libfshfs-20201104/fshfstools/digest_hash.c libfshfs-20240221/fshfstools/digest_hash.c --- libfshfs-20201104/fshfstools/digest_hash.c 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/fshfstools/digest_hash.c 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Crypographic digest hash * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/fshfstools/digest_hash.h libfshfs-20240221/fshfstools/digest_hash.h --- libfshfs-20201104/fshfstools/digest_hash.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/fshfstools/digest_hash.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Crypographic digest hash * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/fshfstools/fshfsinfo.c libfshfs-20240221/fshfstools/fshfsinfo.c --- libfshfs-20201104/fshfstools/fshfsinfo.c 2020-11-04 04:22:35.000000000 +0000 +++ libfshfs-20240221/fshfstools/fshfsinfo.c 2024-02-21 05:50:44.000000000 +0000 @@ -1,7 +1,7 @@ /* * Shows information obtained from a Hierarchical File System (HFS) volume * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/fshfstools/fshfsmount.c libfshfs-20240221/fshfstools/fshfsmount.c --- libfshfs-20201104/fshfstools/fshfsmount.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/fshfstools/fshfsmount.c 2024-02-21 05:50:44.000000000 +0000 @@ -0,0 +1,604 @@ +/* + * Mounts a Hierarchical File System (HFS) volume + * + * Copyright (C) 2009-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include +#include +#include +#include + +#include + +#if defined( HAVE_IO_H ) || defined( WINAPI ) +#include +#endif + +#if defined( HAVE_STDLIB_H ) || defined( WINAPI ) +#include +#endif + +#if defined( HAVE_UNISTD_H ) +#include +#endif + +#include "fshfstools_getopt.h" +#include "fshfstools_i18n.h" +#include "fshfstools_libcerror.h" +#include "fshfstools_libclocale.h" +#include "fshfstools_libcnotify.h" +#include "fshfstools_libfshfs.h" +#include "fshfstools_output.h" +#include "fshfstools_signal.h" +#include "fshfstools_unused.h" +#include "mount_dokan.h" +#include "mount_fuse.h" +#include "mount_handle.h" + +mount_handle_t *fshfsmount_mount_handle = NULL; +int fshfsmount_abort = 0; + +/* Prints usage information + */ +void usage_fprint( + FILE *stream ) +{ + if( stream == NULL ) + { + return; + } + fprintf( stream, "Use fshfsmount to mount a Hierarchical File System (HFS) volume\n\n" ); + + fprintf( stream, "Usage: fshfsmount [ -o offset ] [ -X extended_options ]\n" + " [ -hvV ] volume mount_point\n\n" ); + + fprintf( stream, "\tvolume: a Hierarchical File System (HFS) volume\n\n" ); + fprintf( stream, "\tmount_point: the directory to serve as mount point\n\n" ); + + fprintf( stream, "\t-h: shows this help\n" ); + fprintf( stream, "\t-o: specify the volume offset in bytes\n" ); + fprintf( stream, "\t-v: verbose output to stderr, while fshfsmount will remain running in the\n" + "\t foreground\n" ); + fprintf( stream, "\t-V: print version\n" ); + fprintf( stream, "\t-X: extended options to pass to sub system\n" ); +} + +/* Signal handler for fshfsmount + */ +void fshfsmount_signal_handler( + fshfstools_signal_t signal FSHFSTOOLS_ATTRIBUTE_UNUSED ) +{ + libcerror_error_t *error = NULL; + static char *function = "fshfsmount_signal_handler"; + + FSHFSTOOLS_UNREFERENCED_PARAMETER( signal ) + + fshfsmount_abort = 1; + + if( fshfsmount_mount_handle != NULL ) + { + if( mount_handle_signal_abort( + fshfsmount_mount_handle, + &error ) != 1 ) + { + libcnotify_printf( + "%s: unable to signal mount handle to abort.\n", + function ); + + libcnotify_print_error_backtrace( + error ); + libcerror_error_free( + &error ); + } + } + /* Force stdin to close otherwise any function reading it will remain blocked + */ +#if defined( WINAPI ) && !defined( __CYGWIN__ ) + if( _close( + 0 ) != 0 ) +#else + if( close( + 0 ) != 0 ) +#endif + { + libcnotify_printf( + "%s: unable to close stdin.\n", + function ); + } +} + +/* The main program + */ +#if defined( HAVE_WIDE_SYSTEM_CHARACTER ) +int wmain( int argc, wchar_t * const argv[] ) +#else +int main( int argc, char * const argv[] ) +#endif +{ + libfshfs_error_t *error = NULL; + system_character_t *mount_point = NULL; + system_character_t *option_extended_options = NULL; + system_character_t *option_offset = NULL; + system_character_t *source = NULL; + char *program = "fshfsmount"; + system_integer_t option = 0; + int result = 0; + int verbose = 0; + +#if defined( HAVE_LIBFUSE ) || defined( HAVE_LIBOSXFUSE ) + struct fuse_operations fshfsmount_fuse_operations; + + struct fuse_args fshfsmount_fuse_arguments = FUSE_ARGS_INIT(0, NULL); + struct fuse_chan *fshfsmount_fuse_channel = NULL; + struct fuse *fshfsmount_fuse_handle = NULL; + +#elif defined( HAVE_LIBDOKAN ) + DOKAN_OPERATIONS fshfsmount_dokan_operations; + DOKAN_OPTIONS fshfsmount_dokan_options; +#endif + + libcnotify_stream_set( + stderr, + NULL ); + libcnotify_verbose_set( + 1 ); + + if( libclocale_initialize( + "fshfstools", + &error ) != 1 ) + { + fprintf( + stderr, + "Unable to initialize locale values.\n" ); + + goto on_error; + } + if( fshfstools_output_initialize( + _IONBF, + &error ) != 1 ) + { + fprintf( + stderr, + "Unable to initialize output settings.\n" ); + + goto on_error; + } + fshfstools_output_version_fprint( + stdout, + program ); + + while( ( option = fshfstools_getopt( + argc, + argv, + _SYSTEM_STRING( "ho:vVX:" ) ) ) != (system_integer_t) -1 ) + { + switch( option ) + { + case (system_integer_t) '?': + default: + fprintf( + stderr, + "Invalid argument: %" PRIs_SYSTEM "\n", + argv[ optind - 1 ] ); + + usage_fprint( + stdout ); + + return( EXIT_FAILURE ); + + case (system_integer_t) 'h': + usage_fprint( + stdout ); + + return( EXIT_SUCCESS ); + + case (system_integer_t) 'o': + option_offset = optarg; + + break; + + case (system_integer_t) 'v': + verbose = 1; + + break; + + case (system_integer_t) 'V': + fshfstools_output_copyright_fprint( + stdout ); + + return( EXIT_SUCCESS ); + + case (system_integer_t) 'X': + option_extended_options = optarg; + + break; + } + } + if( optind == argc ) + { + fprintf( + stderr, + "Missing source volume.\n" ); + + usage_fprint( + stdout ); + + return( EXIT_FAILURE ); + } + source = argv[ optind++ ]; + + if( optind == argc ) + { + fprintf( + stderr, + "Missing mount point.\n" ); + + usage_fprint( + stdout ); + + return( EXIT_FAILURE ); + } + mount_point = argv[ optind ]; + + libcnotify_verbose_set( + verbose ); + libfshfs_notify_set_stream( + stderr, + NULL ); + libfshfs_notify_set_verbose( + verbose ); + + if( mount_handle_initialize( + &fshfsmount_mount_handle, + &error ) != 1 ) + { + fprintf( + stderr, + "Unable to initialize mount handle.\n" ); + + goto on_error; + } + if( option_offset != NULL ) + { + if( mount_handle_set_offset( + fshfsmount_mount_handle, + option_offset, + &error ) != 1 ) + { + fprintf( + stderr, + "Unable to set volume offset.\n" ); + + goto on_error; + } + } + if( mount_handle_open( + fshfsmount_mount_handle, + source, + &error ) != 1 ) + { + fprintf( + stderr, + "Unable to open source volume\n" ); + + goto on_error; + } +#if defined( HAVE_LIBFUSE ) || defined( HAVE_LIBOSXFUSE ) + if( option_extended_options != NULL ) + { + /* This argument is required but ignored + */ + if( fuse_opt_add_arg( + &fshfsmount_fuse_arguments, + "" ) != 0 ) + { + fprintf( + stderr, + "Unable add fuse arguments.\n" ); + + goto on_error; + } + if( fuse_opt_add_arg( + &fshfsmount_fuse_arguments, + "-o" ) != 0 ) + { + fprintf( + stderr, + "Unable add fuse arguments.\n" ); + + goto on_error; + } + if( fuse_opt_add_arg( + &fshfsmount_fuse_arguments, + option_extended_options ) != 0 ) + { + fprintf( + stderr, + "Unable add fuse arguments.\n" ); + + goto on_error; + } + } + if( memory_set( + &fshfsmount_fuse_operations, + 0, + sizeof( struct fuse_operations ) ) == NULL ) + { + fprintf( + stderr, + "Unable to clear fuse operations.\n" ); + + goto on_error; + } + fshfsmount_fuse_operations.open = &mount_fuse_open; + fshfsmount_fuse_operations.read = &mount_fuse_read; + fshfsmount_fuse_operations.release = &mount_fuse_release; + fshfsmount_fuse_operations.getxattr = &mount_fuse_getxattr; + fshfsmount_fuse_operations.listxattr = &mount_fuse_listxattr; + fshfsmount_fuse_operations.opendir = &mount_fuse_opendir; + fshfsmount_fuse_operations.readdir = &mount_fuse_readdir; + fshfsmount_fuse_operations.releasedir = &mount_fuse_releasedir; + fshfsmount_fuse_operations.getattr = &mount_fuse_getattr; + fshfsmount_fuse_operations.readlink = &mount_fuse_readlink; + fshfsmount_fuse_operations.destroy = &mount_fuse_destroy; + + fshfsmount_fuse_channel = fuse_mount( + mount_point, + &fshfsmount_fuse_arguments ); + + if( fshfsmount_fuse_channel == NULL ) + { + fprintf( + stderr, + "Unable to create fuse channel.\n" ); + + goto on_error; + } + fshfsmount_fuse_handle = fuse_new( + fshfsmount_fuse_channel, + &fshfsmount_fuse_arguments, + &fshfsmount_fuse_operations, + sizeof( struct fuse_operations ), + fshfsmount_mount_handle ); + + if( fshfsmount_fuse_handle == NULL ) + { + fprintf( + stderr, + "Unable to create fuse handle.\n" ); + + goto on_error; + } + if( verbose == 0 ) + { + if( fuse_daemonize( + 0 ) != 0 ) + { + fprintf( + stderr, + "Unable to daemonize fuse.\n" ); + + goto on_error; + } + } + result = fuse_loop( + fshfsmount_fuse_handle ); + + if( result != 0 ) + { + fprintf( + stderr, + "Unable to run fuse loop.\n" ); + + goto on_error; + } + fuse_destroy( + fshfsmount_fuse_handle ); + + fuse_opt_free_args( + &fshfsmount_fuse_arguments ); + + return( EXIT_SUCCESS ); + +#elif defined( HAVE_LIBDOKAN ) + if( memory_set( + &fshfsmount_dokan_operations, + 0, + sizeof( DOKAN_OPERATIONS ) ) == NULL ) + { + fprintf( + stderr, + "Unable to clear dokan operations.\n" ); + + goto on_error; + } + if( memory_set( + &fshfsmount_dokan_options, + 0, + sizeof( DOKAN_OPTIONS ) ) == NULL ) + { + fprintf( + stderr, + "Unable to clear dokan options.\n" ); + + goto on_error; + } + fshfsmount_dokan_options.Version = DOKAN_VERSION; + fshfsmount_dokan_options.ThreadCount = 0; + fshfsmount_dokan_options.MountPoint = mount_point; + + if( verbose != 0 ) + { + fshfsmount_dokan_options.Options |= DOKAN_OPTION_STDERR; +#if defined( HAVE_DEBUG_OUTPUT ) + fshfsmount_dokan_options.Options |= DOKAN_OPTION_DEBUG; +#endif + } +/* This will only affect the drive properties + fshfsmount_dokan_options.Options |= DOKAN_OPTION_REMOVABLE; +*/ + +#if ( DOKAN_VERSION >= 600 ) && ( DOKAN_VERSION < 800 ) + fshfsmount_dokan_options.Options |= DOKAN_OPTION_KEEP_ALIVE; + + fshfsmount_dokan_operations.CreateFile = &mount_dokan_CreateFile; + fshfsmount_dokan_operations.OpenDirectory = &mount_dokan_OpenDirectory; + fshfsmount_dokan_operations.CreateDirectory = NULL; + fshfsmount_dokan_operations.Cleanup = NULL; + fshfsmount_dokan_operations.CloseFile = &mount_dokan_CloseFile; + fshfsmount_dokan_operations.ReadFile = &mount_dokan_ReadFile; + fshfsmount_dokan_operations.WriteFile = NULL; + fshfsmount_dokan_operations.FlushFileBuffers = NULL; + fshfsmount_dokan_operations.GetFileInformation = &mount_dokan_GetFileInformation; + fshfsmount_dokan_operations.FindFiles = &mount_dokan_FindFiles; + fshfsmount_dokan_operations.FindFilesWithPattern = NULL; + fshfsmount_dokan_operations.SetFileAttributes = NULL; + fshfsmount_dokan_operations.SetFileTime = NULL; + fshfsmount_dokan_operations.DeleteFile = NULL; + fshfsmount_dokan_operations.DeleteDirectory = NULL; + fshfsmount_dokan_operations.MoveFile = NULL; + fshfsmount_dokan_operations.SetEndOfFile = NULL; + fshfsmount_dokan_operations.SetAllocationSize = NULL; + fshfsmount_dokan_operations.LockFile = NULL; + fshfsmount_dokan_operations.UnlockFile = NULL; + fshfsmount_dokan_operations.GetFileSecurity = NULL; + fshfsmount_dokan_operations.SetFileSecurity = NULL; + fshfsmount_dokan_operations.GetDiskFreeSpace = NULL; + fshfsmount_dokan_operations.GetVolumeInformation = &mount_dokan_GetVolumeInformation; + fshfsmount_dokan_operations.Unmount = &mount_dokan_Unmount; + +#else + fshfsmount_dokan_operations.ZwCreateFile = &mount_dokan_ZwCreateFile; + fshfsmount_dokan_operations.Cleanup = NULL; + fshfsmount_dokan_operations.CloseFile = &mount_dokan_CloseFile; + fshfsmount_dokan_operations.ReadFile = &mount_dokan_ReadFile; + fshfsmount_dokan_operations.WriteFile = NULL; + fshfsmount_dokan_operations.FlushFileBuffers = NULL; + fshfsmount_dokan_operations.GetFileInformation = &mount_dokan_GetFileInformation; + fshfsmount_dokan_operations.FindFiles = &mount_dokan_FindFiles; + fshfsmount_dokan_operations.FindFilesWithPattern = NULL; + fshfsmount_dokan_operations.SetFileAttributes = NULL; + fshfsmount_dokan_operations.SetFileTime = NULL; + fshfsmount_dokan_operations.DeleteFile = NULL; + fshfsmount_dokan_operations.DeleteDirectory = NULL; + fshfsmount_dokan_operations.MoveFile = NULL; + fshfsmount_dokan_operations.SetEndOfFile = NULL; + fshfsmount_dokan_operations.SetAllocationSize = NULL; + fshfsmount_dokan_operations.LockFile = NULL; + fshfsmount_dokan_operations.UnlockFile = NULL; + fshfsmount_dokan_operations.GetFileSecurity = NULL; + fshfsmount_dokan_operations.SetFileSecurity = NULL; + fshfsmount_dokan_operations.GetDiskFreeSpace = NULL; + fshfsmount_dokan_operations.GetVolumeInformation = &mount_dokan_GetVolumeInformation; + fshfsmount_dokan_operations.Unmounted = NULL; + fshfsmount_dokan_operations.FindStreams = NULL; + fshfsmount_dokan_operations.Mounted = NULL; + +#endif /* ( DOKAN_VERSION >= 600 ) && ( DOKAN_VERSION < 800 ) */ + + result = DokanMain( + &fshfsmount_dokan_options, + &fshfsmount_dokan_operations ); + + switch( result ) + { + case DOKAN_SUCCESS: + break; + + case DOKAN_ERROR: + fprintf( + stderr, + "Unable to run dokan main: generic error\n" ); + break; + + case DOKAN_DRIVE_LETTER_ERROR: + fprintf( + stderr, + "Unable to run dokan main: bad drive letter\n" ); + break; + + case DOKAN_DRIVER_INSTALL_ERROR: + fprintf( + stderr, + "Unable to run dokan main: unable to load driver\n" ); + break; + + case DOKAN_START_ERROR: + fprintf( + stderr, + "Unable to run dokan main: driver error\n" ); + break; + + case DOKAN_MOUNT_ERROR: + fprintf( + stderr, + "Unable to run dokan main: unable to assign drive letter\n" ); + break; + + case DOKAN_MOUNT_POINT_ERROR: + fprintf( + stderr, + "Unable to run dokan main: mount point error\n" ); + break; + + default: + fprintf( + stderr, + "Unable to run dokan main: unknown error: %d\n", + result ); + break; + } + return( EXIT_SUCCESS ); + +#else + fprintf( + stderr, + "No sub system to mount HFS format.\n" ); + + return( EXIT_FAILURE ); + +#endif /* defined( HAVE_LIBFUSE ) || defined( HAVE_LIBOSXFUSE ) */ + +on_error: + if( error != NULL ) + { + libcnotify_print_error_backtrace( + error ); + libcerror_error_free( + &error ); + } +#if defined( HAVE_LIBFUSE ) || defined( HAVE_LIBOSXFUSE ) + if( fshfsmount_fuse_handle != NULL ) + { + fuse_destroy( + fshfsmount_fuse_handle ); + } + fuse_opt_free_args( + &fshfsmount_fuse_arguments ); +#endif + if( fshfsmount_mount_handle != NULL ) + { + mount_handle_free( + &fshfsmount_mount_handle, + NULL ); + } + return( EXIT_FAILURE ); +} + diff -Nru libfshfs-20201104/fshfstools/fshfstools_getopt.c libfshfs-20240221/fshfstools/fshfstools_getopt.c --- libfshfs-20201104/fshfstools/fshfstools_getopt.c 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/fshfstools/fshfstools_getopt.c 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * GetOpt functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/fshfstools/fshfstools_getopt.h libfshfs-20240221/fshfstools/fshfstools_getopt.h --- libfshfs-20201104/fshfstools/fshfstools_getopt.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/fshfstools/fshfstools_getopt.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * GetOpt functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/fshfstools/fshfstools_i18n.h libfshfs-20240221/fshfstools/fshfstools_i18n.h --- libfshfs-20201104/fshfstools/fshfstools_i18n.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/fshfstools/fshfstools_i18n.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Internationalization (i18n) functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/fshfstools/fshfstools_libbfio.h libfshfs-20240221/fshfstools/fshfstools_libbfio.h --- libfshfs-20201104/fshfstools/fshfstools_libbfio.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/fshfstools/fshfstools_libbfio.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libbfio header wrapper * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/fshfstools/fshfstools_libcerror.h libfshfs-20240221/fshfstools/fshfstools_libcerror.h --- libfshfs-20201104/fshfstools/fshfstools_libcerror.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/fshfstools/fshfstools_libcerror.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libcerror header wrapper * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/fshfstools/fshfstools_libclocale.h libfshfs-20240221/fshfstools/fshfstools_libclocale.h --- libfshfs-20201104/fshfstools/fshfstools_libclocale.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/fshfstools/fshfstools_libclocale.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libclocale header wrapper * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/fshfstools/fshfstools_libcnotify.h libfshfs-20240221/fshfstools/fshfstools_libcnotify.h --- libfshfs-20201104/fshfstools/fshfstools_libcnotify.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/fshfstools/fshfstools_libcnotify.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libcnotify header wrapper * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/fshfstools/fshfstools_libcpath.h libfshfs-20240221/fshfstools/fshfstools_libcpath.h --- libfshfs-20201104/fshfstools/fshfstools_libcpath.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/fshfstools/fshfstools_libcpath.h 2024-02-21 05:48:50.000000000 +0000 @@ -0,0 +1,48 @@ +/* + * The libcpath header wrapper + * + * Copyright (C) 2009-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _FSHFSTOOLS_LIBCPATH_H ) +#define _FSHFSTOOLS_LIBCPATH_H + +#include + +/* Define HAVE_LOCAL_LIBCPATH for local use of libcpath + */ +#if defined( HAVE_LOCAL_LIBCPATH ) + +#include +#include + +#else + +/* If libtool DLL support is enabled set LIBCPATH_DLL_IMPORT + * before including libcpath.h + */ +#if defined( _WIN32 ) && defined( DLL_IMPORT ) && !defined( HAVE_STATIC_EXECUTABLES ) +#define LIBCPATH_DLL_IMPORT +#endif + +#include + +#endif /* defined( HAVE_LOCAL_LIBCPATH ) */ + +#endif /* !defined( _FSHFSTOOLS_LIBCPATH_H ) */ + diff -Nru libfshfs-20201104/fshfstools/fshfstools_libfcache.h libfshfs-20240221/fshfstools/fshfstools_libfcache.h --- libfshfs-20201104/fshfstools/fshfstools_libfcache.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/fshfstools/fshfstools_libfcache.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libfcache header wrapper * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/fshfstools/fshfstools_libfdata.h libfshfs-20240221/fshfstools/fshfstools_libfdata.h --- libfshfs-20201104/fshfstools/fshfstools_libfdata.h 2020-11-04 04:19:45.000000000 +0000 +++ libfshfs-20240221/fshfstools/fshfstools_libfdata.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libfdata header wrapper * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -34,8 +34,6 @@ #include #include #include -#include -#include #include #include diff -Nru libfshfs-20201104/fshfstools/fshfstools_libfdatetime.h libfshfs-20240221/fshfstools/fshfstools_libfdatetime.h --- libfshfs-20201104/fshfstools/fshfstools_libfdatetime.h 2020-11-04 04:19:45.000000000 +0000 +++ libfshfs-20240221/fshfstools/fshfstools_libfdatetime.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libfdatetime header wrapper * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/fshfstools/fshfstools_libfguid.h libfshfs-20240221/fshfstools/fshfstools_libfguid.h --- libfshfs-20201104/fshfstools/fshfstools_libfguid.h 2020-11-04 04:19:45.000000000 +0000 +++ libfshfs-20240221/fshfstools/fshfstools_libfguid.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libfguid header wrapper * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/fshfstools/fshfstools_libfshfs.h libfshfs-20240221/fshfstools/fshfstools_libfshfs.h --- libfshfs-20201104/fshfstools/fshfstools_libfshfs.h 2020-11-04 04:19:45.000000000 +0000 +++ libfshfs-20240221/fshfstools/fshfstools_libfshfs.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libfshfs header wrapper * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/fshfstools/fshfstools_libhmac.h libfshfs-20240221/fshfstools/fshfstools_libhmac.h --- libfshfs-20201104/fshfstools/fshfstools_libhmac.h 2020-11-04 04:19:45.000000000 +0000 +++ libfshfs-20240221/fshfstools/fshfstools_libhmac.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libhmac header wrapper * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/fshfstools/fshfstools_libuna.h libfshfs-20240221/fshfstools/fshfstools_libuna.h --- libfshfs-20201104/fshfstools/fshfstools_libuna.h 2020-11-04 04:19:45.000000000 +0000 +++ libfshfs-20240221/fshfstools/fshfstools_libuna.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libuna header wrapper * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/fshfstools/fshfstools_output.c libfshfs-20240221/fshfstools/fshfstools_output.c --- libfshfs-20201104/fshfstools/fshfstools_output.c 2020-11-04 04:19:45.000000000 +0000 +++ libfshfs-20240221/fshfstools/fshfstools_output.c 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Common output functions for the fshfstools * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -108,7 +108,7 @@ */ fprintf( stream, - _( "Copyright (C) 2009-2020, %s.\n" ), + _( "Copyright (C) 2009-2024, %s.\n" ), _( "Joachim Metz" ) ); fprintf( diff -Nru libfshfs-20201104/fshfstools/fshfstools_output.h libfshfs-20240221/fshfstools/fshfstools_output.h --- libfshfs-20201104/fshfstools/fshfstools_output.h 2020-11-04 04:19:45.000000000 +0000 +++ libfshfs-20240221/fshfstools/fshfstools_output.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Common output functions for the fshfstools * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/fshfstools/fshfstools_signal.c libfshfs-20240221/fshfstools/fshfstools_signal.c --- libfshfs-20201104/fshfstools/fshfstools_signal.c 2020-11-04 04:19:45.000000000 +0000 +++ libfshfs-20240221/fshfstools/fshfstools_signal.c 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Signal handling functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -40,7 +40,7 @@ /* Signal handler for Ctrl+C or Ctrl+Break signals */ BOOL WINAPI fshfstools_signal_handler( - unsigned long signal ) + fshfstools_signal_t signal ) { static char *function = "fshfstools_signal_handler"; @@ -112,7 +112,7 @@ fshfstools_signal_signal_handler = signal_handler; if( SetConsoleCtrlHandler( - fshfstools_signal_handler, + (PHANDLER_ROUTINE) fshfstools_signal_handler, TRUE ) == 0 ) { libcerror_error_set( @@ -179,7 +179,7 @@ static char *function = "fshfstools_signal_detach"; if( SetConsoleCtrlHandler( - fshfstools_signal_handler, + (PHANDLER_ROUTINE) fshfstools_signal_handler, FALSE ) == 0 ) { libcerror_error_set( diff -Nru libfshfs-20201104/fshfstools/fshfstools_signal.h libfshfs-20240221/fshfstools/fshfstools_signal.h --- libfshfs-20201104/fshfstools/fshfstools_signal.h 2020-11-04 04:19:45.000000000 +0000 +++ libfshfs-20240221/fshfstools/fshfstools_signal.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Signal handling functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/fshfstools/fshfstools_unused.h libfshfs-20240221/fshfstools/fshfstools_unused.h --- libfshfs-20201104/fshfstools/fshfstools_unused.h 2020-11-04 04:19:45.000000000 +0000 +++ libfshfs-20240221/fshfstools/fshfstools_unused.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Definitions to silence compiler warnings about unused function attributes/parameters. * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/fshfstools/info_handle.c libfshfs-20240221/fshfstools/info_handle.c --- libfshfs-20201104/fshfstools/info_handle.c 2020-11-04 04:22:35.000000000 +0000 +++ libfshfs-20240221/fshfstools/info_handle.c 2024-02-21 05:50:44.000000000 +0000 @@ -1,7 +1,7 @@ /* * Info handle * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -1115,7 +1115,7 @@ /* Prints a seconds POSIX time value * Returns 1 if successful or -1 on error */ -int info_handle_posix_time_seconds_value_fprint( +int info_handle_posix_time_in_seconds_value_fprint( info_handle_t *info_handle, const char *value_name, int32_t value_32bit, @@ -1124,7 +1124,7 @@ system_character_t date_time_string[ 32 ]; libfdatetime_posix_time_t *posix_time = NULL; - static char *function = "info_handle_posix_time_seconds_value_fprint"; + static char *function = "info_handle_posix_time_in_seconds_value_fprint"; int result = 0; if( info_handle == NULL ) @@ -1266,7 +1266,10 @@ uint32_t file_entry_identifier = 0; uint32_t group_identifier = 0; uint32_t link_identifier = 0; + uint32_t major_device_number = 0; + uint32_t minor_device_number = 0; uint32_t modification_time = 0; + uint32_t number_of_links = 0; uint32_t owner_identifier = 0; uint32_t parent_identifier = 0; int32_t added_time = 0; @@ -1366,10 +1369,12 @@ goto on_error; } - if( libfshfs_file_entry_get_owner_identifier( - file_entry, - &owner_identifier, - error ) != 1 ) + result = libfshfs_file_entry_get_owner_identifier( + file_entry, + &owner_identifier, + error ); + + if( result == -1 ) { libcerror_error_set( error, @@ -1380,10 +1385,12 @@ goto on_error; } - if( libfshfs_file_entry_get_group_identifier( - file_entry, - &group_identifier, - error ) != 1 ) + result = libfshfs_file_entry_get_group_identifier( + file_entry, + &group_identifier, + error ); + + if( result == -1 ) { libcerror_error_set( error, @@ -1394,10 +1401,12 @@ goto on_error; } - if( libfshfs_file_entry_get_file_mode( - file_entry, - &file_mode, - error ) != 1 ) + result = libfshfs_file_entry_get_file_mode( + file_entry, + &file_mode, + error ); + + if( result == -1 ) { libcerror_error_set( error, @@ -1855,7 +1864,7 @@ } else if( result != 0 ) { - if( info_handle_posix_time_seconds_value_fprint( + if( info_handle_posix_time_in_seconds_value_fprint( info_handle, "\tAdded time\t\t", added_time, @@ -1871,6 +1880,25 @@ goto on_error; } } + if( libfshfs_file_entry_get_number_of_links( + file_entry, + &number_of_links, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve number of links.", + function ); + + goto on_error; + } + fprintf( + info_handle->notify_stream, + "\tNumber of links\t\t: %" PRIu32 "\n", + number_of_links ); + fprintf( info_handle->notify_stream, "\tOwner identifier\t: %" PRIu32 "\n", @@ -1887,6 +1915,31 @@ file_mode_string, file_mode ); + result = libfshfs_file_entry_get_device_number( + file_entry, + &major_device_number, + &minor_device_number, + error ); + + if( result == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve device number.", + function ); + + goto on_error; + } + else if( result != 0 ) + { + fprintf( + info_handle->notify_stream, + "\tDevice number\t\t: %" PRIu32 ",%" PRIu32 "\n", + major_device_number, + minor_device_number ); + } if( symbolic_link_target != NULL ) { fprintf( @@ -1894,6 +1947,27 @@ "\tSymbolic link target\t: %" PRIs_SYSTEM "\n", symbolic_link_target ); } + result = libfshfs_file_entry_has_resource_fork( + file_entry, + error ); + + if( result == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to determine if file entry has a resource fork.", + function ); + + goto on_error; + } + else if( result == 1 ) + { + fprintf( + info_handle->notify_stream, + "\tHas a resource fork\n" ); + } if( libfshfs_file_entry_get_number_of_extended_attributes( file_entry, &number_of_extended_attributes, diff -Nru libfshfs-20201104/fshfstools/info_handle.h libfshfs-20240221/fshfstools/info_handle.h --- libfshfs-20201104/fshfstools/info_handle.h 2020-11-04 04:22:35.000000000 +0000 +++ libfshfs-20240221/fshfstools/info_handle.h 2024-02-21 05:50:44.000000000 +0000 @@ -1,7 +1,7 @@ /* * Info handle * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -124,7 +124,7 @@ uint32_t value_32bit, libcerror_error_t **error ); -int info_handle_posix_time_seconds_value_fprint( +int info_handle_posix_time_in_seconds_value_fprint( info_handle_t *info_handle, const char *value_name, int32_t value_32bit, diff -Nru libfshfs-20201104/fshfstools/mount_dokan.c libfshfs-20240221/fshfstools/mount_dokan.c --- libfshfs-20201104/fshfstools/mount_dokan.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/fshfstools/mount_dokan.c 2024-02-21 05:50:44.000000000 +0000 @@ -0,0 +1,1609 @@ +/* + * Mount tool dokan functions + * + * Copyright (C) 2009-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include +#include +#include + +#include "fshfstools_libcerror.h" +#include "fshfstools_libcnotify.h" +#include "fshfstools_libfshfs.h" +#include "fshfstools_unused.h" +#include "mount_dokan.h" +#include "mount_file_entry.h" +#include "mount_handle.h" + +extern mount_handle_t *fshfsmount_mount_handle; + +#if defined( HAVE_LIBDOKAN ) + +#if ( DOKAN_VERSION >= 600 ) && ( DOKAN_VERSION < 800 ) +#define MOUNT_DOKAN_ERROR_BAD_ARGUMENTS -ERROR_BAD_ARGUMENTS +#define MOUNT_DOKAN_ERROR_FILE_NOT_FOUND -ERROR_FILE_NOT_FOUND +#define MOUNT_DOKAN_ERROR_GENERIC_FAILURE -ERROR_GEN_FAILURE +#define MOUNT_DOKAN_ERROR_READ_FAULT -ERROR_READ_FAULT + +#else +#define MOUNT_DOKAN_ERROR_BAD_ARGUMENTS STATUS_UNSUCCESSFUL +#define MOUNT_DOKAN_ERROR_FILE_NOT_FOUND STATUS_OBJECT_NAME_NOT_FOUND +#define MOUNT_DOKAN_ERROR_GENERIC_FAILURE STATUS_UNSUCCESSFUL +#define MOUNT_DOKAN_ERROR_READ_FAULT STATUS_UNEXPECTED_IO_ERROR + +#endif /* ( DOKAN_VERSION >= 600 ) && ( DOKAN_VERSION < 800 ) */ + +/* Sets the values in a file information structure + * The time values contain an unsigned 64-bit FILETIME timestamp + * Returns 1 if successful or -1 on error + */ +int mount_dokan_set_file_information( + BY_HANDLE_FILE_INFORMATION *file_information, + size64_t size, + uint16_t file_mode, + uint64_t creation_time, + uint64_t access_time, + uint64_t modification_time, + libcerror_error_t **error ) +{ + static char *function = "mount_dokan_set_file_information"; + + if( file_information == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file information.", + function ); + + return( -1 ); + } + if( size > 0 ) + { + file_information->nFileSizeHigh = (DWORD) ( size >> 32 ); + file_information->nFileSizeLow = (DWORD) ( size & 0xffffffffUL ); + } + if( ( file_mode & 0x4000 ) != 0 ) + { + file_information->dwFileAttributes = FILE_ATTRIBUTE_DIRECTORY; + } + else + { + file_information->dwFileAttributes = FILE_ATTRIBUTE_NORMAL; + } + file_information->ftCreationTime.dwLowDateTime = (uint32_t) ( creation_time & 0x00000000ffffffffULL ); + file_information->ftCreationTime.dwHighDateTime = creation_time >> 32; + + file_information->ftLastAccessTime.dwLowDateTime = (uint32_t) ( access_time & 0x00000000ffffffffULL ); + file_information->ftLastAccessTime.dwHighDateTime = access_time >> 32; + + file_information->ftLastWriteTime.dwLowDateTime = (uint32_t) ( modification_time & 0x00000000ffffffffULL ); + file_information->ftLastWriteTime.dwHighDateTime = modification_time >> 32; + + return( 1 ); +} + +/* Sets the values in a find data structure + * The time values contain an unsigned 64-bit FILETIME timestamp + * Returns 1 if successful or -1 on error + */ +int mount_dokan_set_find_data( + WIN32_FIND_DATAW *find_data, + size64_t size, + uint16_t file_mode, + uint64_t creation_time, + uint64_t access_time, + uint64_t modification_time, + libcerror_error_t **error ) +{ + static char *function = "mount_dokan_set_find_data"; + + if( find_data == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid find data.", + function ); + + return( -1 ); + } + if( size > 0 ) + { + find_data->nFileSizeHigh = (DWORD) ( size >> 32 ); + find_data->nFileSizeLow = (DWORD) ( size & 0xffffffffUL ); + } + if( ( file_mode & 0x4000 ) != 0 ) + { + find_data->dwFileAttributes = FILE_ATTRIBUTE_DIRECTORY; + } + else + { + find_data->dwFileAttributes = FILE_ATTRIBUTE_NORMAL; + } + find_data->ftCreationTime.dwLowDateTime = (uint32_t) ( creation_time & 0x00000000ffffffffULL ); + find_data->ftCreationTime.dwHighDateTime = creation_time >> 32; + + find_data->ftLastAccessTime.dwLowDateTime = (uint32_t) ( access_time & 0x00000000ffffffffULL ); + find_data->ftLastAccessTime.dwHighDateTime = access_time >> 32; + + find_data->ftLastWriteTime.dwLowDateTime = (uint32_t) ( modification_time & 0x00000000ffffffffULL ); + find_data->ftLastWriteTime.dwHighDateTime = modification_time >> 32; + + return( 1 ); +} + +/* Fills a directory entry + * Returns 1 if successful or -1 on error + */ +int mount_dokan_filldir( + PFillFindData fill_find_data, + DOKAN_FILE_INFO *file_info, + wchar_t *name, + size_t name_size, + WIN32_FIND_DATAW *find_data, + mount_file_entry_t *file_entry, + libcerror_error_t **error ) +{ + static char *function = "mount_dokan_filldir"; + size64_t file_size = 0; + uint64_t access_time = 0; + uint64_t creation_time = 0; + uint64_t modification_time = 0; + uint16_t file_mode = 0; + + if( fill_find_data == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid fill find data.", + function ); + + return( -1 ); + } + if( name == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid name.", + function ); + + return( -1 ); + } + if( name_size > (size_t) MAX_PATH ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid name size value out of bounds.", + function ); + + return( -1 ); + } + if( file_entry != NULL ) + { + if( mount_file_entry_get_size( + file_entry, + &file_size, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve file entry size.", + function ); + + return( -1 ); + } + if( mount_file_entry_get_file_mode( + file_entry, + &file_mode, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve file mode.", + function ); + + return( -1 ); + } + if( mount_file_entry_get_creation_time( + file_entry, + &creation_time, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve creation time.", + function ); + + return( -1 ); + } + if( mount_file_entry_get_access_time( + file_entry, + &access_time, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve access time.", + function ); + + return( -1 ); + } + if( mount_file_entry_get_modification_time( + file_entry, + &modification_time, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve modification time.", + function ); + + return( -1 ); + } + } + if( memory_set( + find_data, + 0, + sizeof( WIN32_FIND_DATAW ) ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_SET_FAILED, + "%s: unable to clear find data.", + function ); + + return( -1 ); + } + if( wide_string_copy( + find_data->cFileName, + name, + name_size ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_COPY_FAILED, + "%s: unable to copy filename.", + function ); + + return( -1 ); + } + if( name_size <= (size_t) 14 ) + { + if( wide_string_copy( + find_data->cAlternateFileName, + name, + name_size ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_COPY_FAILED, + "%s: unable to copy alternate filename.", + function ); + + return( -1 ); + } + } + if( mount_dokan_set_find_data( + find_data, + file_size, + file_mode, + creation_time, + access_time, + modification_time, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to set find data.", + function ); + + return( -1 ); + } + if( fill_find_data( + find_data, + file_info ) != 0 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to set directory entry.", + function ); + + return( -1 ); + } + return( 1 ); +} + +#if ( DOKAN_VERSION >= 600 ) && ( DOKAN_VERSION < 800 ) + +/* Opens a file or directory + * Returns 0 if successful or an error code otherwise + */ +int __stdcall mount_dokan_CreateFile( + const wchar_t *path, + DWORD desired_access, + DWORD share_mode FSHFSTOOLS_ATTRIBUTE_UNUSED, + DWORD creation_disposition, + DWORD attribute_flags FSHFSTOOLS_ATTRIBUTE_UNUSED, + DOKAN_FILE_INFO *file_info ) +{ + libcerror_error_t *error = NULL; + static char *function = "mount_dokan_CreateFile"; + int result = 0; + + FSHFSTOOLS_UNREFERENCED_PARAMETER( share_mode ) + FSHFSTOOLS_UNREFERENCED_PARAMETER( attribute_flags ) + +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: %ls\n", + function, + path ); + } +#endif + if( path == NULL ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid path.", + function ); + + result = -ERROR_BAD_ARGUMENTS; + + goto on_error; + } + if( ( desired_access & GENERIC_WRITE ) != 0 ) + { + return( -ERROR_WRITE_PROTECT ); + } + /* Ignore the share_mode + */ + if( creation_disposition == CREATE_NEW ) + { + return( -ERROR_FILE_EXISTS ); + } + else if( creation_disposition == CREATE_ALWAYS ) + { + return( -ERROR_ALREADY_EXISTS ); + } + else if( creation_disposition == OPEN_ALWAYS ) + { + return( -ERROR_FILE_NOT_FOUND ); + } + else if( creation_disposition == TRUNCATE_EXISTING ) + { + return( -ERROR_FILE_NOT_FOUND ); + } + else if( creation_disposition != OPEN_EXISTING ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid creation disposition.", + function ); + + result = -ERROR_BAD_ARGUMENTS; + + goto on_error; + } + if( file_info == NULL ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file information.", + function ); + + result = -ERROR_BAD_ARGUMENTS; + + goto on_error; + } + if( file_info->Context != (ULONG64) NULL ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, + "%s: invalid file information - context already set.", + function ); + + result = -ERROR_BAD_ARGUMENTS; + + goto on_error; + } + if( mount_handle_get_file_entry_by_path( + fshfsmount_mount_handle, + path, + (mount_file_entry_t **) &( file_info->Context ), + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve file entry for path: %ls.", + function, + path ); + + result = -ERROR_FILE_NOT_FOUND; + + goto on_error; + } + return( 0 ); + +on_error: + if( error != NULL ) + { + libcnotify_print_error_backtrace( + error ); + libcerror_error_free( + &error ); + } + return( result ); +} + +#else + +/* Opens a file or directory + * Returns 0 if successful or an error code otherwise + */ +NTSTATUS __stdcall mount_dokan_ZwCreateFile( + const wchar_t *path, + DOKAN_IO_SECURITY_CONTEXT *security_context FSHFSTOOLS_ATTRIBUTE_UNUSED, + ACCESS_MASK desired_access, + ULONG file_attributes FSHFSTOOLS_ATTRIBUTE_UNUSED, + ULONG share_access FSHFSTOOLS_ATTRIBUTE_UNUSED, + ULONG creation_disposition, + ULONG creation_options FSHFSTOOLS_ATTRIBUTE_UNUSED, + DOKAN_FILE_INFO *file_info ) +{ + libcerror_error_t *error = NULL; + static char *function = "mount_dokan_ZwCreateFile"; + int result = 0; + + FSHFSTOOLS_UNREFERENCED_PARAMETER( security_context ) + FSHFSTOOLS_UNREFERENCED_PARAMETER( file_attributes ) + FSHFSTOOLS_UNREFERENCED_PARAMETER( share_access ) + FSHFSTOOLS_UNREFERENCED_PARAMETER( creation_options ) + + if( path == NULL ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid path.", + function ); + + result = STATUS_UNSUCCESSFUL; + + goto on_error; + } + if( ( desired_access & GENERIC_WRITE ) != 0 ) + { + return( STATUS_MEDIA_WRITE_PROTECTED ); + } + /* Ignore the share_mode + */ + if( creation_disposition == FILE_CREATE ) + { + return( STATUS_OBJECT_NAME_COLLISION ); + } + else if( ( creation_disposition != FILE_OPEN ) + && ( creation_disposition != FILE_OPEN_IF ) ) + { + return( STATUS_ACCESS_DENIED ); + } + if( file_info == NULL ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file information.", + function ); + + result = STATUS_UNSUCCESSFUL; + + goto on_error; + } + if( file_info->Context != (ULONG64) NULL ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, + "%s: invalid file information - context already set.", + function ); + + result = STATUS_UNSUCCESSFUL; + + goto on_error; + } + if( mount_handle_get_file_entry_by_path( + fshfsmount_mount_handle, + path, + (mount_file_entry_t **) &( file_info->Context ), + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve file entry for path: %ls.", + function, + path ); + + result = STATUS_OBJECT_NAME_NOT_FOUND; + + goto on_error; + } + return( STATUS_SUCCESS ); + +on_error: + if( error != NULL ) + { + libcnotify_print_error_backtrace( + error ); + libcerror_error_free( + &error ); + } + return( result ); +} + +#endif /* ( DOKAN_VERSION >= 600 ) && ( DOKAN_VERSION < 800 ) */ + +#if ( DOKAN_VERSION >= 600 ) && ( DOKAN_VERSION < 800 ) + +/* Opens a directory + * Returns 0 if successful or an error code otherwise + */ +int __stdcall mount_dokan_OpenDirectory( + const wchar_t *path, + DOKAN_FILE_INFO *file_info ) +{ + libcerror_error_t *error = NULL; + static char *function = "mount_dokan_OpenDirectory"; + int result = 0; + +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: %ls\n", + function, + path ); + } +#endif + if( path == NULL ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid path.", + function ); + + result = MOUNT_DOKAN_ERROR_BAD_ARGUMENTS; + + goto on_error; + } + if( file_info == NULL ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file information.", + function ); + + result = MOUNT_DOKAN_ERROR_BAD_ARGUMENTS; + + goto on_error; + } + if( file_info->Context != (ULONG64) NULL ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, + "%s: invalid file information - context already set.", + function ); + + result = MOUNT_DOKAN_ERROR_BAD_ARGUMENTS; + + goto on_error; + } + if( mount_handle_get_file_entry_by_path( + fshfsmount_mount_handle, + path, + (mount_file_entry_t **) &( file_info->Context ), + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve file entry for path: %ls.", + function, + path ); + + result = MOUNT_DOKAN_ERROR_FILE_NOT_FOUND; + + goto on_error; + } + return( 0 ); + +on_error: + if( error != NULL ) + { + libcnotify_print_error_backtrace( + error ); + libcerror_error_free( + &error ); + } + return( result ); +} + +#endif /* ( DOKAN_VERSION >= 600 ) && ( DOKAN_VERSION < 800 ) */ + +/* Closes a file or direcotry + * Returns 0 if successful or an error code otherwise + */ +#if ( DOKAN_VERSION >= 600 ) && ( DOKAN_VERSION < 800 ) +int __stdcall mount_dokan_CloseFile( + const wchar_t *path, + DOKAN_FILE_INFO *file_info ) +#else +NTSTATUS __stdcall mount_dokan_CloseFile( + const wchar_t *path, + DOKAN_FILE_INFO *file_info ) +#endif +{ + libcerror_error_t *error = NULL; + static char *function = "mount_dokan_CloseFile"; + int result = 0; + +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: %ls\n", + function, + path ); + } +#endif + if( path == NULL ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid path.", + function ); + + result = MOUNT_DOKAN_ERROR_BAD_ARGUMENTS; + + goto on_error; + } + if( file_info == NULL ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file information.", + function ); + + result = MOUNT_DOKAN_ERROR_BAD_ARGUMENTS; + + goto on_error; + } + if( file_info->Context != (ULONG64) NULL ) + { + if( mount_file_entry_free( + (mount_file_entry_t **) &( file_info->Context ), + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free file entry.", + function ); + + result = MOUNT_DOKAN_ERROR_GENERIC_FAILURE; + + goto on_error; + } + } + return( 0 ); + +on_error: + if( error != NULL ) + { + libcnotify_print_error_backtrace( + error ); + libcerror_error_free( + &error ); + } + return( result ); +} + +/* Reads a buffer of data at the specified offset + * Returns 0 if successful or an error code otherwise + */ +#if ( DOKAN_VERSION >= 600 ) && ( DOKAN_VERSION < 800 ) +int __stdcall mount_dokan_ReadFile( + const wchar_t *path, + void *buffer, + DWORD number_of_bytes_to_read, + DWORD *number_of_bytes_read, + LONGLONG offset, + DOKAN_FILE_INFO *file_info ) +#else +NTSTATUS __stdcall mount_dokan_ReadFile( + const wchar_t *path, + void *buffer, + DWORD number_of_bytes_to_read, + DWORD *number_of_bytes_read, + LONGLONG offset, + DOKAN_FILE_INFO *file_info ) +#endif +{ + libcerror_error_t *error = NULL; + static char *function = "mount_dokan_ReadFile"; + ssize_t read_count = 0; + int result = 0; + +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: %ls\n", + function, + path ); + } +#endif + if( path == NULL ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid path.", + function ); + + result = MOUNT_DOKAN_ERROR_BAD_ARGUMENTS; + + goto on_error; + } + if( number_of_bytes_to_read > (DWORD) INT32_MAX ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid number of bytes to read value exceeds maximum.", + function ); + + result = MOUNT_DOKAN_ERROR_BAD_ARGUMENTS; + + goto on_error; + } + if( number_of_bytes_read == NULL ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid number of bytes read.", + function ); + + result = MOUNT_DOKAN_ERROR_BAD_ARGUMENTS; + + goto on_error; + } + if( file_info == NULL ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file information.", + function ); + + result = MOUNT_DOKAN_ERROR_BAD_ARGUMENTS; + + goto on_error; + } + if( file_info->Context == (ULONG64) NULL ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, + "%s: invalid file information - missing context.", + function ); + + result = MOUNT_DOKAN_ERROR_BAD_ARGUMENTS; + + goto on_error; + } + read_count = mount_file_entry_read_buffer_at_offset( + (mount_file_entry_t *) file_info->Context, + buffer, + (size_t) number_of_bytes_to_read, + (off64_t) offset, + &error ); + + if( read_count < 0 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_READ_FAILED, + "%s: unable to read from mount handle.", + function ); + + result = MOUNT_DOKAN_ERROR_READ_FAULT; + + goto on_error; + } + if( read_count > (size_t) INT32_MAX ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid read count value exceeds maximum.", + function ); + + result = MOUNT_DOKAN_ERROR_READ_FAULT; + + goto on_error; + } + /* Dokan does not require the read function to return ERROR_HANDLE_EOF + */ + *number_of_bytes_read = (DWORD) read_count; + + return( 0 ); + +on_error: + if( error != NULL ) + { + libcnotify_print_error_backtrace( + error ); + libcerror_error_free( + &error ); + } + return( result ); +} + +/* Reads a directory + * Returns 0 if successful or an error code otherwise + */ +#if ( DOKAN_VERSION >= 600 ) && ( DOKAN_VERSION < 800 ) +int __stdcall mount_dokan_FindFiles( + const wchar_t *path, + PFillFindData fill_find_data, + DOKAN_FILE_INFO *file_info ) +#else +NTSTATUS __stdcall mount_dokan_FindFiles( + const wchar_t *path, + PFillFindData fill_find_data, + DOKAN_FILE_INFO *file_info ) +#endif +{ + WIN32_FIND_DATAW find_data; + + libcerror_error_t *error = NULL; + mount_file_entry_t *file_entry = NULL; + mount_file_entry_t *parent_file_entry = NULL; + mount_file_entry_t *sub_file_entry = NULL; + wchar_t *name = NULL; + static char *function = "mount_dokan_FindFiles"; + size_t name_size = 0; + int number_of_sub_file_entries = 0; + int result = 0; + int sub_file_entry_index = 0; + +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: %ls\n", + function, + path ); + } +#endif + if( path == NULL ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid path.", + function ); + + result = MOUNT_DOKAN_ERROR_BAD_ARGUMENTS; + + goto on_error; + } + if( mount_handle_get_file_entry_by_path( + fshfsmount_mount_handle, + path, + &file_entry, + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve file entry for path: %ls.", + function, + path ); + + result = MOUNT_DOKAN_ERROR_FILE_NOT_FOUND; + + goto on_error; + } + if( mount_dokan_filldir( + fill_find_data, + file_info, + L".", + 2, + &find_data, + file_entry, + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to set self find data.", + function ); + + result = MOUNT_DOKAN_ERROR_GENERIC_FAILURE; + + goto on_error; + } + result = mount_file_entry_get_parent_file_entry( + file_entry, + &parent_file_entry, + &error ); + + if( result == -1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve parent file entry.", + function ); + + result = MOUNT_DOKAN_ERROR_GENERIC_FAILURE; + + goto on_error; + } + if( mount_dokan_filldir( + fill_find_data, + file_info, + L"..", + 3, + &find_data, + parent_file_entry, + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to set parent find data.", + function ); + + result = MOUNT_DOKAN_ERROR_GENERIC_FAILURE; + + goto on_error; + } + if( mount_file_entry_free( + &parent_file_entry, + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free parent file entry.", + function ); + + result = MOUNT_DOKAN_ERROR_GENERIC_FAILURE; + + goto on_error; + } + if( mount_file_entry_get_number_of_sub_file_entries( + file_entry, + &number_of_sub_file_entries, + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve number of sub file entries.", + function ); + + result = MOUNT_DOKAN_ERROR_GENERIC_FAILURE; + + goto on_error; + } + for( sub_file_entry_index = 0; + sub_file_entry_index < number_of_sub_file_entries; + sub_file_entry_index++ ) + { + if( mount_file_entry_get_sub_file_entry_by_index( + file_entry, + sub_file_entry_index, + &sub_file_entry, + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve sub file entry: %d.", + function, + sub_file_entry_index ); + + result = MOUNT_DOKAN_ERROR_GENERIC_FAILURE; + + goto on_error; + } + if( mount_file_entry_get_name_size( + sub_file_entry, + &name_size, + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve sub file entry: %d name size.", + function, + sub_file_entry_index ); + + result = MOUNT_DOKAN_ERROR_GENERIC_FAILURE; + + goto on_error; + } + name = wide_string_allocate( + name_size ); + + if( name == NULL ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_INSUFFICIENT, + "%s: unable to create sub file entry: %d name.", + function ); + + result = MOUNT_DOKAN_ERROR_GENERIC_FAILURE; + + goto on_error; + } + if( mount_file_entry_get_name( + sub_file_entry, + name, + name_size, + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve sub file entry: %d name.", + function, + sub_file_entry_index ); + + result = MOUNT_DOKAN_ERROR_GENERIC_FAILURE; + + goto on_error; + } + if( mount_dokan_filldir( + fill_find_data, + file_info, + name, + name_size, + &find_data, + sub_file_entry, + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to set sub file entry: %d find data.", + function, + sub_file_entry_index ); + + result = MOUNT_DOKAN_ERROR_GENERIC_FAILURE; + + goto on_error; + } + memory_free( + name ); + + name = NULL; + + if( mount_file_entry_free( + &sub_file_entry, + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free sub file entry: %d.", + function, + sub_file_entry_index ); + + result = MOUNT_DOKAN_ERROR_GENERIC_FAILURE; + + goto on_error; + } + } + if( mount_file_entry_free( + &file_entry, + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free file entry.", + function ); + + result = MOUNT_DOKAN_ERROR_GENERIC_FAILURE; + + goto on_error; + } + return( 0 ); + +on_error: + if( error != NULL ) + { + libcnotify_print_error_backtrace( + error ); + libcerror_error_free( + &error ); + } + if( name != NULL ) + { + memory_free( + name ); + } + if( sub_file_entry != NULL ) + { + mount_file_entry_free( + &sub_file_entry, + NULL ); + } + if( parent_file_entry != NULL ) + { + mount_file_entry_free( + &parent_file_entry, + NULL ); + } + if( file_entry != NULL ) + { + mount_file_entry_free( + &file_entry, + NULL ); + } + return( result ); +} + +/* Retrieves the file information + * Returns 0 if successful or an error code otherwise + */ +#if ( DOKAN_VERSION >= 600 ) && ( DOKAN_VERSION < 800 ) +int __stdcall mount_dokan_GetFileInformation( + const wchar_t *path, + BY_HANDLE_FILE_INFORMATION *file_information, + DOKAN_FILE_INFO *file_info FSHFSTOOLS_ATTRIBUTE_UNUSED ) +#else +NTSTATUS __stdcall mount_dokan_GetFileInformation( + const wchar_t *path, + BY_HANDLE_FILE_INFORMATION *file_information, + DOKAN_FILE_INFO *file_info FSHFSTOOLS_ATTRIBUTE_UNUSED ) +#endif +{ + libcerror_error_t *error = NULL; + mount_file_entry_t *file_entry = NULL; + static char *function = "mount_dokan_GetFileInformation"; + size64_t file_size = 0; + uint64_t access_time = 0; + uint64_t creation_time = 0; + uint64_t modification_time = 0; + uint16_t file_mode = 0; + int result = 0; + + FSHFSTOOLS_UNREFERENCED_PARAMETER( file_info ) + +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: %ls\n", + function, + path ); + } +#endif + if( path == NULL ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid path.", + function ); + + result = MOUNT_DOKAN_ERROR_BAD_ARGUMENTS; + + goto on_error; + } + if( mount_handle_get_file_entry_by_path( + fshfsmount_mount_handle, + path, + &file_entry, + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve file entry for path: %ls.", + function, + path ); + + result = MOUNT_DOKAN_ERROR_FILE_NOT_FOUND; + + goto on_error; + } + if( file_entry != NULL ) + { + if( mount_file_entry_get_size( + file_entry, + &file_size, + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve file entry size.", + function ); + + result = MOUNT_DOKAN_ERROR_GENERIC_FAILURE; + + goto on_error; + } + if( mount_file_entry_get_file_mode( + file_entry, + &file_mode, + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve file mode.", + function ); + + result = MOUNT_DOKAN_ERROR_GENERIC_FAILURE; + + goto on_error; + } + if( mount_file_entry_get_creation_time( + file_entry, + &creation_time, + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve creation time.", + function ); + + result = MOUNT_DOKAN_ERROR_GENERIC_FAILURE; + + goto on_error; + } + if( mount_file_entry_get_access_time( + file_entry, + &access_time, + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve access time.", + function ); + + result = MOUNT_DOKAN_ERROR_GENERIC_FAILURE; + + goto on_error; + } + if( mount_file_entry_get_modification_time( + file_entry, + &modification_time, + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve modification time.", + function ); + + result = MOUNT_DOKAN_ERROR_GENERIC_FAILURE; + + goto on_error; + } + } + if( mount_dokan_set_file_information( + file_information, + file_size, + file_mode, + creation_time, + access_time, + modification_time, + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to set file information.", + function ); + + result = MOUNT_DOKAN_ERROR_GENERIC_FAILURE; + + goto on_error; + } + if( mount_file_entry_free( + &file_entry, + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free file entry.", + function ); + + result = MOUNT_DOKAN_ERROR_GENERIC_FAILURE; + + goto on_error; + } + return( 0 ); + +on_error: + if( error != NULL ) + { + libcnotify_print_error_backtrace( + error ); + libcerror_error_free( + &error ); + } + if( file_entry != NULL ) + { + mount_file_entry_free( + &file_entry, + NULL ); + } + return( result ); +} + +/* Retrieves the volume information + * Returns 0 if successful or an error code otherwise + */ +#if ( DOKAN_VERSION >= 600 ) && ( DOKAN_VERSION < 800 ) +int __stdcall mount_dokan_GetVolumeInformation( + wchar_t *volume_name, + DWORD volume_name_size, + DWORD *volume_serial_number, + DWORD *maximum_filename_length, + DWORD *file_system_flags, + wchar_t *file_system_name, + DWORD file_system_name_size, + DOKAN_FILE_INFO *file_info FSHFSTOOLS_ATTRIBUTE_UNUSED ) +#else +NTSTATUS __stdcall mount_dokan_GetVolumeInformation( + wchar_t *volume_name, + DWORD volume_name_size, + DWORD *volume_serial_number, + DWORD *maximum_filename_length, + DWORD *file_system_flags, + wchar_t *file_system_name, + DWORD file_system_name_size, + DOKAN_FILE_INFO *file_info FSHFSTOOLS_ATTRIBUTE_UNUSED ) +#endif +{ + libcerror_error_t *error = NULL; + const wchar_t *name = NULL; + static char *function = "mount_dokan_GetVolumeInformation"; + size_t name_size = 0; + int result = 0; + + FSHFSTOOLS_UNREFERENCED_PARAMETER( file_info ) + +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: %ls\n", + function, + volume_name ); + } +#endif + name = L"FSHFS"; + name_size = 1 + wide_string_length( + name ); + + if( ( volume_name != NULL ) + && ( volume_name_size > (DWORD) name_size ) ) + { + /* Using wcsncpy seems to cause strange behavior here + */ + if( memory_copy( + volume_name, + name, + name_size * sizeof( wchar_t ) ) == NULL ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_COPY_FAILED, + "%s: unable to copy volume name.", + function ); + + result = MOUNT_DOKAN_ERROR_GENERIC_FAILURE; + + goto on_error; + } + } + if( volume_serial_number != NULL ) + { + /* If this value contains 0 it can crash the system is this an issue in Dokan? + */ + *volume_serial_number = 0x19831116; + } + if( maximum_filename_length != NULL ) + { + *maximum_filename_length = 256; + } + if( file_system_flags != NULL ) + { + *file_system_flags = FILE_CASE_SENSITIVE_SEARCH + | FILE_CASE_PRESERVED_NAMES + | FILE_UNICODE_ON_DISK + | FILE_READ_ONLY_VOLUME; + } + name = L"Dokan"; + name_size = 1 + wide_string_length( + name ); + + if( ( file_system_name != NULL ) + && ( file_system_name_size > (DWORD) name_size ) ) + { + /* Using wcsncpy seems to cause strange behavior here + */ + if( memory_copy( + file_system_name, + name, + name_size * sizeof( wchar_t ) ) == NULL ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_COPY_FAILED, + "%s: unable to copy file system name.", + function ); + + result = MOUNT_DOKAN_ERROR_GENERIC_FAILURE; + + goto on_error; + } + } + return( 0 ); + +on_error: + if( error != NULL ) + { + libcnotify_print_error_backtrace( + error ); + libcerror_error_free( + &error ); + } + return( result ); +} + +#if ( DOKAN_VERSION >= 600 ) && ( DOKAN_VERSION < 800 ) + +/* Unmounts the volume + * Returns 0 if successful or an error code otherwise + */ +int __stdcall mount_dokan_Unmount( + DOKAN_FILE_INFO *file_info FSHFSTOOLS_ATTRIBUTE_UNUSED ) +{ + static char *function = "mount_dokan_Unmount"; + + FSHFSTOOLS_UNREFERENCED_PARAMETER( file_info ) + +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s\n", + function ); + } +#endif + return( 0 ); +} + +#endif /* ( DOKAN_VERSION >= 600 ) && ( DOKAN_VERSION < 800 ) */ + +#endif /* defined( HAVE_LIBDOKAN ) */ + diff -Nru libfshfs-20201104/fshfstools/mount_dokan.h libfshfs-20240221/fshfstools/mount_dokan.h --- libfshfs-20201104/fshfstools/mount_dokan.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/fshfstools/mount_dokan.h 2024-02-21 05:48:50.000000000 +0000 @@ -0,0 +1,171 @@ +/* + * Mount tool dokan functions + * + * Copyright (C) 2009-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _MOUNT_DOKAN_H ) +#define _MOUNT_DOKAN_H + +#include +#include + +#if defined( HAVE_LIBDOKAN ) +#include +#endif + +#include "fshfstools_libcerror.h" +#include "fshfstools_libfshfs.h" +#include "mount_file_entry.h" + +#if defined( __cplusplus ) +extern "C" { +#endif + +#if defined( HAVE_LIBDOKAN ) + +int mount_dokan_set_file_information( + BY_HANDLE_FILE_INFORMATION *file_information, + size64_t size, + uint16_t file_mode, + uint64_t creation_time, + uint64_t access_time, + uint64_t modification_time, + libcerror_error_t **error ); + +int mount_dokan_set_find_data( + WIN32_FIND_DATAW *find_data, + size64_t size, + uint16_t file_mode, + uint64_t creation_time, + uint64_t access_time, + uint64_t modification_time, + libcerror_error_t **error ); + +int mount_dokan_filldir( + PFillFindData fill_find_data, + DOKAN_FILE_INFO *file_info, + wchar_t *name, + size_t name_size, + WIN32_FIND_DATAW *find_data, + mount_file_entry_t *file_entry, + libcerror_error_t **error ); + +#if ( DOKAN_VERSION >= 600 ) && ( DOKAN_VERSION < 800 ) + +int __stdcall mount_dokan_CreateFile( + const wchar_t *path, + DWORD desired_access, + DWORD share_mode, + DWORD creation_disposition, + DWORD attribute_flags, + DOKAN_FILE_INFO *file_info ); + +int __stdcall mount_dokan_OpenDirectory( + const wchar_t *path, + DOKAN_FILE_INFO *file_info ); + +int __stdcall mount_dokan_CloseFile( + const wchar_t *path, + DOKAN_FILE_INFO *file_info ); + +int __stdcall mount_dokan_ReadFile( + const wchar_t *path, + void *buffer, + DWORD number_of_bytes_to_read, + DWORD *number_of_bytes_read, + LONGLONG offset, + DOKAN_FILE_INFO *file_info ); + +int __stdcall mount_dokan_FindFiles( + const wchar_t *path, + PFillFindData fill_find_data, + DOKAN_FILE_INFO *file_info ); + +int __stdcall mount_dokan_GetFileInformation( + const wchar_t *path, + BY_HANDLE_FILE_INFORMATION *file_information, + DOKAN_FILE_INFO *file_info ); + +int __stdcall mount_dokan_GetVolumeInformation( + wchar_t *volume_name, + DWORD volume_name_size, + DWORD *volume_serial_number, + DWORD *maximum_filename_length, + DWORD *file_system_flags, + wchar_t *file_system_name, + DWORD file_system_name_size, + DOKAN_FILE_INFO *file_info ); + +int __stdcall mount_dokan_Unmount( + DOKAN_FILE_INFO *file_info ); + +#else + +NTSTATUS __stdcall mount_dokan_ZwCreateFile( + const wchar_t *path, + DOKAN_IO_SECURITY_CONTEXT *security_context, + ACCESS_MASK desired_access, + ULONG file_attributes, + ULONG share_access, + ULONG creation_disposition, + ULONG creation_options, + DOKAN_FILE_INFO *file_info ); + +NTSTATUS __stdcall mount_dokan_CloseFile( + const wchar_t *path, + DOKAN_FILE_INFO *file_info ); + +NTSTATUS __stdcall mount_dokan_ReadFile( + const wchar_t *path, + void *buffer, + DWORD number_of_bytes_to_read, + DWORD *number_of_bytes_read, + LONGLONG offset, + DOKAN_FILE_INFO *file_info ); + +NTSTATUS __stdcall mount_dokan_FindFiles( + const wchar_t *path, + PFillFindData fill_find_data, + DOKAN_FILE_INFO *file_info ); + +NTSTATUS __stdcall mount_dokan_GetFileInformation( + const wchar_t *path, + BY_HANDLE_FILE_INFORMATION *file_information, + DOKAN_FILE_INFO *file_info ); + +NTSTATUS __stdcall mount_dokan_GetVolumeInformation( + wchar_t *volume_name, + DWORD volume_name_size, + DWORD *volume_serial_number, + DWORD *maximum_filename_length, + DWORD *file_system_flags, + wchar_t *file_system_name, + DWORD file_system_name_size, + DOKAN_FILE_INFO *file_info ); + +#endif /* ( DOKAN_VERSION >= 600 ) && ( DOKAN_VERSION < 800 ) */ + +#endif /* defined( HAVE_LIBDOKAN ) */ + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _MOUNT_DOKAN_H ) */ + diff -Nru libfshfs-20201104/fshfstools/mount_file_entry.c libfshfs-20240221/fshfstools/mount_file_entry.c --- libfshfs-20201104/fshfstools/mount_file_entry.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/fshfstools/mount_file_entry.c 2024-02-21 05:50:44.000000000 +0000 @@ -0,0 +1,1138 @@ +/* + * Mount file entry + * + * Copyright (C) 2009-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include +#include +#include +#include +#include + +#if defined( HAVE_SYS_STAT_H ) +#include +#endif + +#include "fshfstools_libcerror.h" +#include "fshfstools_libfshfs.h" +#include "mount_file_entry.h" +#include "mount_file_system.h" + +#if !defined( S_IFDIR ) +#define S_IFDIR 0x4000 +#endif + +#if !defined( S_IFREG ) +#define S_IFREG 0x8000 +#endif + +/* Creates a file entry + * Make sure the value file_entry is referencing, is set to NULL + * Returns 1 if successful or -1 on error + */ +int mount_file_entry_initialize( + mount_file_entry_t **file_entry, + mount_file_system_t *file_system, + const system_character_t *name, + size_t name_length, + libfshfs_file_entry_t *fshfs_file_entry, + libcerror_error_t **error ) +{ + static char *function = "mount_file_entry_initialize"; + + if( file_entry == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file entry.", + function ); + + return( -1 ); + } + if( *file_entry != NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, + "%s: invalid file entry value already set.", + function ); + + return( -1 ); + } + if( file_system == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file system.", + function ); + + return( -1 ); + } + if( name_length > (size_t) ( SSIZE_MAX - 1 ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid name length value exceeds maximum.", + function ); + + return( -1 ); + } + *file_entry = memory_allocate_structure( + mount_file_entry_t ); + + if( *file_entry == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_INSUFFICIENT, + "%s: unable to create file entry.", + function ); + + goto on_error; + } + if( memory_set( + *file_entry, + 0, + sizeof( mount_file_entry_t ) ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_SET_FAILED, + "%s: unable to clear file entry.", + function ); + + memory_free( + *file_entry ); + + *file_entry = NULL; + + return( -1 ); + } + ( *file_entry )->file_system = file_system; + + if( name != NULL ) + { + ( *file_entry )->name = system_string_allocate( + name_length + 1 ); + + if( ( *file_entry )->name == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_INSUFFICIENT, + "%s: unable to create name string.", + function ); + + goto on_error; + } + if( name_length > 0 ) + { + if( system_string_copy( + ( *file_entry )->name, + name, + name_length ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_COPY_FAILED, + "%s: unable to copy name.", + function ); + + goto on_error; + } + } + ( *file_entry )->name[ name_length ] = 0; + + ( *file_entry )->name_size = name_length + 1; + } + ( *file_entry )->fshfs_file_entry = fshfs_file_entry; + + return( 1 ); + +on_error: + if( *file_entry != NULL ) + { + if( ( *file_entry )->name != NULL ) + { + memory_free( + ( *file_entry )->name ); + } + memory_free( + *file_entry ); + + *file_entry = NULL; + } + return( -1 ); +} + +/* Frees a file entry + * Returns 1 if successful or -1 on error + */ +int mount_file_entry_free( + mount_file_entry_t **file_entry, + libcerror_error_t **error ) +{ + static char *function = "mount_file_entry_free"; + int result = 1; + + if( file_entry == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file entry.", + function ); + + return( -1 ); + } + if( *file_entry != NULL ) + { + if( ( *file_entry )->name != NULL ) + { + memory_free( + ( *file_entry )->name ); + } + if( libfshfs_file_entry_free( + &( ( *file_entry )->fshfs_file_entry ), + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free file entry.", + function ); + + result = -1; + } + memory_free( + *file_entry ); + + *file_entry = NULL; + } + return( result ); +} + +/* Retrieves the parent file entry + * Returns 1 if successful, 0 if no such file entry or -1 on error + */ +int mount_file_entry_get_parent_file_entry( + mount_file_entry_t *file_entry, + mount_file_entry_t **parent_file_entry, + libcerror_error_t **error ) +{ + libfshfs_file_entry_t *parent_fshfs_file_entry = NULL; + system_character_t *filename = NULL; + static char *function = "mount_file_entry_get_parent_file_entry"; + size_t filename_size = 0; + int result = 0; + + if( file_entry == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file entry.", + function ); + + return( -1 ); + } + if( parent_file_entry == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid parent file entry.", + function ); + + return( -1 ); + } + if( *parent_file_entry != NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, + "%s: invalid parent file entry value already set.", + function ); + + return( -1 ); + } + result = libfshfs_file_entry_get_parent_file_entry( + file_entry->fshfs_file_entry, + &parent_fshfs_file_entry, + error ); + + if( result == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve parent file entry.", + function ); + + return( -1 ); + } + else if( result != 0 ) + { + if( mount_file_system_get_filename_from_file_entry( + file_entry->file_system, + parent_fshfs_file_entry, + &filename, + &filename_size, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve filename of parent file entry.", + function ); + + goto on_error; + } + if( mount_file_entry_initialize( + parent_file_entry, + file_entry->file_system, + filename, + filename_size - 1, + parent_fshfs_file_entry, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to initialize parent file entry.", + function ); + + goto on_error; + } + } + if( filename != NULL ) + { + memory_free( + filename ); + } + return( result ); + +on_error: + if( filename != NULL ) + { + memory_free( + filename ); + } + if( parent_fshfs_file_entry != NULL ) + { + libfshfs_file_entry_free( + &parent_fshfs_file_entry, + NULL ); + } + return( -1 ); +} + +/* Retrieves the creation date and time + * On Windows the timestamp is an unsigned 64-bit FILETIME timestamp + * otherwise the timestamp is a signed 64-bit POSIX date and time value in number of nanoseconds + * Returns 1 if successful or -1 on error + */ +int mount_file_entry_get_creation_time( + mount_file_entry_t *file_entry, + uint64_t *creation_time, + libcerror_error_t **error ) +{ + static char *function = "mount_file_entry_get_creation_time"; + uint32_t hfs_time = 0; + +#if defined( WINAPI ) + uint64_t filetime = 0; +#else + uint64_t posix_time = 0; +#endif + + if( file_entry == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file entry.", + function ); + + return( -1 ); + } + if( creation_time == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid creation time.", + function ); + + return( -1 ); + } + if( libfshfs_file_entry_get_creation_time( + file_entry->fshfs_file_entry, + &hfs_time, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve creation time from file entry.", + function ); + + return( -1 ); + } +#if defined( WINAPI ) + if( hfs_time != 0 ) + { + /* Convert the HFS timestamp into a FILETIME timestamp + */ + filetime = ( (uint64_t) hfs_time * 10000000 ) + 116444733917155200L; + } + *creation_time = filetime; +#else + if( hfs_time != 0 ) + { + /* Convert the HFS timestamp into a POSIX nanoseconds timestamp + */ + posix_time = (uint64_t) ( (int64_t) hfs_time - 2082844800 ); + } + *creation_time = posix_time; +#endif + return( 1 ); +} + +/* Retrieves the access date and time + * On Windows the timestamp is an unsigned 64-bit FILETIME timestamp + * otherwise the timestamp is a signed 64-bit POSIX date and time value in number of nanoseconds + * Returns 1 if successful or -1 on error + */ +int mount_file_entry_get_access_time( + mount_file_entry_t *file_entry, + uint64_t *access_time, + libcerror_error_t **error ) +{ + static char *function = "mount_file_entry_get_access_time"; + uint32_t hfs_time = 0; + +#if defined( WINAPI ) + uint64_t filetime = 0; +#else + uint64_t posix_time = 0; +#endif + + if( file_entry == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file entry.", + function ); + + return( -1 ); + } + if( access_time == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid access time.", + function ); + + return( -1 ); + } + if( libfshfs_file_entry_get_access_time( + file_entry->fshfs_file_entry, + &hfs_time, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve access time from file entry.", + function ); + + return( -1 ); + } +#if defined( WINAPI ) + if( hfs_time != 0 ) + { + /* Convert the POSIX nanoseconds timestamp into a FILETIME timestamp + */ + filetime = ( (uint64_t) hfs_time * 10000000 ) + 116444733917155200L; + } + *access_time = filetime; +#else + if( hfs_time != 0 ) + { + /* Convert the HFS timestamp into a POSIX nanoseconds timestamp + */ + posix_time = (uint64_t) ( (int64_t) hfs_time - 2082844800 ); + } + *access_time = posix_time; +#endif + return( 1 ); +} + +/* Retrieves the modification date and time + * On Windows the timestamp is an unsigned 64-bit FILETIME timestamp + * otherwise the timestamp is a signed 64-bit POSIX date and time value in number of nanoseconds + * Returns 1 if successful or -1 on error + */ +int mount_file_entry_get_modification_time( + mount_file_entry_t *file_entry, + uint64_t *modification_time, + libcerror_error_t **error ) +{ + static char *function = "mount_file_entry_get_modification_time"; + uint32_t hfs_time = 0; + +#if defined( WINAPI ) + uint64_t filetime = 0; +#else + uint64_t posix_time = 0; +#endif + + if( file_entry == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file entry.", + function ); + + return( -1 ); + } + if( modification_time == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid modification time.", + function ); + + return( -1 ); + } + if( libfshfs_file_entry_get_modification_time( + file_entry->fshfs_file_entry, + &hfs_time, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve modification time from file entry.", + function ); + + return( -1 ); + } +#if defined( WINAPI ) + if( hfs_time != 0 ) + { + /* Convert the POSIX nanoseconds timestamp into a FILETIME timestamp + */ + filetime = ( (uint64_t) hfs_time * 10000000 ) + 116444733917155200L; + } + *modification_time = filetime; +#else + if( hfs_time != 0 ) + { + /* Convert the HFS timestamp into a POSIX nanoseconds timestamp + */ + posix_time = (uint64_t) ( (int64_t) hfs_time - 2082844800 ); + } + *modification_time = posix_time; +#endif + return( 1 ); +} + +/* Retrieves the inode change date and time + * On Windows the timestamp is an unsigned 64-bit FILETIME timestamp + * otherwise the timestamp is a signed 64-bit POSIX date and time value in number of nanoseconds + * Returns 1 if successful or -1 on error + */ +int mount_file_entry_get_inode_change_time( + mount_file_entry_t *file_entry, + uint64_t *inode_change_time, + libcerror_error_t **error ) +{ + static char *function = "mount_file_entry_get_inode_change_time"; + uint32_t hfs_time = 0; + +#if defined( WINAPI ) + uint64_t filetime = 0; +#else + uint64_t posix_time = 0; +#endif + + if( file_entry == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file entry.", + function ); + + return( -1 ); + } + if( inode_change_time == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid inode change time.", + function ); + + return( -1 ); + } + if( libfshfs_file_entry_get_entry_modification_time( + file_entry->fshfs_file_entry, + &hfs_time, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve entry modification time from file entry.", + function ); + + return( -1 ); + } +#if defined( WINAPI ) + if( hfs_time != 0 ) + { + /* Convert the POSIX nanoseconds timestamp into a FILETIME timestamp + */ + filetime = ( (uint64_t) hfs_time * 10000000 ) + 116444733917155200L; + } + *inode_change_time = filetime; +#else + if( hfs_time != 0 ) + { + /* Convert the HFS timestamp into a POSIX nanoseconds timestamp + */ + posix_time = (uint64_t) ( (int64_t) hfs_time - 2082844800 ); + } + *inode_change_time = posix_time; +#endif + return( 1 ); +} + +/* Retrieves the file mode + * Returns 1 if successful or -1 on error + */ +int mount_file_entry_get_file_mode( + mount_file_entry_t *file_entry, + uint16_t *file_mode, + libcerror_error_t **error ) +{ + static char *function = "mount_file_entry_get_file_mode"; + + if( file_entry == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file entry.", + function ); + + return( -1 ); + } + if( file_mode == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file mode.", + function ); + + return( -1 ); + } + if( libfshfs_file_entry_get_file_mode( + file_entry->fshfs_file_entry, + file_mode, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve file mode.", + function ); + + return( -1 ); + } + /* The HFS file mode matches that of POSIX + */ + if( ( *file_mode & 0xf000 ) == 0xe000 ) + { + *file_mode = S_IFREG | ( *file_mode & 0x0fff ); + } + return( 1 ); +} + +/* Retrieves the size of the name + * The returned size includes the end of string character + * Returns 1 if successful or -1 on error + */ +int mount_file_entry_get_name_size( + mount_file_entry_t *file_entry, + size_t *string_size, + libcerror_error_t **error ) +{ + static char *function = "mount_file_entry_get_name_size"; + + if( file_entry == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file entry.", + function ); + + return( -1 ); + } + if( string_size == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid string size.", + function ); + + return( -1 ); + } + *string_size = file_entry->name_size; + + return( 1 ); +} + +/* Retrieves the name + * The size should include the end of string character + * Returns 1 if successful or -1 on error + */ +int mount_file_entry_get_name( + mount_file_entry_t *file_entry, + system_character_t *string, + size_t string_size, + libcerror_error_t **error ) +{ + static char *function = "mount_file_entry_get_name"; + + if( file_entry == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file entry.", + function ); + + return( -1 ); + } + if( file_entry->name == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, + "%s: invalid file entry - missing name.", + function ); + + return( -1 ); + } + if( string == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid string.", + function ); + + return( -1 ); + } + if( string_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid string size value exceeds maximum.", + function ); + + return( -1 ); + } + if( string_size < file_entry->name_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: invalid string size value too small.", + function ); + + return( -1 ); + } + if( system_string_copy( + string, + file_entry->name, + file_entry->name_size ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_COPY_FAILED, + "%s: unable to copy name.", + function ); + + return( -1 ); + } + string[ file_entry->name_size - 1 ] = 0; + + return( 1 ); +} + +/* Retrieves the symbolic link target + * The size should include the end of string character + * Returns 1 if successful or -1 on error + */ +int mount_file_entry_get_symbolic_link_target( + mount_file_entry_t *file_entry, + system_character_t *string, + size_t string_size, + libcerror_error_t **error ) +{ + static char *function = "mount_file_entry_get_symbolic_link_target"; + int result = 0; + + if( file_entry == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file entry.", + function ); + + return( -1 ); + } +#if defined( HAVE_WIDE_SYSTEM_CHARACTER ) + result = libfshfs_file_entry_get_utf16_symbolic_link_target( + file_entry->fshfs_file_entry, + (uint16_t *) string, + string_size, + error ); +#else + result = libfshfs_file_entry_get_utf8_symbolic_link_target( + file_entry->fshfs_file_entry, + (uint8_t *) string, + string_size, + error ); +#endif + if( result != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve symbolic link target string.", + function ); + + return( -1 ); + } + return( 1 ); +} + +/* Retrieves the number of sub file entries + * Returns 1 if successful or -1 on error + */ +int mount_file_entry_get_number_of_sub_file_entries( + mount_file_entry_t *file_entry, + int *number_of_sub_file_entries, + libcerror_error_t **error ) +{ + static char *function = "mount_file_entry_get_number_of_sub_file_entries"; + + if( file_entry == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file entry.", + function ); + + return( -1 ); + } + if( libfshfs_file_entry_get_number_of_sub_file_entries( + file_entry->fshfs_file_entry, + number_of_sub_file_entries, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve number of sub file entries.", + function ); + + return( -1 ); + } + return( 1 ); +} + +/* Retrieves the sub file entry for the specific index + * Returns 1 if successful or -1 on error + */ +int mount_file_entry_get_sub_file_entry_by_index( + mount_file_entry_t *file_entry, + int sub_file_entry_index, + mount_file_entry_t **sub_file_entry, + libcerror_error_t **error ) +{ + libfshfs_file_entry_t *sub_fshfs_file_entry = NULL; + system_character_t *filename = NULL; + static char *function = "mount_file_entry_get_sub_file_entry_by_index"; + size_t filename_size = 0; + + if( file_entry == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file entry.", + function ); + + return( -1 ); + } + if( sub_file_entry == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid sub file entry.", + function ); + + return( -1 ); + } + if( *sub_file_entry != NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, + "%s: invalid sub file entry value already set.", + function ); + + return( -1 ); + } + if( libfshfs_file_entry_get_sub_file_entry_by_index( + file_entry->fshfs_file_entry, + sub_file_entry_index, + &sub_fshfs_file_entry, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve sub file entry: %d.", + function, + sub_file_entry_index ); + + goto on_error; + } + if( mount_file_system_get_filename_from_file_entry( + file_entry->file_system, + sub_fshfs_file_entry, + &filename, + &filename_size, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve filename of sub file entry: %d.", + function, + sub_file_entry_index ); + + goto on_error; + } + if( mount_file_entry_initialize( + sub_file_entry, + file_entry->file_system, + filename, + filename_size - 1, + sub_fshfs_file_entry, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to initialize sub file entry: %d.", + function, + sub_file_entry_index ); + + goto on_error; + } + if( filename != NULL ) + { + memory_free( + filename ); + } + return( 1 ); + +on_error: + if( filename != NULL ) + { + memory_free( + filename ); + } + if( sub_fshfs_file_entry != NULL ) + { + libfshfs_file_entry_free( + &sub_fshfs_file_entry, + NULL ); + } + return( -1 ); +} + +/* Reads data at a specific offset + * Returns the number of bytes read or -1 on error + */ +ssize_t mount_file_entry_read_buffer_at_offset( + mount_file_entry_t *file_entry, + void *buffer, + size_t buffer_size, + off64_t offset, + libcerror_error_t **error ) +{ + static char *function = "mount_file_entry_read_buffer_at_offset"; + ssize_t read_count = 0; + + if( file_entry == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file entry.", + function ); + + return( -1 ); + } + read_count = libfshfs_file_entry_read_buffer_at_offset( + file_entry->fshfs_file_entry, + buffer, + buffer_size, + offset, + error ); + + if( read_count < 0 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_READ_FAILED, + "%s: unable to read buffer at offset: %" PRIi64 " (0x%08" PRIx64 ") from file entry.", + function, + offset, + offset ); + + return( -1 ); + } + return( read_count ); +} + +/* Retrieves the size + * Returns 1 if successful or -1 on error + */ +int mount_file_entry_get_size( + mount_file_entry_t *file_entry, + size64_t *size, + libcerror_error_t **error ) +{ + static char *function = "mount_file_entry_get_size"; + + if( file_entry == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file entry.", + function ); + + return( -1 ); + } + if( libfshfs_file_entry_get_size( + file_entry->fshfs_file_entry, + size, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve size from file entry.", + function ); + + return( -1 ); + } + return( 1 ); +} + diff -Nru libfshfs-20201104/fshfstools/mount_file_entry.h libfshfs-20240221/fshfstools/mount_file_entry.h --- libfshfs-20201104/fshfstools/mount_file_entry.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/fshfstools/mount_file_entry.h 2024-02-21 05:50:44.000000000 +0000 @@ -0,0 +1,144 @@ +/* + * Mount file entry + * + * Copyright (C) 2009-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _MOUNT_FILE_ENTRY_H ) +#define _MOUNT_FILE_ENTRY_H + +#include +#include + +#include "fshfstools_libcerror.h" +#include "fshfstools_libfshfs.h" +#include "mount_file_system.h" + +#if defined( __cplusplus ) +extern "C" { +#endif + +typedef struct mount_file_entry mount_file_entry_t; + +struct mount_file_entry +{ + /* The file system + */ + mount_file_system_t *file_system; + + /* The name + */ + system_character_t *name; + + /* The name size + */ + size_t name_size; + + /* The file entry + */ + libfshfs_file_entry_t *fshfs_file_entry; +}; + +int mount_file_entry_initialize( + mount_file_entry_t **file_entry, + mount_file_system_t *file_system, + const system_character_t *name, + size_t name_length, + libfshfs_file_entry_t *fshfs_file_entry, + libcerror_error_t **error ); + +int mount_file_entry_free( + mount_file_entry_t **file_entry, + libcerror_error_t **error ); + +int mount_file_entry_get_parent_file_entry( + mount_file_entry_t *file_entry, + mount_file_entry_t **parent_file_entry, + libcerror_error_t **error ); + +int mount_file_entry_get_creation_time( + mount_file_entry_t *file_entry, + uint64_t *creation_time, + libcerror_error_t **error ); + +int mount_file_entry_get_access_time( + mount_file_entry_t *file_entry, + uint64_t *access_time, + libcerror_error_t **error ); + +int mount_file_entry_get_modification_time( + mount_file_entry_t *file_entry, + uint64_t *modification_time, + libcerror_error_t **error ); + +int mount_file_entry_get_inode_change_time( + mount_file_entry_t *file_entry, + uint64_t *inode_change_time, + libcerror_error_t **error ); + +int mount_file_entry_get_file_mode( + mount_file_entry_t *file_entry, + uint16_t *file_mode, + libcerror_error_t **error ); + +int mount_file_entry_get_name_size( + mount_file_entry_t *file_entry, + size_t *string_size, + libcerror_error_t **error ); + +int mount_file_entry_get_name( + mount_file_entry_t *file_entry, + system_character_t *string, + size_t string_size, + libcerror_error_t **error ); + +int mount_file_entry_get_symbolic_link_target( + mount_file_entry_t *file_entry, + system_character_t *string, + size_t string_size, + libcerror_error_t **error ); + +int mount_file_entry_get_number_of_sub_file_entries( + mount_file_entry_t *file_entry, + int *number_of_sub_entries, + libcerror_error_t **error ); + +int mount_file_entry_get_sub_file_entry_by_index( + mount_file_entry_t *file_entry, + int sub_file_entry_index, + mount_file_entry_t **sub_file_entry, + libcerror_error_t **error ); + +ssize_t mount_file_entry_read_buffer_at_offset( + mount_file_entry_t *file_entry, + void *buffer, + size_t buffer_size, + off64_t offset, + libcerror_error_t **error ); + +int mount_file_entry_get_size( + mount_file_entry_t *file_entry, + size64_t *size, + libcerror_error_t **error ); + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _MOUNT_FILE_ENTRY_H ) */ + diff -Nru libfshfs-20201104/fshfstools/mount_file_system.c libfshfs-20240221/fshfstools/mount_file_system.c --- libfshfs-20201104/fshfstools/mount_file_system.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/fshfstools/mount_file_system.c 2024-02-21 05:50:44.000000000 +0000 @@ -0,0 +1,1277 @@ +/* + * Mount file system + * + * Copyright (C) 2009-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include +#include +#include +#include +#include + +#if defined( HAVE_SYS_STAT_H ) +#include +#endif + +#if defined( HAVE_SYS_TIME_H ) +#include +#endif + +#include + +#include "fshfstools_libcerror.h" +#include "fshfstools_libcpath.h" +#include "fshfstools_libfshfs.h" +#include "fshfstools_libuna.h" +#include "mount_file_system.h" + +/* Creates a file system + * Make sure the value file_system is referencing, is set to NULL + * Returns 1 if successful or -1 on error + */ +int mount_file_system_initialize( + mount_file_system_t **file_system, + libcerror_error_t **error ) +{ +#if defined( WINAPI ) + FILETIME filetime; + SYSTEMTIME systemtime; + +#elif defined( HAVE_CLOCK_GETTIME ) + struct timespec time_structure; +#endif + + static char *function = "mount_file_system_initialize"; + +#if defined( WINAPI ) + DWORD error_code = 0; +#else + int64_t timestamp = 0; +#endif + + if( file_system == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file system.", + function ); + + return( -1 ); + } + if( *file_system != NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, + "%s: invalid file system value already set.", + function ); + + return( -1 ); + } + *file_system = memory_allocate_structure( + mount_file_system_t ); + + if( *file_system == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_INSUFFICIENT, + "%s: unable to create file system.", + function ); + + goto on_error; + } + if( memory_set( + *file_system, + 0, + sizeof( mount_file_system_t ) ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_SET_FAILED, + "%s: unable to clear file system.", + function ); + + memory_free( + *file_system ); + + *file_system = NULL; + + return( -1 ); + } +#if defined( WINAPI ) + if( memory_set( + &systemtime, + 0, + sizeof( SYSTEMTIME ) ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_SET_FAILED, + "%s: unable to clear systemtime.", + function ); + + goto on_error; + } + GetSystemTime( + &systemtime ); + + if( SystemTimeToFileTime( + &systemtime, + &filetime ) == 0 ) + { + error_code = GetLastError(); + + libcerror_system_set_error( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + error_code, + "%s: unable to retrieve FILETIME of current time.", + function ); + + goto on_error; + } + ( *file_system )->mounted_timestamp = ( (uint64_t) filetime.dwHighDateTime << 32 ) | filetime.dwLowDateTime; + +#elif defined( HAVE_CLOCK_GETTIME ) + if( clock_gettime( + CLOCK_REALTIME, + &time_structure ) != 0 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve current time structure.", + function ); + + goto on_error; + } + timestamp = ( (int64_t) time_structure.tv_sec * 1000000000 ) + time_structure.tv_nsec; + + ( *file_system )->mounted_timestamp = (uint64_t) timestamp; + +#else + timestamp = (int64_t) time( NULL ); + + if( timestamp == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve current time.", + function ); + + goto on_error; + } + timestamp *= 1000000000; + + ( *file_system )->mounted_timestamp = (uint64_t) timestamp; + +#endif /* defined( HAVE_CLOCK_GETTIME ) */ + + return( 1 ); + +on_error: + if( *file_system != NULL ) + { + memory_free( + *file_system ); + + *file_system = NULL; + } + return( -1 ); +} + +/* Frees a file system + * Returns 1 if successful or -1 on error + */ +int mount_file_system_free( + mount_file_system_t **file_system, + libcerror_error_t **error ) +{ + static char *function = "mount_file_system_free"; + int result = 1; + + if( file_system == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file system.", + function ); + + return( -1 ); + } + if( *file_system != NULL ) + { + memory_free( + *file_system ); + + *file_system = NULL; + } + return( result ); +} + +/* Signals the mount volume system to abort + * Returns 1 if successful or -1 on error + */ +int mount_file_system_signal_abort( + mount_file_system_t *file_system, + libcerror_error_t **error ) +{ + static char *function = "mount_file_system_signal_abort"; + + if( file_system == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file system.", + function ); + + return( -1 ); + } +/* TODO implement */ + return( 1 ); +} + +/* Sets the volume + * Returns 1 if successful or -1 on error + */ +int mount_file_system_set_volume( + mount_file_system_t *file_system, + libfshfs_volume_t *fshfs_volume, + libcerror_error_t **error ) +{ + static char *function = "mount_file_system_set_volume"; + + if( file_system == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file system.", + function ); + + return( -1 ); + } + file_system->fshfs_volume = fshfs_volume; + + return( 1 ); +} + +/* Retrieves the volume + * Returns 1 if successful or -1 on error + */ +int mount_file_system_get_volume( + mount_file_system_t *file_system, + libfshfs_volume_t **fshfs_volume, + libcerror_error_t **error ) +{ + static char *function = "mount_file_system_get_volume"; + + if( file_system == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file system.", + function ); + + return( -1 ); + } + if( fshfs_volume == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid volume.", + function ); + + return( -1 ); + } + *fshfs_volume = file_system->fshfs_volume; + + return( 1 ); +} + +/* Retrieves the mounted timestamp + * On Windows the timestamp is an unsigned 64-bit FILETIME timestamp + * otherwise the timestamp is a signed 64-bit POSIX date and time value in number of nanoseconds + * Returns 1 if successful or -1 on error + */ +int mount_file_system_get_mounted_timestamp( + mount_file_system_t *file_system, + uint64_t *mounted_timestamp, + libcerror_error_t **error ) +{ + static char *function = "mount_file_system_get_mounted_timestamp"; + + if( file_system == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file system.", + function ); + + return( -1 ); + } + if( mounted_timestamp == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid mounted timestamp.", + function ); + + return( -1 ); + } + *mounted_timestamp = file_system->mounted_timestamp; + + return( 1 ); +} + +/* Retrieves the file entry path from the path + * Returns 1 if successful or -1 on error + */ +int mount_file_system_get_file_entry_path_from_path( + mount_file_system_t *file_system, + const system_character_t *path, + size_t path_length, + system_character_t **file_entry_path, + size_t *file_entry_path_size, + libcerror_error_t **error ) +{ + system_character_t *safe_file_entry_path = NULL; + static char *function = "mount_file_system_get_file_entry_path_from_path"; + libuna_unicode_character_t unicode_character = 0; + system_character_t character = 0; + system_character_t escape_character = 0; + system_character_t hex_digit = 0; + system_character_t hex_value = 0; + size_t file_entry_path_index = 0; + size_t path_index = 0; + size_t safe_file_entry_path_size = 0; + int result = 0; + + if( file_system == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file system.", + function ); + + return( -1 ); + } + if( path == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid path.", + function ); + + return( -1 ); + } + if( path_length == 0 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid path length.", + function ); + + return( -1 ); + } + if( path_length > (size_t) ( SSIZE_MAX - 1 ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid path length value exceeds maximum.", + function ); + + return( -1 ); + } + if( file_entry_path == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file entry path.", + function ); + + return( -1 ); + } + if( file_entry_path_size == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file entry path size.", + function ); + + return( -1 ); + } + if( path[ 0 ] != (system_character_t) LIBCPATH_SEPARATOR ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, + "%s: unsupported path - path is not absolute.", + function ); + + return( -1 ); + } + *file_entry_path = NULL; + *file_entry_path_size = 0; + + safe_file_entry_path_size = path_length + 1; + + if( safe_file_entry_path_size > (size_t) ( MEMORY_MAXIMUM_ALLOCATION_SIZE / sizeof( system_character_t ) ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid file entry path size value exceeds maximum.", + function ); + + goto on_error; + } + safe_file_entry_path = system_string_allocate( + safe_file_entry_path_size ); + + if( safe_file_entry_path == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_INSUFFICIENT, + "%s: unable to create file entry path.", + function ); + + goto on_error; + } +#if defined( WINAPI ) + escape_character = (system_character_t) '^'; +#else + escape_character = (system_character_t) '\\'; +#endif + + while( path_index < path_length ) + { +#if defined( HAVE_WIDE_SYSTEM_CHARACTER ) + result = libuna_unicode_character_copy_from_utf16( + &unicode_character, + (libuna_utf16_character_t *) path, + path_length, + &path_index, + error ); +#else + result = libuna_unicode_character_copy_from_utf8( + &unicode_character, + (libuna_utf8_character_t *) path, + path_length, + &path_index, + error ); +#endif + if( result != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_CONVERSION, + LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, + "%s: unable to copy Unicode character from path.", + function ); + + goto on_error; + } + /* On Windows replaces: + * ^^ by ^ + * ^x5c by \ + * ^x## by values <= 0x1f and 0x7f + * + * On other platforms replaces: + * \\ by \ + * \x2f by / + * \x## by values <= 0x1f and 0x7f + * / by \ + */ + if( unicode_character == (libuna_unicode_character_t) escape_character ) + { + if( ( path_index + 1 ) > path_length ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid path index value out of bounds.", + function ); + + goto on_error; + } + character = path[ path_index++ ]; + +#if defined( WINAPI ) + if( ( character != escape_character ) + && ( character != (system_character_t) 'X' ) + && ( character != (system_character_t) 'x' ) ) +#else + if( ( character != escape_character ) + && ( character != (system_character_t) 'x' ) ) +#endif + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, + "%s: unsupported path - invalid character: %" PRIc_SYSTEM " after escape character.", + function, + character ); + + goto on_error; + } + if( character == escape_character ) + { + if( ( file_entry_path_index + 1 ) > safe_file_entry_path_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid file entry path index value out of bounds.", + function ); + + goto on_error; + } + safe_file_entry_path[ file_entry_path_index++ ] = escape_character; + } + else + { + if( ( path_index + 2 ) > path_length ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid path index value out of bounds.", + function ); + + goto on_error; + } + hex_digit = path[ path_index++ ]; + + if( ( hex_digit >= (system_character_t) '0' ) + && ( hex_digit <= (system_character_t) '9' ) ) + { + hex_value = hex_digit - (system_character_t) '0'; + } +#if defined( WINAPI ) + else if( ( hex_digit >= (system_character_t) 'A' ) + && ( hex_digit <= (system_character_t) 'F' ) ) + { + hex_value = hex_digit - (system_character_t) 'A' + 10; + } +#endif + else if( ( hex_digit >= (system_character_t) 'a' ) + && ( hex_digit <= (system_character_t) 'f' ) ) + { + hex_value = hex_digit - (system_character_t) 'a' + 10; + } + else + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, + "%s: unsupported path - invalid hexadecimal character: %" PRIc_SYSTEM " after escape character.", + function, + hex_digit ); + + goto on_error; + } + hex_value <<= 4; + + hex_digit = path[ path_index++ ]; + + if( ( hex_digit >= (system_character_t) '0' ) + && ( hex_digit <= (system_character_t) '9' ) ) + { + hex_value |= hex_digit - (system_character_t) '0'; + } +#if defined( WINAPI ) + else if( ( hex_digit >= (system_character_t) 'A' ) + && ( hex_digit <= (system_character_t) 'F' ) ) + { + hex_value = hex_digit - (system_character_t) 'A' + 10; + } +#endif + else if( ( hex_digit >= (system_character_t) 'a' ) + && ( hex_digit <= (system_character_t) 'f' ) ) + { + hex_value |= hex_digit - (system_character_t) 'a' + 10; + } + else + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, + "%s: unsupported path - invalid hexadecimal character: %" PRIc_SYSTEM " after escape character.", + function, + hex_digit ); + + goto on_error; + } +#if defined( WINAPI ) + if( ( hex_value == 0 ) + || ( ( hex_value > 0x1f ) + && ( hex_value != 0x5c ) + && ( hex_value != 0x7f ) ) ) +#else + if( ( hex_value == 0 ) + || ( ( hex_value > 0x1f ) + && ( hex_value != 0x2f ) + && ( hex_value != 0x7f ) ) ) +#endif + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid escaped character value out of bounds.", + function ); + + goto on_error; + } + if( ( file_entry_path_index + 1 ) > safe_file_entry_path_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid file entry path index value out of bounds.", + function ); + + goto on_error; + } + safe_file_entry_path[ file_entry_path_index++ ] = hex_value; + } + } +#if !defined( WINAPI ) + else if( unicode_character == (system_character_t) '\\' ) + { + if( ( file_entry_path_index + 1 ) > safe_file_entry_path_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid file entry path index value out of bounds.", + function ); + + goto on_error; + } + safe_file_entry_path[ file_entry_path_index++ ] = (system_character_t) '\\'; + } +#endif + else + { +#if defined( HAVE_WIDE_SYSTEM_CHARACTER ) + result = libuna_unicode_character_copy_to_utf16( + unicode_character, + (libuna_utf16_character_t *) safe_file_entry_path, + safe_file_entry_path_size, + &file_entry_path_index, + error ); +#else + result = libuna_unicode_character_copy_to_utf8( + unicode_character, + (libuna_utf8_character_t *) safe_file_entry_path, + safe_file_entry_path_size, + &file_entry_path_index, + error ); +#endif + if( result != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_CONVERSION, + LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, + "%s: unable to copy Unicode character to file entry path.", + function ); + + goto on_error; + } + } + } + if( file_entry_path_index >= safe_file_entry_path_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid file entry path index value out of bounds.", + function ); + + goto on_error; + } + safe_file_entry_path[ file_entry_path_index ] = 0; + + *file_entry_path = safe_file_entry_path; + *file_entry_path_size = safe_file_entry_path_size; + + return( 1 ); + +on_error: + if( safe_file_entry_path != NULL ) + { + memory_free( + safe_file_entry_path ); + } + return( -1 ); +} +/* Retrieves the file entry of a specific path + * Returns 1 if successful, 0 if no such file entry or -1 on error + */ +int mount_file_system_get_file_entry_by_path( + mount_file_system_t *file_system, + const system_character_t *path, + size_t path_length, + libfshfs_file_entry_t **fshfs_file_entry, + libcerror_error_t **error ) +{ + system_character_t *file_entry_path = NULL; + static char *function = "mount_file_system_get_file_entry_by_path"; + size_t file_entry_path_length = 0; + size_t file_entry_path_size = 0; + int result = 0; + + if( file_system == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file system.", + function ); + + return( -1 ); + } + if( mount_file_system_get_file_entry_path_from_path( + file_system, + path, + path_length, + &file_entry_path, + &file_entry_path_size, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve file entry path from path.", + function ); + + goto on_error; + } + if( file_entry_path == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, + "%s: missing file entry path.", + function ); + + goto on_error; + } + /* Need to determine length here since size is based on the worst case + */ + file_entry_path_length = system_string_length( + file_entry_path ); + +#if defined( HAVE_WIDE_SYSTEM_CHARACTER ) + result = libfshfs_volume_get_file_entry_by_utf16_path( + file_system->fshfs_volume, + (uint16_t *) file_entry_path, + file_entry_path_length, + fshfs_file_entry, + error ); +#else + result = libfshfs_volume_get_file_entry_by_utf8_path( + file_system->fshfs_volume, + (uint8_t *) file_entry_path, + file_entry_path_length, + fshfs_file_entry, + error ); +#endif + if( result == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve file entry ", + function ); + + goto on_error; + } + memory_free( + file_entry_path ); + + return( result ); + +on_error: + if( file_entry_path != NULL ) + { + memory_free( + file_entry_path ); + } + return( -1 ); +} + +/* Retrieves a filename from the name + * Returns 1 if successful or -1 on error + */ +int mount_file_system_get_filename_from_name( + mount_file_system_t *file_system, + const system_character_t *name, + size_t name_length, + system_character_t **filename, + size_t *filename_size, + libcerror_error_t **error ) +{ + system_character_t *safe_filename = NULL; + static char *function = "mount_file_system_get_filename_from_name"; + libuna_unicode_character_t unicode_character = 0; + system_character_t escape_character = 0; + system_character_t hex_digit = 0; + size_t filename_index = 0; + size_t name_index = 0; + size_t safe_filename_size = 0; + int result = 0; + + if( file_system == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file system.", + function ); + + return( -1 ); + } + if( name == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid name.", + function ); + + return( -1 ); + } + if( name_length > (size_t) ( SSIZE_MAX - 1 ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid name length value exceeds maximum.", + function ); + + return( -1 ); + } + if( filename == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid filename.", + function ); + + return( -1 ); + } + if( filename_size == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid filename size.", + function ); + + return( -1 ); + } + *filename = NULL; + *filename_size = 0; + + safe_filename_size = ( name_length * 4 ) + 1; + + if( safe_filename_size > (size_t) ( MEMORY_MAXIMUM_ALLOCATION_SIZE / sizeof( system_character_t ) ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid filename size value exceeds maximum.", + function ); + + goto on_error; + } + safe_filename = system_string_allocate( + safe_filename_size ); + + if( safe_filename == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_INSUFFICIENT, + "%s: unable to create filename.", + function ); + + goto on_error; + } +#if defined( WINAPI ) + escape_character = (system_character_t) '^'; +#else + escape_character = (system_character_t) '\\'; +#endif + + while( name_index < name_length ) + { +#if defined( HAVE_WIDE_SYSTEM_CHARACTER ) + result = libuna_unicode_character_copy_from_utf16( + &unicode_character, + (libuna_utf16_character_t *) name, + name_length, + &name_index, + error ); +#else + result = libuna_unicode_character_copy_from_utf8( + &unicode_character, + (libuna_utf8_character_t *) name, + name_length, + &name_index, + error ); +#endif + if( result != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_CONVERSION, + LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, + "%s: unable to copy Unicode character from name.", + function ); + + goto on_error; + } + if( unicode_character == 0 ) + { + break; + } + /* On Windows replaces: + * values <= 0x1f and 0x7f by ^x## + * \ by ^x5c + * ^ by ^^ + * + * On other platforms replaces: + * values <= 0x1f and 0x7f by \x## + * / by \x2f + * \ by \\ + */ +#if defined( WINAPI ) + if( ( unicode_character <= 0x1f ) + || ( unicode_character == 0x5c ) + || ( unicode_character == 0x7f ) ) +#else + if( ( unicode_character <= 0x1f ) + || ( unicode_character == 0x2f ) + || ( unicode_character == 0x7f ) ) +#endif + { + if( ( filename_index + 4 ) > safe_filename_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid filename index value out of bounds.", + function ); + + goto on_error; + } + safe_filename[ filename_index++ ] = escape_character; + safe_filename[ filename_index++ ] = (system_character_t) 'x'; + + hex_digit = unicode_character >> 4; + + if( hex_digit <= 0x09 ) + { + safe_filename[ filename_index++ ] = (system_character_t) '0' + hex_digit; + } + else + { + safe_filename[ filename_index++ ] = (system_character_t) 'a' + hex_digit - 10; + } + hex_digit = unicode_character & 0x0f; + + if( hex_digit <= 0x09 ) + { + safe_filename[ filename_index++ ] = (system_character_t) '0' + hex_digit; + } + else + { + safe_filename[ filename_index++ ] = (system_character_t) 'a' + hex_digit - 10; + } + } + else if( unicode_character == (libuna_unicode_character_t) escape_character ) + { + if( ( filename_index + 2 ) > safe_filename_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid filename index value out of bounds.", + function ); + + goto on_error; + } + safe_filename[ filename_index++ ] = escape_character; + safe_filename[ filename_index++ ] = escape_character; + } + else + { +#if defined( HAVE_WIDE_SYSTEM_CHARACTER ) + result = libuna_unicode_character_copy_to_utf16( + unicode_character, + (libuna_utf16_character_t *) safe_filename, + safe_filename_size, + &filename_index, + error ); +#else + result = libuna_unicode_character_copy_to_utf8( + unicode_character, + (libuna_utf8_character_t *) safe_filename, + safe_filename_size, + &filename_index, + error ); +#endif + if( result != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_CONVERSION, + LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, + "%s: unable to copy Unicode character to filename.", + function ); + + goto on_error; + } + } + } + if( filename_index >= safe_filename_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid filename index value out of bounds.", + function ); + + goto on_error; + } + safe_filename[ filename_index ] = 0; + + *filename = safe_filename; + *filename_size = safe_filename_size; + + return( 1 ); + +on_error: + if( safe_filename != NULL ) + { + memory_free( + safe_filename ); + } + return( -1 ); +} + +/* Retrieves the filename from an file entry + * Returns 1 if successful or -1 on error + */ +int mount_file_system_get_filename_from_file_entry( + mount_file_system_t *file_system, + libfshfs_file_entry_t *fshfs_file_entry, + system_character_t **filename, + size_t *filename_size, + libcerror_error_t **error ) +{ + system_character_t *file_entry_name = NULL; + static char *function = "mount_file_system_get_filename_from_file_entry"; + size_t file_entry_name_size = 0; + int result = 0; + + if( file_system == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file system.", + function ); + + return( -1 ); + } +#if defined( HAVE_WIDE_SYSTEM_CHARACTER ) + result = libfshfs_file_entry_get_utf16_name_size( + fshfs_file_entry, + &file_entry_name_size, + error ); +#else + result = libfshfs_file_entry_get_utf8_name_size( + fshfs_file_entry, + &file_entry_name_size, + error ); +#endif + if( result != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve file entry name size.", + function ); + + goto on_error; + } + if( ( file_entry_name_size == 0 ) + || ( file_entry_name_size > SSIZE_MAX ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid file entry name size value out of bounds.", + function ); + + goto on_error; + } + file_entry_name = system_string_allocate( + file_entry_name_size ); + + if( file_entry_name == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_INSUFFICIENT, + "%s: unable to create file entry name string.", + function ); + + goto on_error; + } +#if defined( HAVE_WIDE_SYSTEM_CHARACTER ) + result = libfshfs_file_entry_get_utf16_name( + fshfs_file_entry, + (uint16_t *) file_entry_name, + file_entry_name_size, + error ); +#else + result = libfshfs_file_entry_get_utf8_name( + fshfs_file_entry, + (uint8_t *) file_entry_name, + file_entry_name_size, + error ); +#endif + if( result != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve file entry name.", + function ); + + goto on_error; + } + if( mount_file_system_get_filename_from_name( + file_system, + file_entry_name, + file_entry_name_size - 1, + filename, + filename_size, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve a filename from the file entry name.", + function ); + + goto on_error; + } + memory_free( + file_entry_name ); + + return( 1 ); + +on_error: + if( file_entry_name != NULL ) + { + memory_free( + file_entry_name ); + } + return( -1 ); +} + diff -Nru libfshfs-20201104/fshfstools/mount_file_system.h libfshfs-20240221/fshfstools/mount_file_system.h --- libfshfs-20201104/fshfstools/mount_file_system.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/fshfstools/mount_file_system.h 2024-02-21 05:50:44.000000000 +0000 @@ -0,0 +1,110 @@ +/* + * Mount file system + * + * Copyright (C) 2009-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _MOUNT_FILE_SYSTEM_H ) +#define _MOUNT_FILE_SYSTEM_H + +#include +#include + +#include "fshfstools_libcerror.h" +#include "fshfstools_libfshfs.h" + +#if defined( __cplusplus ) +extern "C" { +#endif + +typedef struct mount_file_system mount_file_system_t; + +struct mount_file_system +{ + /* The mounted timestamp + */ + uint64_t mounted_timestamp; + + /* The volume + */ + libfshfs_volume_t *fshfs_volume; +}; + +int mount_file_system_initialize( + mount_file_system_t **file_system, + libcerror_error_t **error ); + +int mount_file_system_free( + mount_file_system_t **file_system, + libcerror_error_t **error ); + +int mount_file_system_signal_abort( + mount_file_system_t *file_system, + libcerror_error_t **error ); + +int mount_file_system_set_volume( + mount_file_system_t *file_system, + libfshfs_volume_t *fshfs_volume, + libcerror_error_t **error ); + +int mount_file_system_get_volume( + mount_file_system_t *file_system, + libfshfs_volume_t **fshfs_volume, + libcerror_error_t **error ); + +int mount_file_system_get_mounted_timestamp( + mount_file_system_t *file_system, + uint64_t *mounted_timestamp, + libcerror_error_t **error ); + +int mount_file_system_get_file_entry_path_from_path( + mount_file_system_t *file_system, + const system_character_t *path, + size_t path_length, + system_character_t **file_entry_path, + size_t *file_entry_path_size, + libcerror_error_t **error ); + +int mount_file_system_get_file_entry_by_path( + mount_file_system_t *file_system, + const system_character_t *path, + size_t path_length, + libfshfs_file_entry_t **fshfs_file_entry, + libcerror_error_t **error ); + +int mount_file_system_get_filename_from_name( + mount_file_system_t *file_system, + const system_character_t *name, + size_t name_length, + system_character_t **filename, + size_t *filename_size, + libcerror_error_t **error ); + +int mount_file_system_get_filename_from_file_entry( + mount_file_system_t *file_system, + libfshfs_file_entry_t *fshfs_file_entry, + system_character_t **filename, + size_t *filename_size, + libcerror_error_t **error ); + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _MOUNT_FILE_SYSTEM_H ) */ + diff -Nru libfshfs-20201104/fshfstools/mount_fuse.c libfshfs-20240221/fshfstools/mount_fuse.c --- libfshfs-20201104/fshfstools/mount_fuse.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/fshfstools/mount_fuse.c 2024-02-21 05:50:44.000000000 +0000 @@ -0,0 +1,1911 @@ +/* + * Mount tool fuse functions + * + * Copyright (C) 2009-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include +#include + +#if defined( HAVE_ERRNO_H ) || defined( WINAPI ) +#include +#endif + +#if defined( HAVE_STDLIB_H ) || defined( WINAPI ) +#include +#endif + +#if defined( HAVE_UNISTD_H ) +#include +#endif + +#include "fshfstools_libcerror.h" +#include "fshfstools_libcnotify.h" +#include "fshfstools_libfshfs.h" +#include "fshfstools_unused.h" +#include "mount_fuse.h" +#include "mount_handle.h" + +extern mount_handle_t *fshfsmount_mount_handle; + +#if defined( HAVE_LIBFUSE ) || defined( HAVE_LIBOSXFUSE ) + +#if ( SIZEOF_OFF_T != 8 ) && ( SIZEOF_OFF_T != 4 ) +#error Size of off_t not supported +#endif + +/* Sets the values in a stat info structure + * The time values are a signed 64-bit POSIX date and time value in number of nanoseconds + * Returns 1 if successful or -1 on error + */ +int mount_fuse_set_stat_info( + struct stat *stat_info, + size64_t size, + uint16_t file_mode, + int64_t access_time, + int64_t inode_change_time, + int64_t modification_time, + libcerror_error_t **error ) +{ + static char *function = "mount_fuse_set_stat_info"; + + if( stat_info == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid stat info.", + function ); + + return( -1 ); + } +#if SIZEOF_OFF_T <= 4 + if( size > (size64_t) UINT32_MAX ) +#else + if( size > (size64_t) INT64_MAX ) +#endif + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid size value out of bounds.", + function ); + + return( -1 ); + } + stat_info->st_size = (off_t) size; + stat_info->st_mode = file_mode; + + if( ( file_mode & 0x4000 ) != 0 ) + { + stat_info->st_nlink = 2; + } + else + { + stat_info->st_nlink = 1; + } +#if defined( HAVE_GETEUID ) + stat_info->st_uid = geteuid(); +#endif +#if defined( HAVE_GETEGID ) + stat_info->st_gid = getegid(); +#endif + + stat_info->st_atime = access_time / 1000000000; + stat_info->st_ctime = inode_change_time / 1000000000; + stat_info->st_mtime = modification_time / 1000000000; + +#if defined( STAT_HAVE_NSEC ) + stat_info->st_atime_nsec = access_time % 1000000000; + stat_info->st_ctime_nsec = inode_change_time % 1000000000; + stat_info->st_mtime_nsec = modification_time % 1000000000; +#endif + return( 1 ); +} + +/* Fills a directory entry + * Returns 1 if successful or -1 on error + */ +int mount_fuse_filldir( + void *buffer, + fuse_fill_dir_t filler, + const char *name, + struct stat *stat_info, + mount_file_entry_t *file_entry, + libcerror_error_t **error ) +{ + static char *function = "mount_fuse_filldir"; + size64_t file_size = 0; + uint64_t access_time = 0; + uint64_t inode_change_time = 0; + uint64_t modification_time = 0; + uint16_t file_mode = 0; + + if( filler == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid filler.", + function ); + + return( -1 ); + } + if( file_entry != NULL ) + { + if( mount_file_entry_get_size( + file_entry, + &file_size, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve file entry size.", + function ); + + return( -1 ); + } + if( mount_file_entry_get_file_mode( + file_entry, + &file_mode, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve file mode.", + function ); + + return( -1 ); + } + if( mount_file_entry_get_access_time( + file_entry, + &access_time, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve access time.", + function ); + + return( -1 ); + } + if( mount_file_entry_get_modification_time( + file_entry, + &modification_time, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve modification time.", + function ); + + return( -1 ); + } + if( mount_file_entry_get_inode_change_time( + file_entry, + &inode_change_time, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve inode change time.", + function ); + + return( -1 ); + } + } + if( memory_set( + stat_info, + 0, + sizeof( struct stat ) ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_SET_FAILED, + "%s: unable to clear stat info.", + function ); + + return( -1 ); + } + if( mount_fuse_set_stat_info( + stat_info, + file_size, + file_mode, + (int64_t) access_time, + (int64_t) inode_change_time, + (int64_t) modification_time, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to set stat info.", + function ); + + return( -1 ); + } + if( filler( + buffer, + name, + stat_info, + 0 ) == 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to set directory entry.", + function ); + + return( -1 ); + } + return( 1 ); +} + +/* Opens a file or directory + * Returns 0 if successful or a negative errno value otherwise + */ +int mount_fuse_open( + const char *path, + struct fuse_file_info *file_info ) +{ + libcerror_error_t *error = NULL; + static char *function = "mount_fuse_open"; + int result = 0; + +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: %s\n", + function, + path ); + } +#endif + if( path == NULL ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid path.", + function ); + + result = -EINVAL; + + goto on_error; + } + if( file_info == NULL ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file information.", + function ); + + result = -EINVAL; + + goto on_error; + } + if( file_info->fh != (uint64_t) NULL ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, + "%s: invalid file information - file handle already set.", + function ); + + result = -EINVAL; + + goto on_error; + } + if( ( file_info->flags & 0x03 ) != O_RDONLY ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, + "%s: write access currently not supported.", + function ); + + result = -EACCES; + + goto on_error; + } + if( mount_handle_get_file_entry_by_path( + fshfsmount_mount_handle, + path, + (mount_file_entry_t **) &( file_info->fh ), + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve file entry for path: %s.", + function, + path ); + + result = -ENOENT; + + goto on_error; + } + return( 0 ); + +on_error: + if( error != NULL ) + { + libcnotify_print_error_backtrace( + error ); + libcerror_error_free( + &error ); + } + return( result ); +} + +/* Reads a buffer of data at the specified offset + * Returns number of bytes read if successful or a negative errno value otherwise + */ +int mount_fuse_read( + const char *path, + char *buffer, + size_t size, + off_t offset, + struct fuse_file_info *file_info ) +{ + libcerror_error_t *error = NULL; + static char *function = "mount_fuse_read"; + ssize_t read_count = 0; + int result = 0; + +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: %s\n", + function, + path ); + } +#endif + if( path == NULL ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid path.", + function ); + + result = -EINVAL; + + goto on_error; + } + if( size > (size_t) INT_MAX ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid size value exceeds maximum.", + function ); + + result = -EINVAL; + + goto on_error; + } + if( file_info == NULL ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file information.", + function ); + + result = -EINVAL; + + goto on_error; + } + if( file_info->fh == (uint64_t) NULL ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, + "%s: invalid file information - missing file handle.", + function ); + + result = -EINVAL; + + goto on_error; + } + read_count = mount_file_entry_read_buffer_at_offset( + (mount_file_entry_t *) file_info->fh, + (void *) buffer, + size, + (off64_t) offset, + &error ); + + if( read_count < 0 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_READ_FAILED, + "%s: unable to read from file entry.", + function ); + + result = -EIO; + + goto on_error; + } + return( (int) read_count ); + +on_error: + if( error != NULL ) + { + libcnotify_print_error_backtrace( + error ); + libcerror_error_free( + &error ); + } + return( result ); +} + +/* Releases a file entry + * Returns 0 if successful or a negative errno value otherwise + */ +int mount_fuse_release( + const char *path, + struct fuse_file_info *file_info ) +{ + libcerror_error_t *error = NULL; + static char *function = "mount_fuse_release"; + int result = 0; + +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: %s\n", + function, + path ); + } +#endif + if( path == NULL ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid path.", + function ); + + result = -EINVAL; + + goto on_error; + } + if( file_info == NULL ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file information.", + function ); + + result = -EINVAL; + + goto on_error; + } + if( file_info->fh != (uint64_t) NULL ) + { + if( mount_file_entry_free( + (mount_file_entry_t **) &( file_info->fh ), + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free file entry.", + function ); + + result = -ENOENT; + + goto on_error; + } + } + return( 0 ); + +on_error: + if( error != NULL ) + { + libcnotify_print_error_backtrace( + error ); + libcerror_error_free( + &error ); + } + return( result ); +} + +/* Retrieves the value data of an extended attribute + * Returns 0 if successful or a negative errno value otherwise + */ +int mount_fuse_getxattr( + const char *path, + const char *name, + char *value, + size_t size ) +{ + libcerror_error_t *error = NULL; + libfshfs_extended_attribute_t *extended_attribute = NULL; + mount_file_entry_t *file_entry = NULL; + static char *function = "mount_fuse_getxattr"; + size64_t value_data_size = 0; + size_t name_length = 0; + ssize_t read_count = 0; + int result = 0; + +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: %s\n", + function, + path ); + } +#endif + if( path == NULL ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid path.", + function ); + + result = -EINVAL; + + goto on_error; + } + if( name == NULL ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid name.", + function ); + + result = -EINVAL; + + goto on_error; + } + if( size > (size_t) INT_MAX ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid size value exceeds maximum.", + function ); + + result = -EINVAL; + + goto on_error; + } + result = mount_handle_get_file_entry_by_path( + fshfsmount_mount_handle, + path, + &file_entry, + &error ); + + if( result == -1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve value for: %s.", + function, + path ); + + result = -ENOENT; + + goto on_error; + } + else if( result == 0 ) + { + return( -ENOENT ); + } + name_length = narrow_string_length( + name ); + + result = libfshfs_file_entry_get_extended_attribute_by_utf8_name( + file_entry->fshfs_file_entry, + (uint8_t *) name, + name_length, + &extended_attribute, + &error ); + + if( result == -1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve extended attribute.", + function ); + + result = -EIO; + + goto on_error; + } + else if( result != 0 ) + { + if( libfshfs_extended_attribute_get_size( + extended_attribute, + &value_data_size, + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve extended attribute value data size.", + function ); + + result = -EIO; + + goto on_error; + } + if( value_data_size > (size64_t) INT_MAX ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid value data size value out of bounds.", + function ); + + result = -E2BIG; + + goto on_error; + } + /* When size is 0 determine and return the required value size + */ + if( size == 0 ) + { + read_count = (ssize_t) value_data_size; + } + else + { + if( (size64_t) size < value_data_size ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: invalid size value too small.", + function ); + + result = -ERANGE; + + goto on_error; + } + read_count = libfshfs_extended_attribute_read_buffer_at_offset( + extended_attribute, + (void *) value, + size, + 0, + &error ); + + if( read_count == -1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_READ_FAILED, + "%s: unable to read from extended attribute.", + function ); + + result = -EIO; + + goto on_error; + } + } + } + if( libfshfs_extended_attribute_free( + &extended_attribute, + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free extended attribute.", + function ); + + result = -EIO; + + goto on_error; + } + if( mount_file_entry_free( + &file_entry, + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free file entry.", + function ); + + result = -EIO; + + goto on_error; + } + if( result == 0 ) + { + return( -ENOENT ); + } + return( (int) read_count ); + +on_error: + if( error != NULL ) + { + libcnotify_print_error_backtrace( + error ); + libcerror_error_free( + &error ); + } + if( file_entry != NULL ) + { + mount_file_entry_free( + &file_entry, + NULL ); + } + return( result ); +} + +/* Lists the names of extended attributes + * Returns 0 if successful or a negative errno value otherwise + */ +int mount_fuse_listxattr( + const char *path, + char *list, + size_t size ) +{ + libcerror_error_t *error = NULL; + libfshfs_extended_attribute_t *extended_attribute = NULL; + mount_file_entry_t *file_entry = NULL; + static char *function = "mount_fuse_listxattr"; + size_t extended_attribute_name_size = 0; + size_t list_offset = 0; + int extended_attribute_index = 0; + int number_of_extended_attributes = 0; + int result = 0; + +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: %s\n", + function, + path ); + } +#endif + if( path == NULL ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid path.", + function ); + + result = -EINVAL; + + goto on_error; + } + /* When size is 0 determine and return the required list size + */ + if( size > 0 ) + { + if( list == NULL ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid list.", + function ); + + result = -EINVAL; + + goto on_error; + } + } + if( size > (size_t) INT_MAX ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid size value exceeds maximum.", + function ); + + result = -EINVAL; + + goto on_error; + } + result = mount_handle_get_file_entry_by_path( + fshfsmount_mount_handle, + path, + &file_entry, + &error ); + + if( result == -1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve value for: %s.", + function, + path ); + + result = -ENOENT; + + goto on_error; + } + else if( result == 0 ) + { + return( -ENOENT ); + } + if( libfshfs_file_entry_get_number_of_extended_attributes( + file_entry->fshfs_file_entry, + &number_of_extended_attributes, + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve number of extended attributes.", + function ); + + result = -EIO; + + goto on_error; + } + for( extended_attribute_index = 0; + extended_attribute_index < number_of_extended_attributes; + extended_attribute_index++ ) + { + if( libfshfs_file_entry_get_extended_attribute_by_index( + file_entry->fshfs_file_entry, + extended_attribute_index, + &extended_attribute, + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve extended attribute: %d.", + function, + extended_attribute_index ); + + result = -EIO; + + goto on_error; + } + if( libfshfs_extended_attribute_get_utf8_name_size( + extended_attribute, + &extended_attribute_name_size, + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve extended attribute: %d name string size.", + function, + extended_attribute_index ); + + result = -EIO; + + goto on_error; + } + if( size > 0 ) + { + if( extended_attribute_name_size > ( size - list_offset ) ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid extended attribute name size value out of bounds.", + function ); + + result = -EIO; + + goto on_error; + } + if( libfshfs_extended_attribute_get_utf8_name( + extended_attribute, + (uint8_t *) &( list[ list_offset ] ), + extended_attribute_name_size, + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve extended attribute name: %d string.", + function, + extended_attribute_index ); + + result = -EIO; + + goto on_error; + } + } + list_offset += extended_attribute_name_size; + + if( libfshfs_extended_attribute_free( + &extended_attribute, + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free extended attribute: %d.", + function, + extended_attribute_index ); + + result = -EIO; + + goto on_error; + } + } + if( mount_file_entry_free( + &file_entry, + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free file entry.", + function ); + + result = -EIO; + + goto on_error; + } + return( (int) list_offset ); + +on_error: + if( error != NULL ) + { + libcnotify_print_error_backtrace( + error ); + libcerror_error_free( + &error ); + } + if( extended_attribute != NULL ) + { + libfshfs_extended_attribute_free( + &extended_attribute, + NULL ); + } + if( file_entry != NULL ) + { + mount_file_entry_free( + &file_entry, + NULL ); + } + return( result ); +} + +/* Opens a directory + * Returns 0 if successful or a negative errno value otherwise + */ +int mount_fuse_opendir( + const char *path, + struct fuse_file_info *file_info ) +{ + libcerror_error_t *error = NULL; + static char *function = "mount_fuse_opendir"; + int result = 0; + +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: %s\n", + function, + path ); + } +#endif + if( path == NULL ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid path.", + function ); + + result = -EINVAL; + + goto on_error; + } + if( file_info == NULL ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file information.", + function ); + + result = -EINVAL; + + goto on_error; + } + if( file_info->fh != (uint64_t) NULL ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, + "%s: invalid file information - file handle already set.", + function ); + + result = -EINVAL; + + goto on_error; + } + if( mount_handle_get_file_entry_by_path( + fshfsmount_mount_handle, + path, + (mount_file_entry_t **) &( file_info->fh ), + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve file entry for path: %s.", + function, + path ); + + result = -ENOENT; + + goto on_error; + } + return( 0 ); + +on_error: + if( error != NULL ) + { + libcnotify_print_error_backtrace( + error ); + libcerror_error_free( + &error ); + } + return( result ); +} + +/* Reads a directory + * Returns 0 if successful or a negative errno value otherwise + */ +int mount_fuse_readdir( + const char *path, + void *buffer, + fuse_fill_dir_t filler, + off_t offset FSHFSTOOLS_ATTRIBUTE_UNUSED, + struct fuse_file_info *file_info FSHFSTOOLS_ATTRIBUTE_UNUSED ) +{ + struct stat *stat_info = NULL; + libcerror_error_t *error = NULL; + mount_file_entry_t *parent_file_entry = NULL; + mount_file_entry_t *sub_file_entry = NULL; + static char *function = "mount_fuse_readdir"; + char *name = NULL; + size_t name_size = 0; + int number_of_sub_file_entries = 0; + int result = 0; + int sub_file_entry_index = 0; + + FSHFSTOOLS_UNREFERENCED_PARAMETER( offset ) + +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: %s\n", + function, + path ); + } +#endif + if( path == NULL ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid path.", + function ); + + result = -EINVAL; + + goto on_error; + } + if( file_info == NULL ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file information.", + function ); + + result = -EINVAL; + + goto on_error; + } + if( file_info->fh == (uint64_t) NULL ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, + "%s: invalid file information - missing file handle.", + function ); + + result = -EINVAL; + + goto on_error; + } + stat_info = memory_allocate_structure( + struct stat ); + + if( stat_info == NULL ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_INSUFFICIENT, + "%s: unable to create stat info.", + function ); + + result = errno; + + goto on_error; + } + if( mount_fuse_filldir( + buffer, + filler, + ".", + stat_info, + (mount_file_entry_t *) file_info->fh, + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to set self directory entry.", + function ); + + result = -EIO; + + goto on_error; + } + result = mount_file_entry_get_parent_file_entry( + (mount_file_entry_t *) file_info->fh, + &parent_file_entry, + &error ); + + if( result == -1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve parent file entry.", + function ); + + result = -EIO; + + goto on_error; + } + if( mount_fuse_filldir( + buffer, + filler, + "..", + stat_info, + parent_file_entry, + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to set parent directory entry.", + function ); + + result = -EIO; + + goto on_error; + } + if( mount_file_entry_free( + &parent_file_entry, + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free parent file entry.", + function ); + + result = -EIO; + + goto on_error; + } + if( mount_file_entry_get_number_of_sub_file_entries( + (mount_file_entry_t *) file_info->fh, + &number_of_sub_file_entries, + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve number of sub file entries.", + function ); + + result = -EIO; + + goto on_error; + } + for( sub_file_entry_index = 0; + sub_file_entry_index < number_of_sub_file_entries; + sub_file_entry_index++ ) + { + if( mount_file_entry_get_sub_file_entry_by_index( + (mount_file_entry_t *) file_info->fh, + sub_file_entry_index, + &sub_file_entry, + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve sub file entry: %d.", + function, + sub_file_entry_index ); + + result = -EIO; + + goto on_error; + } + if( mount_file_entry_get_name_size( + sub_file_entry, + &name_size, + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve sub file entry: %d name size.", + function, + sub_file_entry_index ); + + result = -EIO; + + goto on_error; + } + name = narrow_string_allocate( + name_size ); + + if( name == NULL ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_INSUFFICIENT, + "%s: unable to create sub file entry: %d name.", + function ); + + result = -EIO; + + goto on_error; + } + if( mount_file_entry_get_name( + sub_file_entry, + name, + name_size, + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve sub file entry: %d name.", + function, + sub_file_entry_index ); + + result = -EIO; + + goto on_error; + } + if( mount_fuse_filldir( + buffer, + filler, + name, + stat_info, + sub_file_entry, + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to set directory entry.", + function ); + + result = -EIO; + + goto on_error; + } + memory_free( + name ); + + name = NULL; + + if( mount_file_entry_free( + &sub_file_entry, + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free sub file entry: %d.", + function, + sub_file_entry_index ); + + result = -EIO; + + goto on_error; + } + } + memory_free( + stat_info ); + + return( 0 ); + +on_error: + if( error != NULL ) + { + libcnotify_print_error_backtrace( + error ); + libcerror_error_free( + &error ); + } + if( name != NULL ) + { + memory_free( + name ); + } + if( sub_file_entry != NULL ) + { + mount_file_entry_free( + &sub_file_entry, + NULL ); + } + if( parent_file_entry != NULL ) + { + mount_file_entry_free( + &parent_file_entry, + NULL ); + } + if( stat_info != NULL ) + { + memory_free( + stat_info ); + } + return( result ); +} + +/* Releases a directory entry + * Returns 0 if successful or a negative errno value otherwise + */ +int mount_fuse_releasedir( + const char *path, + struct fuse_file_info *file_info ) +{ + libcerror_error_t *error = NULL; + static char *function = "mount_fuse_releasedir"; + int result = 0; + +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: %s\n", + function, + path ); + } +#endif + if( path == NULL ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid path.", + function ); + + result = -EINVAL; + + goto on_error; + } + if( file_info == NULL ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file information.", + function ); + + result = -EINVAL; + + goto on_error; + } + if( file_info->fh != (uint64_t) NULL ) + { + file_info->fh = (uint64_t) NULL; + } + return( 0 ); + +on_error: + if( error != NULL ) + { + libcnotify_print_error_backtrace( + error ); + libcerror_error_free( + &error ); + } + return( result ); +} + +/* Retrieves the file stat info + * Returns 0 if successful or a negative errno value otherwise + */ +int mount_fuse_getattr( + const char *path, + struct stat *stat_info ) +{ + libcerror_error_t *error = NULL; + mount_file_entry_t *file_entry = NULL; + static char *function = "mount_fuse_getattr"; + size64_t file_size = 0; + uint64_t access_time = 0; + uint64_t inode_change_time = 0; + uint64_t modification_time = 0; + uint16_t file_mode = 0; + int result = 0; + +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: %s\n", + function, + path ); + } +#endif + if( path == NULL ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid path.", + function ); + + result = -EINVAL; + + goto on_error; + } + if( stat_info == NULL ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid stat info.", + function ); + + result = -EINVAL; + + goto on_error; + } + if( memory_set( + stat_info, + 0, + sizeof( struct stat ) ) == NULL ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_SET_FAILED, + "%s: unable to clear stat info.", + function ); + + result = errno; + + goto on_error; + } + result = mount_handle_get_file_entry_by_path( + fshfsmount_mount_handle, + path, + &file_entry, + &error ); + + if( result == -1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve value for: %s.", + function, + path ); + + result = -ENOENT; + + goto on_error; + } + else if( result == 0 ) + { + return( -ENOENT ); + } + if( mount_file_entry_get_size( + file_entry, + &file_size, + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve file entry size.", + function ); + + result = -EIO; + + goto on_error; + } + if( mount_file_entry_get_file_mode( + file_entry, + &file_mode, + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve file mode.", + function ); + + result = -EIO; + + goto on_error; + } + if( mount_file_entry_get_access_time( + file_entry, + &access_time, + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve access time.", + function ); + + result = -EIO; + + goto on_error; + } + if( mount_file_entry_get_modification_time( + file_entry, + &modification_time, + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve modification time.", + function ); + + result = -EIO; + + goto on_error; + } + if( mount_file_entry_get_inode_change_time( + file_entry, + &inode_change_time, + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve inode change time.", + function ); + + result = -EIO; + + goto on_error; + } + if( mount_fuse_set_stat_info( + stat_info, + file_size, + file_mode, + (int64_t) access_time, + (int64_t) inode_change_time, + (int64_t) modification_time, + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to set stat info.", + function ); + + result = -EIO; + + goto on_error; + } + if( mount_file_entry_free( + &file_entry, + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free file entry.", + function ); + + result = -EIO; + + goto on_error; + } + return( 0 ); + +on_error: + if( error != NULL ) + { + libcnotify_print_error_backtrace( + error ); + libcerror_error_free( + &error ); + } + if( file_entry != NULL ) + { + mount_file_entry_free( + &file_entry, + NULL ); + } + return( result ); +} + +/* Reads the target of a symbolic link + * Returns 0 if successful or a negative errno value otherwise + */ +int mount_fuse_readlink( + const char *path, + char *buffer, + size_t size ) +{ + libcerror_error_t *error = NULL; + mount_file_entry_t *file_entry = NULL; + static char *function = "mount_fuse_readlink"; + int result = 0; + +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: %s\n", + function, + path ); + } +#endif + if( path == NULL ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid path.", + function ); + + result = -EINVAL; + + goto on_error; + } + result = mount_handle_get_file_entry_by_path( + fshfsmount_mount_handle, + path, + &file_entry, + &error ); + + if( result == -1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve value for: %s.", + function, + path ); + + result = -ENOENT; + + goto on_error; + } + else if( result == 0 ) + { + return( -ENOENT ); + } + if( mount_file_entry_get_symbolic_link_target( + file_entry, + buffer, + size, + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve symbolic link target string.", + function ); + + result = -EIO; + + goto on_error; + } + if( mount_file_entry_free( + &file_entry, + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free file entry.", + function ); + + result = -EIO; + + goto on_error; + } + return( 0 ); + +on_error: + if( error != NULL ) + { + libcnotify_print_error_backtrace( + error ); + libcerror_error_free( + &error ); + } + if( file_entry != NULL ) + { + mount_file_entry_free( + &file_entry, + NULL ); + } + return( result ); +} + +/* Cleans up when fuse is done + */ +void mount_fuse_destroy( + void *private_data FSHFSTOOLS_ATTRIBUTE_UNUSED ) +{ + libcerror_error_t *error = NULL; + static char *function = "mount_fuse_destroy"; + + FSHFSTOOLS_UNREFERENCED_PARAMETER( private_data ) + +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s\n", + function ); + } +#endif + if( fshfsmount_mount_handle != NULL ) + { + if( mount_handle_free( + &fshfsmount_mount_handle, + &error ) != 1 ) + { + libcerror_error_set( + &error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free mount handle.", + function ); + + goto on_error; + } + } + return; + +on_error: + if( error != NULL ) + { + libcnotify_print_error_backtrace( + error ); + libcerror_error_free( + &error ); + } + return; +} + +#endif /* defined( HAVE_LIBFUSE ) || defined( HAVE_LIBOSXFUSE ) */ + diff -Nru libfshfs-20201104/fshfstools/mount_fuse.h libfshfs-20240221/fshfstools/mount_fuse.h --- libfshfs-20201104/fshfstools/mount_fuse.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/fshfstools/mount_fuse.h 2024-02-21 05:50:44.000000000 +0000 @@ -0,0 +1,128 @@ +/* + * Mount tool fuse functions + * + * Copyright (C) 2009-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _MOUNT_FUSE_H ) +#define _MOUNT_FUSE_H + +#include +#include + +#if defined( HAVE_LIBFUSE ) || defined( HAVE_LIBOSXFUSE ) +#define FUSE_USE_VERSION 26 + +#if defined( HAVE_LIBFUSE ) +#include + +#elif defined( HAVE_LIBOSXFUSE ) +#include +#endif + +#endif /* defined( HAVE_LIBFUSE ) || defined( HAVE_LIBOSXFUSE ) */ + +#include "fshfstools_libcerror.h" +#include "fshfstools_libfshfs.h" +#include "mount_file_entry.h" +#include "mount_handle.h" + +#if defined( __cplusplus ) +extern "C" { +#endif + +#if defined( HAVE_LIBFUSE ) || defined( HAVE_LIBOSXFUSE ) + +int mount_fuse_set_stat_info( + struct stat *stat_info, + size64_t size, + uint16_t file_mode, + int64_t access_time, + int64_t inode_change_time, + int64_t modification_time, + libcerror_error_t **error ); + +int mount_fuse_filldir( + void *buffer, + fuse_fill_dir_t filler, + const char *name, + struct stat *stat_info, + mount_file_entry_t *file_entry, + libcerror_error_t **error ); + +int mount_fuse_open( + const char *path, + struct fuse_file_info *file_info ); + +int mount_fuse_read( + const char *path, + char *buffer, + size_t size, + off_t offset, + struct fuse_file_info *file_info ); + +int mount_fuse_release( + const char *path, + struct fuse_file_info *file_info ); + +int mount_fuse_getxattr( + const char *path, + const char *name, + char *value, + size_t size ); + +int mount_fuse_listxattr( + const char *path, + char *list, + size_t size ); + +int mount_fuse_opendir( + const char *path, + struct fuse_file_info *file_info ); + +int mount_fuse_readdir( + const char *path, + void *buffer, + fuse_fill_dir_t filler, + off_t offset, + struct fuse_file_info *file_info ); + +int mount_fuse_releasedir( + const char *path, + struct fuse_file_info *file_info ); + +int mount_fuse_getattr( + const char *path, + struct stat *stat_info ); + +int mount_fuse_readlink( + const char *path, + char *buffer, + size_t size ); + +void mount_fuse_destroy( + void *private_data ); + +#endif /* defined( HAVE_LIBFUSE ) || defined( HAVE_LIBOSXFUSE ) */ + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _MOUNT_FUSE_H ) */ + diff -Nru libfshfs-20201104/fshfstools/mount_handle.c libfshfs-20240221/fshfstools/mount_handle.c --- libfshfs-20201104/fshfstools/mount_handle.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/fshfstools/mount_handle.c 2024-02-21 05:50:44.000000000 +0000 @@ -0,0 +1,897 @@ +/* + * Mount handle + * + * Copyright (C) 2009-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include +#include +#include +#include +#include + +#include "fshfstools_libbfio.h" +#include "fshfstools_libcerror.h" +#include "fshfstools_libcpath.h" +#include "fshfstools_libfshfs.h" +#include "mount_file_entry.h" +#include "mount_file_system.h" +#include "mount_handle.h" + +#if !defined( LIBFSHFS_HAVE_BFIO ) + +extern \ +int libfshfs_volume_open_file_io_handle( + libfshfs_volume_t *volume, + libbfio_handle_t *file_io_handle, + int access_flags, + libfshfs_error_t **error ); + +#endif /* !defined( LIBFSHFS_HAVE_BFIO ) */ + +/* Copies a string of a decimal value to a 64-bit value + * Returns 1 if successful or -1 on error + */ +int mount_handle_system_string_copy_from_64_bit_in_decimal( + const system_character_t *string, + size_t string_size, + uint64_t *value_64bit, + libcerror_error_t **error ) +{ + static char *function = "mount_handle_system_string_copy_from_64_bit_in_decimal"; + system_character_t character_value = 0; + size_t string_index = 0; + uint8_t maximum_string_index = 20; + int8_t sign = 1; + + if( string == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid string.", + function ); + + return( -1 ); + } + if( string_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid string size value exceeds maximum.", + function ); + + return( -1 ); + } + if( value_64bit == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid value 64-bit.", + function ); + + return( -1 ); + } + *value_64bit = 0; + + if( string[ string_index ] == (system_character_t) '-' ) + { + string_index++; + maximum_string_index++; + + sign = -1; + } + else if( string[ string_index ] == (system_character_t) '+' ) + { + string_index++; + maximum_string_index++; + } + while( string_index < string_size ) + { + if( string[ string_index ] == 0 ) + { + break; + } + if( string_index > (size_t) maximum_string_index ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_LARGE, + "%s: string too large.", + function ); + + return( -1 ); + } + *value_64bit *= 10; + + if( ( string[ string_index ] >= (system_character_t) '0' ) + && ( string[ string_index ] <= (system_character_t) '9' ) ) + { + character_value = (system_character_t) ( string[ string_index ] - (system_character_t) '0' ); + } + else + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, + "%s: unsupported character value: %" PRIc_SYSTEM " at index: %d.", + function, + string[ string_index ], + string_index ); + + return( -1 ); + } + *value_64bit += character_value; + + string_index++; + } + if( sign == -1 ) + { + *value_64bit *= (uint64_t) -1; + } + return( 1 ); +} + +/* Creates a mount handle + * Make sure the value mount_handle is referencing, is set to NULL + * Returns 1 if successful or -1 on error + */ +int mount_handle_initialize( + mount_handle_t **mount_handle, + libcerror_error_t **error ) +{ + static char *function = "mount_handle_initialize"; + + if( mount_handle == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid mount handle.", + function ); + + return( -1 ); + } + if( *mount_handle != NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, + "%s: invalid mount handle value already set.", + function ); + + return( -1 ); + } + *mount_handle = memory_allocate_structure( + mount_handle_t ); + + if( *mount_handle == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_INSUFFICIENT, + "%s: unable to create mount handle.", + function ); + + goto on_error; + } + if( memory_set( + *mount_handle, + 0, + sizeof( mount_handle_t ) ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_SET_FAILED, + "%s: unable to clear mount handle.", + function ); + + goto on_error; + } + if( mount_file_system_initialize( + &( ( *mount_handle )->file_system ), + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to initialize file system.", + function ); + + goto on_error; + } + return( 1 ); + +on_error: + if( *mount_handle != NULL ) + { + memory_free( + *mount_handle ); + + *mount_handle = NULL; + } + return( -1 ); +} + +/* Frees a mount handle + * Returns 1 if successful or -1 on error + */ +int mount_handle_free( + mount_handle_t **mount_handle, + libcerror_error_t **error ) +{ + static char *function = "mount_handle_free"; + int result = 1; + + if( mount_handle == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid mount handle.", + function ); + + return( -1 ); + } + if( *mount_handle != NULL ) + { + if( mount_file_system_free( + &( ( *mount_handle )->file_system ), + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free file system.", + function ); + + result = -1; + } + memory_free( + *mount_handle ); + + *mount_handle = NULL; + } + return( result ); +} + +/* Signals the mount handle to abort + * Returns 1 if successful or -1 on error + */ +int mount_handle_signal_abort( + mount_handle_t *mount_handle, + libcerror_error_t **error ) +{ + static char *function = "mount_handle_signal_abort"; + + if( mount_handle == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid mount handle.", + function ); + + return( -1 ); + } + if( mount_file_system_signal_abort( + mount_handle->file_system, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to signal file system to abort.", + function ); + + return( -1 ); + } + return( 1 ); +} + +/* Sets the file system index + * Returns 1 if successful or -1 on error + */ +int mount_handle_set_file_system_index( + mount_handle_t *mount_handle, + const system_character_t *string, + libcerror_error_t **error ) +{ + static char *function = "mount_handle_set_file_system_index"; + size_t string_length = 0; + uint64_t value_64bit = 0; + + if( mount_handle == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid mount handle.", + function ); + + return( -1 ); + } + string_length = system_string_length( + string ); + + if( mount_handle_system_string_copy_from_64_bit_in_decimal( + string, + string_length + 1, + &value_64bit, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_COPY_FAILED, + "%s: unable to copy string to 64-bit decimal.", + function ); + + return( -1 ); + } + if( ( value_64bit == 0 ) + || ( value_64bit > 100 ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid file system index value out of bounds.", + function ); + + return( -1 ); + } + mount_handle->file_system_index = (int) value_64bit; + + return( 1 ); +} + +/* Sets the volume offset + * Returns 1 if successful or -1 on error + */ +int mount_handle_set_offset( + mount_handle_t *mount_handle, + const system_character_t *string, + libcerror_error_t **error ) +{ + static char *function = "mount_handle_set_offset"; + size_t string_length = 0; + uint64_t value_64bit = 0; + + if( mount_handle == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid mount handle.", + function ); + + return( -1 ); + } + string_length = system_string_length( + string ); + + if( mount_handle_system_string_copy_from_64_bit_in_decimal( + string, + string_length + 1, + &value_64bit, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_COPY_FAILED, + "%s: unable to copy string to 64-bit decimal.", + function ); + + return( -1 ); + } + mount_handle->volume_offset = (off64_t) value_64bit; + + return( 1 ); +} + +/* Sets the password + * Returns 1 if successful or -1 on error + */ +int mount_handle_set_password( + mount_handle_t *mount_handle, + const system_character_t *string, + libcerror_error_t **error ) +{ + static char *function = "mount_handle_set_password"; + size_t string_length = 0; + + if( mount_handle == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid mount handle.", + function ); + + return( -1 ); + } + if( string == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid string.", + function ); + + return( -1 ); + } + string_length = system_string_length( + string ); + + mount_handle->password = string; + mount_handle->password_length = string_length; + + return( 1 ); +} + +/* Sets the recovery password + * Returns 1 if successful or -1 on error + */ +int mount_handle_set_recovery_password( + mount_handle_t *mount_handle, + const system_character_t *string, + libcerror_error_t **error ) +{ + static char *function = "mount_handle_set_recovery_password"; + size_t string_length = 0; + + if( mount_handle == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid mount handle.", + function ); + + return( -1 ); + } + if( string == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid string.", + function ); + + return( -1 ); + } + string_length = system_string_length( + string ); + + mount_handle->recovery_password = string; + mount_handle->recovery_password_length = string_length; + + return( 1 ); +} + +/* Opens the mount handle + * Returns 1 if successful, 0 if not or -1 on error + */ +int mount_handle_open( + mount_handle_t *mount_handle, + const system_character_t *filename, + libcerror_error_t **error ) +{ + libbfio_handle_t *file_io_handle = NULL; + libfshfs_volume_t *fshfs_volume = NULL; + static char *function = "mount_handle_open"; + size_t filename_length = 0; + int result = 0; + + if( mount_handle == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid mount handle.", + function ); + + return( -1 ); + } + if( filename == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid filename.", + function ); + + return( -1 ); + } + filename_length = system_string_length( + filename ); + + if( libbfio_file_range_initialize( + &file_io_handle, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to initialize file IO handle.", + function ); + + goto on_error; + } +#if defined( HAVE_WIDE_SYSTEM_CHARACTER ) + if( libbfio_file_range_set_name_wide( + file_io_handle, + filename, + filename_length, + error ) != 1 ) +#else + if( libbfio_file_range_set_name( + file_io_handle, + filename, + filename_length, + error ) != 1 ) +#endif + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_OPEN_FAILED, + "%s: unable to set file range name.", + function ); + + goto on_error; + } + if( libbfio_file_range_set( + file_io_handle, + mount_handle->volume_offset, + 0, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_OPEN_FAILED, + "%s: unable to set file range offset.", + function ); + + goto on_error; + } + if( libfshfs_volume_initialize( + &fshfs_volume, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to initialize volume.", + function ); + + goto on_error; + } + result = libfshfs_volume_open_file_io_handle( + fshfs_volume, + file_io_handle, + LIBFSHFS_OPEN_READ, + error ); + + if( result == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_OPEN_FAILED, + "%s: unable to open volume.", + function ); + + goto on_error; + } + if( mount_file_system_set_volume( + mount_handle->file_system, + fshfs_volume, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to set volume in file system.", + function ); + + goto on_error; + } + mount_handle->file_io_handle = file_io_handle; + + return( 1 ); + +on_error: + if( fshfs_volume != NULL ) + { + libfshfs_volume_free( + &fshfs_volume, + NULL ); + } + if( file_io_handle != NULL ) + { + libbfio_handle_free( + &file_io_handle, + NULL ); + } + return( -1 ); +} + +/* Closes the mount handle + * Returns the 0 if succesful or -1 on error + */ +int mount_handle_close( + mount_handle_t *mount_handle, + libcerror_error_t **error ) +{ + libfshfs_volume_t *fshfs_volume = NULL; + static char *function = "mount_handle_close"; + + if( mount_handle == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid mount handle.", + function ); + + return( -1 ); + } + if( mount_file_system_get_volume( + mount_handle->file_system, + &fshfs_volume, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve volume from file system.", + function ); + + goto on_error; + } + if( mount_file_system_set_volume( + mount_handle->file_system, + NULL, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to set volume in file system.", + function ); + + fshfs_volume = NULL; + + goto on_error; + } + if( libfshfs_volume_free( + &fshfs_volume, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free volume.", + function ); + + goto on_error; + } + if( libbfio_handle_close( + mount_handle->file_io_handle, + error ) != 0 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to close file IO handle.", + function ); + + goto on_error; + } + if( libbfio_handle_free( + &( mount_handle->file_io_handle ), + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free file IO handle.", + function ); + + goto on_error; + } + return( 0 ); + +on_error: + if( fshfs_volume != NULL ) + { + libfshfs_volume_free( + &fshfs_volume, + NULL ); + } + return( -1 ); +} + +/* Retrieves a file entry for a specific path + * Returns 1 if successful, 0 if no such file entry or -1 on error + */ +int mount_handle_get_file_entry_by_path( + mount_handle_t *mount_handle, + const system_character_t *path, + mount_file_entry_t **file_entry, + libcerror_error_t **error ) +{ + libfshfs_file_entry_t *fshfs_file_entry = NULL; + const system_character_t *filename = NULL; + static char *function = "mount_handle_get_file_entry_by_path"; + size_t filename_length = 0; + size_t path_index = 0; + size_t path_length = 0; + int result = 0; + + if( mount_handle == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid mount handle.", + function ); + + return( -1 ); + } + if( path == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid path.", + function ); + + return( -1 ); + } + path_length = system_string_length( + path ); + + if( path_length == 0 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid path length value out of bounds.", + function ); + + goto on_error; + } + if( ( path_length >= 2 ) + && ( path[ path_length - 1 ] == LIBCPATH_SEPARATOR ) ) + { + path_length--; + } + path_index = path_length; + + while( path_index > 0 ) + { + if( path[ path_index ] == LIBCPATH_SEPARATOR ) + { + break; + } + path_index--; + } + /* Ignore the name of the root item + */ + if( path_length == 0 ) + { + filename = _SYSTEM_STRING( "" ); + filename_length = 0; + } + else + { + filename = &( path[ path_index + 1 ] ); + filename_length = path_length - ( path_index + 1 ); + } + result = mount_file_system_get_file_entry_by_path( + mount_handle->file_system, + path, + path_length, + &fshfs_file_entry, + error ); + + if( result == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve file entry.", + function ); + + goto on_error; + } + else if( result != 0 ) + { + if( mount_file_entry_initialize( + file_entry, + mount_handle->file_system, + filename, + filename_length, + fshfs_file_entry, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to initialize file entry.", + function ); + + goto on_error; + } + } + return( result ); + +on_error: + if( fshfs_file_entry != NULL ) + { + libfshfs_file_entry_free( + &fshfs_file_entry, + NULL ); + } + return( -1 ); +} + diff -Nru libfshfs-20201104/fshfstools/mount_handle.h libfshfs-20240221/fshfstools/mount_handle.h --- libfshfs-20201104/fshfstools/mount_handle.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/fshfstools/mount_handle.h 2024-02-21 05:50:44.000000000 +0000 @@ -0,0 +1,138 @@ +/* + * Mount handle + * + * Copyright (C) 2009-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _MOUNT_HANDLE_H ) +#define _MOUNT_HANDLE_H + +#include +#include +#include + +#include "fshfstools_libbfio.h" +#include "fshfstools_libcerror.h" +#include "fshfstools_libfshfs.h" +#include "mount_file_entry.h" +#include "mount_file_system.h" + +#if defined( __cplusplus ) +extern "C" { +#endif + +typedef struct mount_handle mount_handle_t; + +struct mount_handle +{ + /* The file system + */ + mount_file_system_t *file_system; + + /* The file system index + */ + int file_system_index; + + /* The volume offset + */ + off64_t volume_offset; + + /* The libbfio file IO handle + */ + libbfio_handle_t *file_io_handle; + + /* The password + */ + const system_character_t *password; + + /* The password length + */ + size_t password_length; + + /* The recovery password + */ + const system_character_t *recovery_password; + + /* The recovery password length + */ + size_t recovery_password_length; + + /* The notification output stream + */ + FILE *notify_stream; +}; + +int mount_handle_system_string_copy_from_64_bit_in_decimal( + const system_character_t *string, + size_t string_size, + uint64_t *value_64bit, + libcerror_error_t **error ); + +int mount_handle_initialize( + mount_handle_t **mount_handle, + libcerror_error_t **error ); + +int mount_handle_free( + mount_handle_t **mount_handle, + libcerror_error_t **error ); + +int mount_handle_signal_abort( + mount_handle_t *mount_handle, + libcerror_error_t **error ); + +int mount_handle_set_file_system_index( + mount_handle_t *mount_handle, + const system_character_t *string, + libcerror_error_t **error ); + +int mount_handle_set_offset( + mount_handle_t *mount_handle, + const system_character_t *string, + libcerror_error_t **error ); + +int mount_handle_set_password( + mount_handle_t *mount_handle, + const system_character_t *string, + libcerror_error_t **error ); + +int mount_handle_set_recovery_password( + mount_handle_t *mount_handle, + const system_character_t *string, + libcerror_error_t **error ); + +int mount_handle_open( + mount_handle_t *mount_handle, + const system_character_t *filename, + libcerror_error_t **error ); + +int mount_handle_close( + mount_handle_t *mount_handle, + libcerror_error_t **error ); + +int mount_handle_get_file_entry_by_path( + mount_handle_t *mount_handle, + const system_character_t *path, + mount_file_entry_t **file_entry, + libcerror_error_t **error ); + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _MOUNT_HANDLE_H ) */ + diff -Nru libfshfs-20201104/include/Makefile.am libfshfs-20240221/include/Makefile.am --- libfshfs-20201104/include/Makefile.am 2020-11-04 04:19:36.000000000 +0000 +++ libfshfs-20240221/include/Makefile.am 2024-02-21 05:48:48.000000000 +0000 @@ -19,9 +19,9 @@ Makefile.in distclean: clean - /bin/rm -f libfshfs.h - /bin/rm -f libfshfs/definitions.h - /bin/rm -f libfshfs/features.h - /bin/rm -f libfshfs/types.h - /bin/rm -f Makefile + -rm -f libfshfs.h + -rm -f libfshfs/definitions.h + -rm -f libfshfs/features.h + -rm -f libfshfs/types.h + -rm -f Makefile diff -Nru libfshfs-20201104/include/Makefile.in libfshfs-20240221/include/Makefile.in --- libfshfs-20201104/include/Makefile.in 2020-11-04 11:56:31.000000000 +0000 +++ libfshfs-20240221/include/Makefile.in 2024-02-21 06:04:25.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -91,25 +91,26 @@ subdir = include ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcdata.m4 \ - $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \ - $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \ - $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcrypto.m4 \ - $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcthreads.m4 \ - $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ - $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ - $(top_srcdir)/m4/libhmac.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/libuna.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \ - $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \ - $(top_srcdir)/m4/zlib.m4 $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libbfio.m4 \ + $(top_srcdir)/m4/libcdata.m4 $(top_srcdir)/m4/libcerror.m4 \ + $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ + $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ + $(top_srcdir)/m4/libcrypto.m4 $(top_srcdir)/m4/libcsplit.m4 \ + $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \ + $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ + $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmos.m4 \ + $(top_srcdir)/m4/libfuse.m4 $(top_srcdir)/m4/libhmac.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/pthread.m4 \ + $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ + $(top_srcdir)/m4/types.m4 $(top_srcdir)/m4/zlib.m4 \ + $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(include_HEADERS) \ @@ -167,6 +168,7 @@ am__installdirs = "$(DESTDIR)$(includedir)" \ "$(DESTDIR)$(pkgincludedir)" HEADERS = $(include_HEADERS) $(pkginclude_HEADERS) +am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -184,8 +186,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/libfshfs.h.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ @@ -202,6 +202,8 @@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ @@ -217,8 +219,10 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -238,6 +242,8 @@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ +HAVE_LIBFMOS = @HAVE_LIBFMOS@ +HAVE_LIBFUSE = @HAVE_LIBFUSE@ HAVE_LIBHMAC = @HAVE_LIBHMAC@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ @@ -253,6 +259,7 @@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ +HAVE_LOCAL_LIBFMOS = @HAVE_LOCAL_LIBFMOS@ HAVE_LOCAL_LIBHMAC = @HAVE_LOCAL_LIBHMAC@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ @@ -306,8 +313,12 @@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ +LIBFMOS_CPPFLAGS = @LIBFMOS_CPPFLAGS@ +LIBFMOS_LIBADD = @LIBFMOS_LIBADD@ LIBFSHFS_DLL_EXPORT = @LIBFSHFS_DLL_EXPORT@ LIBFSHFS_DLL_IMPORT = @LIBFSHFS_DLL_IMPORT@ +LIBFUSE_CPPFLAGS = @LIBFUSE_CPPFLAGS@ +LIBFUSE_LIBADD = @LIBFUSE_LIBADD@ LIBHMAC_CPPFLAGS = @LIBHMAC_CPPFLAGS@ LIBHMAC_LIBADD = @LIBHMAC_LIBADD@ LIBICONV = @LIBICONV@ @@ -329,8 +340,8 @@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ @@ -353,26 +364,6 @@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ -PYTHON2 = @PYTHON2@ -PYTHON2_CONFIG = @PYTHON2_CONFIG@ -PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ -PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ -PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ -PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ -PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ -PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ -PYTHON2_PREFIX = @PYTHON2_PREFIX@ -PYTHON2_VERSION = @PYTHON2_VERSION@ -PYTHON3 = @PYTHON3@ -PYTHON3_CONFIG = @PYTHON3_CONFIG@ -PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ -PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ -PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ -PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ -PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ -PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ -PYTHON3_PREFIX = @PYTHON3_PREFIX@ -PYTHON3_VERSION = @PYTHON3_VERSION@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ @@ -450,6 +441,12 @@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ +ax_libfmos_pc_libs_private = @ax_libfmos_pc_libs_private@ +ax_libfmos_spec_build_requires = @ax_libfmos_spec_build_requires@ +ax_libfmos_spec_requires = @ax_libfmos_spec_requires@ +ax_libfuse_pc_libs_private = @ax_libfuse_pc_libs_private@ +ax_libfuse_spec_build_requires = @ax_libfuse_spec_build_requires@ +ax_libfuse_spec_requires = @ax_libfuse_spec_requires@ ax_libhmac_pc_libs_private = @ax_libhmac_pc_libs_private@ ax_libhmac_spec_build_requires = @ax_libhmac_spec_build_requires@ ax_libhmac_spec_requires = @ax_libhmac_spec_requires@ @@ -474,6 +471,8 @@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +fuse_CFLAGS = @fuse_CFLAGS@ +fuse_LIBS = @fuse_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -511,6 +510,8 @@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ +libfmos_CFLAGS = @libfmos_CFLAGS@ +libfmos_LIBS = @libfmos_LIBS@ libfshfs_spec_requires = @libfshfs_spec_requires@ libfshfs_spec_tools_build_requires = @libfshfs_spec_tools_build_requires@ libhmac_CFLAGS = @libhmac_CFLAGS@ @@ -529,11 +530,8 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ -pyexecdir2 = @pyexecdir2@ -pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ -pythondir2 = @pythondir2@ -pythondir3 = @pythondir3@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -646,6 +644,8 @@ @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir) +sources-local: +splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique @@ -698,7 +698,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am @@ -832,6 +831,14 @@ ps-am: +sources: sources-am + +sources-am: sources-local + +splint: splint-am + +splint-am: splint-local + uninstall-am: uninstall-includeHEADERS uninstall-pkgincludeHEADERS .MAKE: install-am install-strip @@ -848,18 +855,19 @@ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am uninstall-includeHEADERS \ + sources-am sources-local splint-am splint-local tags tags-am \ + uninstall uninstall-am uninstall-includeHEADERS \ uninstall-pkgincludeHEADERS .PRECIOUS: Makefile distclean: clean - /bin/rm -f libfshfs.h - /bin/rm -f libfshfs/definitions.h - /bin/rm -f libfshfs/features.h - /bin/rm -f libfshfs/types.h - /bin/rm -f Makefile + -rm -f libfshfs.h + -rm -f libfshfs/definitions.h + -rm -f libfshfs/features.h + -rm -f libfshfs/types.h + -rm -f Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru libfshfs-20201104/include/libfshfs/codepage.h libfshfs-20240221/include/libfshfs/codepage.h --- libfshfs-20201104/include/libfshfs/codepage.h 2020-11-04 04:19:43.000000000 +0000 +++ libfshfs-20240221/include/libfshfs/codepage.h 2024-02-21 05:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * Codepage definitions for libfshfs * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/include/libfshfs/definitions.h libfshfs-20240221/include/libfshfs/definitions.h --- libfshfs-20201104/include/libfshfs/definitions.h 2020-11-04 11:56:45.000000000 +0000 +++ libfshfs-20240221/include/libfshfs/definitions.h 2024-02-21 06:04:37.000000000 +0000 @@ -1,7 +1,7 @@ /* * Definitions for libfshfs * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -24,11 +24,11 @@ #include -#define LIBFSHFS_VERSION 20201104 +#define LIBFSHFS_VERSION 20240221 /* The version string */ -#define LIBFSHFS_VERSION_STRING "20201104" +#define LIBFSHFS_VERSION_STRING "20240221" /* The file access * bit 1 set to 1 for read access @@ -58,10 +58,10 @@ */ enum LIBFSHFS_FILE_SYSTEM_TYPES { - LIBFSHFS_EXTENT_FILE_SYSTEM_TYPE_UNDEFINED, - LIBFSHFS_EXTENT_FILE_SYSTEM_TYPE_HFS, - LIBFSHFS_EXTENT_FILE_SYSTEM_TYPE_HFS_PLUS, - LIBFSHFS_EXTENT_FILE_SYSTEM_TYPE_HFSX + LIBFSHFS_FILE_SYSTEM_TYPE_UNDEFINED, + LIBFSHFS_FILE_SYSTEM_TYPE_HFS, + LIBFSHFS_FILE_SYSTEM_TYPE_HFS_PLUS, + LIBFSHFS_FILE_SYSTEM_TYPE_HFSX }; /* The file types diff -Nru libfshfs-20201104/include/libfshfs/definitions.h.in libfshfs-20240221/include/libfshfs/definitions.h.in --- libfshfs-20201104/include/libfshfs/definitions.h.in 2020-11-04 04:19:43.000000000 +0000 +++ libfshfs-20240221/include/libfshfs/definitions.h.in 2024-02-21 05:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * Definitions for libfshfs * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -58,10 +58,10 @@ */ enum LIBFSHFS_FILE_SYSTEM_TYPES { - LIBFSHFS_EXTENT_FILE_SYSTEM_TYPE_UNDEFINED, - LIBFSHFS_EXTENT_FILE_SYSTEM_TYPE_HFS, - LIBFSHFS_EXTENT_FILE_SYSTEM_TYPE_HFS_PLUS, - LIBFSHFS_EXTENT_FILE_SYSTEM_TYPE_HFSX + LIBFSHFS_FILE_SYSTEM_TYPE_UNDEFINED, + LIBFSHFS_FILE_SYSTEM_TYPE_HFS, + LIBFSHFS_FILE_SYSTEM_TYPE_HFS_PLUS, + LIBFSHFS_FILE_SYSTEM_TYPE_HFSX }; /* The file types diff -Nru libfshfs-20201104/include/libfshfs/error.h libfshfs-20240221/include/libfshfs/error.h --- libfshfs-20201104/include/libfshfs/error.h 2020-11-04 04:19:43.000000000 +0000 +++ libfshfs-20240221/include/libfshfs/error.h 2024-02-21 05:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * The error code definitions for libfshfs * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/include/libfshfs/extern.h libfshfs-20240221/include/libfshfs/extern.h --- libfshfs-20201104/include/libfshfs/extern.h 2020-11-04 04:19:43.000000000 +0000 +++ libfshfs-20240221/include/libfshfs/extern.h 2024-02-21 05:48:49.000000000 +0000 @@ -4,7 +4,7 @@ * This header should be included in header files that export or import * library functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/include/libfshfs/features.h libfshfs-20240221/include/libfshfs/features.h --- libfshfs-20201104/include/libfshfs/features.h 2020-11-04 11:56:45.000000000 +0000 +++ libfshfs-20240221/include/libfshfs/features.h 2024-02-21 06:04:37.000000000 +0000 @@ -1,7 +1,7 @@ /* * Features of libfshfs * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/include/libfshfs/features.h.in libfshfs-20240221/include/libfshfs/features.h.in --- libfshfs-20201104/include/libfshfs/features.h.in 2020-11-04 04:19:43.000000000 +0000 +++ libfshfs-20240221/include/libfshfs/features.h.in 2024-02-21 05:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * Features of libfshfs * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/include/libfshfs/types.h libfshfs-20240221/include/libfshfs/types.h --- libfshfs-20201104/include/libfshfs/types.h 2020-11-04 11:56:45.000000000 +0000 +++ libfshfs-20240221/include/libfshfs/types.h 2024-02-21 06:04:37.000000000 +0000 @@ -1,7 +1,7 @@ /* * Type definitions for libfshfs * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -33,7 +33,7 @@ #endif /* Microsoft Visual Studio C++ before Visual Studio 2010 or earlier versions of the Borland C++ Builder - * do not support the (u)int#_t type definitions but have __int# defintions instead + * do not support the (u)int#_t type definitions but have __int# definitions instead */ #if !defined( HAVE_INT8_T ) #define HAVE_INT8_T @@ -201,6 +201,7 @@ /* The following type definitions hide internal data structures */ +typedef intptr_t libfshfs_data_stream_t; typedef intptr_t libfshfs_extended_attribute_t; typedef intptr_t libfshfs_file_entry_t; typedef intptr_t libfshfs_volume_t; diff -Nru libfshfs-20201104/include/libfshfs/types.h.in libfshfs-20240221/include/libfshfs/types.h.in --- libfshfs-20201104/include/libfshfs/types.h.in 2020-11-04 04:19:43.000000000 +0000 +++ libfshfs-20240221/include/libfshfs/types.h.in 2024-02-21 05:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * Type definitions for libfshfs * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -33,7 +33,7 @@ #endif /* Microsoft Visual Studio C++ before Visual Studio 2010 or earlier versions of the Borland C++ Builder - * do not support the (u)int#_t type definitions but have __int# defintions instead + * do not support the (u)int#_t type definitions but have __int# definitions instead */ #if !defined( HAVE_INT8_T ) #define HAVE_INT8_T @@ -201,6 +201,7 @@ /* The following type definitions hide internal data structures */ +typedef intptr_t libfshfs_data_stream_t; typedef intptr_t libfshfs_extended_attribute_t; typedef intptr_t libfshfs_file_entry_t; typedef intptr_t libfshfs_volume_t; diff -Nru libfshfs-20201104/include/libfshfs.h libfshfs-20240221/include/libfshfs.h --- libfshfs-20201104/include/libfshfs.h 2020-11-04 11:56:45.000000000 +0000 +++ libfshfs-20240221/include/libfshfs.h 2024-02-21 06:04:37.000000000 +0000 @@ -1,7 +1,7 @@ /* * Library to access the Hierarchical File System (HFS) format * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -302,22 +302,22 @@ size_t utf16_string_size, libfshfs_error_t **error ); -/* Retrieves the file entry for a specific identifier (or catalog node identifier (CNID)) - * Returns 1 if successful, 0 if not available or -1 on error +/* Retrieves the root directory file entry + * Returns 1 if successful or -1 on error */ LIBFSHFS_EXTERN \ -int libfshfs_volume_get_file_entry_by_identifier( +int libfshfs_volume_get_root_directory( libfshfs_volume_t *volume, - uint32_t identifier, libfshfs_file_entry_t **file_entry, libfshfs_error_t **error ); -/* Retrieves the root directory file entry - * Returns 1 if successful or -1 on error +/* Retrieves the file entry for a specific identifier (or catalog node identifier (CNID)) + * Returns 1 if successful, 0 if not available or -1 on error */ LIBFSHFS_EXTERN \ -int libfshfs_volume_get_root_directory( +int libfshfs_volume_get_file_entry_by_identifier( libfshfs_volume_t *volume, + uint32_t identifier, libfshfs_file_entry_t **file_entry, libfshfs_error_t **error ); @@ -375,6 +375,15 @@ uint32_t *parent_identifier, libfshfs_error_t **error ); +/* Retrieves the parent file entry + * Returns 1 if successful, 0 if no such file entry or -1 on error + */ +LIBFSHFS_EXTERN \ +int libfshfs_file_entry_get_parent_file_entry( + libfshfs_file_entry_t *file_entry, + libfshfs_file_entry_t **parent_file_entry, + libfshfs_error_t **error ); + /* Retrieves the hard link identifier (or catalog node identifier (CNID)) * Returns 1 if successful, 0 if not available or -1 on error */ @@ -453,6 +462,16 @@ uint16_t *file_mode, libfshfs_error_t **error ); +/* Retrieves the number of links + * This value is retrieved from the indirect node file if available otherwise it defaults to 1 + * Returns 1 if successful or -1 on error + */ +LIBFSHFS_EXTERN \ +int libfshfs_file_entry_get_number_of_links( + libfshfs_file_entry_t *file_entry, + uint32_t *number_of_links, + libfshfs_error_t **error ); + /* Retrieves the owner identifier * Returns 1 if successful, 0 if not available or -1 on error */ @@ -471,6 +490,25 @@ uint32_t *group_identifier, libfshfs_error_t **error ); +/* Retrieves the device identifier + * Returns 1 if successful, 0 if not available or -1 on error + */ +LIBFSHFS_EXTERN \ +int libfshfs_file_entry_get_device_identifier( + libfshfs_file_entry_t *file_entry, + uint32_t *device_identifier, + libfshfs_error_t **error ); + +/* Retrieves the device number + * Returns 1 if successful, 0 if not available or -1 on error + */ +LIBFSHFS_EXTERN \ +int libfshfs_file_entry_get_device_number( + libfshfs_file_entry_t *file_entry, + uint32_t *major_device_number, + uint32_t *minor_device_number, + libfshfs_error_t **error ); + /* Retrieves the size of the UTF-8 encoded name * The returned size includes the end of string character * This value is retrieved from the catalog node key of the corresponding directory or file record @@ -563,6 +601,23 @@ size_t utf16_string_size, libfshfs_error_t **error ); +/* Determines if the file entry has a resource fork + * Returns 1 if the file entry has a resource fork, 0 if not or -1 on error + */ +LIBFSHFS_EXTERN \ +int libfshfs_file_entry_has_resource_fork( + libfshfs_file_entry_t *file_entry, + libfshfs_error_t **error ); + +/* Retrieves a data stream of the resource fork + * Returns 1 if successful, 0 if not available or -1 on error + */ +LIBFSHFS_EXTERN \ +int libfshfs_file_entry_get_resource_fork( + libfshfs_file_entry_t *file_entry, + libfshfs_data_stream_t **data_stream, + libfshfs_error_t **error ); + /* Retrieves the number of extended attributes * Returns 1 if successful or -1 on error */ @@ -716,6 +771,109 @@ size64_t *size, libfshfs_error_t **error ); +/* Retrieves the number of extents + * Returns 1 if successful or -1 on error + */ +LIBFSHFS_EXTERN \ +int libfshfs_file_entry_get_number_of_extents( + libfshfs_file_entry_t *file_entry, + int *number_of_extents, + libfshfs_error_t **error ); + +/* Retrieves a specific extent + * Returns 1 if successful or -1 on error + */ +LIBFSHFS_EXTERN \ +int libfshfs_file_entry_get_extent_by_index( + libfshfs_file_entry_t *file_entry, + int extent_index, + off64_t *extent_offset, + size64_t *extent_size, + uint32_t *extent_flags, + libfshfs_error_t **error ); + +/* ------------------------------------------------------------------------- + * Data stream functions + * ------------------------------------------------------------------------- */ + +/* Frees a data stream + * Returns 1 if successful or -1 on error + */ +LIBFSHFS_EXTERN \ +int libfshfs_data_stream_free( + libfshfs_data_stream_t **data_stream, + libfshfs_error_t **error ); + +/* Reads data at the current offset + * Returns the number of bytes read or -1 on error + */ +LIBFSHFS_EXTERN \ +ssize_t libfshfs_data_stream_read_buffer( + libfshfs_data_stream_t *data_stream, + void *buffer, + size_t buffer_size, + libfshfs_error_t **error ); + +/* Reads data at a specific offset + * Returns the number of bytes read or -1 on error + */ +LIBFSHFS_EXTERN \ +ssize_t libfshfs_data_stream_read_buffer_at_offset( + libfshfs_data_stream_t *data_stream, + void *buffer, + size_t buffer_size, + off64_t offset, + libfshfs_error_t **error ); + +/* Seeks a certain offset of the data + * Returns the offset if seek is successful or -1 on error + */ +LIBFSHFS_EXTERN \ +off64_t libfshfs_data_stream_seek_offset( + libfshfs_data_stream_t *data_stream, + off64_t offset, + int whence, + libfshfs_error_t **error ); + +/* Retrieves the current offset of the data + * Returns the offset if successful or -1 on error + */ +LIBFSHFS_EXTERN \ +int libfshfs_data_stream_get_offset( + libfshfs_data_stream_t *data_stream, + off64_t *offset, + libfshfs_error_t **error ); + +/* Retrieves the size + * Returns 1 if successful or -1 on error + */ +LIBFSHFS_EXTERN \ +int libfshfs_data_stream_get_size( + libfshfs_data_stream_t *data_stream, + size64_t *size, + libfshfs_error_t **error ); + +/* Retrieves the number of extents (decoded data runs) + * Returns 1 if successful or -1 on error + */ +LIBFSHFS_EXTERN \ +int libfshfs_data_stream_get_number_of_extents( + libfshfs_data_stream_t *data_stream, + int *number_of_extents, + libfshfs_error_t **error ); + +/* Retrieves a specific extent (decoded data run) + * Returns 1 if successful or -1 on error + */ +LIBFSHFS_EXTERN \ +int libfshfs_data_stream_get_extent_by_index( + libfshfs_data_stream_t *data_stream, + int extent_index, + off64_t *extent_offset, + size64_t *extent_size, + uint32_t *extent_flags, + libfshfs_error_t **error ); + /* ------------------------------------------------------------------------- * Extended attribute functions * ------------------------------------------------------------------------- */ @@ -770,6 +928,76 @@ size_t utf16_string_size, libfshfs_error_t **error ); +/* Reads data at the current offset into a buffer + * Returns the number of bytes read or -1 on error + */ +LIBFSHFS_EXTERN \ +ssize_t libfshfs_extended_attribute_read_buffer( + libfshfs_extended_attribute_t *extended_attribute, + void *buffer, + size_t buffer_size, + libfshfs_error_t **error ); + +/* Reads data at a specific offset + * Returns the number of bytes read or -1 on error + */ +LIBFSHFS_EXTERN \ +ssize_t libfshfs_extended_attribute_read_buffer_at_offset( + libfshfs_extended_attribute_t *extended_attribute, + void *buffer, + size_t buffer_size, + off64_t offset, + libfshfs_error_t **error ); + +/* Seeks a certain offset + * Returns the offset if seek is successful or -1 on error + */ +LIBFSHFS_EXTERN \ +off64_t libfshfs_extended_attribute_seek_offset( + libfshfs_extended_attribute_t *extended_attribute, + off64_t offset, + int whence, + libfshfs_error_t **error ); + +/* Retrieves the current offset + * Returns the offset if successful or -1 on error + */ +LIBFSHFS_EXTERN \ +int libfshfs_extended_attribute_get_offset( + libfshfs_extended_attribute_t *extended_attribute, + off64_t *offset, + libfshfs_error_t **error ); + +/* Retrieves the size of the data stream object + * Returns 1 if successful or -1 on error + */ +LIBFSHFS_EXTERN \ +int libfshfs_extended_attribute_get_size( + libfshfs_extended_attribute_t *extended_attribute, + size64_t *size, + libfshfs_error_t **error ); + +/* Retrieves the number of extents + * Returns 1 if successful or -1 on error + */ +LIBFSHFS_EXTERN \ +int libfshfs_extended_attribute_get_number_of_extents( + libfshfs_extended_attribute_t *extended_attribute, + int *number_of_extents, + libfshfs_error_t **error ); + +/* Retrieves a specific extent + * Returns 1 if successful or -1 on error + */ +LIBFSHFS_EXTERN \ +int libfshfs_extended_attribute_get_extent_by_index( + libfshfs_extended_attribute_t *extended_attribute, + int extent_index, + off64_t *extent_offset, + size64_t *extent_size, + uint32_t *extent_flags, + libfshfs_error_t **error ); + #if defined( __cplusplus ) } #endif diff -Nru libfshfs-20201104/include/libfshfs.h.in libfshfs-20240221/include/libfshfs.h.in --- libfshfs-20201104/include/libfshfs.h.in 2020-11-04 04:19:43.000000000 +0000 +++ libfshfs-20240221/include/libfshfs.h.in 2024-02-21 05:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * Library to access the Hierarchical File System (HFS) format * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -302,22 +302,22 @@ size_t utf16_string_size, libfshfs_error_t **error ); -/* Retrieves the file entry for a specific identifier (or catalog node identifier (CNID)) - * Returns 1 if successful, 0 if not available or -1 on error +/* Retrieves the root directory file entry + * Returns 1 if successful or -1 on error */ LIBFSHFS_EXTERN \ -int libfshfs_volume_get_file_entry_by_identifier( +int libfshfs_volume_get_root_directory( libfshfs_volume_t *volume, - uint32_t identifier, libfshfs_file_entry_t **file_entry, libfshfs_error_t **error ); -/* Retrieves the root directory file entry - * Returns 1 if successful or -1 on error +/* Retrieves the file entry for a specific identifier (or catalog node identifier (CNID)) + * Returns 1 if successful, 0 if not available or -1 on error */ LIBFSHFS_EXTERN \ -int libfshfs_volume_get_root_directory( +int libfshfs_volume_get_file_entry_by_identifier( libfshfs_volume_t *volume, + uint32_t identifier, libfshfs_file_entry_t **file_entry, libfshfs_error_t **error ); @@ -375,6 +375,15 @@ uint32_t *parent_identifier, libfshfs_error_t **error ); +/* Retrieves the parent file entry + * Returns 1 if successful, 0 if no such file entry or -1 on error + */ +LIBFSHFS_EXTERN \ +int libfshfs_file_entry_get_parent_file_entry( + libfshfs_file_entry_t *file_entry, + libfshfs_file_entry_t **parent_file_entry, + libfshfs_error_t **error ); + /* Retrieves the hard link identifier (or catalog node identifier (CNID)) * Returns 1 if successful, 0 if not available or -1 on error */ @@ -453,6 +462,16 @@ uint16_t *file_mode, libfshfs_error_t **error ); +/* Retrieves the number of links + * This value is retrieved from the indirect node file if available otherwise it defaults to 1 + * Returns 1 if successful or -1 on error + */ +LIBFSHFS_EXTERN \ +int libfshfs_file_entry_get_number_of_links( + libfshfs_file_entry_t *file_entry, + uint32_t *number_of_links, + libfshfs_error_t **error ); + /* Retrieves the owner identifier * Returns 1 if successful, 0 if not available or -1 on error */ @@ -471,6 +490,25 @@ uint32_t *group_identifier, libfshfs_error_t **error ); +/* Retrieves the device identifier + * Returns 1 if successful, 0 if not available or -1 on error + */ +LIBFSHFS_EXTERN \ +int libfshfs_file_entry_get_device_identifier( + libfshfs_file_entry_t *file_entry, + uint32_t *device_identifier, + libfshfs_error_t **error ); + +/* Retrieves the device number + * Returns 1 if successful, 0 if not available or -1 on error + */ +LIBFSHFS_EXTERN \ +int libfshfs_file_entry_get_device_number( + libfshfs_file_entry_t *file_entry, + uint32_t *major_device_number, + uint32_t *minor_device_number, + libfshfs_error_t **error ); + /* Retrieves the size of the UTF-8 encoded name * The returned size includes the end of string character * This value is retrieved from the catalog node key of the corresponding directory or file record @@ -563,6 +601,23 @@ size_t utf16_string_size, libfshfs_error_t **error ); +/* Determines if the file entry has a resource fork + * Returns 1 if the file entry has a resource fork, 0 if not or -1 on error + */ +LIBFSHFS_EXTERN \ +int libfshfs_file_entry_has_resource_fork( + libfshfs_file_entry_t *file_entry, + libfshfs_error_t **error ); + +/* Retrieves a data stream of the resource fork + * Returns 1 if successful, 0 if not available or -1 on error + */ +LIBFSHFS_EXTERN \ +int libfshfs_file_entry_get_resource_fork( + libfshfs_file_entry_t *file_entry, + libfshfs_data_stream_t **data_stream, + libfshfs_error_t **error ); + /* Retrieves the number of extended attributes * Returns 1 if successful or -1 on error */ @@ -716,6 +771,109 @@ size64_t *size, libfshfs_error_t **error ); +/* Retrieves the number of extents + * Returns 1 if successful or -1 on error + */ +LIBFSHFS_EXTERN \ +int libfshfs_file_entry_get_number_of_extents( + libfshfs_file_entry_t *file_entry, + int *number_of_extents, + libfshfs_error_t **error ); + +/* Retrieves a specific extent + * Returns 1 if successful or -1 on error + */ +LIBFSHFS_EXTERN \ +int libfshfs_file_entry_get_extent_by_index( + libfshfs_file_entry_t *file_entry, + int extent_index, + off64_t *extent_offset, + size64_t *extent_size, + uint32_t *extent_flags, + libfshfs_error_t **error ); + +/* ------------------------------------------------------------------------- + * Data stream functions + * ------------------------------------------------------------------------- */ + +/* Frees a data stream + * Returns 1 if successful or -1 on error + */ +LIBFSHFS_EXTERN \ +int libfshfs_data_stream_free( + libfshfs_data_stream_t **data_stream, + libfshfs_error_t **error ); + +/* Reads data at the current offset + * Returns the number of bytes read or -1 on error + */ +LIBFSHFS_EXTERN \ +ssize_t libfshfs_data_stream_read_buffer( + libfshfs_data_stream_t *data_stream, + void *buffer, + size_t buffer_size, + libfshfs_error_t **error ); + +/* Reads data at a specific offset + * Returns the number of bytes read or -1 on error + */ +LIBFSHFS_EXTERN \ +ssize_t libfshfs_data_stream_read_buffer_at_offset( + libfshfs_data_stream_t *data_stream, + void *buffer, + size_t buffer_size, + off64_t offset, + libfshfs_error_t **error ); + +/* Seeks a certain offset of the data + * Returns the offset if seek is successful or -1 on error + */ +LIBFSHFS_EXTERN \ +off64_t libfshfs_data_stream_seek_offset( + libfshfs_data_stream_t *data_stream, + off64_t offset, + int whence, + libfshfs_error_t **error ); + +/* Retrieves the current offset of the data + * Returns the offset if successful or -1 on error + */ +LIBFSHFS_EXTERN \ +int libfshfs_data_stream_get_offset( + libfshfs_data_stream_t *data_stream, + off64_t *offset, + libfshfs_error_t **error ); + +/* Retrieves the size + * Returns 1 if successful or -1 on error + */ +LIBFSHFS_EXTERN \ +int libfshfs_data_stream_get_size( + libfshfs_data_stream_t *data_stream, + size64_t *size, + libfshfs_error_t **error ); + +/* Retrieves the number of extents (decoded data runs) + * Returns 1 if successful or -1 on error + */ +LIBFSHFS_EXTERN \ +int libfshfs_data_stream_get_number_of_extents( + libfshfs_data_stream_t *data_stream, + int *number_of_extents, + libfshfs_error_t **error ); + +/* Retrieves a specific extent (decoded data run) + * Returns 1 if successful or -1 on error + */ +LIBFSHFS_EXTERN \ +int libfshfs_data_stream_get_extent_by_index( + libfshfs_data_stream_t *data_stream, + int extent_index, + off64_t *extent_offset, + size64_t *extent_size, + uint32_t *extent_flags, + libfshfs_error_t **error ); + /* ------------------------------------------------------------------------- * Extended attribute functions * ------------------------------------------------------------------------- */ @@ -770,6 +928,76 @@ size_t utf16_string_size, libfshfs_error_t **error ); +/* Reads data at the current offset into a buffer + * Returns the number of bytes read or -1 on error + */ +LIBFSHFS_EXTERN \ +ssize_t libfshfs_extended_attribute_read_buffer( + libfshfs_extended_attribute_t *extended_attribute, + void *buffer, + size_t buffer_size, + libfshfs_error_t **error ); + +/* Reads data at a specific offset + * Returns the number of bytes read or -1 on error + */ +LIBFSHFS_EXTERN \ +ssize_t libfshfs_extended_attribute_read_buffer_at_offset( + libfshfs_extended_attribute_t *extended_attribute, + void *buffer, + size_t buffer_size, + off64_t offset, + libfshfs_error_t **error ); + +/* Seeks a certain offset + * Returns the offset if seek is successful or -1 on error + */ +LIBFSHFS_EXTERN \ +off64_t libfshfs_extended_attribute_seek_offset( + libfshfs_extended_attribute_t *extended_attribute, + off64_t offset, + int whence, + libfshfs_error_t **error ); + +/* Retrieves the current offset + * Returns the offset if successful or -1 on error + */ +LIBFSHFS_EXTERN \ +int libfshfs_extended_attribute_get_offset( + libfshfs_extended_attribute_t *extended_attribute, + off64_t *offset, + libfshfs_error_t **error ); + +/* Retrieves the size of the data stream object + * Returns 1 if successful or -1 on error + */ +LIBFSHFS_EXTERN \ +int libfshfs_extended_attribute_get_size( + libfshfs_extended_attribute_t *extended_attribute, + size64_t *size, + libfshfs_error_t **error ); + +/* Retrieves the number of extents + * Returns 1 if successful or -1 on error + */ +LIBFSHFS_EXTERN \ +int libfshfs_extended_attribute_get_number_of_extents( + libfshfs_extended_attribute_t *extended_attribute, + int *number_of_extents, + libfshfs_error_t **error ); + +/* Retrieves a specific extent + * Returns 1 if successful or -1 on error + */ +LIBFSHFS_EXTERN \ +int libfshfs_extended_attribute_get_extent_by_index( + libfshfs_extended_attribute_t *extended_attribute, + int extent_index, + off64_t *extent_offset, + size64_t *extent_size, + uint32_t *extent_flags, + libfshfs_error_t **error ); + #if defined( __cplusplus ) } #endif diff -Nru libfshfs-20201104/install-sh libfshfs-20240221/install-sh --- libfshfs-20201104/install-sh 2020-11-04 11:56:30.000000000 +0000 +++ libfshfs-20240221/install-sh 2024-02-21 06:04:25.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2018-03-11.20; # UTC +scriptversion=2020-11-14.01; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -69,6 +69,11 @@ # Desired mode of installed file. mode=0755 +# Create dirs (including intermediate dirs) using mode 755. +# This is like GNU 'install' as of coreutils 8.32 (2020). +mkdir_umask=22 + +backupsuffix= chgrpcmd= chmodcmd=$chmodprog chowncmd= @@ -99,18 +104,28 @@ --version display version info and exit. -c (ignored) - -C install only if different (preserve the last data modification time) + -C install only if different (preserve data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. + -p pass -p to $cpprog. -s $stripprog installed files. + -S SUFFIX attempt to back up existing files, with suffix SUFFIX. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG + +By default, rm is invoked with -f; when overridden with RMPROG, +it's up to you to specify -f if you want it. + +If -S is not specified, no backups are attempted. + +Email bug reports to bug-automake@gnu.org. +Automake home page: https://www.gnu.org/software/automake/ " while test $# -ne 0; do @@ -137,8 +152,13 @@ -o) chowncmd="$chownprog $2" shift;; + -p) cpprog="$cpprog -p";; + -s) stripcmd=$stripprog;; + -S) backupsuffix="$2" + shift;; + -t) is_target_a_directory=always dst_arg=$2 @@ -255,6 +275,10 @@ dstdir=$dst test -d "$dstdir" dstdir_status=$? + # Don't chown directories that already exist. + if test $dstdir_status = 0; then + chowncmd="" + fi else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command @@ -301,22 +325,6 @@ if test $dstdir_status != 0; then case $posix_mkdir in '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then @@ -326,52 +334,49 @@ fi posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - # Note that $RANDOM variable is not portable (e.g. dash); Use it - # here however when possible just to lower collision chance. - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - - trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 - - # Because "mkdir -p" follows existing symlinks and we likely work - # directly in world-writeable /tmp, make sure that the '$tmpdir' - # directory is successfully created first before we actually test - # 'mkdir -p' feature. - if (umask $mkdir_umask && - $mkdirprog $mkdir_mode "$tmpdir" && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - test_tmpdir="$tmpdir/a" - ls_ld_tmpdir=`ls -ld "$test_tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null - fi - trap '' 0;; - esac;; + # The $RANDOM variable is not portable (e.g., dash). Use it + # here however when possible just to lower collision chance. + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + + trap ' + ret=$? + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null + exit $ret + ' 0 + + # Because "mkdir -p" follows existing symlinks and we likely work + # directly in world-writeable /tmp, make sure that the '$tmpdir' + # directory is successfully created first before we actually test + # 'mkdir -p'. + if (umask $mkdir_umask && + $mkdirprog $mkdir_mode "$tmpdir" && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + test_tmpdir="$tmpdir/a" + ls_ld_tmpdir=`ls -ld "$test_tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null + fi + trap '' 0;; esac if @@ -382,7 +387,7 @@ then : else - # The umask is ridiculous, or mkdir does not conform to POSIX, + # mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. @@ -411,7 +416,7 @@ prefixes= else if $posix_mkdir; then - (umask=$mkdir_umask && + (umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 @@ -451,7 +456,18 @@ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. - (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + (umask $cp_umask && + { test -z "$stripcmd" || { + # Create $dsttmp read-write so that cp doesn't create it read-only, + # which would cause strip to fail. + if test -z "$doit"; then + : >"$dsttmp" # No need to fork-exec 'touch'. + else + $doit touch "$dsttmp" + fi + } + } && + $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # @@ -477,6 +493,13 @@ then rm -f "$dsttmp" else + # If $backupsuffix is set, and the file being installed + # already exists, attempt a backup. Don't worry if it fails, + # e.g., if mv doesn't support -f. + if test -n "$backupsuffix" && test -f "$dst"; then + $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null + fi + # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || @@ -491,9 +514,9 @@ # file should still install successfully. { test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || + $doit $rmcmd "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + { $doit $rmcmd "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 diff -Nru libfshfs-20201104/libbfio/Makefile.in libfshfs-20240221/libbfio/Makefile.in --- libfshfs-20201104/libbfio/Makefile.in 2020-11-04 11:56:31.000000000 +0000 +++ libfshfs-20240221/libbfio/Makefile.in 2024-02-21 06:04:25.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -91,25 +91,26 @@ subdir = libbfio ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcdata.m4 \ - $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \ - $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \ - $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcrypto.m4 \ - $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcthreads.m4 \ - $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ - $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ - $(top_srcdir)/m4/libhmac.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/libuna.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \ - $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \ - $(top_srcdir)/m4/zlib.m4 $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libbfio.m4 \ + $(top_srcdir)/m4/libcdata.m4 $(top_srcdir)/m4/libcerror.m4 \ + $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ + $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ + $(top_srcdir)/m4/libcrypto.m4 $(top_srcdir)/m4/libcsplit.m4 \ + $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \ + $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ + $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmos.m4 \ + $(top_srcdir)/m4/libfuse.m4 $(top_srcdir)/m4/libhmac.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/pthread.m4 \ + $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ + $(top_srcdir)/m4/types.m4 $(top_srcdir)/m4/zlib.m4 \ + $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) @@ -202,6 +203,7 @@ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -219,8 +221,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ @@ -237,6 +237,8 @@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ @@ -252,8 +254,10 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -273,6 +277,8 @@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ +HAVE_LIBFMOS = @HAVE_LIBFMOS@ +HAVE_LIBFUSE = @HAVE_LIBFUSE@ HAVE_LIBHMAC = @HAVE_LIBHMAC@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ @@ -288,6 +294,7 @@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ +HAVE_LOCAL_LIBFMOS = @HAVE_LOCAL_LIBFMOS@ HAVE_LOCAL_LIBHMAC = @HAVE_LOCAL_LIBHMAC@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ @@ -341,8 +348,12 @@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ +LIBFMOS_CPPFLAGS = @LIBFMOS_CPPFLAGS@ +LIBFMOS_LIBADD = @LIBFMOS_LIBADD@ LIBFSHFS_DLL_EXPORT = @LIBFSHFS_DLL_EXPORT@ LIBFSHFS_DLL_IMPORT = @LIBFSHFS_DLL_IMPORT@ +LIBFUSE_CPPFLAGS = @LIBFUSE_CPPFLAGS@ +LIBFUSE_LIBADD = @LIBFUSE_LIBADD@ LIBHMAC_CPPFLAGS = @LIBHMAC_CPPFLAGS@ LIBHMAC_LIBADD = @LIBHMAC_LIBADD@ LIBICONV = @LIBICONV@ @@ -364,8 +375,8 @@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ @@ -388,26 +399,6 @@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ -PYTHON2 = @PYTHON2@ -PYTHON2_CONFIG = @PYTHON2_CONFIG@ -PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ -PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ -PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ -PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ -PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ -PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ -PYTHON2_PREFIX = @PYTHON2_PREFIX@ -PYTHON2_VERSION = @PYTHON2_VERSION@ -PYTHON3 = @PYTHON3@ -PYTHON3_CONFIG = @PYTHON3_CONFIG@ -PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ -PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ -PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ -PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ -PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ -PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ -PYTHON3_PREFIX = @PYTHON3_PREFIX@ -PYTHON3_VERSION = @PYTHON3_VERSION@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ @@ -485,6 +476,12 @@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ +ax_libfmos_pc_libs_private = @ax_libfmos_pc_libs_private@ +ax_libfmos_spec_build_requires = @ax_libfmos_spec_build_requires@ +ax_libfmos_spec_requires = @ax_libfmos_spec_requires@ +ax_libfuse_pc_libs_private = @ax_libfuse_pc_libs_private@ +ax_libfuse_spec_build_requires = @ax_libfuse_spec_build_requires@ +ax_libfuse_spec_requires = @ax_libfuse_spec_requires@ ax_libhmac_pc_libs_private = @ax_libhmac_pc_libs_private@ ax_libhmac_spec_build_requires = @ax_libhmac_spec_build_requires@ ax_libhmac_spec_requires = @ax_libhmac_spec_requires@ @@ -509,6 +506,8 @@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +fuse_CFLAGS = @fuse_CFLAGS@ +fuse_LIBS = @fuse_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -546,6 +545,8 @@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ +libfmos_CFLAGS = @libfmos_CFLAGS@ +libfmos_LIBS = @libfmos_LIBS@ libfshfs_spec_requires = @libfshfs_spec_requires@ libfshfs_spec_tools_build_requires = @libfshfs_spec_tools_build_requires@ libhmac_CFLAGS = @libhmac_CFLAGS@ @@ -564,11 +565,8 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ -pyexecdir2 = @pyexecdir2@ -pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ -pythondir2 = @pythondir2@ -pythondir3 = @pythondir3@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -722,6 +720,8 @@ clean-libtool: -rm -rf .libs _libs +sources-local: +splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique @@ -774,7 +774,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am @@ -920,6 +919,12 @@ ps-am: +sources: sources-am + +sources-am: sources-local + +splint-am: splint-local + uninstall-am: .MAKE: install-am install-strip @@ -936,7 +941,8 @@ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am + sources-am sources-local splint splint-am splint-local tags \ + tags-am uninstall uninstall-am .PRECIOUS: Makefile diff -Nru libfshfs-20201104/libbfio/libbfio_codepage.h libfshfs-20240221/libbfio/libbfio_codepage.h --- libfshfs-20201104/libbfio/libbfio_codepage.h 2020-11-04 11:55:37.000000000 +0000 +++ libfshfs-20240221/libbfio/libbfio_codepage.h 2024-02-21 06:03:55.000000000 +0000 @@ -1,7 +1,7 @@ /* * Codepage functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2022, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libbfio/libbfio_definitions.h libfshfs-20240221/libbfio/libbfio_definitions.h --- libfshfs-20201104/libbfio/libbfio_definitions.h 2020-11-04 11:55:37.000000000 +0000 +++ libfshfs-20240221/libbfio/libbfio_definitions.h 2024-02-21 06:03:55.000000000 +0000 @@ -1,7 +1,7 @@ /* * The internal definitions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2022, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -33,11 +33,11 @@ * for local use of libbfio */ #else -#define LIBBFIO_VERSION 20200905 +#define LIBBFIO_VERSION 20221025 /* The libbfio version string */ -#define LIBBFIO_VERSION_STRING "20200905" +#define LIBBFIO_VERSION_STRING "20221025" /* The library flags definitions */ diff -Nru libfshfs-20201104/libbfio/libbfio_error.c libfshfs-20240221/libbfio/libbfio_error.c --- libfshfs-20201104/libbfio/libbfio_error.c 2020-11-04 11:55:37.000000000 +0000 +++ libfshfs-20240221/libbfio/libbfio_error.c 2024-02-21 06:03:55.000000000 +0000 @@ -1,7 +1,7 @@ /* * Error functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2022, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libbfio/libbfio_error.h libfshfs-20240221/libbfio/libbfio_error.h --- libfshfs-20201104/libbfio/libbfio_error.h 2020-11-04 11:55:37.000000000 +0000 +++ libfshfs-20240221/libbfio/libbfio_error.h 2024-02-21 06:03:55.000000000 +0000 @@ -1,7 +1,7 @@ /* * Error functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2022, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libbfio/libbfio_extern.h libfshfs-20240221/libbfio/libbfio_extern.h --- libfshfs-20201104/libbfio/libbfio_extern.h 2020-11-04 11:55:37.000000000 +0000 +++ libfshfs-20240221/libbfio/libbfio_extern.h 2024-02-21 06:03:55.000000000 +0000 @@ -1,7 +1,7 @@ /* * The internal extern definition * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2022, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -30,7 +30,11 @@ #include +#if defined( __CYGWIN__ ) || defined( __MINGW32__ ) +#define LIBBFIO_EXTERN_VARIABLE extern +#else #define LIBBFIO_EXTERN_VARIABLE LIBBFIO_EXTERN +#endif #else #define LIBBFIO_EXTERN /* extern */ diff -Nru libfshfs-20201104/libbfio/libbfio_file.c libfshfs-20240221/libbfio/libbfio_file.c --- libfshfs-20201104/libbfio/libbfio_file.c 2020-11-04 11:55:37.000000000 +0000 +++ libfshfs-20240221/libbfio/libbfio_file.c 2024-02-21 06:03:55.000000000 +0000 @@ -1,7 +1,7 @@ /* * File functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2022, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libbfio/libbfio_file.h libfshfs-20240221/libbfio/libbfio_file.h --- libfshfs-20201104/libbfio/libbfio_file.h 2020-11-04 11:55:37.000000000 +0000 +++ libfshfs-20240221/libbfio/libbfio_file.h 2024-02-21 06:03:55.000000000 +0000 @@ -1,7 +1,7 @@ /* * File functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2022, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libbfio/libbfio_file_io_handle.c libfshfs-20240221/libbfio/libbfio_file_io_handle.c --- libfshfs-20201104/libbfio/libbfio_file_io_handle.c 2020-11-04 11:55:37.000000000 +0000 +++ libfshfs-20240221/libbfio/libbfio_file_io_handle.c 2024-02-21 06:03:55.000000000 +0000 @@ -1,7 +1,7 @@ /* * File IO handle functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2022, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -416,13 +416,14 @@ return( -1 ); } - if( name_length == 0 ) + if( ( name_length == 0 ) + || ( name_length > ( (size_t) SSIZE_MAX - 1 ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, - "%s: invalid name length is zero.", + LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid name length value out of bounds.", function ); return( -1 ); @@ -458,8 +459,8 @@ memory_free( file_io_handle->name ); - file_io_handle->name = NULL; - file_io_handle->name_size = 0; + file_io_handle->name = NULL; + file_io_handle->name_size = 0; } if( libbfio_system_string_size_from_narrow_string( name, @@ -476,13 +477,14 @@ goto on_error; } - if( file_io_handle->name_size > ( (size_t) SSIZE_MAX / sizeof( system_character_t ) ) ) + if( ( file_io_handle->name_size == 0 ) + || ( file_io_handle->name_size > ( (size_t) SSIZE_MAX / sizeof( system_character_t ) ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, - "%s: invalid file IO handle - name size value exceeds maximum.", + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid file IO handle - name size value out of bounds.", function ); goto on_error; @@ -650,13 +652,14 @@ return( -1 ); } - if( name_length == 0 ) + if( ( name_length == 0 ) + || ( name_length > ( (size_t) SSIZE_MAX - 1 ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, - "%s: invalid name length is zero.", + LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid name length value out of bounds.", function ); return( -1 ); @@ -692,8 +695,8 @@ memory_free( file_io_handle->name ); - file_io_handle->name = NULL; - file_io_handle->name_size = 0; + file_io_handle->name = NULL; + file_io_handle->name_size = 0; } if( libbfio_system_string_size_from_wide_string( name, @@ -710,13 +713,14 @@ goto on_error; } - if( file_io_handle->name_size > ( (size_t) SSIZE_MAX / sizeof( system_character_t ) ) ) + if( ( file_io_handle->name_size == 0 ) + || ( file_io_handle->name_size > ( (size_t) SSIZE_MAX / sizeof( system_character_t ) ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, - "%s: invalid file IO handle - name size value exceeds maximum.", + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid file IO handle - name size value out of bounds.", function ); goto on_error; @@ -890,7 +894,7 @@ size_t size, libcerror_error_t **error ) { - static char *function = "libbfio_file_read_buffer"; + static char *function = "libbfio_file_io_handle_read_buffer"; ssize_t read_count = 0; if( file_io_handle == NULL ) diff -Nru libfshfs-20201104/libbfio/libbfio_file_io_handle.h libfshfs-20240221/libbfio/libbfio_file_io_handle.h --- libfshfs-20201104/libbfio/libbfio_file_io_handle.h 2020-11-04 11:55:37.000000000 +0000 +++ libfshfs-20240221/libbfio/libbfio_file_io_handle.h 2024-02-21 06:03:55.000000000 +0000 @@ -1,7 +1,7 @@ /* * File IO handle functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2022, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libbfio/libbfio_file_pool.c libfshfs-20240221/libbfio/libbfio_file_pool.c --- libfshfs-20201104/libbfio/libbfio_file_pool.c 2020-11-04 11:55:37.000000000 +0000 +++ libfshfs-20240221/libbfio/libbfio_file_pool.c 2024-02-21 06:03:55.000000000 +0000 @@ -1,7 +1,7 @@ /* * File pool functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2022, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -32,6 +32,230 @@ #include "libbfio_pool.h" #include "libbfio_types.h" +/* Opens a handle in the pool + * Returns 1 if successful or -1 on error + */ +int libbfio_file_pool_open( + libbfio_pool_t *pool, + int entry, + const char *name, + int access_flags, + libcerror_error_t **error ) +{ + libbfio_handle_t *file_io_handle = NULL; + static char *function = "libbfio_file_pool_open"; + size_t name_length = 0; + + if( pool == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid pool.", + function ); + + return( -1 ); + } + if( name == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid name.", + function ); + + return( -1 ); + } + if( libbfio_file_initialize( + &file_io_handle, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to create file IO handle.", + function ); + + goto on_error; + } + name_length = narrow_string_length( + name ); + + if( libbfio_file_set_name( + file_io_handle, + name, + name_length + 1, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to set name in file IO handle.", + function ); + + goto on_error; + } + if( libbfio_handle_open( + file_io_handle, + access_flags, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_OPEN_FAILED, + "%s: unable to open file IO handle.", + function ); + + goto on_error; + } + if( libbfio_pool_set_handle( + pool, + entry, + file_io_handle, + access_flags, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to set file IO handle: %d in pool.", + function, + entry ); + + goto on_error; + } + return( 1 ); + +on_error: + if( file_io_handle != NULL ) + { + libbfio_handle_free( + &file_io_handle, + NULL ); + } + return( -1 ); +} + +#if defined( HAVE_WIDE_CHARACTER_TYPE ) + +/* Opens a handle in the pool + * Returns 1 if successful or -1 on error + */ +int libbfio_file_pool_open_wide( + libbfio_pool_t *pool, + int entry, + const wchar_t *name, + int access_flags, + libcerror_error_t **error ) +{ + libbfio_handle_t *file_io_handle = NULL; + static char *function = "libbfio_file_pool_open_wide"; + size_t name_length = 0; + + if( pool == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid pool.", + function ); + + return( -1 ); + } + if( name == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid name.", + function ); + + return( -1 ); + } + if( libbfio_file_initialize( + &file_io_handle, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to create file IO handle.", + function ); + + goto on_error; + } + name_length = wide_string_length( + name ); + + if( libbfio_file_set_name_wide( + file_io_handle, + name, + name_length + 1, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to set name in file IO handle.", + function ); + + goto on_error; + } + if( libbfio_handle_open( + file_io_handle, + access_flags, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_OPEN_FAILED, + "%s: unable to open file IO handle.", + function ); + + goto on_error; + } + if( libbfio_pool_set_handle( + pool, + entry, + file_io_handle, + access_flags, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to set file IO handle: %d in pool.", + function, + entry ); + + goto on_error; + } + return( 1 ); + +on_error: + if( file_io_handle != NULL ) + { + libbfio_handle_free( + &file_io_handle, + NULL ); + } + return( -1 ); +} + +#endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ + /* Appends file handles to the pool for the corresponding filenames * Returns 1 if successful or -1 on error */ diff -Nru libfshfs-20201104/libbfio/libbfio_file_pool.h libfshfs-20240221/libbfio/libbfio_file_pool.h --- libfshfs-20201104/libbfio/libbfio_file_pool.h 2020-11-04 11:55:37.000000000 +0000 +++ libfshfs-20240221/libbfio/libbfio_file_pool.h 2024-02-21 06:03:55.000000000 +0000 @@ -1,7 +1,7 @@ /* * File pool functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2022, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -34,6 +34,26 @@ #endif LIBBFIO_EXTERN \ +int libbfio_file_pool_open( + libbfio_pool_t *pool, + int entry, + const char *name, + int access_flags, + libcerror_error_t **error ); + +#if defined( HAVE_WIDE_CHARACTER_TYPE ) + +LIBBFIO_EXTERN \ +int libbfio_file_pool_open_wide( + libbfio_pool_t *pool, + int entry, + const wchar_t *name, + int access_flags, + libcerror_error_t **error ); + +#endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ + +LIBBFIO_EXTERN \ int libbfio_file_pool_append_handles_for_names( libbfio_pool_t *pool, char * const names[], diff -Nru libfshfs-20201104/libbfio/libbfio_file_range.c libfshfs-20240221/libbfio/libbfio_file_range.c --- libfshfs-20201104/libbfio/libbfio_file_range.c 2020-11-04 11:55:37.000000000 +0000 +++ libfshfs-20240221/libbfio/libbfio_file_range.c 2024-02-21 06:03:55.000000000 +0000 @@ -1,7 +1,7 @@ /* * File range functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2022, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libbfio/libbfio_file_range.h libfshfs-20240221/libbfio/libbfio_file_range.h --- libfshfs-20201104/libbfio/libbfio_file_range.h 2020-11-04 11:55:37.000000000 +0000 +++ libfshfs-20240221/libbfio/libbfio_file_range.h 2024-02-21 06:03:55.000000000 +0000 @@ -1,7 +1,7 @@ /* * File range functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2022, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libbfio/libbfio_file_range_io_handle.c libfshfs-20240221/libbfio/libbfio_file_range_io_handle.c --- libfshfs-20201104/libbfio/libbfio_file_range_io_handle.c 2020-11-04 11:55:37.000000000 +0000 +++ libfshfs-20240221/libbfio/libbfio_file_range_io_handle.c 2024-02-21 06:03:55.000000000 +0000 @@ -1,7 +1,7 @@ /* * File range IO handle functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2022, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libbfio/libbfio_file_range_io_handle.h libfshfs-20240221/libbfio/libbfio_file_range_io_handle.h --- libfshfs-20201104/libbfio/libbfio_file_range_io_handle.h 2020-11-04 11:55:37.000000000 +0000 +++ libfshfs-20240221/libbfio/libbfio_file_range_io_handle.h 2024-02-21 06:03:55.000000000 +0000 @@ -1,7 +1,7 @@ /* * File range IO handle functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2022, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libbfio/libbfio_handle.c libfshfs-20240221/libbfio/libbfio_handle.c --- libfshfs-20201104/libbfio/libbfio_handle.c 2020-11-04 11:55:37.000000000 +0000 +++ libfshfs-20240221/libbfio/libbfio_handle.c 2024-02-21 06:03:55.000000000 +0000 @@ -1,7 +1,7 @@ /* * The handle functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2022, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -976,22 +976,22 @@ return( -1 ); } -/* Reads a buffer from the handle +/* Reads data at the current offset into the buffer + * This function is not multi-thread safe acquire write lock before call * Returns the number of bytes read if successful, or -1 on error */ -ssize_t libbfio_handle_read_buffer( - libbfio_handle_t *handle, +ssize_t libbfio_internal_handle_read_buffer( + libbfio_internal_handle_t *internal_handle, uint8_t *buffer, size_t size, libcerror_error_t **error ) { - libbfio_internal_handle_t *internal_handle = NULL; - static char *function = "libbfio_handle_read_buffer"; - ssize_t read_count = 0; - int is_open = 0; - int result = 0; + static char *function = "libbfio_internal_handle_read_buffer"; + ssize_t read_count = 0; + int is_open = 0; + int result = 0; - if( handle == NULL ) + if( internal_handle == NULL ) { libcerror_error_set( error, @@ -1002,19 +1002,6 @@ return( -1 ); } - internal_handle = (libbfio_internal_handle_t *) handle; - - if( internal_handle->io_handle == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, - "%s: invalid handle - missing IO handle.", - function ); - - return( -1 ); - } if( internal_handle->read == NULL ) { libcerror_error_set( @@ -1048,21 +1035,6 @@ return( -1 ); } -#if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) - if( libcthreads_read_write_lock_grab_for_write( - internal_handle->read_write_lock, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to grab read/write lock for writing.", - function ); - - return( -1 ); - } -#endif if( internal_handle->open_on_demand != 0 ) { if( internal_handle->is_open == NULL ) @@ -1074,7 +1046,7 @@ "%s: invalid handle - missing is open function.", function ); - goto on_error; + return( -1 ); } if( internal_handle->open == NULL ) { @@ -1085,7 +1057,7 @@ "%s: invalid handle - missing open function.", function ); - goto on_error; + return( -1 ); } if( internal_handle->seek_offset == NULL ) { @@ -1096,7 +1068,7 @@ "%s: invalid handle - missing seek offset function.", function ); - goto on_error; + return( -1 ); } is_open = internal_handle->is_open( internal_handle->io_handle, @@ -1111,7 +1083,7 @@ "%s: unable to determine if handle is open.", function ); - goto on_error; + return( -1 ); } else if( is_open == 0 ) { @@ -1127,7 +1099,7 @@ "%s: unable to open handle on demand.", function ); - goto on_error; + return( -1 ); } if( internal_handle->seek_offset( internal_handle->io_handle, @@ -1143,7 +1115,7 @@ function, internal_handle->current_offset ); - goto on_error; + return( -1 ); } } } @@ -1162,7 +1134,7 @@ "%s: unable to read from handle.", function ); - goto on_error; + return( -1 ); } if( internal_handle->track_offsets_read != 0 ) { @@ -1184,7 +1156,7 @@ "%s: unable to insert offset range to offsets read table.", function ); - goto on_error; + return( -1 ); } } internal_handle->current_offset += (off64_t) read_count; @@ -1200,7 +1172,7 @@ "%s: invalid handle - missing close function.", function ); - goto on_error; + return( -1 ); } if( internal_handle->close( internal_handle->io_handle, @@ -1213,11 +1185,51 @@ "%s: unable to close handle on demand.", function ); - goto on_error; + return( -1 ); } } + return( read_count ); +} + +/* Reads data at the current offset into the buffer + * Returns the number of bytes read if successful, or -1 on error + */ +ssize_t libbfio_handle_read_buffer( + libbfio_handle_t *handle, + uint8_t *buffer, + size_t size, + libcerror_error_t **error ) +{ + libbfio_internal_handle_t *internal_handle = NULL; + static char *function = "libbfio_handle_read_buffer"; + ssize_t read_count = 0; + + if( handle == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid handle.", + function ); + + return( -1 ); + } + internal_handle = (libbfio_internal_handle_t *) handle; + + if( internal_handle->io_handle == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, + "%s: invalid handle - missing IO handle.", + function ); + + return( -1 ); + } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) - if( libcthreads_read_write_lock_release_for_write( + if( libcthreads_read_write_lock_grab_for_write( internal_handle->read_write_lock, error ) != 1 ) { @@ -1225,35 +1237,60 @@ error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to release read/write lock for writing.", + "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } #endif - return( read_count ); + read_count = libbfio_internal_handle_read_buffer( + internal_handle, + buffer, + size, + error ); -on_error: + if( read_count < 0 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_READ_FAILED, + "%s: unable to read buffer.", + function ); + + read_count = -1; + } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) - libcthreads_read_write_lock_release_for_write( - internal_handle->read_write_lock, - NULL ); + if( libcthreads_read_write_lock_release_for_write( + internal_handle->read_write_lock, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to release read/write lock for writing.", + function ); + + return( -1 ); + } #endif - return( -1 ); + return( read_count ); } -/* Writes a buffer to the handle - * Returns the number of bytes written if successful, or -1 on error +/* Reads data at a specific offset into the buffer + * Returns the number of bytes read if successful, or -1 on error */ -ssize_t libbfio_handle_write_buffer( +ssize_t libbfio_handle_read_buffer_at_offset( libbfio_handle_t *handle, - const uint8_t *buffer, + uint8_t *buffer, size_t size, + off64_t offset, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; - static char *function = "libbfio_handle_write_buffer"; - ssize_t write_count = 0; + static char *function = "libbfio_handle_read_buffer_at_offset"; + ssize_t read_count = 0; if( handle == NULL ) { @@ -1279,6 +1316,100 @@ return( -1 ); } +#if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) + if( libcthreads_read_write_lock_grab_for_write( + internal_handle->read_write_lock, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to grab read/write lock for writing.", + function ); + + return( -1 ); + } +#endif + if( libbfio_internal_handle_seek_offset( + internal_handle, + offset, + SEEK_SET, + error ) == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_SEEK_FAILED, + "%s: unable to seek offset: %" PRIi64 " (0x%08" PRIx64 ") in handle.", + function, + offset, + offset ); + + read_count = -1; + } + else + { + read_count = libbfio_internal_handle_read_buffer( + internal_handle, + buffer, + size, + error ); + + if( read_count < 0 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_READ_FAILED, + "%s: unable to read buffer.", + function ); + + read_count = -1; + } + } +#if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) + if( libcthreads_read_write_lock_release_for_write( + internal_handle->read_write_lock, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to release read/write lock for writing.", + function ); + + return( -1 ); + } +#endif + return( read_count ); +} + +/* Writes data at the current offset from the buffer + * This function is not multi-thread safe acquire write lock before call + * Returns the number of bytes written if successful, or -1 on error + */ +ssize_t libbfio_internal_handle_write_buffer( + libbfio_internal_handle_t *internal_handle, + const uint8_t *buffer, + size_t size, + libcerror_error_t **error ) +{ + static char *function = "libbfio_internal_handle_write_buffer"; + ssize_t write_count = 0; + + if( internal_handle == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid handle.", + function ); + + return( -1 ); + } if( internal_handle->write == NULL ) { libcerror_error_set( @@ -1312,6 +1443,69 @@ return( -1 ); } + write_count = internal_handle->write( + internal_handle->io_handle, + buffer, + size, + error ); + + if( write_count < 0 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_WRITE_FAILED, + "%s: unable to write to handle.", + function ); + + return( -1 ); + } + internal_handle->current_offset += (off64_t) write_count; + + if( (size64_t) internal_handle->current_offset > internal_handle->size ) + { + internal_handle->size = (size64_t) internal_handle->current_offset; + } + return( write_count ); +} + +/* Writes data at the current offset from the buffer + * Returns the number of bytes written if successful, or -1 on error + */ +ssize_t libbfio_handle_write_buffer( + libbfio_handle_t *handle, + const uint8_t *buffer, + size_t size, + libcerror_error_t **error ) +{ + libbfio_internal_handle_t *internal_handle = NULL; + static char *function = "libbfio_handle_write_buffer"; + ssize_t write_count = 0; + + if( handle == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid handle.", + function ); + + return( -1 ); + } + internal_handle = (libbfio_internal_handle_t *) handle; + + if( internal_handle->io_handle == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, + "%s: invalid handle - missing IO handle.", + function ); + + return( -1 ); + } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_grab_for_write( internal_handle->read_write_lock, @@ -1327,8 +1521,8 @@ return( -1 ); } #endif - write_count = internal_handle->write( - internal_handle->io_handle, + write_count = libbfio_internal_handle_write_buffer( + internal_handle, buffer, size, error ); @@ -1342,13 +1536,7 @@ "%s: unable to write to handle.", function ); - goto on_error; - } - internal_handle->current_offset += (off64_t) write_count; - - if( (size64_t) internal_handle->current_offset > internal_handle->size ) - { - internal_handle->size = (size64_t) internal_handle->current_offset; + write_count = -1; } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_write( @@ -1366,28 +1554,21 @@ } #endif return( write_count ); - -on_error: -#if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) - libcthreads_read_write_lock_release_for_write( - internal_handle->read_write_lock, - NULL ); -#endif - return( -1 ); } -/* Seeks a certain offset within the handle - * Returns the offset if the seek is successful or -1 on error +/* Writes data at a specific offset from the buffer + * Returns the number of bytes written if successful, or -1 on error */ -off64_t libbfio_handle_seek_offset( +ssize_t libbfio_handle_write_buffer_at_offset( libbfio_handle_t *handle, + const uint8_t *buffer, + size_t size, off64_t offset, - int whence, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; - static char *function = "libbfio_handle_seek_offset"; - off64_t seek_offset = 0; + static char *function = "libbfio_handle_write_buffer_at_offset"; + ssize_t write_count = 0; if( handle == NULL ) { @@ -1413,6 +1594,99 @@ return( -1 ); } +#if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) + if( libcthreads_read_write_lock_grab_for_write( + internal_handle->read_write_lock, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to grab read/write lock for writing.", + function ); + + return( -1 ); + } +#endif + if( libbfio_internal_handle_seek_offset( + internal_handle, + offset, + SEEK_SET, + error ) == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_SEEK_FAILED, + "%s: unable to seek offset: %" PRIi64 " (0x%08" PRIx64 ") in handle.", + function, + offset, + offset ); + + write_count = -1; + } + else + { + write_count = libbfio_internal_handle_write_buffer( + internal_handle, + buffer, + size, + error ); + + if( write_count < 0 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_WRITE_FAILED, + "%s: unable to write to handle.", + function ); + + write_count = -1; + } + } +#if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) + if( libcthreads_read_write_lock_release_for_write( + internal_handle->read_write_lock, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to release read/write lock for writing.", + function ); + + return( -1 ); + } +#endif + return( write_count ); +} + +/* Seeks a certain offset within the handle + * This function is not multi-thread safe acquire write lock before call + * Returns the offset if the seek is successful or -1 on error + */ +off64_t libbfio_internal_handle_seek_offset( + libbfio_internal_handle_t *internal_handle, + off64_t offset, + int whence, + libcerror_error_t **error ) +{ + static char *function = "libbfio_internal_handle_seek_offset"; + + if( internal_handle == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid handle.", + function ); + + return( -1 ); + } if( internal_handle->seek_offset == NULL ) { libcerror_error_set( @@ -1437,6 +1711,64 @@ return( -1 ); } + offset = internal_handle->seek_offset( + internal_handle->io_handle, + offset, + whence, + error ); + + if( offset == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_SEEK_FAILED, + "%s: unable to seek offset in handle.", + function ); + + return( -1 ); + } + internal_handle->current_offset = offset; + + return( offset ); +} + +/* Seeks a certain offset within the handle + * Returns the offset if the seek is successful or -1 on error + */ +off64_t libbfio_handle_seek_offset( + libbfio_handle_t *handle, + off64_t offset, + int whence, + libcerror_error_t **error ) +{ + libbfio_internal_handle_t *internal_handle = NULL; + static char *function = "libbfio_handle_seek_offset"; + + if( handle == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid handle.", + function ); + + return( -1 ); + } + internal_handle = (libbfio_internal_handle_t *) handle; + + if( internal_handle->io_handle == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, + "%s: invalid handle - missing IO handle.", + function ); + + return( -1 ); + } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_grab_for_write( internal_handle->read_write_lock, @@ -1452,26 +1784,23 @@ return( -1 ); } #endif - seek_offset = internal_handle->seek_offset( - internal_handle->io_handle, - offset, - whence, - error ); + offset = libbfio_internal_handle_seek_offset( + internal_handle, + offset, + whence, + error ); - if( seek_offset == -1 ) + if( offset == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, - "%s: unable to seek offset: %" PRIi64 " in handle.", - function, - offset ); + "%s: unable to seek offset in handle.", + function ); - goto on_error; + offset = -1; } - internal_handle->current_offset = seek_offset; - #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_write( internal_handle->read_write_lock, @@ -1487,15 +1816,7 @@ return( -1 ); } #endif - return( seek_offset ); - -on_error: -#if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) - libcthreads_read_write_lock_release_for_write( - internal_handle->read_write_lock, - NULL ); -#endif - return( -1 ); + return( offset ); } /* Function to determine if a file object exists @@ -2244,6 +2565,7 @@ { libbfio_internal_handle_t *internal_handle = NULL; static char *function = "libbfio_handle_get_number_of_offsets_read"; + int result = 1; if( handle == NULL ) { @@ -2285,7 +2607,7 @@ "%s: unable to retrieve number of read offsets.", function ); - goto on_error; + result = -1; } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_read( @@ -2302,15 +2624,7 @@ return( -1 ); } #endif - return( 1 ); - -on_error: -#if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) - libcthreads_read_write_lock_release_for_read( - internal_handle->read_write_lock, - NULL ); -#endif - return( -1 ); + return( result ); } /* Retrieves the information of an offset read @@ -2324,8 +2638,9 @@ libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; - static char *function = "libbfio_handle_get_offset_read"; intptr_t *value = NULL; + static char *function = "libbfio_handle_get_offset_read"; + int result = 1; if( handle == NULL ) { @@ -2371,7 +2686,7 @@ function, index ); - goto on_error; + result = -1; } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_read( @@ -2388,14 +2703,6 @@ return( -1 ); } #endif - return( 1 ); - -on_error: -#if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) - libcthreads_read_write_lock_release_for_read( - internal_handle->read_write_lock, - NULL ); -#endif - return( -1 ); + return( result ); } diff -Nru libfshfs-20201104/libbfio/libbfio_handle.h libfshfs-20240221/libbfio/libbfio_handle.h --- libfshfs-20201104/libbfio/libbfio_handle.h 2020-11-04 11:55:37.000000000 +0000 +++ libfshfs-20240221/libbfio/libbfio_handle.h 2024-02-21 06:03:55.000000000 +0000 @@ -1,7 +1,7 @@ /* * The handle functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2022, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -234,6 +234,12 @@ libbfio_handle_t *handle, libcerror_error_t **error ); +ssize_t libbfio_internal_handle_read_buffer( + libbfio_internal_handle_t *internal_handle, + uint8_t *buffer, + size_t size, + libcerror_error_t **error ); + LIBBFIO_EXTERN \ ssize_t libbfio_handle_read_buffer( libbfio_handle_t *handle, @@ -242,6 +248,20 @@ libcerror_error_t **error ); LIBBFIO_EXTERN \ +ssize_t libbfio_handle_read_buffer_at_offset( + libbfio_handle_t *handle, + uint8_t *buffer, + size_t size, + off64_t offset, + libcerror_error_t **error ); + +ssize_t libbfio_internal_handle_write_buffer( + libbfio_internal_handle_t *internal_handle, + const uint8_t *buffer, + size_t size, + libcerror_error_t **error ); + +LIBBFIO_EXTERN \ ssize_t libbfio_handle_write_buffer( libbfio_handle_t *handle, const uint8_t *buffer, @@ -249,6 +269,20 @@ libcerror_error_t **error ); LIBBFIO_EXTERN \ +ssize_t libbfio_handle_write_buffer_at_offset( + libbfio_handle_t *handle, + const uint8_t *buffer, + size_t size, + off64_t offset, + libcerror_error_t **error ); + +off64_t libbfio_internal_handle_seek_offset( + libbfio_internal_handle_t *internal_handle, + off64_t offset, + int whence, + libcerror_error_t **error ); + +LIBBFIO_EXTERN \ off64_t libbfio_handle_seek_offset( libbfio_handle_t *handle, off64_t offset, diff -Nru libfshfs-20201104/libbfio/libbfio_libcdata.h libfshfs-20240221/libbfio/libbfio_libcdata.h --- libfshfs-20201104/libbfio/libbfio_libcdata.h 2020-11-04 11:55:37.000000000 +0000 +++ libfshfs-20240221/libbfio/libbfio_libcdata.h 2024-02-21 06:03:55.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libcdata header wrapper * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2022, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libbfio/libbfio_libcerror.h libfshfs-20240221/libbfio/libbfio_libcerror.h --- libfshfs-20201104/libbfio/libbfio_libcerror.h 2020-11-04 11:55:37.000000000 +0000 +++ libfshfs-20240221/libbfio/libbfio_libcerror.h 2024-02-21 06:03:55.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libcerror header wrapper * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2022, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libbfio/libbfio_libcfile.h libfshfs-20240221/libbfio/libbfio_libcfile.h --- libfshfs-20201104/libbfio/libbfio_libcfile.h 2020-11-04 11:55:37.000000000 +0000 +++ libfshfs-20240221/libbfio/libbfio_libcfile.h 2024-02-21 06:03:55.000000000 +0000 @@ -1,7 +1,7 @@ /* * The internal libcfile header * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2022, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libbfio/libbfio_libclocale.h libfshfs-20240221/libbfio/libbfio_libclocale.h --- libfshfs-20201104/libbfio/libbfio_libclocale.h 2020-11-04 11:55:37.000000000 +0000 +++ libfshfs-20240221/libbfio/libbfio_libclocale.h 2024-02-21 06:03:55.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libclocale header wrapper * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2022, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libbfio/libbfio_libcpath.h libfshfs-20240221/libbfio/libbfio_libcpath.h --- libfshfs-20201104/libbfio/libbfio_libcpath.h 2020-11-04 11:55:37.000000000 +0000 +++ libfshfs-20240221/libbfio/libbfio_libcpath.h 2024-02-21 06:03:55.000000000 +0000 @@ -1,7 +1,7 @@ /* * The internal libcpath header * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2022, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libbfio/libbfio_libcthreads.h libfshfs-20240221/libbfio/libbfio_libcthreads.h --- libfshfs-20201104/libbfio/libbfio_libcthreads.h 2020-11-04 11:55:37.000000000 +0000 +++ libfshfs-20240221/libbfio/libbfio_libcthreads.h 2024-02-21 06:03:55.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libcthreads header wrapper * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2022, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libbfio/libbfio_libuna.h libfshfs-20240221/libbfio/libbfio_libuna.h --- libfshfs-20201104/libbfio/libbfio_libuna.h 2020-11-04 11:55:37.000000000 +0000 +++ libfshfs-20240221/libbfio/libbfio_libuna.h 2024-02-21 06:03:55.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libuna header wrapper * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2022, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libbfio/libbfio_memory_range.c libfshfs-20240221/libbfio/libbfio_memory_range.c --- libfshfs-20201104/libbfio/libbfio_memory_range.c 2020-11-04 11:55:37.000000000 +0000 +++ libfshfs-20240221/libbfio/libbfio_memory_range.c 2024-02-21 06:03:55.000000000 +0000 @@ -1,7 +1,7 @@ /* * Memory range functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2022, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libbfio/libbfio_memory_range.h libfshfs-20240221/libbfio/libbfio_memory_range.h --- libfshfs-20201104/libbfio/libbfio_memory_range.h 2020-11-04 11:55:37.000000000 +0000 +++ libfshfs-20240221/libbfio/libbfio_memory_range.h 2024-02-21 06:03:55.000000000 +0000 @@ -1,7 +1,7 @@ /* * Memory range functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2022, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libbfio/libbfio_memory_range_io_handle.c libfshfs-20240221/libbfio/libbfio_memory_range_io_handle.c --- libfshfs-20201104/libbfio/libbfio_memory_range_io_handle.c 2020-11-04 11:55:37.000000000 +0000 +++ libfshfs-20240221/libbfio/libbfio_memory_range_io_handle.c 2024-02-21 06:03:55.000000000 +0000 @@ -1,7 +1,7 @@ /* * Memory range IO handle functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2022, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libbfio/libbfio_memory_range_io_handle.h libfshfs-20240221/libbfio/libbfio_memory_range_io_handle.h --- libfshfs-20201104/libbfio/libbfio_memory_range_io_handle.h 2020-11-04 11:55:37.000000000 +0000 +++ libfshfs-20240221/libbfio/libbfio_memory_range_io_handle.h 2024-02-21 06:03:55.000000000 +0000 @@ -1,7 +1,7 @@ /* * Memory range IO handle functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2022, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libbfio/libbfio_pool.c libfshfs-20240221/libbfio/libbfio_pool.c --- libfshfs-20201104/libbfio/libbfio_pool.c 2020-11-04 11:55:37.000000000 +0000 +++ libfshfs-20240221/libbfio/libbfio_pool.c 2024-02-21 06:03:55.000000000 +0000 @@ -1,7 +1,7 @@ /* * The internal pool functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2022, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -165,6 +165,7 @@ } #endif internal_pool->maximum_number_of_open_handles = maximum_number_of_open_handles; + internal_pool->current_entry = -1; *pool = (libbfio_pool_t *) internal_pool; @@ -360,6 +361,9 @@ goto on_error; } + internal_destination_pool->current_entry = -1; + internal_destination_pool->current_handle = NULL; + if( libcdata_array_clone( &( internal_destination_pool->handles_array ), internal_source_pool->handles_array, @@ -663,9 +667,10 @@ const libbfio_handle_t *handle, libcerror_error_t **error ) { - libbfio_internal_handle_t *internal_handle = NULL; - libcdata_list_element_t *last_used_list_element = NULL; - static char *function = "libbfio_internal_pool_append_handle_to_last_used_list"; + libbfio_internal_handle_t *internal_handle = NULL; + libcdata_list_element_t *last_used_list_element = NULL; + libcdata_list_element_t *safe_last_used_list_element = NULL; + static char *function = "libbfio_internal_pool_append_handle_to_last_used_list"; if( internal_pool == NULL ) { @@ -717,13 +722,13 @@ "%s: unable to retrieve last list element from last used list.", function ); - return( -1 ); + goto on_error; } } if( last_used_list_element == NULL ) { if( libcdata_list_element_initialize( - &last_used_list_element, + &safe_last_used_list_element, error ) != 1 ) { libcerror_error_set( @@ -733,9 +738,11 @@ "%s: unable to create last used list element.", function ); - return( -1 ); + goto on_error; } internal_pool->number_of_open_handles++; + + last_used_list_element = safe_last_used_list_element; } else { @@ -753,7 +760,7 @@ "%s: unable to retrieve value from last used list element.", function ); - return( -1 ); + goto on_error; } if( libcdata_list_remove_element( internal_pool->last_used_list, @@ -767,8 +774,12 @@ "%s: unable to remove last list element from last used list.", function ); - return( -1 ); + goto on_error; } + safe_last_used_list_element = last_used_list_element; + + internal_handle->pool_last_used_list_element = NULL; + if( internal_handle != NULL ) { if( libbfio_handle_close( @@ -782,15 +793,8 @@ "%s: unable to close handle.", function ); - libcdata_list_element_free( - &last_used_list_element, - NULL, - NULL ); - - return( -1 ); + goto on_error; } - internal_handle->pool_last_used_list_element = NULL; - /* Make sure the truncate flag is removed from the handle */ internal_handle->access_flags &= ~( LIBBFIO_ACCESS_FLAG_TRUNCATE ); @@ -807,13 +811,11 @@ error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to set value int last used list element.", + "%s: unable to set value in last used list element.", function ); - return( -1 ); + goto on_error; } - internal_handle->pool_last_used_list_element = last_used_list_element; - if( libcdata_list_prepend_element( internal_pool->last_used_list, last_used_list_element, @@ -826,14 +828,21 @@ "%s: unable to prepend last used list element to list.", function ); + goto on_error; + } + internal_handle->pool_last_used_list_element = last_used_list_element; + + return( 1 ); + +on_error: + if( safe_last_used_list_element != NULL ) + { libcdata_list_element_free( - &last_used_list_element, + &safe_last_used_list_element, NULL, NULL ); - - return( -1 ); } - return( 1 ); + return( -1 ); } /* Moves the handle to the front of the last used list @@ -896,11 +905,9 @@ "%s: unable to retrieve first list element from last used list.", function ); - return( -1 ); + goto on_error; } - last_used_list_element = internal_handle->pool_last_used_list_element; - - if( last_used_list_element == NULL ) + if( internal_handle->pool_last_used_list_element == NULL ) { libcerror_error_set( error, @@ -909,9 +916,9 @@ "%s: missing last used list element.", function ); - return( -1 ); + goto on_error; } - if( last_used_list_element != first_list_element ) + if( internal_handle->pool_last_used_list_element != first_list_element ) { if( libcdata_list_remove_element( internal_pool->last_used_list, @@ -925,8 +932,10 @@ "%s: unable to remove last used list element from list.", function ); - return( -1 ); + goto on_error; } + internal_handle->pool_last_used_list_element = NULL; + if( libcdata_list_prepend_element( internal_pool->last_used_list, last_used_list_element, @@ -939,17 +948,21 @@ "%s: unable to prepend last used list element to list.", function ); - internal_handle->pool_last_used_list_element = NULL; - - libcdata_list_element_free( - &last_used_list_element, - NULL, - NULL ); - - return( -1 ); + goto on_error; } + internal_handle->pool_last_used_list_element = last_used_list_element; } return( 1 ); + +on_error: + if( last_used_list_element != NULL ) + { + libcdata_list_element_free( + &last_used_list_element, + NULL, + NULL ); + } + return( -1 ); } /* Removes a handle from the last used list @@ -1051,6 +1064,20 @@ return( -1 ); } + if( libcdata_list_element_free( + &last_used_list_element, + NULL, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free last used list element.", + function ); + + return( -1 ); + } } return( 1 ); } @@ -1579,6 +1606,11 @@ } } } + if( entry == internal_pool->current_entry ) + { + internal_pool->current_entry = -1; + internal_pool->current_handle = NULL; + } } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_write( @@ -1605,7 +1637,7 @@ libcdata_array_set_entry_by_index( internal_pool->handles_array, entry, - NULL, + (intptr_t *) backup_handle, NULL ); return( -1 ); @@ -1713,6 +1745,11 @@ } if( result == 1 ) { + if( entry == internal_pool->current_entry ) + { + internal_pool->current_entry = -1; + internal_pool->current_handle = NULL; + } if( libcdata_array_set_entry_by_index( internal_pool->handles_array, entry, @@ -1859,10 +1896,11 @@ int maximum_number_of_open_handles, libcerror_error_t **error ) { - libbfio_internal_handle_t *internal_handle = NULL; - libbfio_internal_pool_t *internal_pool = NULL; - libcdata_list_element_t *last_used_list_element = NULL; - static char *function = "libbfio_pool_set_maximum_number_of_open_handles"; + libbfio_internal_handle_t *internal_handle = NULL; + libbfio_internal_pool_t *internal_pool = NULL; + libcdata_list_element_t *last_used_list_element = NULL; + libcdata_list_element_t *safe_last_used_list_element = NULL; + static char *function = "libbfio_pool_set_maximum_number_of_open_handles"; if( pool == NULL ) { @@ -1961,6 +1999,10 @@ goto on_error; } + safe_last_used_list_element = last_used_list_element; + + internal_handle->pool_last_used_list_element = NULL; + if( libbfio_handle_close( (libbfio_handle_t *) internal_handle, error ) != 0 ) @@ -1976,14 +2018,12 @@ } internal_pool->number_of_open_handles--; - internal_handle->pool_last_used_list_element = NULL; - /* Make sure the truncate flag is removed from the handle */ internal_handle->access_flags &= ~( LIBBFIO_ACCESS_FLAG_TRUNCATE ); if( libcdata_list_element_free( - &last_used_list_element, + &safe_last_used_list_element, NULL, error ) != 1 ) { @@ -2015,10 +2055,10 @@ return( 1 ); on_error: - if( last_used_list_element != NULL ) + if( safe_last_used_list_element != NULL ) { libcdata_list_element_free( - &last_used_list_element, + &safe_last_used_list_element, NULL, NULL ); } @@ -2033,18 +2073,17 @@ /* Opens a handle in the pool * Returns 1 if successful or -1 on error */ -int libbfio_pool_open( - libbfio_pool_t *pool, +int libbfio_internal_pool_open( + libbfio_internal_pool_t *internal_pool, int entry, int access_flags, libcerror_error_t **error ) { - libbfio_handle_t *handle = NULL; - libbfio_internal_pool_t *internal_pool = NULL; - static char *function = "libbfio_pool_open"; - int is_open = 0; + libbfio_handle_t *handle = NULL; + static char *function = "libbfio_internal_pool_open"; + int is_open = 0; - if( pool == NULL ) + if( internal_pool == NULL ) { libcerror_error_set( error, @@ -2055,23 +2094,6 @@ return( -1 ); } - internal_pool = (libbfio_internal_pool_t *) pool; - -#if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) - if( libcthreads_read_write_lock_grab_for_write( - internal_pool->read_write_lock, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to grab read/write lock for writing.", - function ); - - return( -1 ); - } -#endif if( libcdata_array_get_entry_by_index( internal_pool->handles_array, entry, @@ -2086,9 +2108,9 @@ function, entry ); - goto on_error; + return( -1 ); } - /* Make sure the handle is not open + /* Make sure the handle is not already open */ is_open = libbfio_handle_is_open( handle, @@ -2104,7 +2126,7 @@ function, entry ); - goto on_error; + return( -1 ); } else if( is_open == 1 ) { @@ -2116,7 +2138,7 @@ function, entry ); - goto on_error; + return( -1 ); } if( libbfio_internal_pool_open_handle( internal_pool, @@ -2132,10 +2154,42 @@ function, entry ); - goto on_error; + return( -1 ); } + internal_pool->current_entry = entry; + internal_pool->current_handle = handle; + + return( 1 ); +} + +/* Opens a handle in the pool + * Returns 1 if successful or -1 on error + */ +int libbfio_pool_open( + libbfio_pool_t *pool, + int entry, + int access_flags, + libcerror_error_t **error ) +{ + libbfio_internal_pool_t *internal_pool = NULL; + static char *function = "libbfio_pool_open"; + int result = 1; + + if( pool == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid pool.", + function ); + + return( -1 ); + } + internal_pool = (libbfio_internal_pool_t *) pool; + #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) - if( libcthreads_read_write_lock_release_for_write( + if( libcthreads_read_write_lock_grab_for_write( internal_pool->read_write_lock, error ) != 1 ) { @@ -2143,21 +2197,44 @@ error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to release read/write lock for writing.", + "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } #endif - return( 1 ); + if( libbfio_internal_pool_open( + internal_pool, + entry, + access_flags, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_OPEN_FAILED, + "%s: unable to open entry: %d.", + function, + entry ); -on_error: + result = -1; + } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) - libcthreads_read_write_lock_release_for_write( - internal_pool->read_write_lock, - NULL ); + if( libcthreads_read_write_lock_release_for_write( + internal_pool->read_write_lock, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to release read/write lock for writing.", + function ); + + return( -1 ); + } #endif - return( -1 ); + return( result ); } /* Reopens a handle in the pool @@ -2232,6 +2309,9 @@ goto on_error; } + internal_pool->current_entry = entry; + internal_pool->current_handle = handle; + #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_write( internal_pool->read_write_lock, @@ -2266,10 +2346,11 @@ int entry, libcerror_error_t **error ) { - libbfio_handle_t *handle = NULL; - libbfio_internal_handle_t *internal_handle = NULL; - libcdata_list_element_t *last_used_list_element = NULL; - static char *function = "libbfio_internal_pool_close"; + libbfio_handle_t *handle = NULL; + libbfio_internal_handle_t *internal_handle = NULL; + libcdata_list_element_t *last_used_list_element = NULL; + libcdata_list_element_t *safe_last_used_list_element = NULL; + static char *function = "libbfio_internal_pool_close"; if( internal_pool == NULL ) { @@ -2356,10 +2437,12 @@ goto on_error; } + safe_last_used_list_element = last_used_list_element; + internal_handle->pool_last_used_list_element = NULL; if( libcdata_list_element_free( - &last_used_list_element, + &safe_last_used_list_element, NULL, error ) != 1 ) { @@ -2387,13 +2470,18 @@ goto on_error; } + if( entry == internal_pool->current_entry ) + { + internal_pool->current_entry = -1; + internal_pool->current_handle = NULL; + } return( 0 ); on_error: - if( last_used_list_element != NULL ) + if( safe_last_used_list_element != NULL ) { libcdata_list_element_free( - &last_used_list_element, + &safe_last_used_list_element, NULL, NULL ); } @@ -2617,7 +2705,137 @@ return( -1 ); } -/* Reads a buffer from a handle in the pool +/* Retrieves a specific handle from the pool and opens it if needed + * Returns 1 if successful or -1 on error + */ +int libbfio_internal_pool_get_open_handle( + libbfio_internal_pool_t *internal_pool, + int entry, + libbfio_handle_t **handle, + libcerror_error_t **error ) +{ + libbfio_handle_t *safe_handle = NULL; + static char *function = "libbfio_internal_pool_get_open_handle"; + int access_flags = 0; + int is_open = 0; + + if( internal_pool == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid pool.", + function ); + + return( -1 ); + } + if( handle == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid handle.", + function ); + + return( -1 ); + } + if( entry != internal_pool->current_entry ) + { + if( libcdata_array_get_entry_by_index( + internal_pool->handles_array, + entry, + (intptr_t **) &safe_handle, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve handle: %d.", + function, + entry ); + + return( -1 ); + } + /* Make sure the handle is open + */ + is_open = libbfio_handle_is_open( + safe_handle, + error ); + + if( is_open == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to determine if entry: %d is open.", + function, + entry ); + + return( -1 ); + } + else if( is_open == 0 ) + { + if( libbfio_handle_get_access_flags( + safe_handle, + &access_flags, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve access flags.", + function ); + + return( -1 ); + } + if( libbfio_internal_pool_open_handle( + internal_pool, + safe_handle, + access_flags, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_OPEN_FAILED, + "%s: unable to open entry: %d.", + function, + entry ); + + return( -1 ); + } + } + if( internal_pool->maximum_number_of_open_handles != LIBBFIO_POOL_UNLIMITED_NUMBER_OF_OPEN_HANDLES ) + { + if( libbfio_internal_pool_move_handle_to_front_of_last_used_list( + internal_pool, + safe_handle, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to move handle to front of last used list.", + function ); + + return( -1 ); + } + } + internal_pool->current_entry = entry; + internal_pool->current_handle = safe_handle; + } + *handle = internal_pool->current_handle; + + return( 1 ); +} + +/* Reads data at the current offset into the buffer * Returns the number of bytes read or -1 on error */ ssize_t libbfio_pool_read_buffer( @@ -2631,8 +2849,6 @@ libbfio_internal_pool_t *internal_pool = NULL; static char *function = "libbfio_pool_read_buffer"; ssize_t read_count = 0; - int access_flags = 0; - int is_open = 0; if( pool == NULL ) { @@ -2662,10 +2878,10 @@ return( -1 ); } #endif - if( libcdata_array_get_entry_by_index( - internal_pool->handles_array, + if( libbfio_internal_pool_get_open_handle( + internal_pool, entry, - (intptr_t **) &handle, + &handle, error ) != 1 ) { libcerror_error_set( @@ -2676,93 +2892,130 @@ function, entry ); - goto on_error; - } - /* Make sure the handle is open - */ - is_open = libbfio_handle_is_open( - handle, - error ); - - if( is_open == -1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to determine if entry: %d is open.", - function, - entry ); - - goto on_error; + read_count = -1; } - else if( is_open == 0 ) + else { - if( libbfio_handle_get_access_flags( - handle, - &access_flags, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve access flags.", - function ); + read_count = libbfio_handle_read_buffer( + handle, + buffer, + size, + error ); - goto on_error; - } - if( libbfio_internal_pool_open_handle( - internal_pool, - handle, - access_flags, - error ) != 1 ) + if( read_count < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, - LIBCERROR_IO_ERROR_OPEN_FAILED, - "%s: unable to open entry: %d.", + LIBCERROR_IO_ERROR_READ_FAILED, + "%s: unable to read from entry: %d.", function, entry ); - goto on_error; + read_count = -1; } } - if( internal_pool->maximum_number_of_open_handles != LIBBFIO_POOL_UNLIMITED_NUMBER_OF_OPEN_HANDLES ) +#if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) + if( libcthreads_read_write_lock_release_for_write( + internal_pool->read_write_lock, + error ) != 1 ) { - if( libbfio_internal_pool_move_handle_to_front_of_last_used_list( - internal_pool, - handle, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to move handle to front of last used list.", - function ); + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to release read/write lock for writing.", + function ); - goto on_error; - } + return( -1 ); } - read_count = libbfio_handle_read_buffer( - handle, - buffer, - size, - error ); +#endif + return( read_count ); +} - if( read_count < 0 ) +/* Reads data at a specific offset into the buffer + * Returns the number of bytes read or -1 on error + */ +ssize_t libbfio_pool_read_buffer_at_offset( + libbfio_pool_t *pool, + int entry, + uint8_t *buffer, + size_t size, + off64_t offset, + libcerror_error_t **error ) +{ + libbfio_handle_t *handle = NULL; + libbfio_internal_pool_t *internal_pool = NULL; + static char *function = "libbfio_pool_read_buffer_at_offset"; + ssize_t read_count = 0; + + if( pool == NULL ) { libcerror_error_set( error, - LIBCERROR_ERROR_DOMAIN_IO, - LIBCERROR_IO_ERROR_READ_FAILED, - "%s: unable to read from entry: %d.", + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid pool.", + function ); + + return( -1 ); + } + internal_pool = (libbfio_internal_pool_t *) pool; + +#if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) + if( libcthreads_read_write_lock_grab_for_write( + internal_pool->read_write_lock, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to grab read/write lock for writing.", + function ); + + return( -1 ); + } +#endif + if( libbfio_internal_pool_get_open_handle( + internal_pool, + entry, + &handle, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve handle: %d.", function, entry ); - goto on_error; + read_count = -1; + } + else + { + read_count = libbfio_handle_read_buffer_at_offset( + handle, + buffer, + size, + offset, + error ); + + if( read_count < 0 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_READ_FAILED, + "%s: unable to read from entry: %d at offset: %" PRIi64 " (0x%08" PRIx64 ").", + function, + entry, + offset, + offset ); + + read_count = -1; + } } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_write( @@ -2780,17 +3033,9 @@ } #endif return( read_count ); - -on_error: -#if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) - libcthreads_read_write_lock_release_for_write( - internal_pool->read_write_lock, - NULL ); -#endif - return( -1 ); } -/* Writes a buffer to a handle in the pool +/* Writes data at the current offset from the buffer * Returns the number of bytes written or -1 on error */ ssize_t libbfio_pool_write_buffer( @@ -2804,8 +3049,6 @@ libbfio_internal_pool_t *internal_pool = NULL; static char *function = "libbfio_pool_write_buffer"; ssize_t write_count = 0; - int access_flags = 0; - int is_open = 0; if( pool == NULL ) { @@ -2835,10 +3078,10 @@ return( -1 ); } #endif - if( libcdata_array_get_entry_by_index( - internal_pool->handles_array, + if( libbfio_internal_pool_get_open_handle( + internal_pool, entry, - (intptr_t **) &handle, + &handle, error ) != 1 ) { libcerror_error_set( @@ -2849,93 +3092,130 @@ function, entry ); - goto on_error; + write_count = -1; } - /* Make sure the handle is open - */ - is_open = libbfio_handle_is_open( - handle, - error ); - - if( is_open == -1 ) + else { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to determine if entry: %d is open.", - function, - entry ); + write_count = libbfio_handle_write_buffer( + handle, + buffer, + size, + error ); - goto on_error; - } - else if( is_open == 0 ) - { - if( libbfio_handle_get_access_flags( - handle, - &access_flags, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve access flags.", - function ); - - goto on_error; - } - if( libbfio_internal_pool_open_handle( - internal_pool, - handle, - access_flags, - error ) != 1 ) + if( write_count < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, - LIBCERROR_IO_ERROR_OPEN_FAILED, - "%s: unable to open entry: %d.", + LIBCERROR_IO_ERROR_WRITE_FAILED, + "%s: unable to write to entry: %d.", function, entry ); - goto on_error; + write_count = -1; } } - if( internal_pool->maximum_number_of_open_handles != LIBBFIO_POOL_UNLIMITED_NUMBER_OF_OPEN_HANDLES ) +#if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) + if( libcthreads_read_write_lock_release_for_write( + internal_pool->read_write_lock, + error ) != 1 ) { - if( libbfio_internal_pool_move_handle_to_front_of_last_used_list( - internal_pool, - handle, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to move handle to front of last used list.", - function ); + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to release read/write lock for writing.", + function ); - goto on_error; - } + return( -1 ); + } +#endif + return( write_count ); +} + +/* Writes data at a specific offset from the buffer + * Returns the number of bytes written or -1 on error + */ +ssize_t libbfio_pool_write_buffer_at_offset( + libbfio_pool_t *pool, + int entry, + const uint8_t *buffer, + size_t size, + off64_t offset, + libcerror_error_t **error ) +{ + libbfio_handle_t *handle = NULL; + libbfio_internal_pool_t *internal_pool = NULL; + static char *function = "libbfio_pool_write_buffer_at_offset"; + ssize_t write_count = 0; + + if( pool == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid pool.", + function ); + + return( -1 ); } - write_count = libbfio_handle_write_buffer( - handle, - buffer, - size, - error ); + internal_pool = (libbfio_internal_pool_t *) pool; - if( write_count < 0 ) +#if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) + if( libcthreads_read_write_lock_grab_for_write( + internal_pool->read_write_lock, + error ) != 1 ) { libcerror_error_set( error, - LIBCERROR_ERROR_DOMAIN_IO, - LIBCERROR_IO_ERROR_WRITE_FAILED, - "%s: unable to write to entry: %d.", + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to grab read/write lock for writing.", + function ); + + return( -1 ); + } +#endif + if( libbfio_internal_pool_get_open_handle( + internal_pool, + entry, + &handle, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve handle: %d.", function, entry ); - goto on_error; + write_count = -1; + } + else + { + write_count = libbfio_handle_write_buffer_at_offset( + handle, + buffer, + size, + offset, + error ); + + if( write_count < 0 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_WRITE_FAILED, + "%s: unable to write to entry: %d at offset: %" PRIi64 " (0x%08" PRIx64 ").", + function, + entry, + offset, + offset ); + + write_count = -1; + } } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_write( @@ -2953,14 +3233,6 @@ } #endif return( write_count ); - -on_error: -#if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) - libcthreads_read_write_lock_release_for_write( - internal_pool->read_write_lock, - NULL ); -#endif - return( -1 ); } /* Seeks an offset in a handle in the pool @@ -2976,9 +3248,6 @@ libbfio_handle_t *handle = NULL; libbfio_internal_pool_t *internal_pool = NULL; static char *function = "libbfio_pool_seek_offset"; - off64_t seek_offset = 0; - int access_flags = 0; - int is_open = 0; if( pool == NULL ) { @@ -3008,10 +3277,10 @@ return( -1 ); } #endif - if( libcdata_array_get_entry_by_index( - internal_pool->handles_array, + if( libbfio_internal_pool_get_open_handle( + internal_pool, entry, - (intptr_t **) &handle, + &handle, error ) != 1 ) { libcerror_error_set( @@ -3022,95 +3291,29 @@ function, entry ); - goto on_error; - } - /* Make sure the handle is open - */ - is_open = libbfio_handle_is_open( - handle, - error ); - - if( is_open == -1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to determine if entry: %d is open.", - function, - entry ); - - goto on_error; + offset = -1; } - else if( is_open == 0 ) + else { - if( libbfio_handle_get_access_flags( - handle, - &access_flags, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve access flags.", - function ); + offset = libbfio_handle_seek_offset( + handle, + offset, + whence, + error ); - goto on_error; - } - if( libbfio_internal_pool_open_handle( - internal_pool, - handle, - access_flags, - error ) != 1 ) + if( offset == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, - LIBCERROR_IO_ERROR_OPEN_FAILED, - "%s: unable to open entry: %d.", + LIBCERROR_IO_ERROR_SEEK_FAILED, + "%s: unable to seek offset in entry: %d.", function, entry ); - goto on_error; - } - } - if( internal_pool->maximum_number_of_open_handles != LIBBFIO_POOL_UNLIMITED_NUMBER_OF_OPEN_HANDLES ) - { - if( libbfio_internal_pool_move_handle_to_front_of_last_used_list( - internal_pool, - handle, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to move handle to front of last used list.", - function ); - - goto on_error; + offset = -1; } } - seek_offset = libbfio_handle_seek_offset( - handle, - offset, - whence, - error ); - - if( seek_offset == -1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_IO, - LIBCERROR_IO_ERROR_SEEK_FAILED, - "%s: unable to seek offset: %" PRIi64 " in entry: %d.", - function, - offset, - entry ); - - goto on_error; - } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_write( internal_pool->read_write_lock, @@ -3126,15 +3329,7 @@ return( -1 ); } #endif - return( seek_offset ); - -on_error: -#if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) - libcthreads_read_write_lock_release_for_write( - internal_pool->read_write_lock, - NULL ); -#endif - return( -1 ); + return( offset ); } /* Retrieves the current offset in a handle in the pool @@ -3149,8 +3344,7 @@ libbfio_handle_t *handle = NULL; libbfio_internal_pool_t *internal_pool = NULL; static char *function = "libbfio_pool_get_offset"; - int access_flags = 0; - int is_open = 0; + int result = 1; if( pool == NULL ) { @@ -3180,10 +3374,10 @@ return( -1 ); } #endif - if( libcdata_array_get_entry_by_index( - internal_pool->handles_array, + if( libbfio_internal_pool_get_open_handle( + internal_pool, entry, - (intptr_t **) &handle, + &handle, error ) != 1 ) { libcerror_error_set( @@ -3194,73 +3388,25 @@ function, entry ); - goto on_error; - } - /* Make sure the handle is open - */ - is_open = libbfio_handle_is_open( - handle, - error ); - - if( is_open == -1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to determine if entry: %d is open.", - function, - entry ); - - goto on_error; + result = -1; } - else if( is_open == 0 ) + else { - if( libbfio_handle_get_access_flags( + if( libbfio_handle_get_offset( handle, - &access_flags, + offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve access flags.", + "%s: unable to retrieve offset.", function ); - goto on_error; - } - if( libbfio_internal_pool_open_handle( - internal_pool, - handle, - access_flags, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_IO, - LIBCERROR_IO_ERROR_OPEN_FAILED, - "%s: unable to open entry: %d.", - function, - entry ); - - goto on_error; + result = -1; } } - if( libbfio_handle_get_offset( - handle, - offset, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve offset.", - function ); - - goto on_error; - } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_write( internal_pool->read_write_lock, @@ -3276,15 +3422,7 @@ return( -1 ); } #endif - return( 1 ); - -on_error: -#if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) - libcthreads_read_write_lock_release_for_write( - internal_pool->read_write_lock, - NULL ); -#endif - return( -1 ); + return( result ); } /* Retrieves the size of a handle in the pool @@ -3299,8 +3437,7 @@ libbfio_handle_t *handle = NULL; libbfio_internal_pool_t *internal_pool = NULL; static char *function = "libbfio_pool_get_size"; - int access_flags = 0; - int is_open = 0; + int result = 1; if( pool == NULL ) { @@ -3330,10 +3467,10 @@ return( -1 ); } #endif - if( libcdata_array_get_entry_by_index( - internal_pool->handles_array, + if( libbfio_internal_pool_get_open_handle( + internal_pool, entry, - (intptr_t **) &handle, + &handle, error ) != 1 ) { libcerror_error_set( @@ -3344,74 +3481,26 @@ function, entry ); - goto on_error; - } - /* Make sure the handle is open - */ - is_open = libbfio_handle_is_open( - handle, - error ); - - if( is_open == -1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to determine if entry: %d is open.", - function, - entry ); - - goto on_error; + result = -1; } - else if( is_open == 0 ) + else { - if( libbfio_handle_get_access_flags( + if( libbfio_handle_get_size( handle, - &access_flags, + size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve access flags.", - function ); - - goto on_error; - } - if( libbfio_internal_pool_open_handle( - internal_pool, - handle, - access_flags, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_IO, - LIBCERROR_IO_ERROR_OPEN_FAILED, - "%s: unable to open entry: %d.", + "%s: unable to retrieve size of entry: %d.", function, entry ); - goto on_error; + result = -1; } } - if( libbfio_handle_get_size( - handle, - size, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve size of entry: %d.", - function, - entry ); - - goto on_error; - } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_write( internal_pool->read_write_lock, @@ -3427,14 +3516,6 @@ return( -1 ); } #endif - return( 1 ); - -on_error: -#if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) - libcthreads_read_write_lock_release_for_write( - internal_pool->read_write_lock, - NULL ); -#endif - return( -1 ); + return( result ); } diff -Nru libfshfs-20201104/libbfio/libbfio_pool.h libfshfs-20240221/libbfio/libbfio_pool.h --- libfshfs-20201104/libbfio/libbfio_pool.h 2020-11-04 11:55:37.000000000 +0000 +++ libfshfs-20240221/libbfio/libbfio_pool.h 2024-02-21 06:03:55.000000000 +0000 @@ -1,7 +1,7 @@ /* * The internal pool functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2022, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -55,6 +55,14 @@ */ libcdata_array_t *handles_array; + /* The current entry + */ + int current_entry; + + /* The current file IO handle + */ + libbfio_handle_t *current_handle; + /* A list containing the file IO handles in order of the last use * it starts with the last used at the beginning of the list * the value of the list element refers to the corresponding file IO handle @@ -161,6 +169,12 @@ int maximum_number_of_open_handles, libcerror_error_t **error ); +int libbfio_internal_pool_open( + libbfio_internal_pool_t *internal_pool, + int entry, + int access_flags, + libcerror_error_t **error ); + LIBBFIO_EXTERN \ int libbfio_pool_open( libbfio_pool_t *pool, @@ -191,6 +205,12 @@ libbfio_pool_t *pool, libcerror_error_t **error ); +int libbfio_internal_pool_get_open_handle( + libbfio_internal_pool_t *internal_pool, + int entry, + libbfio_handle_t **handle, + libcerror_error_t **error ); + LIBBFIO_EXTERN \ ssize_t libbfio_pool_read_buffer( libbfio_pool_t *pool, @@ -200,6 +220,15 @@ libcerror_error_t **error ); LIBBFIO_EXTERN \ +ssize_t libbfio_pool_read_buffer_at_offset( + libbfio_pool_t *pool, + int entry, + uint8_t *buffer, + size_t size, + off64_t offset, + libcerror_error_t **error ); + +LIBBFIO_EXTERN \ ssize_t libbfio_pool_write_buffer( libbfio_pool_t *pool, int entry, @@ -208,6 +237,15 @@ libcerror_error_t **error ); LIBBFIO_EXTERN \ +ssize_t libbfio_pool_write_buffer_at_offset( + libbfio_pool_t *pool, + int entry, + const uint8_t *buffer, + size_t size, + off64_t offset, + libcerror_error_t **error ); + +LIBBFIO_EXTERN \ off64_t libbfio_pool_seek_offset( libbfio_pool_t *pool, int entry, diff -Nru libfshfs-20201104/libbfio/libbfio_support.c libfshfs-20240221/libbfio/libbfio_support.c --- libfshfs-20201104/libbfio/libbfio_support.c 2020-11-04 11:55:37.000000000 +0000 +++ libfshfs-20240221/libbfio/libbfio_support.c 2024-02-21 06:03:55.000000000 +0000 @@ -1,7 +1,7 @@ /* * Support functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2022, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libbfio/libbfio_support.h libfshfs-20240221/libbfio/libbfio_support.h --- libfshfs-20201104/libbfio/libbfio_support.h 2020-11-04 11:55:37.000000000 +0000 +++ libfshfs-20240221/libbfio/libbfio_support.h 2024-02-21 06:03:55.000000000 +0000 @@ -1,7 +1,7 @@ /* * Support functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2022, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libbfio/libbfio_system_string.c libfshfs-20240221/libbfio/libbfio_system_string.c --- libfshfs-20201104/libbfio/libbfio_system_string.c 2020-11-04 11:55:37.000000000 +0000 +++ libfshfs-20240221/libbfio/libbfio_system_string.c 2024-02-21 06:03:55.000000000 +0000 @@ -1,7 +1,7 @@ /* * System string functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2022, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libbfio/libbfio_system_string.h libfshfs-20240221/libbfio/libbfio_system_string.h --- libfshfs-20201104/libbfio/libbfio_system_string.h 2020-11-04 11:55:37.000000000 +0000 +++ libfshfs-20240221/libbfio/libbfio_system_string.h 2024-02-21 06:03:55.000000000 +0000 @@ -1,7 +1,7 @@ /* * System string functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2022, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libbfio/libbfio_types.h libfshfs-20240221/libbfio/libbfio_types.h --- libfshfs-20201104/libbfio/libbfio_types.h 2020-11-04 11:55:37.000000000 +0000 +++ libfshfs-20240221/libbfio/libbfio_types.h 2024-02-21 06:03:55.000000000 +0000 @@ -1,7 +1,7 @@ /* * The internal type definitions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2022, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libbfio/libbfio_unused.h libfshfs-20240221/libbfio/libbfio_unused.h --- libfshfs-20201104/libbfio/libbfio_unused.h 2020-11-04 11:55:37.000000000 +0000 +++ libfshfs-20240221/libbfio/libbfio_unused.h 2024-02-21 06:03:55.000000000 +0000 @@ -1,7 +1,7 @@ /* * Definitions to silence compiler warnings about unused function attributes/parameters. * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2022, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcdata/Makefile.am libfshfs-20240221/libcdata/Makefile.am --- libfshfs-20201104/libcdata/Makefile.am 2020-11-04 11:55:40.000000000 +0000 +++ libfshfs-20240221/libcdata/Makefile.am 2024-02-21 06:03:57.000000000 +0000 @@ -32,9 +32,11 @@ Makefile.in distclean: clean - /bin/rm -f Makefile + -rm -f Makefile -splint: +sources-local: $(BUILT_SOURCES) + +splint-local: @echo "Running splint on libcdata ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcdata_la_SOURCES) diff -Nru libfshfs-20201104/libcdata/Makefile.in libfshfs-20240221/libcdata/Makefile.in --- libfshfs-20201104/libcdata/Makefile.in 2020-11-04 11:56:31.000000000 +0000 +++ libfshfs-20240221/libcdata/Makefile.in 2024-02-21 06:04:25.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -91,25 +91,26 @@ subdir = libcdata ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcdata.m4 \ - $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \ - $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \ - $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcrypto.m4 \ - $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcthreads.m4 \ - $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ - $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ - $(top_srcdir)/m4/libhmac.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/libuna.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \ - $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \ - $(top_srcdir)/m4/zlib.m4 $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libbfio.m4 \ + $(top_srcdir)/m4/libcdata.m4 $(top_srcdir)/m4/libcerror.m4 \ + $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ + $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ + $(top_srcdir)/m4/libcrypto.m4 $(top_srcdir)/m4/libcsplit.m4 \ + $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \ + $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ + $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmos.m4 \ + $(top_srcdir)/m4/libfuse.m4 $(top_srcdir)/m4/libhmac.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/pthread.m4 \ + $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ + $(top_srcdir)/m4/types.m4 $(top_srcdir)/m4/zlib.m4 \ + $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) @@ -198,6 +199,7 @@ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -215,8 +217,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ @@ -233,6 +233,8 @@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ @@ -248,8 +250,10 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -269,6 +273,8 @@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ +HAVE_LIBFMOS = @HAVE_LIBFMOS@ +HAVE_LIBFUSE = @HAVE_LIBFUSE@ HAVE_LIBHMAC = @HAVE_LIBHMAC@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ @@ -284,6 +290,7 @@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ +HAVE_LOCAL_LIBFMOS = @HAVE_LOCAL_LIBFMOS@ HAVE_LOCAL_LIBHMAC = @HAVE_LOCAL_LIBHMAC@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ @@ -337,8 +344,12 @@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ +LIBFMOS_CPPFLAGS = @LIBFMOS_CPPFLAGS@ +LIBFMOS_LIBADD = @LIBFMOS_LIBADD@ LIBFSHFS_DLL_EXPORT = @LIBFSHFS_DLL_EXPORT@ LIBFSHFS_DLL_IMPORT = @LIBFSHFS_DLL_IMPORT@ +LIBFUSE_CPPFLAGS = @LIBFUSE_CPPFLAGS@ +LIBFUSE_LIBADD = @LIBFUSE_LIBADD@ LIBHMAC_CPPFLAGS = @LIBHMAC_CPPFLAGS@ LIBHMAC_LIBADD = @LIBHMAC_LIBADD@ LIBICONV = @LIBICONV@ @@ -360,8 +371,8 @@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ @@ -384,26 +395,6 @@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ -PYTHON2 = @PYTHON2@ -PYTHON2_CONFIG = @PYTHON2_CONFIG@ -PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ -PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ -PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ -PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ -PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ -PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ -PYTHON2_PREFIX = @PYTHON2_PREFIX@ -PYTHON2_VERSION = @PYTHON2_VERSION@ -PYTHON3 = @PYTHON3@ -PYTHON3_CONFIG = @PYTHON3_CONFIG@ -PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ -PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ -PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ -PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ -PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ -PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ -PYTHON3_PREFIX = @PYTHON3_PREFIX@ -PYTHON3_VERSION = @PYTHON3_VERSION@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ @@ -481,6 +472,12 @@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ +ax_libfmos_pc_libs_private = @ax_libfmos_pc_libs_private@ +ax_libfmos_spec_build_requires = @ax_libfmos_spec_build_requires@ +ax_libfmos_spec_requires = @ax_libfmos_spec_requires@ +ax_libfuse_pc_libs_private = @ax_libfuse_pc_libs_private@ +ax_libfuse_spec_build_requires = @ax_libfuse_spec_build_requires@ +ax_libfuse_spec_requires = @ax_libfuse_spec_requires@ ax_libhmac_pc_libs_private = @ax_libhmac_pc_libs_private@ ax_libhmac_spec_build_requires = @ax_libhmac_spec_build_requires@ ax_libhmac_spec_requires = @ax_libhmac_spec_requires@ @@ -505,6 +502,8 @@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +fuse_CFLAGS = @fuse_CFLAGS@ +fuse_LIBS = @fuse_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -542,6 +541,8 @@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ +libfmos_CFLAGS = @libfmos_CFLAGS@ +libfmos_LIBS = @libfmos_LIBS@ libfshfs_spec_requires = @libfshfs_spec_requires@ libfshfs_spec_tools_build_requires = @libfshfs_spec_tools_build_requires@ libhmac_CFLAGS = @libhmac_CFLAGS@ @@ -560,11 +561,8 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ -pyexecdir2 = @pyexecdir2@ -pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ -pythondir2 = @pythondir2@ -pythondir3 = @pythondir3@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -703,6 +701,8 @@ clean-libtool: -rm -rf .libs _libs +sources-local: +splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique @@ -755,7 +755,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am @@ -900,6 +899,14 @@ ps-am: +sources: sources-am + +sources-am: sources-local + +splint: splint-am + +splint-am: splint-local + uninstall-am: .MAKE: install-am install-strip @@ -916,15 +923,18 @@ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am + sources-am sources-local splint-am splint-local tags tags-am \ + uninstall uninstall-am .PRECIOUS: Makefile distclean: clean - /bin/rm -f Makefile + -rm -f Makefile + +sources-local: $(BUILT_SOURCES) -splint: +splint-local: @echo "Running splint on libcdata ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcdata_la_SOURCES) diff -Nru libfshfs-20201104/libcdata/libcdata_array.c libfshfs-20240221/libcdata/libcdata_array.c --- libfshfs-20201104/libcdata/libcdata_array.c 2020-11-04 11:55:40.000000000 +0000 +++ libfshfs-20240221/libcdata/libcdata_array.c 2024-02-21 06:03:57.000000000 +0000 @@ -1,7 +1,7 @@ /* * Array functions * - * Copyright (C) 2006-2020, Joachim Metz + * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -1663,7 +1663,9 @@ * Duplicate entries are allowed by default and inserted after the last duplicate entry. * Only allowing unique entries can be enforced by setting the flag LIBCDATA_INSERT_FLAG_UNIQUE_ENTRIES * - * entry_index is set when the entry was successfully inserted + * entry_index is set to the index of the entry when the entry was successfully inserted + * or to the index of the existing entry when the flag LIBCDATA_INSERT_FLAG_UNIQUE_ENTRIES + * is set and an existing entry was found. * * Returns 1 if successful, 0 if the entry already exists or -1 on error */ @@ -1679,7 +1681,7 @@ libcerror_error_t **error ) { libcdata_internal_array_t *internal_array = NULL; - static char *function = "libcdata_tree_node_insert_node"; + static char *function = "libcdata_array_insert_entry"; int compare_result = 0; int entry_iterator = 0; int result = 0; @@ -1862,7 +1864,7 @@ goto on_error; } #endif - if( result == 1 ) + if( result != -1 ) { *entry_index = safe_entry_index; } diff -Nru libfshfs-20201104/libcdata/libcdata_array.h libfshfs-20240221/libcdata/libcdata_array.h --- libfshfs-20201104/libcdata/libcdata_array.h 2020-11-04 11:55:40.000000000 +0000 +++ libfshfs-20240221/libcdata/libcdata_array.h 2024-02-21 06:03:57.000000000 +0000 @@ -1,7 +1,7 @@ /* * Array functions * - * Copyright (C) 2006-2020, Joachim Metz + * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcdata/libcdata_btree.c libfshfs-20240221/libcdata/libcdata_btree.c --- libfshfs-20201104/libcdata/libcdata_btree.c 2020-11-04 11:55:40.000000000 +0000 +++ libfshfs-20240221/libcdata/libcdata_btree.c 2024-02-21 06:03:57.000000000 +0000 @@ -1,7 +1,7 @@ /* * Balanced tree type functions * - * Copyright (C) 2006-2020, Joachim Metz + * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcdata/libcdata_btree.h libfshfs-20240221/libcdata/libcdata_btree.h --- libfshfs-20201104/libcdata/libcdata_btree.h 2020-11-04 11:55:40.000000000 +0000 +++ libfshfs-20240221/libcdata/libcdata_btree.h 2024-02-21 06:03:57.000000000 +0000 @@ -1,7 +1,7 @@ /* * Balanced tree type functions * - * Copyright (C) 2006-2020, Joachim Metz + * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcdata/libcdata_btree_node.c libfshfs-20240221/libcdata/libcdata_btree_node.c --- libfshfs-20201104/libcdata/libcdata_btree_node.c 2020-11-04 11:55:40.000000000 +0000 +++ libfshfs-20240221/libcdata/libcdata_btree_node.c 2024-02-21 06:03:57.000000000 +0000 @@ -1,7 +1,7 @@ /* * Balanced tree node functions * - * Copyright (C) 2006-2020, Joachim Metz + * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcdata/libcdata_btree_node.h libfshfs-20240221/libcdata/libcdata_btree_node.h --- libfshfs-20201104/libcdata/libcdata_btree_node.h 2020-11-04 11:55:40.000000000 +0000 +++ libfshfs-20240221/libcdata/libcdata_btree_node.h 2024-02-21 06:03:57.000000000 +0000 @@ -1,7 +1,7 @@ /* * Balanced tree node functions * - * Copyright (C) 2006-2020, Joachim Metz + * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcdata/libcdata_btree_values_list.c libfshfs-20240221/libcdata/libcdata_btree_values_list.c --- libfshfs-20201104/libcdata/libcdata_btree_values_list.c 2020-11-04 11:55:40.000000000 +0000 +++ libfshfs-20240221/libcdata/libcdata_btree_values_list.c 2024-02-21 06:03:57.000000000 +0000 @@ -1,7 +1,7 @@ /* * Balanced tree values list functions * - * Copyright (C) 2006-2020, Joachim Metz + * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcdata/libcdata_btree_values_list.h libfshfs-20240221/libcdata/libcdata_btree_values_list.h --- libfshfs-20201104/libcdata/libcdata_btree_values_list.h 2020-11-04 11:55:40.000000000 +0000 +++ libfshfs-20240221/libcdata/libcdata_btree_values_list.h 2024-02-21 06:03:57.000000000 +0000 @@ -1,7 +1,7 @@ /* * Balanced tree values list functions * - * Copyright (C) 2006-2020, Joachim Metz + * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcdata/libcdata_definitions.h libfshfs-20240221/libcdata/libcdata_definitions.h --- libfshfs-20201104/libcdata/libcdata_definitions.h 2020-11-04 11:55:40.000000000 +0000 +++ libfshfs-20240221/libcdata/libcdata_definitions.h 2024-02-21 06:03:57.000000000 +0000 @@ -1,7 +1,7 @@ /* * The internal definitions * - * Copyright (C) 2006-2020, Joachim Metz + * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -35,11 +35,11 @@ */ #else -#define LIBCDATA_VERSION 20200509 +#define LIBCDATA_VERSION 20240103 /* The libcdata version string */ -#define LIBCDATA_VERSION_STRING "20200509" +#define LIBCDATA_VERSION_STRING "20240103" /* The comparison function definitions */ diff -Nru libfshfs-20201104/libcdata/libcdata_error.c libfshfs-20240221/libcdata/libcdata_error.c --- libfshfs-20201104/libcdata/libcdata_error.c 2020-11-04 11:55:40.000000000 +0000 +++ libfshfs-20240221/libcdata/libcdata_error.c 2024-02-21 06:03:57.000000000 +0000 @@ -1,7 +1,7 @@ /* * Error functions * - * Copyright (C) 2006-2020, Joachim Metz + * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcdata/libcdata_error.h libfshfs-20240221/libcdata/libcdata_error.h --- libfshfs-20201104/libcdata/libcdata_error.h 2020-11-04 11:55:40.000000000 +0000 +++ libfshfs-20240221/libcdata/libcdata_error.h 2024-02-21 06:03:57.000000000 +0000 @@ -1,7 +1,7 @@ /* * Error functions * - * Copyright (C) 2006-2020, Joachim Metz + * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcdata/libcdata_extern.h libfshfs-20240221/libcdata/libcdata_extern.h --- libfshfs-20201104/libcdata/libcdata_extern.h 2020-11-04 11:55:40.000000000 +0000 +++ libfshfs-20240221/libcdata/libcdata_extern.h 2024-02-21 06:03:57.000000000 +0000 @@ -1,7 +1,7 @@ /* * The internal extern definition * - * Copyright (C) 2006-2020, Joachim Metz + * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -30,7 +30,11 @@ #include +#if defined( __CYGWIN__ ) || defined( __MINGW32__ ) +#define LIBCDATA_EXTERN_VARIABLE extern +#else #define LIBCDATA_EXTERN_VARIABLE LIBCDATA_EXTERN +#endif #else #define LIBCDATA_EXTERN /* extern */ diff -Nru libfshfs-20201104/libcdata/libcdata_libcerror.h libfshfs-20240221/libcdata/libcdata_libcerror.h --- libfshfs-20201104/libcdata/libcdata_libcerror.h 2020-11-04 11:55:40.000000000 +0000 +++ libfshfs-20240221/libcdata/libcdata_libcerror.h 2024-02-21 06:03:57.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libcerror header wrapper * - * Copyright (C) 2006-2020, Joachim Metz + * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcdata/libcdata_libcthreads.h libfshfs-20240221/libcdata/libcdata_libcthreads.h --- libfshfs-20201104/libcdata/libcdata_libcthreads.h 2020-11-04 11:55:40.000000000 +0000 +++ libfshfs-20240221/libcdata/libcdata_libcthreads.h 2024-02-21 06:03:57.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libcthreads header wrapper * - * Copyright (C) 2006-2020, Joachim Metz + * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcdata/libcdata_list.c libfshfs-20240221/libcdata/libcdata_list.c --- libfshfs-20201104/libcdata/libcdata_list.c 2020-11-04 11:55:40.000000000 +0000 +++ libfshfs-20240221/libcdata/libcdata_list.c 2024-02-21 06:03:57.000000000 +0000 @@ -1,7 +1,7 @@ /* * List functions * - * Copyright (C) 2006-2020, Joachim Metz + * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -2106,18 +2106,66 @@ uint8_t insert_flags, libcerror_error_t **error ) { - libcdata_internal_list_t *internal_list = NULL; - libcdata_list_element_t *list_element = NULL; - libcdata_list_element_t *next_element = NULL; - libcdata_list_element_t *previous_element = NULL; - intptr_t *value_to_insert = NULL; - static char *function = "libcdata_list_insert_element"; - int element_index = 0; - int result = 1; + libcdata_list_element_t *existing_element = NULL; + static char *function = "libcdata_list_insert_element"; + int result = 0; + + result = libcdata_list_insert_element_with_existing( + list, + element_to_insert, + value_compare_function, + insert_flags, + &existing_element, + error ); + + if( result == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, + "%s: unable to insert element into list.", + function ); + + return( -1 ); + } + return( result ); +} + +/* Inserts a list element into the list + * + * Uses the value_compare_function to determine the order of the entries + * The value_compare_function should return LIBCDATA_COMPARE_LESS, + * LIBCDATA_COMPARE_EQUAL, LIBCDATA_COMPARE_GREATER if successful or -1 on error + * + * Duplicate entries are allowed by default and inserted after the last duplicate value. + * Only allowing unique entries can be enforced by setting the flag LIBCDATA_INSERT_FLAG_UNIQUE_ENTRIES + * + * Returns 1 if successful, 0 if the list element already exists or -1 on error + */ +int libcdata_list_insert_element_with_existing( + libcdata_list_t *list, + libcdata_list_element_t *element_to_insert, + int (*value_compare_function)( + intptr_t *first_value, + intptr_t *second_value, + libcerror_error_t **error ), + uint8_t insert_flags, + libcdata_list_element_t **existing_element, + libcerror_error_t **error ) +{ + libcdata_internal_list_t *internal_list = NULL; + libcdata_list_element_t *next_element = NULL; + libcdata_list_element_t *previous_element = NULL; + libcdata_list_element_t *safe_existing_element = NULL; + intptr_t *value_to_insert = NULL; + static char *function = "libcdata_list_insert_element_with_existing"; + int element_index = 0; + int result = 1; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) - libcdata_list_element_t *backup_first_element = NULL; - libcdata_list_element_t *backup_last_element = NULL; + libcdata_list_element_t *backup_first_element = NULL; + libcdata_list_element_t *backup_last_element = NULL; #endif if( list == NULL ) @@ -2217,6 +2265,19 @@ return( -1 ); } + if( existing_element == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid existing element.", + function ); + + return( -1 ); + } + *existing_element = NULL; + if( libcdata_list_element_get_elements( element_to_insert, &previous_element, @@ -2274,7 +2335,8 @@ } backup_first_element = internal_list->first_element; backup_last_element = internal_list->last_element; -#endif + +#endif /* defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) */ result = libcdata_internal_list_insert_element_find_element( internal_list, @@ -2282,7 +2344,7 @@ value_compare_function, insert_flags, &element_index, - &list_element, + &safe_existing_element, error ); if( result == -1 ) @@ -2296,12 +2358,16 @@ result = -1; } - else if( result == 1 ) + else if( result == 0 ) + { + *existing_element = safe_existing_element; + } + else { - if( list_element != NULL ) + if( safe_existing_element != NULL ) { if( libcdata_list_element_get_elements( - list_element, + safe_existing_element, &previous_element, &next_element, error ) != 1 ) @@ -2321,7 +2387,7 @@ { if( libcdata_internal_list_insert_element_before_element( internal_list, - list_element, + safe_existing_element, element_to_insert, error ) != 1 ) { @@ -2354,6 +2420,7 @@ return( result ); #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) + on_error: if( result == 1 ) { @@ -2363,10 +2430,10 @@ NULL, NULL ); - if( list_element != NULL ) + if( safe_existing_element != NULL ) { libcdata_list_element_set_elements( - list_element, + safe_existing_element, previous_element, next_element, NULL ); @@ -2384,7 +2451,8 @@ internal_list->number_of_elements -= 1; } return( -1 ); -#endif + +#endif /* defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) */ } /* Inserts a value to the list @@ -2410,9 +2478,73 @@ uint8_t insert_flags, libcerror_error_t **error ) { - libcdata_list_element_t *element = NULL; - static char *function = "libcdata_list_insert_value"; - int result = 1; + intptr_t *existing_value = NULL; + static char *function = "libcdata_list_insert_value"; + int result = 0; + + result = libcdata_list_insert_value_with_existing( + list, + value, + value_compare_function, + insert_flags, + &existing_value, + error ); + + if( result == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, + "%s: unable to insert value into list.", + function ); + + return( -1 ); + } + return( result ); +} + +/* Inserts a value to the list + * + * Creates a new list element + * + * Uses the value_compare_function to determine the order of the entries + * The value_compare_function should return LIBCDATA_COMPARE_LESS, + * LIBCDATA_COMPARE_EQUAL, LIBCDATA_COMPARE_GREATER if successful or -1 on error + * + * Duplicate entries are allowed by default and inserted after the last duplicate value. + * Only allowing unique entries can be enforced by setting the flag LIBCDATA_INSERT_FLAG_UNIQUE_ENTRIES + * + * Returns 1 if successful, 0 if the list element already exists or -1 on error + */ +int libcdata_list_insert_value_with_existing( + libcdata_list_t *list, + intptr_t *value, + int (*value_compare_function)( + intptr_t *first_value, + intptr_t *second_value, + libcerror_error_t **error ), + uint8_t insert_flags, + intptr_t **existing_value, + libcerror_error_t **error ) +{ + libcdata_list_element_t *element = NULL; + libcdata_list_element_t *existing_element = NULL; + static char *function = "libcdata_list_insert_value_with_existing"; + int result = 1; + + if( existing_value == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid existing value.", + function ); + + return( -1 ); + } + *existing_value = NULL; if( libcdata_list_element_initialize( &element, @@ -2441,11 +2573,12 @@ goto on_error; } - result = libcdata_list_insert_element( + result = libcdata_list_insert_element_with_existing( list, element, value_compare_function, insert_flags, + &existing_element, error ); if( result == -1 ) @@ -2474,6 +2607,20 @@ function ); goto on_error; + } + if( libcdata_list_element_get_value( + existing_element, + existing_value, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve value from existing list element.", + function ); + + goto on_error; } } return( result ); diff -Nru libfshfs-20201104/libcdata/libcdata_list.h libfshfs-20240221/libcdata/libcdata_list.h --- libfshfs-20201104/libcdata/libcdata_list.h 2020-11-04 11:55:40.000000000 +0000 +++ libfshfs-20240221/libcdata/libcdata_list.h 2024-02-21 06:03:57.000000000 +0000 @@ -1,7 +1,7 @@ /* * List functions * - * Copyright (C) 2006-2020, Joachim Metz + * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -187,6 +187,18 @@ libcerror_error_t **error ); LIBCDATA_EXTERN \ +int libcdata_list_insert_element_with_existing( + libcdata_list_t *list, + libcdata_list_element_t *element_to_insert, + int (*value_compare_function)( + intptr_t *first, + intptr_t *second, + libcerror_error_t **error ), + uint8_t insert_flags, + libcdata_list_element_t **existing_element, + libcerror_error_t **error ); + +LIBCDATA_EXTERN \ int libcdata_list_insert_value( libcdata_list_t *list, intptr_t *value, @@ -198,6 +210,18 @@ libcerror_error_t **error ); LIBCDATA_EXTERN \ +int libcdata_list_insert_value_with_existing( + libcdata_list_t *list, + intptr_t *value, + int (*value_compare_function)( + intptr_t *first, + intptr_t *second, + libcerror_error_t **error ), + uint8_t insert_flags, + intptr_t **existing_value, + libcerror_error_t **error ); + +LIBCDATA_EXTERN \ int libcdata_list_remove_element( libcdata_list_t *list, libcdata_list_element_t *element_to_remove, diff -Nru libfshfs-20201104/libcdata/libcdata_list_element.c libfshfs-20240221/libcdata/libcdata_list_element.c --- libfshfs-20201104/libcdata/libcdata_list_element.c 2020-11-04 11:55:40.000000000 +0000 +++ libfshfs-20240221/libcdata/libcdata_list_element.c 2024-02-21 06:03:57.000000000 +0000 @@ -1,7 +1,7 @@ /* * List element functions * - * Copyright (C) 2006-2020, Joachim Metz + * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcdata/libcdata_list_element.h libfshfs-20240221/libcdata/libcdata_list_element.h --- libfshfs-20201104/libcdata/libcdata_list_element.h 2020-11-04 11:55:40.000000000 +0000 +++ libfshfs-20240221/libcdata/libcdata_list_element.h 2024-02-21 06:03:57.000000000 +0000 @@ -1,7 +1,7 @@ /* * List element functions * - * Copyright (C) 2006-2020, Joachim Metz + * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcdata/libcdata_range_list.c libfshfs-20240221/libcdata/libcdata_range_list.c --- libfshfs-20201104/libcdata/libcdata_range_list.c 2020-11-04 11:55:40.000000000 +0000 +++ libfshfs-20240221/libcdata/libcdata_range_list.c 2024-02-21 06:03:57.000000000 +0000 @@ -1,7 +1,7 @@ /* * Range list * - * Copyright (C) 2006-2020, Joachim Metz + * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -4443,8 +4443,9 @@ return( -1 ); } -/* Determines if a certain range is present - * Returns 1 if present, 0 if not present or -1 on error +/* Determines if a certain range is present in the list + * This function does not check for partial overlapping ranges + * Returns 1 if a range is present, 0 if not or -1 on error */ int libcdata_range_list_range_is_present( libcdata_range_list_t *range_list, @@ -4484,7 +4485,7 @@ return( -1 ); } - if( range_size > (size_t) SSIZE_MAX ) + if( range_size > (uint64_t) INT64_MAX ) { libcerror_error_set( error, @@ -4553,6 +4554,169 @@ && ( range_end <= range_list_value->end ) ) { result = 1; + + break; + } + if( libcdata_list_element_get_next_element( + list_element, + &list_element, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve next element from list element: %d.", + function, + element_index ); + + goto on_error; + } + } +#if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) + if( libcthreads_read_write_lock_release_for_read( + internal_range_list->read_write_lock, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to release read/write lock for reading.", + function ); + + return( -1 ); + } +#endif + return( result ); + +on_error: +#if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) + libcthreads_read_write_lock_release_for_read( + internal_range_list->read_write_lock, + NULL ); +#endif + return( -1 ); +} + +/* Determines if a certain range is present in the list + * This function does not check for partial overlapping ranges + * Returns 1 if a range is present, 0 if not or -1 on error + */ +int libcdata_range_list_range_has_overlapping_range( + libcdata_range_list_t *range_list, + uint64_t range_start, + uint64_t range_size, + libcerror_error_t **error ) +{ + libcdata_internal_range_list_t *internal_range_list = NULL; + libcdata_list_element_t *list_element = NULL; + libcdata_range_list_value_t *range_list_value = NULL; + static char *function = "libcdata_range_list_range_has_overlapping_range"; + uint64_t range_end = 0; + int element_index = 0; + int result = 0; + + if( range_list == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid range list.", + function ); + + return( -1 ); + } + internal_range_list = (libcdata_internal_range_list_t *) range_list; + + if( range_start > (uint64_t) INT64_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid range start value exceeds maximum.", + function ); + + return( -1 ); + } + if( range_size > (uint64_t) INT64_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid size value exceeds maximum.", + function ); + + return( -1 ); + } + range_end = range_start + range_size; + + if( range_end < range_start ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid range end value out of bounds.", + function ); + + return( -1 ); + } +#if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) + if( libcthreads_read_write_lock_grab_for_read( + internal_range_list->read_write_lock, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to grab read/write lock for reading.", + function ); + + return( -1 ); + } +#endif +/* TODO add optimization using current element */ + list_element = internal_range_list->first_element; + + for( element_index = 0; + element_index < internal_range_list->number_of_elements; + element_index++ ) + { + if( libcdata_list_element_get_value( + list_element, + (intptr_t **) &range_list_value, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve value from list element: %d.", + function, + element_index ); + + goto on_error; + } + if( range_end < range_list_value->start ) + { + break; + } + if( ( range_start >= range_list_value->start ) + && ( range_start < range_list_value->end ) ) + { + result = 1; + + break; + } + if( ( range_end > range_list_value->start ) + && ( range_end <= range_list_value->end ) ) + { + result = 1; break; } diff -Nru libfshfs-20201104/libcdata/libcdata_range_list.h libfshfs-20240221/libcdata/libcdata_range_list.h --- libfshfs-20201104/libcdata/libcdata_range_list.h 2020-11-04 11:55:40.000000000 +0000 +++ libfshfs-20240221/libcdata/libcdata_range_list.h 2024-02-21 06:03:57.000000000 +0000 @@ -1,7 +1,7 @@ /* * Range list * - * Copyright (C) 2006-2020, Joachim Metz + * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -358,6 +358,13 @@ libcdata_range_list_t *range_list, uint64_t range_start, uint64_t range_size, + libcerror_error_t **error ); + +LIBCDATA_EXTERN \ +int libcdata_range_list_range_has_overlapping_range( + libcdata_range_list_t *range_list, + uint64_t range_start, + uint64_t range_size, libcerror_error_t **error ); LIBCDATA_EXTERN \ diff -Nru libfshfs-20201104/libcdata/libcdata_range_list_value.c libfshfs-20240221/libcdata/libcdata_range_list_value.c --- libfshfs-20201104/libcdata/libcdata_range_list_value.c 2020-11-04 11:55:40.000000000 +0000 +++ libfshfs-20240221/libcdata/libcdata_range_list_value.c 2024-02-21 06:03:57.000000000 +0000 @@ -1,7 +1,7 @@ /* * Range list value * - * Copyright (C) 2006-2020, Joachim Metz + * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcdata/libcdata_range_list_value.h libfshfs-20240221/libcdata/libcdata_range_list_value.h --- libfshfs-20201104/libcdata/libcdata_range_list_value.h 2020-11-04 11:55:40.000000000 +0000 +++ libfshfs-20240221/libcdata/libcdata_range_list_value.h 2024-02-21 06:03:57.000000000 +0000 @@ -1,7 +1,7 @@ /* * Range list value * - * Copyright (C) 2006-2020, Joachim Metz + * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcdata/libcdata_support.c libfshfs-20240221/libcdata/libcdata_support.c --- libfshfs-20201104/libcdata/libcdata_support.c 2020-11-04 11:55:40.000000000 +0000 +++ libfshfs-20240221/libcdata/libcdata_support.c 2024-02-21 06:03:57.000000000 +0000 @@ -1,7 +1,7 @@ /* * Support functions * - * Copyright (C) 2006-2020, Joachim Metz + * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcdata/libcdata_support.h libfshfs-20240221/libcdata/libcdata_support.h --- libfshfs-20201104/libcdata/libcdata_support.h 2020-11-04 11:55:40.000000000 +0000 +++ libfshfs-20240221/libcdata/libcdata_support.h 2024-02-21 06:03:57.000000000 +0000 @@ -1,7 +1,7 @@ /* * Support functions * - * Copyright (C) 2006-2020, Joachim Metz + * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcdata/libcdata_tree_node.c libfshfs-20240221/libcdata/libcdata_tree_node.c --- libfshfs-20201104/libcdata/libcdata_tree_node.c 2020-11-04 11:55:40.000000000 +0000 +++ libfshfs-20240221/libcdata/libcdata_tree_node.c 2024-02-21 06:03:57.000000000 +0000 @@ -1,7 +1,7 @@ /* * Tree functions * - * Copyright (C) 2006-2020, Joachim Metz + * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcdata/libcdata_tree_node.h libfshfs-20240221/libcdata/libcdata_tree_node.h --- libfshfs-20201104/libcdata/libcdata_tree_node.h 2020-11-04 11:55:40.000000000 +0000 +++ libfshfs-20240221/libcdata/libcdata_tree_node.h 2024-02-21 06:03:57.000000000 +0000 @@ -1,7 +1,7 @@ /* * Tree functions * - * Copyright (C) 2006-2020, Joachim Metz + * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcdata/libcdata_types.h libfshfs-20240221/libcdata/libcdata_types.h --- libfshfs-20201104/libcdata/libcdata_types.h 2020-11-04 11:55:40.000000000 +0000 +++ libfshfs-20240221/libcdata/libcdata_types.h 2024-02-21 06:03:57.000000000 +0000 @@ -1,7 +1,7 @@ /* * The internal type definitions * - * Copyright (C) 2006-2020, Joachim Metz + * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcdata/libcdata_unused.h libfshfs-20240221/libcdata/libcdata_unused.h --- libfshfs-20201104/libcdata/libcdata_unused.h 2020-11-04 11:55:40.000000000 +0000 +++ libfshfs-20240221/libcdata/libcdata_unused.h 2024-02-21 06:03:57.000000000 +0000 @@ -1,7 +1,7 @@ /* * Definitions to silence compiler warnings about unused function attributes/parameters. * - * Copyright (C) 2006-2020, Joachim Metz + * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcerror/Makefile.am libfshfs-20240221/libcerror/Makefile.am --- libfshfs-20201104/libcerror/Makefile.am 2020-11-04 11:55:42.000000000 +0000 +++ libfshfs-20240221/libcerror/Makefile.am 2024-02-21 06:03:58.000000000 +0000 @@ -19,9 +19,11 @@ Makefile.in distclean: clean - /bin/rm -f Makefile + -rm -f Makefile -splint: +sources-local: $(BUILT_SOURCES) + +splint-local: @echo "Running splint on libcerror ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcerror_la_SOURCES) diff -Nru libfshfs-20201104/libcerror/Makefile.in libfshfs-20240221/libcerror/Makefile.in --- libfshfs-20201104/libcerror/Makefile.in 2020-11-04 11:56:31.000000000 +0000 +++ libfshfs-20240221/libcerror/Makefile.in 2024-02-21 06:04:25.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -91,25 +91,26 @@ subdir = libcerror ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcdata.m4 \ - $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \ - $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \ - $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcrypto.m4 \ - $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcthreads.m4 \ - $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ - $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ - $(top_srcdir)/m4/libhmac.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/libuna.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \ - $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \ - $(top_srcdir)/m4/zlib.m4 $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libbfio.m4 \ + $(top_srcdir)/m4/libcdata.m4 $(top_srcdir)/m4/libcerror.m4 \ + $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ + $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ + $(top_srcdir)/m4/libcrypto.m4 $(top_srcdir)/m4/libcsplit.m4 \ + $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \ + $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ + $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmos.m4 \ + $(top_srcdir)/m4/libfuse.m4 $(top_srcdir)/m4/libhmac.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/pthread.m4 \ + $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ + $(top_srcdir)/m4/types.m4 $(top_srcdir)/m4/zlib.m4 \ + $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) @@ -177,6 +178,7 @@ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -194,8 +196,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ @@ -212,6 +212,8 @@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ @@ -227,8 +229,10 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -248,6 +252,8 @@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ +HAVE_LIBFMOS = @HAVE_LIBFMOS@ +HAVE_LIBFUSE = @HAVE_LIBFUSE@ HAVE_LIBHMAC = @HAVE_LIBHMAC@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ @@ -263,6 +269,7 @@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ +HAVE_LOCAL_LIBFMOS = @HAVE_LOCAL_LIBFMOS@ HAVE_LOCAL_LIBHMAC = @HAVE_LOCAL_LIBHMAC@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ @@ -316,8 +323,12 @@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ +LIBFMOS_CPPFLAGS = @LIBFMOS_CPPFLAGS@ +LIBFMOS_LIBADD = @LIBFMOS_LIBADD@ LIBFSHFS_DLL_EXPORT = @LIBFSHFS_DLL_EXPORT@ LIBFSHFS_DLL_IMPORT = @LIBFSHFS_DLL_IMPORT@ +LIBFUSE_CPPFLAGS = @LIBFUSE_CPPFLAGS@ +LIBFUSE_LIBADD = @LIBFUSE_LIBADD@ LIBHMAC_CPPFLAGS = @LIBHMAC_CPPFLAGS@ LIBHMAC_LIBADD = @LIBHMAC_LIBADD@ LIBICONV = @LIBICONV@ @@ -339,8 +350,8 @@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ @@ -363,26 +374,6 @@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ -PYTHON2 = @PYTHON2@ -PYTHON2_CONFIG = @PYTHON2_CONFIG@ -PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ -PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ -PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ -PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ -PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ -PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ -PYTHON2_PREFIX = @PYTHON2_PREFIX@ -PYTHON2_VERSION = @PYTHON2_VERSION@ -PYTHON3 = @PYTHON3@ -PYTHON3_CONFIG = @PYTHON3_CONFIG@ -PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ -PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ -PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ -PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ -PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ -PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ -PYTHON3_PREFIX = @PYTHON3_PREFIX@ -PYTHON3_VERSION = @PYTHON3_VERSION@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ @@ -460,6 +451,12 @@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ +ax_libfmos_pc_libs_private = @ax_libfmos_pc_libs_private@ +ax_libfmos_spec_build_requires = @ax_libfmos_spec_build_requires@ +ax_libfmos_spec_requires = @ax_libfmos_spec_requires@ +ax_libfuse_pc_libs_private = @ax_libfuse_pc_libs_private@ +ax_libfuse_spec_build_requires = @ax_libfuse_spec_build_requires@ +ax_libfuse_spec_requires = @ax_libfuse_spec_requires@ ax_libhmac_pc_libs_private = @ax_libhmac_pc_libs_private@ ax_libhmac_spec_build_requires = @ax_libhmac_spec_build_requires@ ax_libhmac_spec_requires = @ax_libhmac_spec_requires@ @@ -484,6 +481,8 @@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +fuse_CFLAGS = @fuse_CFLAGS@ +fuse_LIBS = @fuse_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -521,6 +520,8 @@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ +libfmos_CFLAGS = @libfmos_CFLAGS@ +libfmos_LIBS = @libfmos_LIBS@ libfshfs_spec_requires = @libfshfs_spec_requires@ libfshfs_spec_tools_build_requires = @libfshfs_spec_tools_build_requires@ libhmac_CFLAGS = @libhmac_CFLAGS@ @@ -539,11 +540,8 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ -pyexecdir2 = @pyexecdir2@ -pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ -pythondir2 = @pythondir2@ -pythondir3 = @pythondir3@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -661,6 +659,8 @@ clean-libtool: -rm -rf .libs _libs +sources-local: +splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique @@ -713,7 +713,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am @@ -850,6 +849,14 @@ ps-am: +sources: sources-am + +sources-am: sources-local + +splint: splint-am + +splint-am: splint-local + uninstall-am: .MAKE: install-am install-strip @@ -866,15 +873,18 @@ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am + sources-am sources-local splint-am splint-local tags tags-am \ + uninstall uninstall-am .PRECIOUS: Makefile distclean: clean - /bin/rm -f Makefile + -rm -f Makefile + +sources-local: $(BUILT_SOURCES) -splint: +splint-local: @echo "Running splint on libcerror ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcerror_la_SOURCES) diff -Nru libfshfs-20201104/libcerror/libcerror_definitions.h libfshfs-20240221/libcerror/libcerror_definitions.h --- libfshfs-20201104/libcerror/libcerror_definitions.h 2020-11-04 11:55:42.000000000 +0000 +++ libfshfs-20240221/libcerror/libcerror_definitions.h 2024-02-21 06:03:58.000000000 +0000 @@ -1,7 +1,7 @@ /* * The internal definitions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -35,11 +35,11 @@ */ #else -#define LIBCERROR_VERSION 20200615 +#define LIBCERROR_VERSION 20240101 /* The libcerror version string */ -#define LIBCERROR_VERSION_STRING "20200615" +#define LIBCERROR_VERSION_STRING "20240101" /* The error domains */ diff -Nru libfshfs-20201104/libcerror/libcerror_error.c libfshfs-20240221/libcerror/libcerror_error.c --- libfshfs-20201104/libcerror/libcerror_error.c 2020-11-04 11:55:42.000000000 +0000 +++ libfshfs-20240221/libcerror/libcerror_error.c 2024-02-21 06:03:58.000000000 +0000 @@ -1,7 +1,7 @@ /* * Error functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcerror/libcerror_error.h libfshfs-20240221/libcerror/libcerror_error.h --- libfshfs-20201104/libcerror/libcerror_error.h 2020-11-04 11:55:42.000000000 +0000 +++ libfshfs-20240221/libcerror/libcerror_error.h 2024-02-21 06:03:58.000000000 +0000 @@ -1,7 +1,7 @@ /* * Error functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcerror/libcerror_extern.h libfshfs-20240221/libcerror/libcerror_extern.h --- libfshfs-20201104/libcerror/libcerror_extern.h 2020-11-04 11:55:42.000000000 +0000 +++ libfshfs-20240221/libcerror/libcerror_extern.h 2024-02-21 06:03:58.000000000 +0000 @@ -1,7 +1,7 @@ /* * The internal extern definition * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -30,7 +30,11 @@ #include +#if defined( __CYGWIN__ ) || defined( __MINGW32__ ) +#define LIBCERROR_EXTERN_VARIABLE extern +#else #define LIBCERROR_EXTERN_VARIABLE LIBCERROR_EXTERN +#endif #else #define LIBCERROR_EXTERN /* extern */ diff -Nru libfshfs-20201104/libcerror/libcerror_support.c libfshfs-20240221/libcerror/libcerror_support.c --- libfshfs-20201104/libcerror/libcerror_support.c 2020-11-04 11:55:42.000000000 +0000 +++ libfshfs-20240221/libcerror/libcerror_support.c 2024-02-21 06:03:58.000000000 +0000 @@ -1,7 +1,7 @@ /* * Support functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcerror/libcerror_support.h libfshfs-20240221/libcerror/libcerror_support.h --- libfshfs-20201104/libcerror/libcerror_support.h 2020-11-04 11:55:42.000000000 +0000 +++ libfshfs-20240221/libcerror/libcerror_support.h 2024-02-21 06:03:58.000000000 +0000 @@ -1,7 +1,7 @@ /* * Support functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcerror/libcerror_system.c libfshfs-20240221/libcerror/libcerror_system.c --- libfshfs-20201104/libcerror/libcerror_system.c 2020-11-04 11:55:42.000000000 +0000 +++ libfshfs-20240221/libcerror/libcerror_system.c 2024-02-21 06:03:58.000000000 +0000 @@ -1,7 +1,7 @@ /* * System functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -558,8 +558,6 @@ { goto on_error; } - message_size += (size_t) print_count; - internal_error->sizes[ message_index ] += print_count; } if( internal_error->sizes[ message_index ] >= LIBCERROR_MESSAGE_MAXIMUM_SIZE ) diff -Nru libfshfs-20201104/libcerror/libcerror_system.h libfshfs-20240221/libcerror/libcerror_system.h --- libfshfs-20201104/libcerror/libcerror_system.h 2020-11-04 11:55:42.000000000 +0000 +++ libfshfs-20240221/libcerror/libcerror_system.h 2024-02-21 06:03:58.000000000 +0000 @@ -1,7 +1,7 @@ /* * System functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcerror/libcerror_types.h libfshfs-20240221/libcerror/libcerror_types.h --- libfshfs-20201104/libcerror/libcerror_types.h 2020-11-04 11:55:42.000000000 +0000 +++ libfshfs-20240221/libcerror/libcerror_types.h 2024-02-21 06:03:58.000000000 +0000 @@ -1,7 +1,7 @@ /* * The internal type definitions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcerror/libcerror_unused.h libfshfs-20240221/libcerror/libcerror_unused.h --- libfshfs-20201104/libcerror/libcerror_unused.h 2020-11-04 11:55:42.000000000 +0000 +++ libfshfs-20240221/libcerror/libcerror_unused.h 2024-02-21 06:03:58.000000000 +0000 @@ -1,7 +1,7 @@ /* * Definitions to silence compiler warnings about unused function attributes/parameters. * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcfile/Makefile.am libfshfs-20240221/libcfile/Makefile.am --- libfshfs-20201104/libcfile/Makefile.am 2020-11-04 11:55:45.000000000 +0000 +++ libfshfs-20240221/libcfile/Makefile.am 2024-02-21 06:03:59.000000000 +0000 @@ -30,9 +30,11 @@ Makefile.in distclean: clean - /bin/rm -f Makefile + -rm -f Makefile -splint: +sources-local: $(BUILT_SOURCES) + +splint-local: @echo "Running splint on libcfile ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcfile_la_SOURCES) diff -Nru libfshfs-20201104/libcfile/Makefile.in libfshfs-20240221/libcfile/Makefile.in --- libfshfs-20201104/libcfile/Makefile.in 2020-11-04 11:56:31.000000000 +0000 +++ libfshfs-20240221/libcfile/Makefile.in 2024-02-21 06:04:25.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -91,25 +91,26 @@ subdir = libcfile ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcdata.m4 \ - $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \ - $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \ - $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcrypto.m4 \ - $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcthreads.m4 \ - $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ - $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ - $(top_srcdir)/m4/libhmac.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/libuna.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \ - $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \ - $(top_srcdir)/m4/zlib.m4 $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libbfio.m4 \ + $(top_srcdir)/m4/libcdata.m4 $(top_srcdir)/m4/libcerror.m4 \ + $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ + $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ + $(top_srcdir)/m4/libcrypto.m4 $(top_srcdir)/m4/libcsplit.m4 \ + $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \ + $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ + $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmos.m4 \ + $(top_srcdir)/m4/libfuse.m4 $(top_srcdir)/m4/libhmac.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/pthread.m4 \ + $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ + $(top_srcdir)/m4/types.m4 $(top_srcdir)/m4/zlib.m4 \ + $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) @@ -184,6 +185,7 @@ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -201,8 +203,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ @@ -219,6 +219,8 @@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ @@ -234,8 +236,10 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -255,6 +259,8 @@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ +HAVE_LIBFMOS = @HAVE_LIBFMOS@ +HAVE_LIBFUSE = @HAVE_LIBFUSE@ HAVE_LIBHMAC = @HAVE_LIBHMAC@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ @@ -270,6 +276,7 @@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ +HAVE_LOCAL_LIBFMOS = @HAVE_LOCAL_LIBFMOS@ HAVE_LOCAL_LIBHMAC = @HAVE_LOCAL_LIBHMAC@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ @@ -323,8 +330,12 @@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ +LIBFMOS_CPPFLAGS = @LIBFMOS_CPPFLAGS@ +LIBFMOS_LIBADD = @LIBFMOS_LIBADD@ LIBFSHFS_DLL_EXPORT = @LIBFSHFS_DLL_EXPORT@ LIBFSHFS_DLL_IMPORT = @LIBFSHFS_DLL_IMPORT@ +LIBFUSE_CPPFLAGS = @LIBFUSE_CPPFLAGS@ +LIBFUSE_LIBADD = @LIBFUSE_LIBADD@ LIBHMAC_CPPFLAGS = @LIBHMAC_CPPFLAGS@ LIBHMAC_LIBADD = @LIBHMAC_LIBADD@ LIBICONV = @LIBICONV@ @@ -346,8 +357,8 @@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ @@ -370,26 +381,6 @@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ -PYTHON2 = @PYTHON2@ -PYTHON2_CONFIG = @PYTHON2_CONFIG@ -PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ -PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ -PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ -PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ -PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ -PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ -PYTHON2_PREFIX = @PYTHON2_PREFIX@ -PYTHON2_VERSION = @PYTHON2_VERSION@ -PYTHON3 = @PYTHON3@ -PYTHON3_CONFIG = @PYTHON3_CONFIG@ -PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ -PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ -PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ -PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ -PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ -PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ -PYTHON3_PREFIX = @PYTHON3_PREFIX@ -PYTHON3_VERSION = @PYTHON3_VERSION@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ @@ -467,6 +458,12 @@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ +ax_libfmos_pc_libs_private = @ax_libfmos_pc_libs_private@ +ax_libfmos_spec_build_requires = @ax_libfmos_spec_build_requires@ +ax_libfmos_spec_requires = @ax_libfmos_spec_requires@ +ax_libfuse_pc_libs_private = @ax_libfuse_pc_libs_private@ +ax_libfuse_spec_build_requires = @ax_libfuse_spec_build_requires@ +ax_libfuse_spec_requires = @ax_libfuse_spec_requires@ ax_libhmac_pc_libs_private = @ax_libhmac_pc_libs_private@ ax_libhmac_spec_build_requires = @ax_libhmac_spec_build_requires@ ax_libhmac_spec_requires = @ax_libhmac_spec_requires@ @@ -491,6 +488,8 @@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +fuse_CFLAGS = @fuse_CFLAGS@ +fuse_LIBS = @fuse_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -528,6 +527,8 @@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ +libfmos_CFLAGS = @libfmos_CFLAGS@ +libfmos_LIBS = @libfmos_LIBS@ libfshfs_spec_requires = @libfshfs_spec_requires@ libfshfs_spec_tools_build_requires = @libfshfs_spec_tools_build_requires@ libhmac_CFLAGS = @libhmac_CFLAGS@ @@ -546,11 +547,8 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ -pyexecdir2 = @pyexecdir2@ -pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ -pythondir2 = @pythondir2@ -pythondir3 = @pythondir3@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -682,6 +680,8 @@ clean-libtool: -rm -rf .libs _libs +sources-local: +splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique @@ -734,7 +734,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am @@ -874,6 +873,14 @@ ps-am: +sources: sources-am + +sources-am: sources-local + +splint: splint-am + +splint-am: splint-local + uninstall-am: .MAKE: install-am install-strip @@ -890,15 +897,18 @@ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am + sources-am sources-local splint-am splint-local tags tags-am \ + uninstall uninstall-am .PRECIOUS: Makefile distclean: clean - /bin/rm -f Makefile + -rm -f Makefile + +sources-local: $(BUILT_SOURCES) -splint: +splint-local: @echo "Running splint on libcfile ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcfile_la_SOURCES) diff -Nru libfshfs-20201104/libcfile/libcfile_definitions.h libfshfs-20240221/libcfile/libcfile_definitions.h --- libfshfs-20201104/libcfile/libcfile_definitions.h 2020-11-04 11:55:45.000000000 +0000 +++ libfshfs-20240221/libcfile/libcfile_definitions.h 2024-02-21 06:03:59.000000000 +0000 @@ -1,7 +1,7 @@ /* * The internal definitions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -35,11 +35,11 @@ */ #else -#define LIBCFILE_VERSION 20200216 +#define LIBCFILE_VERSION 20240106 /* The libcfile version string */ -#define LIBCFILE_VERSION_STRING "20200216" +#define LIBCFILE_VERSION_STRING "20240106" /* The file access flags * bit 1 set to 1 for read access diff -Nru libfshfs-20201104/libcfile/libcfile_error.c libfshfs-20240221/libcfile/libcfile_error.c --- libfshfs-20201104/libcfile/libcfile_error.c 2020-11-04 11:55:45.000000000 +0000 +++ libfshfs-20240221/libcfile/libcfile_error.c 2024-02-21 06:03:59.000000000 +0000 @@ -1,7 +1,7 @@ /* * Error functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcfile/libcfile_error.h libfshfs-20240221/libcfile/libcfile_error.h --- libfshfs-20201104/libcfile/libcfile_error.h 2020-11-04 11:55:45.000000000 +0000 +++ libfshfs-20240221/libcfile/libcfile_error.h 2024-02-21 06:03:59.000000000 +0000 @@ -1,7 +1,7 @@ /* * Error functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcfile/libcfile_extern.h libfshfs-20240221/libcfile/libcfile_extern.h --- libfshfs-20201104/libcfile/libcfile_extern.h 2020-11-04 11:55:45.000000000 +0000 +++ libfshfs-20240221/libcfile/libcfile_extern.h 2024-02-21 06:03:59.000000000 +0000 @@ -1,7 +1,7 @@ /* * The internal extern definition * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -30,7 +30,11 @@ #include +#if defined( __CYGWIN__ ) || defined( __MINGW32__ ) +#define LIBCFILE_EXTERN_VARIABLE extern +#else #define LIBCFILE_EXTERN_VARIABLE LIBCFILE_EXTERN +#endif #else #define LIBCFILE_EXTERN /* extern */ diff -Nru libfshfs-20201104/libcfile/libcfile_file.c libfshfs-20240221/libcfile/libcfile_file.c --- libfshfs-20201104/libcfile/libcfile_file.c 2020-11-04 11:55:45.000000000 +0000 +++ libfshfs-20240221/libcfile/libcfile_file.c 2024-02-21 06:03:59.000000000 +0000 @@ -1,7 +1,7 @@ /* * File functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -2469,6 +2469,10 @@ } internal_file->current_offset += write_count; + if( (size64_t) internal_file->current_offset > internal_file->size ) + { + internal_file->size = (size64_t) internal_file->current_offset; + } return( write_count ); } @@ -2567,6 +2571,10 @@ } internal_file->current_offset += write_count; + if( (size64_t) internal_file->current_offset > internal_file->size ) + { + internal_file->size = (size64_t) internal_file->current_offset; + } return( write_count ); } @@ -3384,7 +3392,10 @@ ssize_t read_count = 0; off64_t current_offset = 0; off64_t offset = 0; + +#if defined( BLKGETSIZE64 ) || defined( DIOCGMEDIASIZE ) || defined( DIOCGDINFO ) || ( defined( DKIOCGETBLOCKCOUNT ) && defined( DKIOCGETBLOCKSIZE ) ) uint32_t error_code = 0; +#endif #if !defined( DIOCGMEDIASIZE ) && defined( DIOCGDINFO ) struct disklabel disk_label; @@ -3647,7 +3658,8 @@ safe_size = (size64_t) ( block_count * bytes_per_sector ); } } -#endif +#endif /* defined( BLKGETSIZE64 ) || defined( DIOCGMEDIASIZE ) || defined( DIOCGDINFO ) || ( defined( DKIOCGETBLOCKCOUNT ) && defined( DKIOCGETBLOCKSIZE ) ) */ + if( read_count <= 0 ) { /* Try to seek the end of the file and determine the size based on the offset diff -Nru libfshfs-20201104/libcfile/libcfile_file.h libfshfs-20240221/libcfile/libcfile_file.h --- libfshfs-20201104/libcfile/libcfile_file.h 2020-11-04 11:55:45.000000000 +0000 +++ libfshfs-20240221/libcfile/libcfile_file.h 2024-02-21 06:03:59.000000000 +0000 @@ -1,7 +1,7 @@ /* * File functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcfile/libcfile_libcerror.h libfshfs-20240221/libcfile/libcfile_libcerror.h --- libfshfs-20201104/libcfile/libcfile_libcerror.h 2020-11-04 11:55:45.000000000 +0000 +++ libfshfs-20240221/libcfile/libcfile_libcerror.h 2024-02-21 06:03:59.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libcerror header wrapper * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcfile/libcfile_libclocale.h libfshfs-20240221/libcfile/libcfile_libclocale.h --- libfshfs-20201104/libcfile/libcfile_libclocale.h 2020-11-04 11:55:45.000000000 +0000 +++ libfshfs-20240221/libcfile/libcfile_libclocale.h 2024-02-21 06:03:59.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libclocale header wrapper * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcfile/libcfile_libcnotify.h libfshfs-20240221/libcfile/libcfile_libcnotify.h --- libfshfs-20201104/libcfile/libcfile_libcnotify.h 2020-11-04 11:55:45.000000000 +0000 +++ libfshfs-20240221/libcfile/libcfile_libcnotify.h 2024-02-21 06:03:59.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libcnotify header wrapper * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcfile/libcfile_libuna.h libfshfs-20240221/libcfile/libcfile_libuna.h --- libfshfs-20201104/libcfile/libcfile_libuna.h 2020-11-04 11:55:45.000000000 +0000 +++ libfshfs-20240221/libcfile/libcfile_libuna.h 2024-02-21 06:03:59.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libuna header wrapper * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcfile/libcfile_notify.c libfshfs-20240221/libcfile/libcfile_notify.c --- libfshfs-20201104/libcfile/libcfile_notify.c 2020-11-04 11:55:45.000000000 +0000 +++ libfshfs-20240221/libcfile/libcfile_notify.c 2024-02-21 06:03:59.000000000 +0000 @@ -1,7 +1,7 @@ /* * Notification functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcfile/libcfile_notify.h libfshfs-20240221/libcfile/libcfile_notify.h --- libfshfs-20201104/libcfile/libcfile_notify.h 2020-11-04 11:55:45.000000000 +0000 +++ libfshfs-20240221/libcfile/libcfile_notify.h 2024-02-21 06:03:59.000000000 +0000 @@ -1,7 +1,7 @@ /* * Notification functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcfile/libcfile_support.c libfshfs-20240221/libcfile/libcfile_support.c --- libfshfs-20201104/libcfile/libcfile_support.c 2020-11-04 11:55:45.000000000 +0000 +++ libfshfs-20240221/libcfile/libcfile_support.c 2024-02-21 06:03:59.000000000 +0000 @@ -1,7 +1,7 @@ /* * Support functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcfile/libcfile_support.h libfshfs-20240221/libcfile/libcfile_support.h --- libfshfs-20201104/libcfile/libcfile_support.h 2020-11-04 11:55:45.000000000 +0000 +++ libfshfs-20240221/libcfile/libcfile_support.h 2024-02-21 06:03:59.000000000 +0000 @@ -1,7 +1,7 @@ /* * Support functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcfile/libcfile_system_string.c libfshfs-20240221/libcfile/libcfile_system_string.c --- libfshfs-20201104/libcfile/libcfile_system_string.c 2020-11-04 11:55:45.000000000 +0000 +++ libfshfs-20240221/libcfile/libcfile_system_string.c 2024-02-21 06:03:59.000000000 +0000 @@ -1,7 +1,7 @@ /* * System string functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcfile/libcfile_system_string.h libfshfs-20240221/libcfile/libcfile_system_string.h --- libfshfs-20201104/libcfile/libcfile_system_string.h 2020-11-04 11:55:45.000000000 +0000 +++ libfshfs-20240221/libcfile/libcfile_system_string.h 2024-02-21 06:03:59.000000000 +0000 @@ -1,7 +1,7 @@ /* * System string functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcfile/libcfile_types.h libfshfs-20240221/libcfile/libcfile_types.h --- libfshfs-20201104/libcfile/libcfile_types.h 2020-11-04 11:55:45.000000000 +0000 +++ libfshfs-20240221/libcfile/libcfile_types.h 2024-02-21 06:03:59.000000000 +0000 @@ -1,7 +1,7 @@ /* * The internal type definitions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcfile/libcfile_unused.h libfshfs-20240221/libcfile/libcfile_unused.h --- libfshfs-20201104/libcfile/libcfile_unused.h 2020-11-04 11:55:45.000000000 +0000 +++ libfshfs-20240221/libcfile/libcfile_unused.h 2024-02-21 06:03:59.000000000 +0000 @@ -1,7 +1,7 @@ /* * Definitions to silence compiler warnings about unused function attributes/parameters. * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcfile/libcfile_winapi.c libfshfs-20240221/libcfile/libcfile_winapi.c --- libfshfs-20201104/libcfile/libcfile_winapi.c 2020-11-04 11:55:45.000000000 +0000 +++ libfshfs-20240221/libcfile/libcfile_winapi.c 2024-02-21 06:03:59.000000000 +0000 @@ -1,7 +1,7 @@ /* * WINAPI fallback functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcfile/libcfile_winapi.h libfshfs-20240221/libcfile/libcfile_winapi.h --- libfshfs-20201104/libcfile/libcfile_winapi.h 2020-11-04 11:55:45.000000000 +0000 +++ libfshfs-20240221/libcfile/libcfile_winapi.h 2024-02-21 06:03:59.000000000 +0000 @@ -1,7 +1,7 @@ /* * WINAPI fallback functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libclocale/Makefile.am libfshfs-20240221/libclocale/Makefile.am --- libfshfs-20201104/libclocale/Makefile.am 2020-11-04 11:55:47.000000000 +0000 +++ libfshfs-20240221/libclocale/Makefile.am 2024-02-21 06:04:01.000000000 +0000 @@ -22,9 +22,11 @@ Makefile.in distclean: clean - /bin/rm -f Makefile + -rm -f Makefile -splint: +sources-local: $(BUILT_SOURCES) + +splint-local: @echo "Running splint on libclocale ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libclocale_la_SOURCES) diff -Nru libfshfs-20201104/libclocale/Makefile.in libfshfs-20240221/libclocale/Makefile.in --- libfshfs-20201104/libclocale/Makefile.in 2020-11-04 11:56:31.000000000 +0000 +++ libfshfs-20240221/libclocale/Makefile.in 2024-02-21 06:04:25.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -91,25 +91,26 @@ subdir = libclocale ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcdata.m4 \ - $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \ - $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \ - $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcrypto.m4 \ - $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcthreads.m4 \ - $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ - $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ - $(top_srcdir)/m4/libhmac.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/libuna.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \ - $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \ - $(top_srcdir)/m4/zlib.m4 $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libbfio.m4 \ + $(top_srcdir)/m4/libcdata.m4 $(top_srcdir)/m4/libcerror.m4 \ + $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ + $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ + $(top_srcdir)/m4/libcrypto.m4 $(top_srcdir)/m4/libcsplit.m4 \ + $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \ + $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ + $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmos.m4 \ + $(top_srcdir)/m4/libfuse.m4 $(top_srcdir)/m4/libhmac.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/pthread.m4 \ + $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ + $(top_srcdir)/m4/types.m4 $(top_srcdir)/m4/zlib.m4 \ + $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) @@ -181,6 +182,7 @@ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -198,8 +200,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ @@ -216,6 +216,8 @@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ @@ -231,8 +233,10 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -252,6 +256,8 @@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ +HAVE_LIBFMOS = @HAVE_LIBFMOS@ +HAVE_LIBFUSE = @HAVE_LIBFUSE@ HAVE_LIBHMAC = @HAVE_LIBHMAC@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ @@ -267,6 +273,7 @@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ +HAVE_LOCAL_LIBFMOS = @HAVE_LOCAL_LIBFMOS@ HAVE_LOCAL_LIBHMAC = @HAVE_LOCAL_LIBHMAC@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ @@ -320,8 +327,12 @@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ +LIBFMOS_CPPFLAGS = @LIBFMOS_CPPFLAGS@ +LIBFMOS_LIBADD = @LIBFMOS_LIBADD@ LIBFSHFS_DLL_EXPORT = @LIBFSHFS_DLL_EXPORT@ LIBFSHFS_DLL_IMPORT = @LIBFSHFS_DLL_IMPORT@ +LIBFUSE_CPPFLAGS = @LIBFUSE_CPPFLAGS@ +LIBFUSE_LIBADD = @LIBFUSE_LIBADD@ LIBHMAC_CPPFLAGS = @LIBHMAC_CPPFLAGS@ LIBHMAC_LIBADD = @LIBHMAC_LIBADD@ LIBICONV = @LIBICONV@ @@ -343,8 +354,8 @@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ @@ -367,26 +378,6 @@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ -PYTHON2 = @PYTHON2@ -PYTHON2_CONFIG = @PYTHON2_CONFIG@ -PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ -PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ -PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ -PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ -PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ -PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ -PYTHON2_PREFIX = @PYTHON2_PREFIX@ -PYTHON2_VERSION = @PYTHON2_VERSION@ -PYTHON3 = @PYTHON3@ -PYTHON3_CONFIG = @PYTHON3_CONFIG@ -PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ -PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ -PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ -PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ -PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ -PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ -PYTHON3_PREFIX = @PYTHON3_PREFIX@ -PYTHON3_VERSION = @PYTHON3_VERSION@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ @@ -464,6 +455,12 @@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ +ax_libfmos_pc_libs_private = @ax_libfmos_pc_libs_private@ +ax_libfmos_spec_build_requires = @ax_libfmos_spec_build_requires@ +ax_libfmos_spec_requires = @ax_libfmos_spec_requires@ +ax_libfuse_pc_libs_private = @ax_libfuse_pc_libs_private@ +ax_libfuse_spec_build_requires = @ax_libfuse_spec_build_requires@ +ax_libfuse_spec_requires = @ax_libfuse_spec_requires@ ax_libhmac_pc_libs_private = @ax_libhmac_pc_libs_private@ ax_libhmac_spec_build_requires = @ax_libhmac_spec_build_requires@ ax_libhmac_spec_requires = @ax_libhmac_spec_requires@ @@ -488,6 +485,8 @@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +fuse_CFLAGS = @fuse_CFLAGS@ +fuse_LIBS = @fuse_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -525,6 +524,8 @@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ +libfmos_CFLAGS = @libfmos_CFLAGS@ +libfmos_LIBS = @libfmos_LIBS@ libfshfs_spec_requires = @libfshfs_spec_requires@ libfshfs_spec_tools_build_requires = @libfshfs_spec_tools_build_requires@ libhmac_CFLAGS = @libhmac_CFLAGS@ @@ -543,11 +544,8 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ -pyexecdir2 = @pyexecdir2@ -pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ -pythondir2 = @pythondir2@ -pythondir3 = @pythondir3@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -669,6 +667,8 @@ clean-libtool: -rm -rf .libs _libs +sources-local: +splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique @@ -721,7 +721,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am @@ -859,6 +858,14 @@ ps-am: +sources: sources-am + +sources-am: sources-local + +splint: splint-am + +splint-am: splint-local + uninstall-am: .MAKE: install-am install-strip @@ -875,15 +882,18 @@ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am + sources-am sources-local splint-am splint-local tags tags-am \ + uninstall uninstall-am .PRECIOUS: Makefile distclean: clean - /bin/rm -f Makefile + -rm -f Makefile + +sources-local: $(BUILT_SOURCES) -splint: +splint-local: @echo "Running splint on libclocale ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libclocale_la_SOURCES) diff -Nru libfshfs-20201104/libclocale/libclocale_codepage.c libfshfs-20240221/libclocale/libclocale_codepage.c --- libfshfs-20201104/libclocale/libclocale_codepage.c 2020-11-04 11:55:47.000000000 +0000 +++ libfshfs-20240221/libclocale/libclocale_codepage.c 2024-02-21 06:04:01.000000000 +0000 @@ -1,7 +1,7 @@ /* * Codepage functions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libclocale/libclocale_codepage.h libfshfs-20240221/libclocale/libclocale_codepage.h --- libfshfs-20201104/libclocale/libclocale_codepage.h 2020-11-04 11:55:47.000000000 +0000 +++ libfshfs-20240221/libclocale/libclocale_codepage.h 2024-02-21 06:04:01.000000000 +0000 @@ -1,7 +1,7 @@ /* * Codepage functions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libclocale/libclocale_definitions.h libfshfs-20240221/libclocale/libclocale_definitions.h --- libfshfs-20201104/libclocale/libclocale_definitions.h 2020-11-04 11:55:47.000000000 +0000 +++ libfshfs-20240221/libclocale/libclocale_definitions.h 2024-02-21 06:04:01.000000000 +0000 @@ -1,7 +1,7 @@ /* * The internal definitions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -34,11 +34,11 @@ */ #else -#define LIBCLOCALE_VERSION 20200913 +#define LIBCLOCALE_VERSION 20240107 /* The libclocale version string */ -#define LIBCLOCALE_VERSION_STRING "20200913" +#define LIBCLOCALE_VERSION_STRING "20240107" /* The codepage feature flag definitions */ diff -Nru libfshfs-20201104/libclocale/libclocale_extern.h libfshfs-20240221/libclocale/libclocale_extern.h --- libfshfs-20201104/libclocale/libclocale_extern.h 2020-11-04 11:55:47.000000000 +0000 +++ libfshfs-20240221/libclocale/libclocale_extern.h 2024-02-21 06:04:01.000000000 +0000 @@ -1,7 +1,7 @@ /* * The internal extern definition * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -30,7 +30,11 @@ #include +#if defined( __CYGWIN__ ) || defined( __MINGW32__ ) +#define LIBCLOCALE_EXTERN_VARIABLE extern +#else #define LIBCLOCALE_EXTERN_VARIABLE LIBCLOCALE_EXTERN +#endif #else #define LIBCLOCALE_EXTERN /* extern */ diff -Nru libfshfs-20201104/libclocale/libclocale_libcerror.h libfshfs-20240221/libclocale/libclocale_libcerror.h --- libfshfs-20201104/libclocale/libclocale_libcerror.h 2020-11-04 11:55:47.000000000 +0000 +++ libfshfs-20240221/libclocale/libclocale_libcerror.h 2024-02-21 06:04:01.000000000 +0000 @@ -1,7 +1,7 @@ /* * The internal libcerror header * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libclocale/libclocale_locale.c libfshfs-20240221/libclocale/libclocale_locale.c --- libfshfs-20201104/libclocale/libclocale_locale.c 2020-11-04 11:55:47.000000000 +0000 +++ libfshfs-20240221/libclocale/libclocale_locale.c 2024-02-21 06:04:01.000000000 +0000 @@ -1,7 +1,7 @@ /* * Locale functions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libclocale/libclocale_locale.h libfshfs-20240221/libclocale/libclocale_locale.h --- libfshfs-20201104/libclocale/libclocale_locale.h 2020-11-04 11:55:47.000000000 +0000 +++ libfshfs-20240221/libclocale/libclocale_locale.h 2024-02-21 06:04:01.000000000 +0000 @@ -1,7 +1,7 @@ /* * Locale functions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libclocale/libclocale_support.c libfshfs-20240221/libclocale/libclocale_support.c --- libfshfs-20201104/libclocale/libclocale_support.c 2020-11-04 11:55:47.000000000 +0000 +++ libfshfs-20240221/libclocale/libclocale_support.c 2024-02-21 06:04:01.000000000 +0000 @@ -1,7 +1,7 @@ /* * Support functions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -22,7 +22,7 @@ #include #include -#if defined( HAVE_LIBINTL_H ) +#if defined( HAVE_LIBINTL_H ) && defined( ENABLE_NLS ) #include #endif @@ -68,7 +68,7 @@ return( -1 ); } -#if defined( HAVE_BINDTEXTDOMAIN ) && defined( HAVE_TEXTDOMAIN ) +#if defined( HAVE_BINDTEXTDOMAIN ) && defined( HAVE_TEXTDOMAIN ) && defined( LOCALEDIR ) if( bindtextdomain( domain_name, LOCALEDIR ) == NULL ) @@ -94,7 +94,7 @@ return( -1 ); } -#endif /* defined( HAVE_BINDTEXTDOMAIN ) && defined( HAVE_TEXTDOMAIN ) */ +#endif /* defined( HAVE_BINDTEXTDOMAIN ) && defined( HAVE_TEXTDOMAIN ) && defined( LOCALEDIR ) */ #if !defined( HAVE_WIDE_SYSTEM_CHARACTER ) if( libclocale_locale_get_codepage( diff -Nru libfshfs-20201104/libclocale/libclocale_support.h libfshfs-20240221/libclocale/libclocale_support.h --- libfshfs-20201104/libclocale/libclocale_support.h 2020-11-04 11:55:47.000000000 +0000 +++ libfshfs-20240221/libclocale/libclocale_support.h 2024-02-21 06:04:01.000000000 +0000 @@ -1,7 +1,7 @@ /* * Support functions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libclocale/libclocale_unused.h libfshfs-20240221/libclocale/libclocale_unused.h --- libfshfs-20201104/libclocale/libclocale_unused.h 2020-11-04 11:55:47.000000000 +0000 +++ libfshfs-20240221/libclocale/libclocale_unused.h 2024-02-21 06:04:01.000000000 +0000 @@ -1,7 +1,7 @@ /* * Definitions to silence compiler warnings about unused function attributes/parameters. * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libclocale/libclocale_wide_string.c libfshfs-20240221/libclocale/libclocale_wide_string.c --- libfshfs-20201104/libclocale/libclocale_wide_string.c 2020-11-04 11:55:47.000000000 +0000 +++ libfshfs-20240221/libclocale/libclocale_wide_string.c 2024-02-21 06:04:01.000000000 +0000 @@ -1,7 +1,7 @@ /* * Wide character string functions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libclocale/libclocale_wide_string.h libfshfs-20240221/libclocale/libclocale_wide_string.h --- libfshfs-20201104/libclocale/libclocale_wide_string.h 2020-11-04 11:55:47.000000000 +0000 +++ libfshfs-20240221/libclocale/libclocale_wide_string.h 2024-02-21 06:04:01.000000000 +0000 @@ -1,7 +1,7 @@ /* * Wide character string functions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcnotify/Makefile.am libfshfs-20240221/libcnotify/Makefile.am --- libfshfs-20201104/libcnotify/Makefile.am 2020-11-04 11:55:50.000000000 +0000 +++ libfshfs-20240221/libcnotify/Makefile.am 2024-02-21 06:04:02.000000000 +0000 @@ -21,9 +21,11 @@ Makefile.in distclean: clean - /bin/rm -f Makefile + -rm -f Makefile -splint: +sources-local: $(BUILT_SOURCES) + +splint-local: @echo "Running splint on libcnotify ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcnotify_la_SOURCES) diff -Nru libfshfs-20201104/libcnotify/Makefile.in libfshfs-20240221/libcnotify/Makefile.in --- libfshfs-20201104/libcnotify/Makefile.in 2020-11-04 11:56:31.000000000 +0000 +++ libfshfs-20240221/libcnotify/Makefile.in 2024-02-21 06:04:25.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -91,25 +91,26 @@ subdir = libcnotify ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcdata.m4 \ - $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \ - $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \ - $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcrypto.m4 \ - $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcthreads.m4 \ - $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ - $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ - $(top_srcdir)/m4/libhmac.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/libuna.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \ - $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \ - $(top_srcdir)/m4/zlib.m4 $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libbfio.m4 \ + $(top_srcdir)/m4/libcdata.m4 $(top_srcdir)/m4/libcerror.m4 \ + $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ + $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ + $(top_srcdir)/m4/libcrypto.m4 $(top_srcdir)/m4/libcsplit.m4 \ + $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \ + $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ + $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmos.m4 \ + $(top_srcdir)/m4/libfuse.m4 $(top_srcdir)/m4/libhmac.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/pthread.m4 \ + $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ + $(top_srcdir)/m4/types.m4 $(top_srcdir)/m4/zlib.m4 \ + $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) @@ -180,6 +181,7 @@ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -197,8 +199,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ @@ -215,6 +215,8 @@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ @@ -230,8 +232,10 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -251,6 +255,8 @@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ +HAVE_LIBFMOS = @HAVE_LIBFMOS@ +HAVE_LIBFUSE = @HAVE_LIBFUSE@ HAVE_LIBHMAC = @HAVE_LIBHMAC@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ @@ -266,6 +272,7 @@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ +HAVE_LOCAL_LIBFMOS = @HAVE_LOCAL_LIBFMOS@ HAVE_LOCAL_LIBHMAC = @HAVE_LOCAL_LIBHMAC@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ @@ -319,8 +326,12 @@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ +LIBFMOS_CPPFLAGS = @LIBFMOS_CPPFLAGS@ +LIBFMOS_LIBADD = @LIBFMOS_LIBADD@ LIBFSHFS_DLL_EXPORT = @LIBFSHFS_DLL_EXPORT@ LIBFSHFS_DLL_IMPORT = @LIBFSHFS_DLL_IMPORT@ +LIBFUSE_CPPFLAGS = @LIBFUSE_CPPFLAGS@ +LIBFUSE_LIBADD = @LIBFUSE_LIBADD@ LIBHMAC_CPPFLAGS = @LIBHMAC_CPPFLAGS@ LIBHMAC_LIBADD = @LIBHMAC_LIBADD@ LIBICONV = @LIBICONV@ @@ -342,8 +353,8 @@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ @@ -366,26 +377,6 @@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ -PYTHON2 = @PYTHON2@ -PYTHON2_CONFIG = @PYTHON2_CONFIG@ -PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ -PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ -PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ -PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ -PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ -PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ -PYTHON2_PREFIX = @PYTHON2_PREFIX@ -PYTHON2_VERSION = @PYTHON2_VERSION@ -PYTHON3 = @PYTHON3@ -PYTHON3_CONFIG = @PYTHON3_CONFIG@ -PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ -PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ -PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ -PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ -PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ -PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ -PYTHON3_PREFIX = @PYTHON3_PREFIX@ -PYTHON3_VERSION = @PYTHON3_VERSION@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ @@ -463,6 +454,12 @@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ +ax_libfmos_pc_libs_private = @ax_libfmos_pc_libs_private@ +ax_libfmos_spec_build_requires = @ax_libfmos_spec_build_requires@ +ax_libfmos_spec_requires = @ax_libfmos_spec_requires@ +ax_libfuse_pc_libs_private = @ax_libfuse_pc_libs_private@ +ax_libfuse_spec_build_requires = @ax_libfuse_spec_build_requires@ +ax_libfuse_spec_requires = @ax_libfuse_spec_requires@ ax_libhmac_pc_libs_private = @ax_libhmac_pc_libs_private@ ax_libhmac_spec_build_requires = @ax_libhmac_spec_build_requires@ ax_libhmac_spec_requires = @ax_libhmac_spec_requires@ @@ -487,6 +484,8 @@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +fuse_CFLAGS = @fuse_CFLAGS@ +fuse_LIBS = @fuse_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -524,6 +523,8 @@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ +libfmos_CFLAGS = @libfmos_CFLAGS@ +libfmos_LIBS = @libfmos_LIBS@ libfshfs_spec_requires = @libfshfs_spec_requires@ libfshfs_spec_tools_build_requires = @libfshfs_spec_tools_build_requires@ libhmac_CFLAGS = @libhmac_CFLAGS@ @@ -542,11 +543,8 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ -pyexecdir2 = @pyexecdir2@ -pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ -pythondir2 = @pythondir2@ -pythondir3 = @pythondir3@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -667,6 +665,8 @@ clean-libtool: -rm -rf .libs _libs +sources-local: +splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique @@ -719,7 +719,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am @@ -857,6 +856,14 @@ ps-am: +sources: sources-am + +sources-am: sources-local + +splint: splint-am + +splint-am: splint-local + uninstall-am: .MAKE: install-am install-strip @@ -873,15 +880,18 @@ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am + sources-am sources-local splint-am splint-local tags tags-am \ + uninstall uninstall-am .PRECIOUS: Makefile distclean: clean - /bin/rm -f Makefile + -rm -f Makefile + +sources-local: $(BUILT_SOURCES) -splint: +splint-local: @echo "Running splint on libcnotify ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcnotify_la_SOURCES) diff -Nru libfshfs-20201104/libcnotify/libcnotify_definitions.h libfshfs-20240221/libcnotify/libcnotify_definitions.h --- libfshfs-20201104/libcnotify/libcnotify_definitions.h 2020-11-04 11:55:50.000000000 +0000 +++ libfshfs-20240221/libcnotify/libcnotify_definitions.h 2024-02-21 06:04:02.000000000 +0000 @@ -1,7 +1,7 @@ /* * The internal definitions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -35,11 +35,11 @@ */ #else -#define LIBCNOTIFY_VERSION 20200913 +#define LIBCNOTIFY_VERSION 20240108 /* The libcnotify version string */ -#define LIBCNOTIFY_VERSION_STRING "20200913" +#define LIBCNOTIFY_VERSION_STRING "20240108" /* The print data flags */ diff -Nru libfshfs-20201104/libcnotify/libcnotify_extern.h libfshfs-20240221/libcnotify/libcnotify_extern.h --- libfshfs-20201104/libcnotify/libcnotify_extern.h 2020-11-04 11:55:50.000000000 +0000 +++ libfshfs-20240221/libcnotify/libcnotify_extern.h 2024-02-21 06:04:02.000000000 +0000 @@ -1,7 +1,7 @@ /* * The internal extern definition * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -30,7 +30,11 @@ #include +#if defined( __CYGWIN__ ) || defined( __MINGW32__ ) +#define LIBCNOTIFY_EXTERN_VARIABLE extern +#else #define LIBCNOTIFY_EXTERN_VARIABLE LIBCNOTIFY_EXTERN +#endif #else #define LIBCNOTIFY_EXTERN /* extern */ diff -Nru libfshfs-20201104/libcnotify/libcnotify_libcerror.h libfshfs-20240221/libcnotify/libcnotify_libcerror.h --- libfshfs-20201104/libcnotify/libcnotify_libcerror.h 2020-11-04 11:55:50.000000000 +0000 +++ libfshfs-20240221/libcnotify/libcnotify_libcerror.h 2024-02-21 06:04:02.000000000 +0000 @@ -1,7 +1,7 @@ /* * The internal libcerror header * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcnotify/libcnotify_print.c libfshfs-20240221/libcnotify/libcnotify_print.c --- libfshfs-20201104/libcnotify/libcnotify_print.c 2020-11-04 11:55:50.000000000 +0000 +++ libfshfs-20240221/libcnotify/libcnotify_print.c 2024-02-21 06:04:02.000000000 +0000 @@ -1,7 +1,7 @@ /* * Notification print functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcnotify/libcnotify_print.h libfshfs-20240221/libcnotify/libcnotify_print.h --- libfshfs-20201104/libcnotify/libcnotify_print.h 2020-11-04 11:55:50.000000000 +0000 +++ libfshfs-20240221/libcnotify/libcnotify_print.h 2024-02-21 06:04:02.000000000 +0000 @@ -1,7 +1,7 @@ /* * Notification print functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcnotify/libcnotify_stream.c libfshfs-20240221/libcnotify/libcnotify_stream.c --- libfshfs-20201104/libcnotify/libcnotify_stream.c 2020-11-04 11:55:50.000000000 +0000 +++ libfshfs-20240221/libcnotify/libcnotify_stream.c 2024-02-21 06:04:02.000000000 +0000 @@ -1,7 +1,7 @@ /* * Notification stream functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcnotify/libcnotify_stream.h libfshfs-20240221/libcnotify/libcnotify_stream.h --- libfshfs-20201104/libcnotify/libcnotify_stream.h 2020-11-04 11:55:50.000000000 +0000 +++ libfshfs-20240221/libcnotify/libcnotify_stream.h 2024-02-21 06:04:02.000000000 +0000 @@ -1,7 +1,7 @@ /* * Notification stream functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcnotify/libcnotify_support.c libfshfs-20240221/libcnotify/libcnotify_support.c --- libfshfs-20201104/libcnotify/libcnotify_support.c 2020-11-04 11:55:50.000000000 +0000 +++ libfshfs-20240221/libcnotify/libcnotify_support.c 2024-02-21 06:04:02.000000000 +0000 @@ -1,7 +1,7 @@ /* * Support functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcnotify/libcnotify_support.h libfshfs-20240221/libcnotify/libcnotify_support.h --- libfshfs-20201104/libcnotify/libcnotify_support.h 2020-11-04 11:55:50.000000000 +0000 +++ libfshfs-20240221/libcnotify/libcnotify_support.h 2024-02-21 06:04:02.000000000 +0000 @@ -1,7 +1,7 @@ /* * Support functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcnotify/libcnotify_unused.h libfshfs-20240221/libcnotify/libcnotify_unused.h --- libfshfs-20201104/libcnotify/libcnotify_unused.h 2020-11-04 11:55:50.000000000 +0000 +++ libfshfs-20240221/libcnotify/libcnotify_unused.h 2024-02-21 06:04:02.000000000 +0000 @@ -1,7 +1,7 @@ /* * Definitions to silence compiler warnings about unused function attributes/parameters. * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcnotify/libcnotify_verbose.c libfshfs-20240221/libcnotify/libcnotify_verbose.c --- libfshfs-20201104/libcnotify/libcnotify_verbose.c 2020-11-04 11:55:50.000000000 +0000 +++ libfshfs-20240221/libcnotify/libcnotify_verbose.c 2024-02-21 06:04:02.000000000 +0000 @@ -1,7 +1,7 @@ /* * Verbose functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcnotify/libcnotify_verbose.h libfshfs-20240221/libcnotify/libcnotify_verbose.h --- libfshfs-20201104/libcnotify/libcnotify_verbose.h 2020-11-04 11:55:50.000000000 +0000 +++ libfshfs-20240221/libcnotify/libcnotify_verbose.h 2024-02-21 06:04:02.000000000 +0000 @@ -1,7 +1,7 @@ /* * Verbose functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcpath/Makefile.am libfshfs-20240221/libcpath/Makefile.am --- libfshfs-20201104/libcpath/Makefile.am 2020-11-04 11:55:52.000000000 +0000 +++ libfshfs-20240221/libcpath/Makefile.am 2024-02-21 06:04:03.000000000 +0000 @@ -27,9 +27,11 @@ Makefile.in distclean: clean - /bin/rm -f Makefile + -rm -f Makefile -splint: +sources-local: $(BUILT_SOURCES) + +splint-local: @echo "Running splint on libcpath ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcpath_la_SOURCES) diff -Nru libfshfs-20201104/libcpath/Makefile.in libfshfs-20240221/libcpath/Makefile.in --- libfshfs-20201104/libcpath/Makefile.in 2020-11-04 11:56:31.000000000 +0000 +++ libfshfs-20240221/libcpath/Makefile.in 2024-02-21 06:04:25.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -91,25 +91,26 @@ subdir = libcpath ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcdata.m4 \ - $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \ - $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \ - $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcrypto.m4 \ - $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcthreads.m4 \ - $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ - $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ - $(top_srcdir)/m4/libhmac.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/libuna.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \ - $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \ - $(top_srcdir)/m4/zlib.m4 $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libbfio.m4 \ + $(top_srcdir)/m4/libcdata.m4 $(top_srcdir)/m4/libcerror.m4 \ + $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ + $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ + $(top_srcdir)/m4/libcrypto.m4 $(top_srcdir)/m4/libcsplit.m4 \ + $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \ + $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ + $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmos.m4 \ + $(top_srcdir)/m4/libfuse.m4 $(top_srcdir)/m4/libhmac.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/pthread.m4 \ + $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ + $(top_srcdir)/m4/types.m4 $(top_srcdir)/m4/zlib.m4 \ + $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) @@ -178,6 +179,7 @@ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -195,8 +197,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ @@ -213,6 +213,8 @@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ @@ -228,8 +230,10 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -249,6 +253,8 @@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ +HAVE_LIBFMOS = @HAVE_LIBFMOS@ +HAVE_LIBFUSE = @HAVE_LIBFUSE@ HAVE_LIBHMAC = @HAVE_LIBHMAC@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ @@ -264,6 +270,7 @@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ +HAVE_LOCAL_LIBFMOS = @HAVE_LOCAL_LIBFMOS@ HAVE_LOCAL_LIBHMAC = @HAVE_LOCAL_LIBHMAC@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ @@ -317,8 +324,12 @@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ +LIBFMOS_CPPFLAGS = @LIBFMOS_CPPFLAGS@ +LIBFMOS_LIBADD = @LIBFMOS_LIBADD@ LIBFSHFS_DLL_EXPORT = @LIBFSHFS_DLL_EXPORT@ LIBFSHFS_DLL_IMPORT = @LIBFSHFS_DLL_IMPORT@ +LIBFUSE_CPPFLAGS = @LIBFUSE_CPPFLAGS@ +LIBFUSE_LIBADD = @LIBFUSE_LIBADD@ LIBHMAC_CPPFLAGS = @LIBHMAC_CPPFLAGS@ LIBHMAC_LIBADD = @LIBHMAC_LIBADD@ LIBICONV = @LIBICONV@ @@ -340,8 +351,8 @@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ @@ -364,26 +375,6 @@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ -PYTHON2 = @PYTHON2@ -PYTHON2_CONFIG = @PYTHON2_CONFIG@ -PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ -PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ -PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ -PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ -PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ -PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ -PYTHON2_PREFIX = @PYTHON2_PREFIX@ -PYTHON2_VERSION = @PYTHON2_VERSION@ -PYTHON3 = @PYTHON3@ -PYTHON3_CONFIG = @PYTHON3_CONFIG@ -PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ -PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ -PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ -PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ -PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ -PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ -PYTHON3_PREFIX = @PYTHON3_PREFIX@ -PYTHON3_VERSION = @PYTHON3_VERSION@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ @@ -461,6 +452,12 @@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ +ax_libfmos_pc_libs_private = @ax_libfmos_pc_libs_private@ +ax_libfmos_spec_build_requires = @ax_libfmos_spec_build_requires@ +ax_libfmos_spec_requires = @ax_libfmos_spec_requires@ +ax_libfuse_pc_libs_private = @ax_libfuse_pc_libs_private@ +ax_libfuse_spec_build_requires = @ax_libfuse_spec_build_requires@ +ax_libfuse_spec_requires = @ax_libfuse_spec_requires@ ax_libhmac_pc_libs_private = @ax_libhmac_pc_libs_private@ ax_libhmac_spec_build_requires = @ax_libhmac_spec_build_requires@ ax_libhmac_spec_requires = @ax_libhmac_spec_requires@ @@ -485,6 +482,8 @@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +fuse_CFLAGS = @fuse_CFLAGS@ +fuse_LIBS = @fuse_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -522,6 +521,8 @@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ +libfmos_CFLAGS = @libfmos_CFLAGS@ +libfmos_LIBS = @libfmos_LIBS@ libfshfs_spec_requires = @libfshfs_spec_requires@ libfshfs_spec_tools_build_requires = @libfshfs_spec_tools_build_requires@ libhmac_CFLAGS = @libhmac_CFLAGS@ @@ -540,11 +541,8 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ -pyexecdir2 = @pyexecdir2@ -pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ -pythondir2 = @pythondir2@ -pythondir3 = @pythondir3@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -671,6 +669,8 @@ clean-libtool: -rm -rf .libs _libs +sources-local: +splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique @@ -723,7 +723,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am @@ -861,6 +860,14 @@ ps-am: +sources: sources-am + +sources-am: sources-local + +splint: splint-am + +splint-am: splint-local + uninstall-am: .MAKE: install-am install-strip @@ -877,15 +884,18 @@ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am + sources-am sources-local splint-am splint-local tags tags-am \ + uninstall uninstall-am .PRECIOUS: Makefile distclean: clean - /bin/rm -f Makefile + -rm -f Makefile + +sources-local: $(BUILT_SOURCES) -splint: +splint-local: @echo "Running splint on libcpath ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcpath_la_SOURCES) diff -Nru libfshfs-20201104/libcpath/libcpath_definitions.h libfshfs-20240221/libcpath/libcpath_definitions.h --- libfshfs-20201104/libcpath/libcpath_definitions.h 2020-11-04 11:55:52.000000000 +0000 +++ libfshfs-20240221/libcpath/libcpath_definitions.h 2024-02-21 06:04:03.000000000 +0000 @@ -1,7 +1,7 @@ /* * The internal definitions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -35,11 +35,11 @@ */ #else -#define LIBCPATH_VERSION 20200623 +#define LIBCPATH_VERSION 20240109 /* The libcpath version string */ -#define LIBCPATH_VERSION_STRING "20200623" +#define LIBCPATH_VERSION_STRING "20240109" #if defined( WINAPI ) #define LIBCPATH_SEPARATOR '\\' diff -Nru libfshfs-20201104/libcpath/libcpath_error.c libfshfs-20240221/libcpath/libcpath_error.c --- libfshfs-20201104/libcpath/libcpath_error.c 2020-11-04 11:55:52.000000000 +0000 +++ libfshfs-20240221/libcpath/libcpath_error.c 2024-02-21 06:04:03.000000000 +0000 @@ -1,7 +1,7 @@ /* * Error functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcpath/libcpath_error.h libfshfs-20240221/libcpath/libcpath_error.h --- libfshfs-20201104/libcpath/libcpath_error.h 2020-11-04 11:55:52.000000000 +0000 +++ libfshfs-20240221/libcpath/libcpath_error.h 2024-02-21 06:04:03.000000000 +0000 @@ -1,7 +1,7 @@ /* * Error functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcpath/libcpath_extern.h libfshfs-20240221/libcpath/libcpath_extern.h --- libfshfs-20201104/libcpath/libcpath_extern.h 2020-11-04 11:55:52.000000000 +0000 +++ libfshfs-20240221/libcpath/libcpath_extern.h 2024-02-21 06:04:03.000000000 +0000 @@ -1,7 +1,7 @@ /* * The internal extern definition * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -30,7 +30,11 @@ #include +#if defined( __CYGWIN__ ) || defined( __MINGW32__ ) +#define LIBCPATH_EXTERN_VARIABLE extern +#else #define LIBCPATH_EXTERN_VARIABLE LIBCPATH_EXTERN +#endif #else #define LIBCPATH_EXTERN /* extern */ diff -Nru libfshfs-20201104/libcpath/libcpath_libcerror.h libfshfs-20240221/libcpath/libcpath_libcerror.h --- libfshfs-20201104/libcpath/libcpath_libcerror.h 2020-11-04 11:55:52.000000000 +0000 +++ libfshfs-20240221/libcpath/libcpath_libcerror.h 2024-02-21 06:04:03.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libcerror header wrapper * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcpath/libcpath_libclocale.h libfshfs-20240221/libcpath/libcpath_libclocale.h --- libfshfs-20201104/libcpath/libcpath_libclocale.h 2020-11-04 11:55:52.000000000 +0000 +++ libfshfs-20240221/libcpath/libcpath_libclocale.h 2024-02-21 06:04:03.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libclocale header wrapper * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcpath/libcpath_libcsplit.h libfshfs-20240221/libcpath/libcpath_libcsplit.h --- libfshfs-20201104/libcpath/libcpath_libcsplit.h 2020-11-04 11:55:52.000000000 +0000 +++ libfshfs-20240221/libcpath/libcpath_libcsplit.h 2024-02-21 06:04:03.000000000 +0000 @@ -1,7 +1,7 @@ /* * The internal libcsplit header * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -46,7 +46,7 @@ #include -#endif +#endif /* defined( HAVE_LOCAL_LIBCSPLIT ) */ -#endif +#endif /* !defined( _LIBCPATH_LIBCSPLIT_H ) */ diff -Nru libfshfs-20201104/libcpath/libcpath_libuna.h libfshfs-20240221/libcpath/libcpath_libuna.h --- libfshfs-20201104/libcpath/libcpath_libuna.h 2020-11-04 11:55:52.000000000 +0000 +++ libfshfs-20240221/libcpath/libcpath_libuna.h 2024-02-21 06:04:03.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libuna header wrapper * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcpath/libcpath_path.c libfshfs-20240221/libcpath/libcpath_path.c --- libfshfs-20201104/libcpath/libcpath_path.c 2020-11-04 11:55:52.000000000 +0000 +++ libfshfs-20240221/libcpath/libcpath_path.c 2024-02-21 06:04:03.000000000 +0000 @@ -1,7 +1,7 @@ /* * Path functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcpath/libcpath_path.h libfshfs-20240221/libcpath/libcpath_path.h --- libfshfs-20201104/libcpath/libcpath_path.h 2020-11-04 11:55:52.000000000 +0000 +++ libfshfs-20240221/libcpath/libcpath_path.h 2024-02-21 06:04:03.000000000 +0000 @@ -1,7 +1,7 @@ /* * Path functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcpath/libcpath_support.c libfshfs-20240221/libcpath/libcpath_support.c --- libfshfs-20201104/libcpath/libcpath_support.c 2020-11-04 11:55:52.000000000 +0000 +++ libfshfs-20240221/libcpath/libcpath_support.c 2024-02-21 06:04:03.000000000 +0000 @@ -1,7 +1,7 @@ /* * Support functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcpath/libcpath_support.h libfshfs-20240221/libcpath/libcpath_support.h --- libfshfs-20201104/libcpath/libcpath_support.h 2020-11-04 11:55:52.000000000 +0000 +++ libfshfs-20240221/libcpath/libcpath_support.h 2024-02-21 06:04:03.000000000 +0000 @@ -1,7 +1,7 @@ /* * Support functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcpath/libcpath_system_string.c libfshfs-20240221/libcpath/libcpath_system_string.c --- libfshfs-20201104/libcpath/libcpath_system_string.c 2020-11-04 11:55:52.000000000 +0000 +++ libfshfs-20240221/libcpath/libcpath_system_string.c 2024-02-21 06:04:03.000000000 +0000 @@ -1,7 +1,7 @@ /* * System string functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcpath/libcpath_system_string.h libfshfs-20240221/libcpath/libcpath_system_string.h --- libfshfs-20201104/libcpath/libcpath_system_string.h 2020-11-04 11:55:52.000000000 +0000 +++ libfshfs-20240221/libcpath/libcpath_system_string.h 2024-02-21 06:04:03.000000000 +0000 @@ -1,7 +1,7 @@ /* * System string functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcpath/libcpath_unused.h libfshfs-20240221/libcpath/libcpath_unused.h --- libfshfs-20201104/libcpath/libcpath_unused.h 2020-11-04 11:55:52.000000000 +0000 +++ libfshfs-20240221/libcpath/libcpath_unused.h 2024-02-21 06:04:03.000000000 +0000 @@ -1,7 +1,7 @@ /* * Definitions to silence compiler warnings about unused function attributes/parameters. * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcsplit/Makefile.am libfshfs-20240221/libcsplit/Makefile.am --- libfshfs-20201104/libcsplit/Makefile.am 2020-11-04 11:55:56.000000000 +0000 +++ libfshfs-20240221/libcsplit/Makefile.am 2024-02-21 06:04:04.000000000 +0000 @@ -24,9 +24,11 @@ Makefile.in distclean: clean - /bin/rm -f Makefile + -rm -f Makefile -splint: +sources-local: $(BUILT_SOURCES) + +splint-local: @echo "Running splint on libcsplit ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcsplit_la_SOURCES) diff -Nru libfshfs-20201104/libcsplit/Makefile.in libfshfs-20240221/libcsplit/Makefile.in --- libfshfs-20201104/libcsplit/Makefile.in 2020-11-04 11:56:31.000000000 +0000 +++ libfshfs-20240221/libcsplit/Makefile.in 2024-02-21 06:04:25.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -91,25 +91,26 @@ subdir = libcsplit ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcdata.m4 \ - $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \ - $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \ - $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcrypto.m4 \ - $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcthreads.m4 \ - $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ - $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ - $(top_srcdir)/m4/libhmac.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/libuna.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \ - $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \ - $(top_srcdir)/m4/zlib.m4 $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libbfio.m4 \ + $(top_srcdir)/m4/libcdata.m4 $(top_srcdir)/m4/libcerror.m4 \ + $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ + $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ + $(top_srcdir)/m4/libcrypto.m4 $(top_srcdir)/m4/libcsplit.m4 \ + $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \ + $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ + $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmos.m4 \ + $(top_srcdir)/m4/libfuse.m4 $(top_srcdir)/m4/libhmac.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/pthread.m4 \ + $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ + $(top_srcdir)/m4/types.m4 $(top_srcdir)/m4/zlib.m4 \ + $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) @@ -188,6 +189,7 @@ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -205,8 +207,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ @@ -223,6 +223,8 @@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ @@ -238,8 +240,10 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -259,6 +263,8 @@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ +HAVE_LIBFMOS = @HAVE_LIBFMOS@ +HAVE_LIBFUSE = @HAVE_LIBFUSE@ HAVE_LIBHMAC = @HAVE_LIBHMAC@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ @@ -274,6 +280,7 @@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ +HAVE_LOCAL_LIBFMOS = @HAVE_LOCAL_LIBFMOS@ HAVE_LOCAL_LIBHMAC = @HAVE_LOCAL_LIBHMAC@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ @@ -327,8 +334,12 @@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ +LIBFMOS_CPPFLAGS = @LIBFMOS_CPPFLAGS@ +LIBFMOS_LIBADD = @LIBFMOS_LIBADD@ LIBFSHFS_DLL_EXPORT = @LIBFSHFS_DLL_EXPORT@ LIBFSHFS_DLL_IMPORT = @LIBFSHFS_DLL_IMPORT@ +LIBFUSE_CPPFLAGS = @LIBFUSE_CPPFLAGS@ +LIBFUSE_LIBADD = @LIBFUSE_LIBADD@ LIBHMAC_CPPFLAGS = @LIBHMAC_CPPFLAGS@ LIBHMAC_LIBADD = @LIBHMAC_LIBADD@ LIBICONV = @LIBICONV@ @@ -350,8 +361,8 @@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ @@ -374,26 +385,6 @@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ -PYTHON2 = @PYTHON2@ -PYTHON2_CONFIG = @PYTHON2_CONFIG@ -PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ -PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ -PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ -PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ -PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ -PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ -PYTHON2_PREFIX = @PYTHON2_PREFIX@ -PYTHON2_VERSION = @PYTHON2_VERSION@ -PYTHON3 = @PYTHON3@ -PYTHON3_CONFIG = @PYTHON3_CONFIG@ -PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ -PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ -PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ -PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ -PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ -PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ -PYTHON3_PREFIX = @PYTHON3_PREFIX@ -PYTHON3_VERSION = @PYTHON3_VERSION@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ @@ -471,6 +462,12 @@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ +ax_libfmos_pc_libs_private = @ax_libfmos_pc_libs_private@ +ax_libfmos_spec_build_requires = @ax_libfmos_spec_build_requires@ +ax_libfmos_spec_requires = @ax_libfmos_spec_requires@ +ax_libfuse_pc_libs_private = @ax_libfuse_pc_libs_private@ +ax_libfuse_spec_build_requires = @ax_libfuse_spec_build_requires@ +ax_libfuse_spec_requires = @ax_libfuse_spec_requires@ ax_libhmac_pc_libs_private = @ax_libhmac_pc_libs_private@ ax_libhmac_spec_build_requires = @ax_libhmac_spec_build_requires@ ax_libhmac_spec_requires = @ax_libhmac_spec_requires@ @@ -495,6 +492,8 @@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +fuse_CFLAGS = @fuse_CFLAGS@ +fuse_LIBS = @fuse_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -532,6 +531,8 @@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ +libfmos_CFLAGS = @libfmos_CFLAGS@ +libfmos_LIBS = @libfmos_LIBS@ libfshfs_spec_requires = @libfshfs_spec_requires@ libfshfs_spec_tools_build_requires = @libfshfs_spec_tools_build_requires@ libhmac_CFLAGS = @libhmac_CFLAGS@ @@ -550,11 +551,8 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ -pyexecdir2 = @pyexecdir2@ -pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ -pythondir2 = @pythondir2@ -pythondir3 = @pythondir3@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -680,6 +678,8 @@ clean-libtool: -rm -rf .libs _libs +sources-local: +splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique @@ -732,7 +732,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am @@ -872,6 +871,14 @@ ps-am: +sources: sources-am + +sources-am: sources-local + +splint: splint-am + +splint-am: splint-local + uninstall-am: .MAKE: install-am install-strip @@ -888,15 +895,18 @@ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am + sources-am sources-local splint-am splint-local tags tags-am \ + uninstall uninstall-am .PRECIOUS: Makefile distclean: clean - /bin/rm -f Makefile + -rm -f Makefile + +sources-local: $(BUILT_SOURCES) -splint: +splint-local: @echo "Running splint on libcsplit ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcsplit_la_SOURCES) diff -Nru libfshfs-20201104/libcsplit/libcsplit_definitions.h libfshfs-20240221/libcsplit/libcsplit_definitions.h --- libfshfs-20201104/libcsplit/libcsplit_definitions.h 2020-11-04 11:55:56.000000000 +0000 +++ libfshfs-20240221/libcsplit/libcsplit_definitions.h 2024-02-21 06:04:04.000000000 +0000 @@ -1,7 +1,7 @@ /* * The internal definitions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -35,11 +35,11 @@ */ #else -#define LIBCSPLIT_VERSION 20200703 +#define LIBCSPLIT_VERSION 20240110 /* The libcsplit version string */ -#define LIBCSPLIT_VERSION_STRING "20200703" +#define LIBCSPLIT_VERSION_STRING "20240110" #endif /* !defined( HAVE_LOCAL_LIBCSPLIT ) */ diff -Nru libfshfs-20201104/libcsplit/libcsplit_error.c libfshfs-20240221/libcsplit/libcsplit_error.c --- libfshfs-20201104/libcsplit/libcsplit_error.c 2020-11-04 11:55:56.000000000 +0000 +++ libfshfs-20240221/libcsplit/libcsplit_error.c 2024-02-21 06:04:04.000000000 +0000 @@ -1,7 +1,7 @@ /* * Error functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcsplit/libcsplit_error.h libfshfs-20240221/libcsplit/libcsplit_error.h --- libfshfs-20201104/libcsplit/libcsplit_error.h 2020-11-04 11:55:56.000000000 +0000 +++ libfshfs-20240221/libcsplit/libcsplit_error.h 2024-02-21 06:04:04.000000000 +0000 @@ -1,7 +1,7 @@ /* * Error functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcsplit/libcsplit_extern.h libfshfs-20240221/libcsplit/libcsplit_extern.h --- libfshfs-20201104/libcsplit/libcsplit_extern.h 2020-11-04 11:55:56.000000000 +0000 +++ libfshfs-20240221/libcsplit/libcsplit_extern.h 2024-02-21 06:04:04.000000000 +0000 @@ -1,7 +1,7 @@ /* * The internal extern definition * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -30,7 +30,11 @@ #include +#if defined( __CYGWIN__ ) || defined( __MINGW32__ ) +#define LIBCSPLIT_EXTERN_VARIABLE extern +#else #define LIBCSPLIT_EXTERN_VARIABLE LIBCSPLIT_EXTERN +#endif #else #define LIBCSPLIT_EXTERN /* extern */ diff -Nru libfshfs-20201104/libcsplit/libcsplit_libcerror.h libfshfs-20240221/libcsplit/libcsplit_libcerror.h --- libfshfs-20201104/libcsplit/libcsplit_libcerror.h 2020-11-04 11:55:56.000000000 +0000 +++ libfshfs-20240221/libcsplit/libcsplit_libcerror.h 2024-02-21 06:04:04.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libcerror header wrapper * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcsplit/libcsplit_narrow_split_string.c libfshfs-20240221/libcsplit/libcsplit_narrow_split_string.c --- libfshfs-20201104/libcsplit/libcsplit_narrow_split_string.c 2020-11-04 11:55:56.000000000 +0000 +++ libfshfs-20240221/libcsplit/libcsplit_narrow_split_string.c 2024-02-21 06:04:04.000000000 +0000 @@ -1,7 +1,7 @@ /* * Split narrow string functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcsplit/libcsplit_narrow_split_string.h libfshfs-20240221/libcsplit/libcsplit_narrow_split_string.h --- libfshfs-20201104/libcsplit/libcsplit_narrow_split_string.h 2020-11-04 11:55:56.000000000 +0000 +++ libfshfs-20240221/libcsplit/libcsplit_narrow_split_string.h 2024-02-21 06:04:04.000000000 +0000 @@ -1,7 +1,7 @@ /* * Split narrow string functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcsplit/libcsplit_narrow_string.c libfshfs-20240221/libcsplit/libcsplit_narrow_string.c --- libfshfs-20201104/libcsplit/libcsplit_narrow_string.c 2020-11-04 11:55:56.000000000 +0000 +++ libfshfs-20240221/libcsplit/libcsplit_narrow_string.c 2024-02-21 06:04:04.000000000 +0000 @@ -1,7 +1,7 @@ /* * Narrow character string functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcsplit/libcsplit_narrow_string.h libfshfs-20240221/libcsplit/libcsplit_narrow_string.h --- libfshfs-20201104/libcsplit/libcsplit_narrow_string.h 2020-11-04 11:55:56.000000000 +0000 +++ libfshfs-20240221/libcsplit/libcsplit_narrow_string.h 2024-02-21 06:04:04.000000000 +0000 @@ -1,7 +1,7 @@ /* * Narrow character string functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcsplit/libcsplit_support.c libfshfs-20240221/libcsplit/libcsplit_support.c --- libfshfs-20201104/libcsplit/libcsplit_support.c 2020-11-04 11:55:56.000000000 +0000 +++ libfshfs-20240221/libcsplit/libcsplit_support.c 2024-02-21 06:04:04.000000000 +0000 @@ -1,7 +1,7 @@ /* * Support functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcsplit/libcsplit_support.h libfshfs-20240221/libcsplit/libcsplit_support.h --- libfshfs-20201104/libcsplit/libcsplit_support.h 2020-11-04 11:55:56.000000000 +0000 +++ libfshfs-20240221/libcsplit/libcsplit_support.h 2024-02-21 06:04:04.000000000 +0000 @@ -1,7 +1,7 @@ /* * Support functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcsplit/libcsplit_types.h libfshfs-20240221/libcsplit/libcsplit_types.h --- libfshfs-20201104/libcsplit/libcsplit_types.h 2020-11-04 11:55:56.000000000 +0000 +++ libfshfs-20240221/libcsplit/libcsplit_types.h 2024-02-21 06:04:04.000000000 +0000 @@ -1,7 +1,7 @@ /* * The internal type definitions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcsplit/libcsplit_unused.h libfshfs-20240221/libcsplit/libcsplit_unused.h --- libfshfs-20201104/libcsplit/libcsplit_unused.h 2020-11-04 11:55:56.000000000 +0000 +++ libfshfs-20240221/libcsplit/libcsplit_unused.h 2024-02-21 06:04:04.000000000 +0000 @@ -1,7 +1,7 @@ /* * Definitions to silence compiler warnings about unused function attributes/parameters. * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcsplit/libcsplit_wide_split_string.c libfshfs-20240221/libcsplit/libcsplit_wide_split_string.c --- libfshfs-20201104/libcsplit/libcsplit_wide_split_string.c 2020-11-04 11:55:56.000000000 +0000 +++ libfshfs-20240221/libcsplit/libcsplit_wide_split_string.c 2024-02-21 06:04:04.000000000 +0000 @@ -1,7 +1,7 @@ /* * Split wide string functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcsplit/libcsplit_wide_split_string.h libfshfs-20240221/libcsplit/libcsplit_wide_split_string.h --- libfshfs-20201104/libcsplit/libcsplit_wide_split_string.h 2020-11-04 11:55:56.000000000 +0000 +++ libfshfs-20240221/libcsplit/libcsplit_wide_split_string.h 2024-02-21 06:04:04.000000000 +0000 @@ -1,7 +1,7 @@ /* * Split wide string functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcsplit/libcsplit_wide_string.c libfshfs-20240221/libcsplit/libcsplit_wide_string.c --- libfshfs-20201104/libcsplit/libcsplit_wide_string.c 2020-11-04 11:55:56.000000000 +0000 +++ libfshfs-20240221/libcsplit/libcsplit_wide_string.c 2024-02-21 06:04:04.000000000 +0000 @@ -1,7 +1,7 @@ /* * Wide character string functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcsplit/libcsplit_wide_string.h libfshfs-20240221/libcsplit/libcsplit_wide_string.h --- libfshfs-20201104/libcsplit/libcsplit_wide_string.h 2020-11-04 11:55:56.000000000 +0000 +++ libfshfs-20240221/libcsplit/libcsplit_wide_string.h 2024-02-21 06:04:04.000000000 +0000 @@ -1,7 +1,7 @@ /* * Wide character string functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcthreads/Makefile.am libfshfs-20240221/libcthreads/Makefile.am --- libfshfs-20201104/libcthreads/Makefile.am 2020-11-04 11:55:58.000000000 +0000 +++ libfshfs-20240221/libcthreads/Makefile.am 2024-02-21 06:04:05.000000000 +0000 @@ -30,9 +30,11 @@ Makefile.in distclean: clean - /bin/rm -f Makefile + -rm -f Makefile -splint: +sources-local: $(BUILT_SOURCES) + +splint-local: @echo "Running splint on libcthreads ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcthreads_la_SOURCES) diff -Nru libfshfs-20201104/libcthreads/Makefile.in libfshfs-20240221/libcthreads/Makefile.in --- libfshfs-20201104/libcthreads/Makefile.in 2020-11-04 11:56:31.000000000 +0000 +++ libfshfs-20240221/libcthreads/Makefile.in 2024-02-21 06:04:26.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -91,25 +91,26 @@ subdir = libcthreads ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcdata.m4 \ - $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \ - $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \ - $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcrypto.m4 \ - $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcthreads.m4 \ - $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ - $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ - $(top_srcdir)/m4/libhmac.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/libuna.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \ - $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \ - $(top_srcdir)/m4/zlib.m4 $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libbfio.m4 \ + $(top_srcdir)/m4/libcdata.m4 $(top_srcdir)/m4/libcerror.m4 \ + $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ + $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ + $(top_srcdir)/m4/libcrypto.m4 $(top_srcdir)/m4/libcsplit.m4 \ + $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \ + $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ + $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmos.m4 \ + $(top_srcdir)/m4/libfuse.m4 $(top_srcdir)/m4/libhmac.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/pthread.m4 \ + $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ + $(top_srcdir)/m4/types.m4 $(top_srcdir)/m4/zlib.m4 \ + $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) @@ -202,6 +203,7 @@ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -219,8 +221,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ @@ -237,6 +237,8 @@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ @@ -252,8 +254,10 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -273,6 +277,8 @@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ +HAVE_LIBFMOS = @HAVE_LIBFMOS@ +HAVE_LIBFUSE = @HAVE_LIBFUSE@ HAVE_LIBHMAC = @HAVE_LIBHMAC@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ @@ -288,6 +294,7 @@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ +HAVE_LOCAL_LIBFMOS = @HAVE_LOCAL_LIBFMOS@ HAVE_LOCAL_LIBHMAC = @HAVE_LOCAL_LIBHMAC@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ @@ -341,8 +348,12 @@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ +LIBFMOS_CPPFLAGS = @LIBFMOS_CPPFLAGS@ +LIBFMOS_LIBADD = @LIBFMOS_LIBADD@ LIBFSHFS_DLL_EXPORT = @LIBFSHFS_DLL_EXPORT@ LIBFSHFS_DLL_IMPORT = @LIBFSHFS_DLL_IMPORT@ +LIBFUSE_CPPFLAGS = @LIBFUSE_CPPFLAGS@ +LIBFUSE_LIBADD = @LIBFUSE_LIBADD@ LIBHMAC_CPPFLAGS = @LIBHMAC_CPPFLAGS@ LIBHMAC_LIBADD = @LIBHMAC_LIBADD@ LIBICONV = @LIBICONV@ @@ -364,8 +375,8 @@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ @@ -388,26 +399,6 @@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ -PYTHON2 = @PYTHON2@ -PYTHON2_CONFIG = @PYTHON2_CONFIG@ -PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ -PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ -PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ -PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ -PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ -PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ -PYTHON2_PREFIX = @PYTHON2_PREFIX@ -PYTHON2_VERSION = @PYTHON2_VERSION@ -PYTHON3 = @PYTHON3@ -PYTHON3_CONFIG = @PYTHON3_CONFIG@ -PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ -PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ -PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ -PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ -PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ -PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ -PYTHON3_PREFIX = @PYTHON3_PREFIX@ -PYTHON3_VERSION = @PYTHON3_VERSION@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ @@ -485,6 +476,12 @@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ +ax_libfmos_pc_libs_private = @ax_libfmos_pc_libs_private@ +ax_libfmos_spec_build_requires = @ax_libfmos_spec_build_requires@ +ax_libfmos_spec_requires = @ax_libfmos_spec_requires@ +ax_libfuse_pc_libs_private = @ax_libfuse_pc_libs_private@ +ax_libfuse_spec_build_requires = @ax_libfuse_spec_build_requires@ +ax_libfuse_spec_requires = @ax_libfuse_spec_requires@ ax_libhmac_pc_libs_private = @ax_libhmac_pc_libs_private@ ax_libhmac_spec_build_requires = @ax_libhmac_spec_build_requires@ ax_libhmac_spec_requires = @ax_libhmac_spec_requires@ @@ -509,6 +506,8 @@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +fuse_CFLAGS = @fuse_CFLAGS@ +fuse_LIBS = @fuse_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -546,6 +545,8 @@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ +libfmos_CFLAGS = @libfmos_CFLAGS@ +libfmos_LIBS = @libfmos_LIBS@ libfshfs_spec_requires = @libfshfs_spec_requires@ libfshfs_spec_tools_build_requires = @libfshfs_spec_tools_build_requires@ libhmac_CFLAGS = @libhmac_CFLAGS@ @@ -564,11 +565,8 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ -pyexecdir2 = @pyexecdir2@ -pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ -pythondir2 = @pythondir2@ -pythondir3 = @pythondir3@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -705,6 +703,8 @@ clean-libtool: -rm -rf .libs _libs +sources-local: +splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique @@ -757,7 +757,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am @@ -902,6 +901,14 @@ ps-am: +sources: sources-am + +sources-am: sources-local + +splint: splint-am + +splint-am: splint-local + uninstall-am: .MAKE: install-am install-strip @@ -918,15 +925,18 @@ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am + sources-am sources-local splint-am splint-local tags tags-am \ + uninstall uninstall-am .PRECIOUS: Makefile distclean: clean - /bin/rm -f Makefile + -rm -f Makefile + +sources-local: $(BUILT_SOURCES) -splint: +splint-local: @echo "Running splint on libcthreads ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcthreads_la_SOURCES) diff -Nru libfshfs-20201104/libcthreads/libcthreads_condition.c libfshfs-20240221/libcthreads/libcthreads_condition.c --- libfshfs-20201104/libcthreads/libcthreads_condition.c 2020-11-04 11:55:58.000000000 +0000 +++ libfshfs-20240221/libcthreads/libcthreads_condition.c 2024-02-21 06:04:05.000000000 +0000 @@ -1,7 +1,7 @@ /* * Condition functions * - * Copyright (C) 2012-2020, Joachim Metz + * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -25,7 +25,7 @@ #include -#if defined( WINAPI ) && ( WINVER >= 0x0602 ) +#if defined( _MSC_VER ) && defined( WINAPI ) && ( WINVER >= 0x0602 ) #include #endif @@ -559,11 +559,12 @@ #if defined( WINAPI ) DWORD error_code = 0; - DWORD wait_status = 0; #if ( WINVER >= 0x0600 ) BOOL result = 0; -#else + +#elif ( WINVER >= 0x0400 ) + DWORD wait_status = 0; int is_last_waiting_thread = 0; #endif @@ -603,7 +604,7 @@ &( internal_mutex->critical_section ), INFINITE ); - if( wait_status == WAIT_FAILED ) + if( result == 0 ) { error_code = GetLastError(); diff -Nru libfshfs-20201104/libcthreads/libcthreads_condition.h libfshfs-20240221/libcthreads/libcthreads_condition.h --- libfshfs-20201104/libcthreads/libcthreads_condition.h 2020-11-04 11:55:58.000000000 +0000 +++ libfshfs-20240221/libcthreads/libcthreads_condition.h 2024-02-21 06:04:05.000000000 +0000 @@ -1,7 +1,7 @@ /* * Condition functions * - * Copyright (C) 2012-2020, Joachim Metz + * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -25,7 +25,7 @@ #include #include -#if defined( WINAPI ) && ( WINVER >= 0x0602 ) +#if defined( _MSC_VER ) && defined( WINAPI ) && ( WINVER >= 0x0602 ) #include #endif diff -Nru libfshfs-20201104/libcthreads/libcthreads_definitions.h libfshfs-20240221/libcthreads/libcthreads_definitions.h --- libfshfs-20201104/libcthreads/libcthreads_definitions.h 2020-11-04 11:55:58.000000000 +0000 +++ libfshfs-20240221/libcthreads/libcthreads_definitions.h 2024-02-21 06:04:05.000000000 +0000 @@ -1,7 +1,7 @@ /* * The internal definitions * - * Copyright (C) 2012-2020, Joachim Metz + * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -35,11 +35,11 @@ */ #else -#define LIBCTHREADS_VERSION 20200508 +#define LIBCTHREADS_VERSION 20240102 /* The libcthreads version string */ -#define LIBCTHREADS_VERSION_STRING "20200508" +#define LIBCTHREADS_VERSION_STRING "20240102" /* The comparison function definitions */ diff -Nru libfshfs-20201104/libcthreads/libcthreads_error.c libfshfs-20240221/libcthreads/libcthreads_error.c --- libfshfs-20201104/libcthreads/libcthreads_error.c 2020-11-04 11:55:58.000000000 +0000 +++ libfshfs-20240221/libcthreads/libcthreads_error.c 2024-02-21 06:04:05.000000000 +0000 @@ -1,7 +1,7 @@ /* * Error functions * - * Copyright (C) 2012-2020, Joachim Metz + * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcthreads/libcthreads_error.h libfshfs-20240221/libcthreads/libcthreads_error.h --- libfshfs-20201104/libcthreads/libcthreads_error.h 2020-11-04 11:55:58.000000000 +0000 +++ libfshfs-20240221/libcthreads/libcthreads_error.h 2024-02-21 06:04:05.000000000 +0000 @@ -1,7 +1,7 @@ /* * Error functions * - * Copyright (C) 2012-2020, Joachim Metz + * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcthreads/libcthreads_extern.h libfshfs-20240221/libcthreads/libcthreads_extern.h --- libfshfs-20201104/libcthreads/libcthreads_extern.h 2020-11-04 11:55:58.000000000 +0000 +++ libfshfs-20240221/libcthreads/libcthreads_extern.h 2024-02-21 06:04:05.000000000 +0000 @@ -1,7 +1,7 @@ /* * The internal extern definition * - * Copyright (C) 2012-2020, Joachim Metz + * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -30,7 +30,11 @@ #include +#if defined( __CYGWIN__ ) || defined( __MINGW32__ ) +#define LIBCTHREADS_EXTERN_VARIABLE extern +#else #define LIBCTHREADS_EXTERN_VARIABLE LIBCTHREADS_EXTERN +#endif #else #define LIBCTHREADS_EXTERN /* extern */ diff -Nru libfshfs-20201104/libcthreads/libcthreads_libcerror.h libfshfs-20240221/libcthreads/libcthreads_libcerror.h --- libfshfs-20201104/libcthreads/libcthreads_libcerror.h 2020-11-04 11:55:58.000000000 +0000 +++ libfshfs-20240221/libcthreads/libcthreads_libcerror.h 2024-02-21 06:04:05.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libcerror header wrapper * - * Copyright (C) 2012-2020, Joachim Metz + * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcthreads/libcthreads_lock.c libfshfs-20240221/libcthreads/libcthreads_lock.c --- libfshfs-20201104/libcthreads/libcthreads_lock.c 2020-11-04 11:55:58.000000000 +0000 +++ libfshfs-20240221/libcthreads/libcthreads_lock.c 2024-02-21 06:04:05.000000000 +0000 @@ -1,7 +1,7 @@ /* * Lock functions * - * Copyright (C) 2012-2020, Joachim Metz + * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcthreads/libcthreads_lock.h libfshfs-20240221/libcthreads/libcthreads_lock.h --- libfshfs-20201104/libcthreads/libcthreads_lock.h 2020-11-04 11:55:58.000000000 +0000 +++ libfshfs-20240221/libcthreads/libcthreads_lock.h 2024-02-21 06:04:05.000000000 +0000 @@ -1,7 +1,7 @@ /* * Lock functions * - * Copyright (C) 2012-2020, Joachim Metz + * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcthreads/libcthreads_mutex.c libfshfs-20240221/libcthreads/libcthreads_mutex.c --- libfshfs-20201104/libcthreads/libcthreads_mutex.c 2020-11-04 11:55:58.000000000 +0000 +++ libfshfs-20240221/libcthreads/libcthreads_mutex.c 2024-02-21 06:04:05.000000000 +0000 @@ -1,7 +1,7 @@ /* * Mutex functions * - * Copyright (C) 2012-2020, Joachim Metz + * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -25,7 +25,7 @@ #include -#if defined( WINAPI ) && ( WINVER >= 0x0602 ) +#if defined( _MSC_VER ) && defined( WINAPI ) && ( WINVER >= 0x0602 ) #include #endif diff -Nru libfshfs-20201104/libcthreads/libcthreads_mutex.h libfshfs-20240221/libcthreads/libcthreads_mutex.h --- libfshfs-20201104/libcthreads/libcthreads_mutex.h 2020-11-04 11:55:58.000000000 +0000 +++ libfshfs-20240221/libcthreads/libcthreads_mutex.h 2024-02-21 06:04:05.000000000 +0000 @@ -1,7 +1,7 @@ /* * Mutex functions * - * Copyright (C) 2012-2020, Joachim Metz + * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcthreads/libcthreads_queue.c libfshfs-20240221/libcthreads/libcthreads_queue.c --- libfshfs-20201104/libcthreads/libcthreads_queue.c 2020-11-04 11:55:58.000000000 +0000 +++ libfshfs-20240221/libcthreads/libcthreads_queue.c 2024-02-21 06:04:05.000000000 +0000 @@ -1,7 +1,7 @@ /* * Queue functions * - * Copyright (C) 2012-2020, Joachim Metz + * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcthreads/libcthreads_queue.h libfshfs-20240221/libcthreads/libcthreads_queue.h --- libfshfs-20201104/libcthreads/libcthreads_queue.h 2020-11-04 11:55:58.000000000 +0000 +++ libfshfs-20240221/libcthreads/libcthreads_queue.h 2024-02-21 06:04:05.000000000 +0000 @@ -1,7 +1,7 @@ /* * Queue functions * - * Copyright (C) 2012-2020, Joachim Metz + * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcthreads/libcthreads_read_write_lock.c libfshfs-20240221/libcthreads/libcthreads_read_write_lock.c --- libfshfs-20201104/libcthreads/libcthreads_read_write_lock.c 2020-11-04 11:55:58.000000000 +0000 +++ libfshfs-20240221/libcthreads/libcthreads_read_write_lock.c 2024-02-21 06:04:05.000000000 +0000 @@ -1,7 +1,7 @@ /* * Read/Write lock functions * - * Copyright (C) 2012-2020, Joachim Metz + * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -25,7 +25,7 @@ #include -#if defined( WINAPI ) && ( WINVER >= 0x0602 ) +#if defined( _MSC_VER ) && defined( WINAPI ) && ( WINVER >= 0x0602 ) #include #endif diff -Nru libfshfs-20201104/libcthreads/libcthreads_read_write_lock.h libfshfs-20240221/libcthreads/libcthreads_read_write_lock.h --- libfshfs-20201104/libcthreads/libcthreads_read_write_lock.h 2020-11-04 11:55:58.000000000 +0000 +++ libfshfs-20240221/libcthreads/libcthreads_read_write_lock.h 2024-02-21 06:04:05.000000000 +0000 @@ -1,7 +1,7 @@ /* * Read/Write lock functions * - * Copyright (C) 2012-2020, Joachim Metz + * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -25,7 +25,7 @@ #include #include -#if defined( WINAPI ) && ( WINVER >= 0x0602 ) +#if defined( _MSC_VER ) && defined( WINAPI ) && ( WINVER >= 0x0602 ) #include #endif diff -Nru libfshfs-20201104/libcthreads/libcthreads_repeating_thread.c libfshfs-20240221/libcthreads/libcthreads_repeating_thread.c --- libfshfs-20201104/libcthreads/libcthreads_repeating_thread.c 2020-11-04 11:55:58.000000000 +0000 +++ libfshfs-20240221/libcthreads/libcthreads_repeating_thread.c 2024-02-21 06:04:05.000000000 +0000 @@ -1,7 +1,7 @@ /* * Repeating thread functions * - * Copyright (C) 2012-2020, Joachim Metz + * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -25,7 +25,7 @@ #include -#if defined( WINAPI ) && ( WINVER >= 0x0602 ) +#if defined( _MSC_VER ) && defined( WINAPI ) && ( WINVER >= 0x0602 ) #include #include #endif diff -Nru libfshfs-20201104/libcthreads/libcthreads_repeating_thread.h libfshfs-20240221/libcthreads/libcthreads_repeating_thread.h --- libfshfs-20201104/libcthreads/libcthreads_repeating_thread.h 2020-11-04 11:55:58.000000000 +0000 +++ libfshfs-20240221/libcthreads/libcthreads_repeating_thread.h 2024-02-21 06:04:05.000000000 +0000 @@ -1,7 +1,7 @@ /* * Repeating thread functions * - * Copyright (C) 2012-2020, Joachim Metz + * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcthreads/libcthreads_support.c libfshfs-20240221/libcthreads/libcthreads_support.c --- libfshfs-20201104/libcthreads/libcthreads_support.c 2020-11-04 11:55:58.000000000 +0000 +++ libfshfs-20240221/libcthreads/libcthreads_support.c 2024-02-21 06:04:05.000000000 +0000 @@ -1,7 +1,7 @@ /* * Support functions * - * Copyright (C) 2012-2020, Joachim Metz + * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcthreads/libcthreads_support.h libfshfs-20240221/libcthreads/libcthreads_support.h --- libfshfs-20201104/libcthreads/libcthreads_support.h 2020-11-04 11:55:58.000000000 +0000 +++ libfshfs-20240221/libcthreads/libcthreads_support.h 2024-02-21 06:04:05.000000000 +0000 @@ -1,7 +1,7 @@ /* * Support functions * - * Copyright (C) 2012-2020, Joachim Metz + * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcthreads/libcthreads_thread.c libfshfs-20240221/libcthreads/libcthreads_thread.c --- libfshfs-20201104/libcthreads/libcthreads_thread.c 2020-11-04 11:55:58.000000000 +0000 +++ libfshfs-20240221/libcthreads/libcthreads_thread.c 2024-02-21 06:04:05.000000000 +0000 @@ -1,7 +1,7 @@ /* * Thread functions * - * Copyright (C) 2012-2020, Joachim Metz + * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -25,7 +25,7 @@ #include -#if defined( WINAPI ) && ( WINVER >= 0x0602 ) +#if defined( _MSC_VER ) && defined( WINAPI ) && ( WINVER >= 0x0602 ) #include #include #endif diff -Nru libfshfs-20201104/libcthreads/libcthreads_thread.h libfshfs-20240221/libcthreads/libcthreads_thread.h --- libfshfs-20201104/libcthreads/libcthreads_thread.h 2020-11-04 11:55:58.000000000 +0000 +++ libfshfs-20240221/libcthreads/libcthreads_thread.h 2024-02-21 06:04:05.000000000 +0000 @@ -1,7 +1,7 @@ /* * Thread functions * - * Copyright (C) 2012-2020, Joachim Metz + * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcthreads/libcthreads_thread_attributes.c libfshfs-20240221/libcthreads/libcthreads_thread_attributes.c --- libfshfs-20201104/libcthreads/libcthreads_thread_attributes.c 2020-11-04 11:55:58.000000000 +0000 +++ libfshfs-20240221/libcthreads/libcthreads_thread_attributes.c 2024-02-21 06:04:05.000000000 +0000 @@ -1,7 +1,7 @@ /* * Thread attributes functions * - * Copyright (C) 2012-2020, Joachim Metz + * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcthreads/libcthreads_thread_attributes.h libfshfs-20240221/libcthreads/libcthreads_thread_attributes.h --- libfshfs-20201104/libcthreads/libcthreads_thread_attributes.h 2020-11-04 11:55:58.000000000 +0000 +++ libfshfs-20240221/libcthreads/libcthreads_thread_attributes.h 2024-02-21 06:04:05.000000000 +0000 @@ -1,7 +1,7 @@ /* * Thread attributes functions * - * Copyright (C) 2012-2020, Joachim Metz + * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcthreads/libcthreads_thread_pool.c libfshfs-20240221/libcthreads/libcthreads_thread_pool.c --- libfshfs-20201104/libcthreads/libcthreads_thread_pool.c 2020-11-04 11:55:58.000000000 +0000 +++ libfshfs-20240221/libcthreads/libcthreads_thread_pool.c 2024-02-21 06:04:05.000000000 +0000 @@ -1,7 +1,7 @@ /* * Thread pool functions * - * Copyright (C) 2012-2020, Joachim Metz + * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -25,7 +25,7 @@ #include -#if defined( WINAPI ) && ( WINVER >= 0x0602 ) +#if defined( _MSC_VER ) && defined( WINAPI ) && ( WINVER >= 0x0602 ) #include #endif diff -Nru libfshfs-20201104/libcthreads/libcthreads_thread_pool.h libfshfs-20240221/libcthreads/libcthreads_thread_pool.h --- libfshfs-20201104/libcthreads/libcthreads_thread_pool.h 2020-11-04 11:55:58.000000000 +0000 +++ libfshfs-20240221/libcthreads/libcthreads_thread_pool.h 2024-02-21 06:04:05.000000000 +0000 @@ -1,7 +1,7 @@ /* * Thread pool functions * - * Copyright (C) 2012-2020, Joachim Metz + * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -25,7 +25,7 @@ #include #include -#if defined( WINAPI ) && ( WINVER >= 0x0602 ) +#if defined( _MSC_VER ) && defined( WINAPI ) && ( WINVER >= 0x0602 ) #include #endif diff -Nru libfshfs-20201104/libcthreads/libcthreads_types.h libfshfs-20240221/libcthreads/libcthreads_types.h --- libfshfs-20201104/libcthreads/libcthreads_types.h 2020-11-04 11:55:58.000000000 +0000 +++ libfshfs-20240221/libcthreads/libcthreads_types.h 2024-02-21 06:04:05.000000000 +0000 @@ -1,7 +1,7 @@ /* * The internal type definitions * - * Copyright (C) 2012-2020, Joachim Metz + * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libcthreads/libcthreads_unused.h libfshfs-20240221/libcthreads/libcthreads_unused.h --- libfshfs-20201104/libcthreads/libcthreads_unused.h 2020-11-04 11:55:58.000000000 +0000 +++ libfshfs-20240221/libcthreads/libcthreads_unused.h 2024-02-21 06:04:05.000000000 +0000 @@ -1,7 +1,7 @@ /* * Definitions to silence compiler warnings about unused function attributes/parameters. * - * Copyright (C) 2012-2020, Joachim Metz + * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfcache/Makefile.am libfshfs-20240221/libfcache/Makefile.am --- libfshfs-20201104/libfcache/Makefile.am 2020-11-04 11:56:00.000000000 +0000 +++ libfshfs-20240221/libfcache/Makefile.am 2024-02-21 06:04:06.000000000 +0000 @@ -27,9 +27,11 @@ Makefile.in distclean: clean - /bin/rm -f Makefile + -rm -f Makefile -splint: +sources-local: $(BUILT_SOURCES) + +splint-local: @echo "Running splint on libfcache ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfcache_la_SOURCES) diff -Nru libfshfs-20201104/libfcache/Makefile.in libfshfs-20240221/libfcache/Makefile.in --- libfshfs-20201104/libfcache/Makefile.in 2020-11-04 11:56:31.000000000 +0000 +++ libfshfs-20240221/libfcache/Makefile.in 2024-02-21 06:04:26.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -91,25 +91,26 @@ subdir = libfcache ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcdata.m4 \ - $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \ - $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \ - $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcrypto.m4 \ - $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcthreads.m4 \ - $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ - $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ - $(top_srcdir)/m4/libhmac.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/libuna.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \ - $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \ - $(top_srcdir)/m4/zlib.m4 $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libbfio.m4 \ + $(top_srcdir)/m4/libcdata.m4 $(top_srcdir)/m4/libcerror.m4 \ + $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ + $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ + $(top_srcdir)/m4/libcrypto.m4 $(top_srcdir)/m4/libcsplit.m4 \ + $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \ + $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ + $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmos.m4 \ + $(top_srcdir)/m4/libfuse.m4 $(top_srcdir)/m4/libhmac.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/pthread.m4 \ + $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ + $(top_srcdir)/m4/types.m4 $(top_srcdir)/m4/zlib.m4 \ + $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) @@ -184,6 +185,7 @@ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -201,8 +203,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ @@ -219,6 +219,8 @@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ @@ -234,8 +236,10 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -255,6 +259,8 @@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ +HAVE_LIBFMOS = @HAVE_LIBFMOS@ +HAVE_LIBFUSE = @HAVE_LIBFUSE@ HAVE_LIBHMAC = @HAVE_LIBHMAC@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ @@ -270,6 +276,7 @@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ +HAVE_LOCAL_LIBFMOS = @HAVE_LOCAL_LIBFMOS@ HAVE_LOCAL_LIBHMAC = @HAVE_LOCAL_LIBHMAC@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ @@ -323,8 +330,12 @@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ +LIBFMOS_CPPFLAGS = @LIBFMOS_CPPFLAGS@ +LIBFMOS_LIBADD = @LIBFMOS_LIBADD@ LIBFSHFS_DLL_EXPORT = @LIBFSHFS_DLL_EXPORT@ LIBFSHFS_DLL_IMPORT = @LIBFSHFS_DLL_IMPORT@ +LIBFUSE_CPPFLAGS = @LIBFUSE_CPPFLAGS@ +LIBFUSE_LIBADD = @LIBFUSE_LIBADD@ LIBHMAC_CPPFLAGS = @LIBHMAC_CPPFLAGS@ LIBHMAC_LIBADD = @LIBHMAC_LIBADD@ LIBICONV = @LIBICONV@ @@ -346,8 +357,8 @@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ @@ -370,26 +381,6 @@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ -PYTHON2 = @PYTHON2@ -PYTHON2_CONFIG = @PYTHON2_CONFIG@ -PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ -PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ -PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ -PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ -PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ -PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ -PYTHON2_PREFIX = @PYTHON2_PREFIX@ -PYTHON2_VERSION = @PYTHON2_VERSION@ -PYTHON3 = @PYTHON3@ -PYTHON3_CONFIG = @PYTHON3_CONFIG@ -PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ -PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ -PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ -PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ -PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ -PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ -PYTHON3_PREFIX = @PYTHON3_PREFIX@ -PYTHON3_VERSION = @PYTHON3_VERSION@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ @@ -467,6 +458,12 @@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ +ax_libfmos_pc_libs_private = @ax_libfmos_pc_libs_private@ +ax_libfmos_spec_build_requires = @ax_libfmos_spec_build_requires@ +ax_libfmos_spec_requires = @ax_libfmos_spec_requires@ +ax_libfuse_pc_libs_private = @ax_libfuse_pc_libs_private@ +ax_libfuse_spec_build_requires = @ax_libfuse_spec_build_requires@ +ax_libfuse_spec_requires = @ax_libfuse_spec_requires@ ax_libhmac_pc_libs_private = @ax_libhmac_pc_libs_private@ ax_libhmac_spec_build_requires = @ax_libhmac_spec_build_requires@ ax_libhmac_spec_requires = @ax_libhmac_spec_requires@ @@ -491,6 +488,8 @@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +fuse_CFLAGS = @fuse_CFLAGS@ +fuse_LIBS = @fuse_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -528,6 +527,8 @@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ +libfmos_CFLAGS = @libfmos_CFLAGS@ +libfmos_LIBS = @libfmos_LIBS@ libfshfs_spec_requires = @libfshfs_spec_requires@ libfshfs_spec_tools_build_requires = @libfshfs_spec_tools_build_requires@ libhmac_CFLAGS = @libhmac_CFLAGS@ @@ -546,11 +547,8 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ -pyexecdir2 = @pyexecdir2@ -pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ -pythondir2 = @pythondir2@ -pythondir3 = @pythondir3@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -678,6 +676,8 @@ clean-libtool: -rm -rf .libs _libs +sources-local: +splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique @@ -730,7 +730,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am @@ -869,6 +868,14 @@ ps-am: +sources: sources-am + +sources-am: sources-local + +splint: splint-am + +splint-am: splint-local + uninstall-am: .MAKE: install-am install-strip @@ -885,15 +892,18 @@ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am + sources-am sources-local splint-am splint-local tags tags-am \ + uninstall uninstall-am .PRECIOUS: Makefile distclean: clean - /bin/rm -f Makefile + -rm -f Makefile + +sources-local: $(BUILT_SOURCES) -splint: +splint-local: @echo "Running splint on libfcache ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfcache_la_SOURCES) diff -Nru libfshfs-20201104/libfcache/libfcache_cache.c libfshfs-20240221/libfcache/libfcache_cache.c --- libfshfs-20201104/libfcache/libfcache_cache.c 2020-11-04 11:56:00.000000000 +0000 +++ libfshfs-20240221/libfcache/libfcache_cache.c 2024-02-21 06:04:06.000000000 +0000 @@ -1,7 +1,7 @@ /* * The cache functions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfcache/libfcache_cache.h libfshfs-20240221/libfcache/libfcache_cache.h --- libfshfs-20201104/libfcache/libfcache_cache.h 2020-11-04 11:56:00.000000000 +0000 +++ libfshfs-20240221/libfcache/libfcache_cache.h 2024-02-21 06:04:06.000000000 +0000 @@ -1,7 +1,7 @@ /* * The cache functions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfcache/libfcache_cache_value.c libfshfs-20240221/libfcache/libfcache_cache_value.c --- libfshfs-20201104/libfcache/libfcache_cache_value.c 2020-11-04 11:56:00.000000000 +0000 +++ libfshfs-20240221/libfcache/libfcache_cache_value.c 2024-02-21 06:04:06.000000000 +0000 @@ -1,7 +1,7 @@ /* * Cache value functions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfcache/libfcache_cache_value.h libfshfs-20240221/libfcache/libfcache_cache_value.h --- libfshfs-20201104/libfcache/libfcache_cache_value.h 2020-11-04 11:56:00.000000000 +0000 +++ libfshfs-20240221/libfcache/libfcache_cache_value.h 2024-02-21 06:04:06.000000000 +0000 @@ -1,7 +1,7 @@ /* * Cache value functions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfcache/libfcache_date_time.c libfshfs-20240221/libfcache/libfcache_date_time.c --- libfshfs-20201104/libfcache/libfcache_date_time.c 2020-11-04 11:56:00.000000000 +0000 +++ libfshfs-20240221/libfcache/libfcache_date_time.c 2024-02-21 06:04:06.000000000 +0000 @@ -1,7 +1,7 @@ /* * Date and time functions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -21,15 +21,12 @@ #include -#if defined( TIME_WITH_SYS_TIME ) +#if defined( HAVE_SYS_TIME_H ) #include -#include -#elif defined( HAVE_SYS_TIME_H ) -#include -#else -#include #endif +#include + #include "libfcache_date_time.h" #include "libfcache_libcerror.h" #include "libfcache_types.h" diff -Nru libfshfs-20201104/libfcache/libfcache_date_time.h libfshfs-20240221/libfcache/libfcache_date_time.h --- libfshfs-20201104/libfcache/libfcache_date_time.h 2020-11-04 11:56:00.000000000 +0000 +++ libfshfs-20240221/libfcache/libfcache_date_time.h 2024-02-21 06:04:06.000000000 +0000 @@ -1,7 +1,7 @@ /* * Date and time functions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfcache/libfcache_definitions.h libfshfs-20240221/libfcache/libfcache_definitions.h --- libfshfs-20201104/libfcache/libfcache_definitions.h 2020-11-04 11:56:00.000000000 +0000 +++ libfshfs-20240221/libfcache/libfcache_definitions.h 2024-02-21 06:04:06.000000000 +0000 @@ -1,7 +1,7 @@ /* * The internal definitions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -33,11 +33,11 @@ * for local use of libfcache */ #else -#define LIBFCACHE_VERSION 20200708 +#define LIBFCACHE_VERSION 20240112 /* The libfcache version string */ -#define LIBFCACHE_VERSION_STRING "20200708" +#define LIBFCACHE_VERSION_STRING "20240112" /* The cache value flags definitions */ @@ -52,7 +52,7 @@ LIBFCACHE_CACHE_VALUE_FLAG_MANAGED = 0x01 }; -#endif +#endif /* !defined( HAVE_LOCAL_LIBFCACHE ) */ -#endif +#endif /* !defined( _LIBFCACHE_INTERNAL_DEFINITIONS_H ) */ diff -Nru libfshfs-20201104/libfcache/libfcache_error.c libfshfs-20240221/libfcache/libfcache_error.c --- libfshfs-20201104/libfcache/libfcache_error.c 2020-11-04 11:56:00.000000000 +0000 +++ libfshfs-20240221/libfcache/libfcache_error.c 2024-02-21 06:04:06.000000000 +0000 @@ -1,7 +1,7 @@ /* * Error functions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfcache/libfcache_error.h libfshfs-20240221/libfcache/libfcache_error.h --- libfshfs-20201104/libfcache/libfcache_error.h 2020-11-04 11:56:00.000000000 +0000 +++ libfshfs-20240221/libfcache/libfcache_error.h 2024-02-21 06:04:06.000000000 +0000 @@ -1,7 +1,7 @@ /* * Error functions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfcache/libfcache_extern.h libfshfs-20240221/libfcache/libfcache_extern.h --- libfshfs-20201104/libfcache/libfcache_extern.h 2020-11-04 11:56:00.000000000 +0000 +++ libfshfs-20240221/libfcache/libfcache_extern.h 2024-02-21 06:04:06.000000000 +0000 @@ -1,7 +1,7 @@ /* * The internal extern definition * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -30,7 +30,11 @@ #include +#if defined( __CYGWIN__ ) || defined( __MINGW32__ ) +#define LIBFCACHE_EXTERN_VARIABLE extern +#else #define LIBFCACHE_EXTERN_VARIABLE LIBFCACHE_EXTERN +#endif #else #define LIBFCACHE_EXTERN /* extern */ diff -Nru libfshfs-20201104/libfcache/libfcache_libcdata.h libfshfs-20240221/libfcache/libfcache_libcdata.h --- libfshfs-20201104/libfcache/libfcache_libcdata.h 2020-11-04 11:56:00.000000000 +0000 +++ libfshfs-20240221/libfcache/libfcache_libcdata.h 2024-02-21 06:04:06.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libcdata header wrapper * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfcache/libfcache_libcerror.h libfshfs-20240221/libfcache/libfcache_libcerror.h --- libfshfs-20201104/libfcache/libfcache_libcerror.h 2020-11-04 11:56:00.000000000 +0000 +++ libfshfs-20240221/libfcache/libfcache_libcerror.h 2024-02-21 06:04:06.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libcerror header wrapper * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfcache/libfcache_support.c libfshfs-20240221/libfcache/libfcache_support.c --- libfshfs-20201104/libfcache/libfcache_support.c 2020-11-04 11:56:00.000000000 +0000 +++ libfshfs-20240221/libfcache/libfcache_support.c 2024-02-21 06:04:06.000000000 +0000 @@ -1,7 +1,7 @@ /* * Support functions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfcache/libfcache_support.h libfshfs-20240221/libfcache/libfcache_support.h --- libfshfs-20201104/libfcache/libfcache_support.h 2020-11-04 11:56:00.000000000 +0000 +++ libfshfs-20240221/libfcache/libfcache_support.h 2024-02-21 06:04:06.000000000 +0000 @@ -1,7 +1,7 @@ /* * Support functions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfcache/libfcache_types.h libfshfs-20240221/libfcache/libfcache_types.h --- libfshfs-20201104/libfcache/libfcache_types.h 2020-11-04 11:56:00.000000000 +0000 +++ libfshfs-20240221/libfcache/libfcache_types.h 2024-02-21 06:04:06.000000000 +0000 @@ -1,7 +1,7 @@ /* * The internal type definitions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfcache/libfcache_unused.h libfshfs-20240221/libfcache/libfcache_unused.h --- libfshfs-20201104/libfcache/libfcache_unused.h 2020-11-04 11:56:00.000000000 +0000 +++ libfshfs-20240221/libfcache/libfcache_unused.h 2024-02-21 06:04:06.000000000 +0000 @@ -1,7 +1,7 @@ /* * Definitions to silence compiler warnings about unused function attributes/parameters. * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfdata/Makefile.am libfshfs-20240221/libfdata/Makefile.am --- libfshfs-20201104/libfdata/Makefile.am 2020-11-04 11:56:03.000000000 +0000 +++ libfshfs-20240221/libfdata/Makefile.am 2024-02-21 06:04:08.000000000 +0000 @@ -30,8 +30,6 @@ libfdata_segments_array.c libfdata_segments_array.h \ libfdata_stream.c libfdata_stream.h \ libfdata_support.c libfdata_support.h \ - libfdata_tree.c libfdata_tree.h \ - libfdata_tree_node.c libfdata_tree_node.h \ libfdata_types.h \ libfdata_unused.h \ libfdata_vector.c libfdata_vector.h @@ -41,9 +39,11 @@ Makefile.in distclean: clean - /bin/rm -f Makefile + -rm -f Makefile -splint: +sources-local: $(BUILT_SOURCES) + +splint-local: @echo "Running splint on libfdata ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfdata_la_SOURCES) diff -Nru libfshfs-20201104/libfdata/Makefile.in libfshfs-20240221/libfdata/Makefile.in --- libfshfs-20201104/libfdata/Makefile.in 2020-11-04 11:56:31.000000000 +0000 +++ libfshfs-20240221/libfdata/Makefile.in 2024-02-21 06:04:26.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -91,25 +91,26 @@ subdir = libfdata ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcdata.m4 \ - $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \ - $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \ - $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcrypto.m4 \ - $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcthreads.m4 \ - $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ - $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ - $(top_srcdir)/m4/libhmac.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/libuna.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \ - $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \ - $(top_srcdir)/m4/zlib.m4 $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libbfio.m4 \ + $(top_srcdir)/m4/libcdata.m4 $(top_srcdir)/m4/libcerror.m4 \ + $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ + $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ + $(top_srcdir)/m4/libcrypto.m4 $(top_srcdir)/m4/libcsplit.m4 \ + $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \ + $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ + $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmos.m4 \ + $(top_srcdir)/m4/libfuse.m4 $(top_srcdir)/m4/libhmac.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/pthread.m4 \ + $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ + $(top_srcdir)/m4/types.m4 $(top_srcdir)/m4/zlib.m4 \ + $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) @@ -130,9 +131,8 @@ libfdata_range.h libfdata_range_list.c libfdata_range_list.h \ libfdata_segments_array.c libfdata_segments_array.h \ libfdata_stream.c libfdata_stream.h libfdata_support.c \ - libfdata_support.h libfdata_tree.c libfdata_tree.h \ - libfdata_tree_node.c libfdata_tree_node.h libfdata_types.h \ - libfdata_unused.h libfdata_vector.c libfdata_vector.h + libfdata_support.h libfdata_types.h libfdata_unused.h \ + libfdata_vector.c libfdata_vector.h @HAVE_LOCAL_LIBFDATA_TRUE@am_libfdata_la_OBJECTS = libfdata_area.lo \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_cache.lo libfdata_error.lo \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_list.lo \ @@ -142,8 +142,7 @@ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_range_list.lo \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_segments_array.lo \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_stream.lo \ -@HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_support.lo libfdata_tree.lo \ -@HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_tree_node.lo \ +@HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_support.lo \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_vector.lo libfdata_la_OBJECTS = $(am_libfdata_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) @@ -175,8 +174,7 @@ ./$(DEPDIR)/libfdata_range_list.Plo \ ./$(DEPDIR)/libfdata_segments_array.Plo \ ./$(DEPDIR)/libfdata_stream.Plo \ - ./$(DEPDIR)/libfdata_support.Plo ./$(DEPDIR)/libfdata_tree.Plo \ - ./$(DEPDIR)/libfdata_tree_node.Plo \ + ./$(DEPDIR)/libfdata_support.Plo \ ./$(DEPDIR)/libfdata_vector.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ @@ -204,6 +202,7 @@ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -221,8 +220,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ @@ -239,6 +236,8 @@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ @@ -254,8 +253,10 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -275,6 +276,8 @@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ +HAVE_LIBFMOS = @HAVE_LIBFMOS@ +HAVE_LIBFUSE = @HAVE_LIBFUSE@ HAVE_LIBHMAC = @HAVE_LIBHMAC@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ @@ -290,6 +293,7 @@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ +HAVE_LOCAL_LIBFMOS = @HAVE_LOCAL_LIBFMOS@ HAVE_LOCAL_LIBHMAC = @HAVE_LOCAL_LIBHMAC@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ @@ -343,8 +347,12 @@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ +LIBFMOS_CPPFLAGS = @LIBFMOS_CPPFLAGS@ +LIBFMOS_LIBADD = @LIBFMOS_LIBADD@ LIBFSHFS_DLL_EXPORT = @LIBFSHFS_DLL_EXPORT@ LIBFSHFS_DLL_IMPORT = @LIBFSHFS_DLL_IMPORT@ +LIBFUSE_CPPFLAGS = @LIBFUSE_CPPFLAGS@ +LIBFUSE_LIBADD = @LIBFUSE_LIBADD@ LIBHMAC_CPPFLAGS = @LIBHMAC_CPPFLAGS@ LIBHMAC_LIBADD = @LIBHMAC_LIBADD@ LIBICONV = @LIBICONV@ @@ -366,8 +374,8 @@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ @@ -390,26 +398,6 @@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ -PYTHON2 = @PYTHON2@ -PYTHON2_CONFIG = @PYTHON2_CONFIG@ -PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ -PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ -PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ -PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ -PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ -PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ -PYTHON2_PREFIX = @PYTHON2_PREFIX@ -PYTHON2_VERSION = @PYTHON2_VERSION@ -PYTHON3 = @PYTHON3@ -PYTHON3_CONFIG = @PYTHON3_CONFIG@ -PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ -PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ -PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ -PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ -PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ -PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ -PYTHON3_PREFIX = @PYTHON3_PREFIX@ -PYTHON3_VERSION = @PYTHON3_VERSION@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ @@ -487,6 +475,12 @@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ +ax_libfmos_pc_libs_private = @ax_libfmos_pc_libs_private@ +ax_libfmos_spec_build_requires = @ax_libfmos_spec_build_requires@ +ax_libfmos_spec_requires = @ax_libfmos_spec_requires@ +ax_libfuse_pc_libs_private = @ax_libfuse_pc_libs_private@ +ax_libfuse_spec_build_requires = @ax_libfuse_spec_build_requires@ +ax_libfuse_spec_requires = @ax_libfuse_spec_requires@ ax_libhmac_pc_libs_private = @ax_libhmac_pc_libs_private@ ax_libhmac_spec_build_requires = @ax_libhmac_spec_build_requires@ ax_libhmac_spec_requires = @ax_libhmac_spec_requires@ @@ -511,6 +505,8 @@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +fuse_CFLAGS = @fuse_CFLAGS@ +fuse_LIBS = @fuse_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -548,6 +544,8 @@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ +libfmos_CFLAGS = @libfmos_CFLAGS@ +libfmos_LIBS = @libfmos_LIBS@ libfshfs_spec_requires = @libfshfs_spec_requires@ libfshfs_spec_tools_build_requires = @libfshfs_spec_tools_build_requires@ libhmac_CFLAGS = @libhmac_CFLAGS@ @@ -566,11 +564,8 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ -pyexecdir2 = @pyexecdir2@ -pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ -pythondir2 = @pythondir2@ -pythondir3 = @pythondir3@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -611,8 +606,6 @@ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_segments_array.c libfdata_segments_array.h \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_stream.c libfdata_stream.h \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_support.c libfdata_support.h \ -@HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_tree.c libfdata_tree.h \ -@HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_tree_node.c libfdata_tree_node.h \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_types.h \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_unused.h \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_vector.c libfdata_vector.h @@ -686,8 +679,6 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_segments_array.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_stream.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_support.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_tree.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_tree_node.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_vector.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @@ -722,6 +713,8 @@ clean-libtool: -rm -rf .libs _libs +sources-local: +splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique @@ -774,7 +767,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am @@ -904,8 +896,6 @@ -rm -f ./$(DEPDIR)/libfdata_segments_array.Plo -rm -f ./$(DEPDIR)/libfdata_stream.Plo -rm -f ./$(DEPDIR)/libfdata_support.Plo - -rm -f ./$(DEPDIR)/libfdata_tree.Plo - -rm -f ./$(DEPDIR)/libfdata_tree_node.Plo -rm -f ./$(DEPDIR)/libfdata_vector.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -923,6 +913,14 @@ ps-am: +sources: sources-am + +sources-am: sources-local + +splint: splint-am + +splint-am: splint-local + uninstall-am: .MAKE: install-am install-strip @@ -939,15 +937,18 @@ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am + sources-am sources-local splint-am splint-local tags tags-am \ + uninstall uninstall-am .PRECIOUS: Makefile distclean: clean - /bin/rm -f Makefile + -rm -f Makefile + +sources-local: $(BUILT_SOURCES) -splint: +splint-local: @echo "Running splint on libfdata ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfdata_la_SOURCES) diff -Nru libfshfs-20201104/libfdata/libfdata_area.c libfshfs-20240221/libfdata/libfdata_area.c --- libfshfs-20201104/libfdata/libfdata_area.c 2020-11-04 11:56:03.000000000 +0000 +++ libfshfs-20240221/libfdata/libfdata_area.c 2024-02-21 06:04:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * The area functions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfdata/libfdata_area.h libfshfs-20240221/libfdata/libfdata_area.h --- libfshfs-20201104/libfdata/libfdata_area.h 2020-11-04 11:56:03.000000000 +0000 +++ libfshfs-20240221/libfdata/libfdata_area.h 2024-02-21 06:04:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * The area functions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfdata/libfdata_cache.c libfshfs-20240221/libfdata/libfdata_cache.c --- libfshfs-20201104/libfdata/libfdata_cache.c 2020-11-04 11:56:03.000000000 +0000 +++ libfshfs-20240221/libfdata/libfdata_cache.c 2024-02-21 06:04:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * Cache functions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfdata/libfdata_cache.h libfshfs-20240221/libfdata/libfdata_cache.h --- libfshfs-20201104/libfdata/libfdata_cache.h 2020-11-04 11:56:03.000000000 +0000 +++ libfshfs-20240221/libfdata/libfdata_cache.h 2024-02-21 06:04:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * Cache functions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfdata/libfdata_definitions.h libfshfs-20240221/libfdata/libfdata_definitions.h --- libfshfs-20201104/libfdata/libfdata_definitions.h 2020-11-04 11:56:03.000000000 +0000 +++ libfshfs-20240221/libfdata/libfdata_definitions.h 2024-02-21 06:04:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * The internal definitions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -33,11 +33,11 @@ * for local use of libfdata */ #else -#define LIBFDATA_VERSION 20200728 +#define LIBFDATA_VERSION 20240114 /* The libfdata version string */ -#define LIBFDATA_VERSION_STRING "20200728" +#define LIBFDATA_VERSION_STRING "20240114" /* The library flag definitions */ @@ -185,19 +185,6 @@ LIBFDATA_READ_FLAG_NO_CACHE = 0x80 }; -/* The btree search flag definitions - */ -enum LIBFDATA_BTREE_SEARCH_FLAGS -{ - /* Flag to additionally scan the previous node - */ - LIBFDATA_BTREE_SEARCH_FLAG_SCAN_PREVIOUS_NODE = 0x01, - - /* Flag to additionally scan the next node - */ - LIBFDATA_BTREE_SEARCH_FLAG_SCAN_NEXT_NODE = 0x02 -}; - /* The tree node flag definitions */ enum LIBFDATA_TREE_NODE_FLAGS @@ -240,20 +227,7 @@ LIBFDATA_TREE_NODE_INSERT_FLAG_UNIQUE_SUB_NODE_VALUES = 0x01 }; -#endif - -/* The btree node flag definitions - */ -enum LIBFDATA_BTREE_NODE_FLAGS -{ - /* The node is a branch - */ - LIBFDATA_BTREE_NODE_FLAG_IS_BRANCH = 0x02, - - /* The node is a leaf - */ - LIBFDATA_BTREE_NODE_FLAG_IS_LEAF = 0x04 -}; +#endif /* !defined( HAVE_LOCAL_LIBFDATA ) */ #define LIBFDATA_BTREE_NODE_LEVEL_UNLIMITED -1 @@ -271,5 +245,5 @@ LIBFDATA_LIST_ELEMENT_FLAG_HAS_MAPPED_SIZE = 0x10 }; -#endif +#endif /* !defined( _LIBFDATA_INTERNAL_DEFINITIONS_H ) */ diff -Nru libfshfs-20201104/libfdata/libfdata_error.c libfshfs-20240221/libfdata/libfdata_error.c --- libfshfs-20201104/libfdata/libfdata_error.c 2020-11-04 11:56:03.000000000 +0000 +++ libfshfs-20240221/libfdata/libfdata_error.c 2024-02-21 06:04:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * Error functions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfdata/libfdata_error.h libfshfs-20240221/libfdata/libfdata_error.h --- libfshfs-20201104/libfdata/libfdata_error.h 2020-11-04 11:56:03.000000000 +0000 +++ libfshfs-20240221/libfdata/libfdata_error.h 2024-02-21 06:04:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * Error functions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfdata/libfdata_extern.h libfshfs-20240221/libfdata/libfdata_extern.h --- libfshfs-20201104/libfdata/libfdata_extern.h 2020-11-04 11:56:03.000000000 +0000 +++ libfshfs-20240221/libfdata/libfdata_extern.h 2024-02-21 06:04:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * The internal extern definition * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -30,7 +30,11 @@ #include +#if defined( __CYGWIN__ ) || defined( __MINGW32__ ) +#define LIBFDATA_EXTERN_VARIABLE extern +#else #define LIBFDATA_EXTERN_VARIABLE LIBFDATA_EXTERN +#endif #else #define LIBFDATA_EXTERN /* extern */ diff -Nru libfshfs-20201104/libfdata/libfdata_libcdata.h libfshfs-20240221/libfdata/libfdata_libcdata.h --- libfshfs-20201104/libfdata/libfdata_libcdata.h 2020-11-04 11:56:03.000000000 +0000 +++ libfshfs-20240221/libfdata/libfdata_libcdata.h 2024-02-21 06:04:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libcdata header wrapper * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfdata/libfdata_libcerror.h libfshfs-20240221/libfdata/libfdata_libcerror.h --- libfshfs-20201104/libfdata/libfdata_libcerror.h 2020-11-04 11:56:03.000000000 +0000 +++ libfshfs-20240221/libfdata/libfdata_libcerror.h 2024-02-21 06:04:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libcerror header wrapper * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfdata/libfdata_libcnotify.h libfshfs-20240221/libfdata/libfdata_libcnotify.h --- libfshfs-20201104/libfdata/libfdata_libcnotify.h 2020-11-04 11:56:03.000000000 +0000 +++ libfshfs-20240221/libfdata/libfdata_libcnotify.h 2024-02-21 06:04:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libcnotify header wrapper * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfdata/libfdata_libfcache.h libfshfs-20240221/libfdata/libfdata_libfcache.h --- libfshfs-20201104/libfdata/libfdata_libfcache.h 2020-11-04 11:56:03.000000000 +0000 +++ libfshfs-20240221/libfdata/libfdata_libfcache.h 2024-02-21 06:04:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libfcache header wrapper * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfdata/libfdata_list.c libfshfs-20240221/libfdata/libfdata_list.c --- libfshfs-20201104/libfdata/libfdata_list.c 2020-11-04 11:56:03.000000000 +0000 +++ libfshfs-20240221/libfdata/libfdata_list.c 2024-02-21 06:04:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * The list functions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -1089,12 +1089,14 @@ if( libcnotify_verbose != 0 ) { libcnotify_printf( - "%s: element: %03d\tfile index: %03d offset: 0x%08" PRIx64 " - 0x%08" PRIx64 " (size: %" PRIu64 ")\n", + "%s: element: %03d\tfile index: %03d offset: %" PRIi64 " - %" PRIi64 " (0x%08" PRIx64 " - 0x%08" PRIx64 ") (size: %" PRIu64 ")\n", function, element_index, element_file_index, element_offset, element_offset + element_size, + element_offset, + element_offset + element_size, element_size ); if( ( internal_list->flags & LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES ) == 0 ) @@ -1116,17 +1118,20 @@ return( -1 ); } libcnotify_printf( - "%s: element: %03d\tmapped range: 0x%08" PRIx64 " - 0x%08" PRIx64 " (size: %" PRIu64 ")\n", + "%s: element: %03d\tmapped range: %" PRIi64 " - %" PRIi64 " (0x%08" PRIx64 " - 0x%08" PRIx64 ") (size: %" PRIu64 ")\n", function, element_index, mapped_range_offset, mapped_range_offset + mapped_range_size, + mapped_range_offset, + mapped_range_offset + mapped_range_size, mapped_range_size ); } libcnotify_printf( "\n" ); } -#endif +#endif /* defined( HAVE_DEBUG_OUTPUT ) */ + internal_list->current_element_index = element_index; return( 1 ); @@ -1501,26 +1506,31 @@ if( libcnotify_verbose != 0 ) { libcnotify_printf( - "%s: element: %03d\tfile index: %03d offset: 0x%08" PRIx64 " - 0x%08" PRIx64 " (size: %" PRIu64 ")\n", + "%s: element: %03d\tfile index: %03d offset: %" PRIi64 " - %" PRIi64 " (0x%08" PRIx64 " - 0x%08" PRIx64 ") (size: %" PRIu64 ")\n", function, *element_index, element_file_index, element_offset, element_offset + element_size, + element_offset, + element_offset + element_size, element_size ); libcnotify_printf( - "%s: element: %03d\tmapped range: 0x%08" PRIx64 " - 0x%08" PRIx64 " (size: %" PRIu64 ")\n", + "%s: element: %03d\tmapped range: %" PRIi64 " - %" PRIi64 " (0x%08" PRIx64 " - 0x%08" PRIx64 ") (size: %" PRIu64 ")\n", function, *element_index, mapped_offset, mapped_offset + element_size, + mapped_offset, + mapped_offset + element_size, element_size ); libcnotify_printf( "\n" ); } -#endif +#endif /* defined( HAVE_DEBUG_OUTPUT ) */ + internal_list->current_element_index = *element_index; internal_list->size += element_size; @@ -1650,11 +1660,13 @@ if( libcnotify_verbose != 0 ) { libcnotify_printf( - "%s: appending source list with mapped offset: %" PRIi64 " and size: %" PRIu64 " to list with mapped offset: %" PRIi64 " and size: %" PRIu64 "\n", + "%s: appending source list with mapped offset: %" PRIi64 " (0x%08" PRIx64 ") and size: %" PRIu64 " to list with mapped offset: %" PRIi64 " (0x%08" PRIx64 ") and size: %" PRIu64 "\n", function, internal_source_list->mapped_offset, + internal_source_list->mapped_offset, internal_source_list->size, internal_list->mapped_offset, + internal_list->mapped_offset, internal_list->size ); } #endif @@ -1976,6 +1988,84 @@ /* Mapped range functions */ +/* Retrieves the mapped range of a specific element + * Returns 1 if successful or -1 on error + */ +int libfdata_list_get_element_mapped_range( + libfdata_list_t *list, + int element_index, + off64_t *mapped_range_offset, + size64_t *mapped_range_size, + libcerror_error_t **error ) +{ + libfdata_internal_list_t *internal_list = NULL; + libfdata_mapped_range_t *mapped_range = NULL; + static char *function = "libfdata_list_get_element_mapped_range"; + + if( list == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid list.", + function ); + + return( -1 ); + } + internal_list = (libfdata_internal_list_t *) list; + + if( ( internal_list->flags & LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES ) != 0 ) + { + if( libfdata_list_calculate_mapped_ranges( + internal_list, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to calculate mapped ranges.", + function ); + + return( -1 ); + } + } + if( libcdata_array_get_entry_by_index( + internal_list->mapped_ranges_array, + element_index, + (intptr_t **) &mapped_range, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve entry: %d from mapped ranges array.", + function, + element_index ); + + return( -1 ); + } + if( libfdata_mapped_range_get( + mapped_range, + mapped_range_offset, + mapped_range_size, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to retrieve values from mapped range: %d.", + function, + element_index ); + + return( -1 ); + } + return( 1 ); +} + /* Retrieves the mapped offset * Returns 1 if successful, 0 if not set or -1 on error */ @@ -2059,8 +2149,9 @@ if( libcnotify_verbose != 0 ) { libcnotify_printf( - "%s: mapped offset: %" PRIi64 "\n", + "%s: mapped offset: %" PRIi64 " (0x%08" PRIx64 ")\n", function, + mapped_offset, mapped_offset ); libcnotify_printf( @@ -2536,12 +2627,14 @@ if( libcnotify_verbose != 0 ) { libcnotify_printf( - "%s: element: %03d\tfile index: %03d offset: 0x%08" PRIx64 " - 0x%08" PRIx64 " (size: %" PRIu64 ")\n", + "%s: element: %03d\tfile index: %03d offset: %" PRIi64 " - %" PRIi64 " (0x%08" PRIx64 " - 0x%08" PRIx64 ") (size: %" PRIu64 ")\n", function, element_index, element_file_index, element_offset, element_offset + element_size, + element_offset, + element_offset + element_size, element_size ); if( ( internal_list->flags & LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES ) == 0 ) @@ -2563,17 +2656,20 @@ return( -1 ); } libcnotify_printf( - "%s: element: %03d\tmapped range: 0x%08" PRIx64 " - 0x%08" PRIx64 " (size: %" PRIu64 ")\n", + "%s: element: %03d\tmapped range: %" PRIi64 " - %" PRIi64 " (0x%08" PRIx64 " - 0x%08" PRIx64 ") (size: %" PRIu64 ")\n", function, element_index, mapped_range_offset, mapped_range_offset + mapped_range_size, + mapped_range_offset, + mapped_range_offset + mapped_range_size, mapped_range_size ); } libcnotify_printf( "\n" ); } -#endif +#endif /* defined( HAVE_DEBUG_OUTPUT ) */ + internal_list->current_element_index = element_index; return( 1 ); @@ -2762,26 +2858,31 @@ if( libcnotify_verbose != 0 ) { libcnotify_printf( - "%s: element: %03d\tfile index: %03d offset: 0x%08" PRIx64 " - 0x%08" PRIx64 " (size: %" PRIu64 ")\n", + "%s: element: %03d\tfile index: %03d offset: %" PRIi64 " - %" PRIi64 " (0x%08" PRIx64 " - 0x%08" PRIx64 ") (size: %" PRIu64 ")\n", function, *element_index, element_file_index, element_offset, element_offset + element_size, + element_offset, + element_offset + element_size, element_size ); libcnotify_printf( - "%s: element: %03d\tmapped range: 0x%08" PRIx64 " - 0x%08" PRIx64 " (size: %" PRIu64 ")\n", + "%s: element: %03d\tmapped range: %" PRIi64 " - %" PRIi64 " (0x%08" PRIx64 " - 0x%08" PRIx64 ") (size: %" PRIu64 ")\n", function, *element_index, mapped_offset, mapped_offset + mapped_size, + mapped_offset, + mapped_offset + mapped_size, mapped_size ); libcnotify_printf( "\n" ); } -#endif +#endif /* defined( HAVE_DEBUG_OUTPUT ) */ + internal_list->current_element_index = *element_index; internal_list->size += mapped_size; @@ -2937,23 +3038,28 @@ if( libcnotify_verbose != 0 ) { libcnotify_printf( - "%s: element: %03d\tfile index: %03d offset: 0x%08" PRIx64 " - 0x%08" PRIx64 " (size: %" PRIu64 ")\n", + "%s: element: %03d\tfile index: %03d offset: %" PRIi64 " - %" PRIi64 " (0x%08" PRIx64 " - 0x%08" PRIx64 ") (size: %" PRIu64 ")\n", function, element_index, element_file_index, element_offset, element_offset + element_size, + element_offset, + element_offset + element_size, element_size ); libcnotify_printf( - "%s: element: %03d\tmapped range: 0x%08" PRIx64 " - 0x%08" PRIx64 " (size: %" PRIu64 ")\n", + "%s: element: %03d\tmapped range: %" PRIi64 " - %" PRIi64 " (0x%08" PRIx64 " - 0x%08" PRIx64 ") (size: %" PRIu64 ")\n", function, element_index, mapped_offset, mapped_offset + mapped_size, + mapped_offset, + mapped_offset + mapped_size, mapped_size ); } -#endif +#endif /* defined( HAVE_DEBUG_OUTPUT ) */ + if( libfdata_mapped_range_set( mapped_range, mapped_offset, @@ -3082,8 +3188,9 @@ if( libcnotify_verbose != 0 ) { libcnotify_printf( - "%s: requested offset: 0x%08" PRIx64 "\n", + "%s: requested offset: %" PRIi64 " (0x%08" PRIx64 ")\n", function, + offset, offset ); } #endif @@ -3184,11 +3291,13 @@ if( libcnotify_verbose != 0 ) { libcnotify_printf( - "%s: element: %03d\tmapped range: 0x%08" PRIx64 " - 0x%08" PRIx64 " (size: %" PRIu64 ")\n", + "%s: element: %03d\tmapped range: %" PRIi64 " - %" PRIi64 " (0x%08" PRIx64 " - 0x%08" PRIx64 ") (size: %" PRIu64 ")\n", function, search_element_index, mapped_range_start_offset, mapped_range_end_offset, + mapped_range_start_offset, + mapped_range_end_offset, mapped_range_size ); } #endif @@ -3268,11 +3377,13 @@ if( libcnotify_verbose != 0 ) { libcnotify_printf( - "%s: element: %03d\tmapped range: 0x%08" PRIx64 " - 0x%08" PRIx64 " (size: %" PRIu64 ")\n", + "%s: element: %03d\tmapped range: %" PRIi64 " - %" PRIi64 " (0x%08" PRIx64 " - 0x%08" PRIx64 ") (size: %" PRIu64 ")\n", function, search_element_index, mapped_range_start_offset, mapped_range_end_offset, + mapped_range_start_offset, + mapped_range_end_offset, mapped_range_size ); } #endif @@ -3349,15 +3460,18 @@ return( -1 ); } libcnotify_printf( - "%s: element: %03d\tfile index: %03d offset: 0x%08" PRIx64 " - 0x%08" PRIx64 " (size: %" PRIu64 ")\n", + "%s: element: %03d\tfile index: %03d offset: %" PRIi64 " - %" PRIi64 " (0x%08" PRIx64 " - 0x%08" PRIx64 ") (size: %" PRIu64 ")\n", function, search_element_index, element_file_index, element_offset, element_offset + element_size, + element_offset, + element_offset + element_size, element_size ); } -#endif +#endif /* defined( HAVE_DEBUG_OUTPUT ) */ + internal_list->current_element_index = search_element_index; result = 1; @@ -3451,8 +3565,9 @@ error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve element index at offset: 0x%08" PRIx64 ".", + "%s: unable to retrieve element index at offset: %" PRIi64 " (0x%08" PRIx64 ").", function, + offset, offset ); return( -1 ); @@ -3535,8 +3650,9 @@ error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve element index at offset: 0x%08" PRIx64 ".", + "%s: unable to retrieve element index at offset: %" PRIi64 " (0x%08" PRIx64 ").", function, + offset, offset ); return( -1 ); @@ -3590,11 +3706,11 @@ int libfdata_list_cache_element_value( libfdata_list_t *list, libfdata_cache_t *cache, - int element_index, + int element_index LIBFDATA_ATTRIBUTE_UNUSED, int element_file_index, - off64_t element_offset, - size64_t element_size, - uint32_t element_flags, + off64_t element_data_offset, + size64_t element_data_size LIBFDATA_ATTRIBUTE_UNUSED, + uint32_t element_data_flags LIBFDATA_ATTRIBUTE_UNUSED, int64_t element_timestamp, intptr_t *element_value, int (*free_element_value)( @@ -3603,10 +3719,11 @@ uint8_t write_flags, libcerror_error_t **error ) { - libfdata_internal_list_t *internal_list = NULL; - static char *function = "libfdata_list_cache_element_value"; - int cache_entry_index = -1; - int number_of_cache_entries = 0; + static char *function = "libfdata_list_cache_element_value"; + + LIBFDATA_UNREFERENCED_PARAMETER( element_index ) + LIBFDATA_UNREFERENCED_PARAMETER( element_data_size ) + LIBFDATA_UNREFERENCED_PARAMETER( element_data_flags ) if( list == NULL ) { @@ -3619,63 +3736,10 @@ return( -1 ); } - internal_list = (libfdata_internal_list_t *) list; - - if( element_index < 0 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, - "%s: invalid element index value out of bounds.", - function ); - - return( -1 ); - } - if( libfcache_cache_get_number_of_entries( - (libfcache_cache_t *) cache, - &number_of_cache_entries, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve number of cache entries.", - function ); - - return( -1 ); - } - if( number_of_cache_entries <= 0 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, - "%s: invalid number of cache entries value out of bounds.", - function ); - - return( -1 ); - } - if( internal_list->calculate_cache_entry_index == NULL ) - { - cache_entry_index = element_index % number_of_cache_entries; - } - else - { - cache_entry_index = internal_list->calculate_cache_entry_index( - element_index, - element_file_index, - element_offset, - element_size, - element_flags, - number_of_cache_entries ); - } - if( libfcache_cache_set_value_by_index( + if( libfcache_cache_set_value_by_identifier( (libfcache_cache_t *) cache, - cache_entry_index, element_file_index, - element_offset, + element_data_offset, element_timestamp, element_value, free_element_value, @@ -3686,9 +3750,8 @@ error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to set value in cache entry: %d.", - function, - cache_entry_index ); + "%s: unable to set value in cache.", + function ); return( -1 ); } @@ -3710,19 +3773,20 @@ libfcache_cache_value_t *cache_value = NULL; libfdata_internal_list_t *internal_list = NULL; static char *function = "libfdata_list_get_element_value"; - size64_t element_size = 0; + size64_t element_data_size = 0; off64_t cache_value_offset = (off64_t) -1; - off64_t element_offset = 0; + off64_t element_data_offset = 0; int64_t cache_value_timestamp = 0; int64_t element_timestamp = 0; - uint32_t element_flags = 0; - int cache_entry_index = -1; + uint32_t element_data_flags = 0; int cache_value_file_index = -1; int element_file_index = -1; - int element_index = -1; - int number_of_cache_entries = 0; int result = 0; +#if defined( HAVE_DEBUG_OUTPUT ) + const char *hit_or_miss = NULL; +#endif + if( list == NULL ) { libcerror_error_set( @@ -3750,9 +3814,9 @@ if( libfdata_list_element_get_data_range( element, &element_file_index, - &element_offset, - &element_size, - &element_flags, + &element_data_offset, + &element_data_size, + &element_data_flags, error ) != 1 ) { libcerror_error_set( @@ -3764,139 +3828,59 @@ return( -1 ); } - if( libfcache_cache_get_number_of_entries( - (libfcache_cache_t *) cache, - &number_of_cache_entries, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve number of cache entries.", - function ); - - return( -1 ); - } - if( libfdata_list_element_get_element_index( + if( libfdata_list_element_get_timestamp( element, - &element_index, + &element_timestamp, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve element index from list element.", - function ); - - return( -1 ); - } - if( number_of_cache_entries <= 0 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, - "%s: invalid number of cache entries value out of bounds.", + "%s: unable to retrieve time stamp from list element.", function ); return( -1 ); } if( ( read_flags & LIBFDATA_READ_FLAG_IGNORE_CACHE ) == 0 ) { - if( internal_list->calculate_cache_entry_index == NULL ) - { - cache_entry_index = element_index % number_of_cache_entries; - } - else - { - cache_entry_index = internal_list->calculate_cache_entry_index( - element_index, - element_file_index, - element_offset, - element_size, - element_flags, - number_of_cache_entries ); - } - if( libfcache_cache_get_value_by_index( - (libfcache_cache_t *) cache, - cache_entry_index, - &cache_value, - error ) != 1 ) + result = libfcache_cache_get_value_by_identifier( + (libfcache_cache_t *) cache, + element_file_index, + element_data_offset, + element_timestamp, + &cache_value, + error ); + + if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve cache entry: %d from cache.", - function, - cache_entry_index ); + "%s: unable to retrieve value from cache.", + function ); return( -1 ); } - if( cache_value != NULL ) - { - if( libfdata_list_element_get_timestamp( - element, - &element_timestamp, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve time stamp from list element.", - function ); - - return( -1 ); - } - if( libfcache_cache_value_get_identifier( - cache_value, - &cache_value_file_index, - &cache_value_offset, - &cache_value_timestamp, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve cache value identifier.", - function ); - - return( -1 ); - } - } - if( ( element_file_index == cache_value_file_index ) - && ( element_offset == cache_value_offset ) - && ( element_timestamp == cache_value_timestamp ) ) - { - result = 1; - } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( result == 0 ) { - libcnotify_printf( - "%s: cache: 0x%08" PRIjx " miss (%d out of %d)\n", - function, - (intptr_t) cache, - cache_entry_index, - number_of_cache_entries ); + hit_or_miss = "miss"; } else { - libcnotify_printf( - "%s: cache: 0x%08" PRIjx " hit (%d out of %d)\n", - function, - (intptr_t) cache, - cache_entry_index, - number_of_cache_entries ); + hit_or_miss = "hit"; } + libcnotify_printf( + "%s: cache: 0x%08" PRIjx " %s\n", + function, + (intptr_t) cache, + hit_or_miss ); } -#endif +#endif /* defined( HAVE_DEBUG_OUTPUT ) */ } if( result == 0 ) { @@ -3906,9 +3890,9 @@ libcnotify_printf( "%s: reading element data at offset: %" PRIi64 " (0x%08" PRIx64 ") of size: %" PRIu64 "\n", function, - element_offset, - element_offset, - element_size ); + element_data_offset, + element_data_offset, + element_data_size ); } #endif if( internal_list->read_element_data( @@ -3917,9 +3901,9 @@ element, cache, element_file_index, - element_offset, - element_size, - element_flags, + element_data_offset, + element_data_size, + element_data_flags, read_flags, error ) != 1 ) { @@ -3927,29 +3911,18 @@ error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, - "%s: unable to read element data at offset: 0x%08" PRIx64 ".", + "%s: unable to read element data at offset: %" PRIi64 " (0x%08" PRIx64 ").", function, - element_offset ); + element_data_offset, + element_data_offset ); return( -1 ); } - if( internal_list->calculate_cache_entry_index == NULL ) - { - cache_entry_index = element_index % number_of_cache_entries; - } - else - { - cache_entry_index = internal_list->calculate_cache_entry_index( - element_index, - element_file_index, - element_offset, - element_size, - element_flags, - number_of_cache_entries ); - } - if( libfcache_cache_get_value_by_index( + if( libfcache_cache_get_value_by_identifier( (libfcache_cache_t *) cache, - cache_entry_index, + element_file_index, + element_data_offset, + element_timestamp, &cache_value, error ) != 1 ) { @@ -3957,47 +3930,29 @@ error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve cache entry: %d from cache.", - function, - cache_entry_index ); + "%s: unable to retrieve value from cache.", + function ); return( -1 ); } - if( cache_value != NULL ) + if( libfcache_cache_value_get_identifier( + cache_value, + &cache_value_file_index, + &cache_value_offset, + &cache_value_timestamp, + error ) != 1 ) { - if( libfdata_list_element_get_timestamp( - element, - &element_timestamp, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve time stamp from list element.", - function ); - - return( -1 ); - } - if( libfcache_cache_value_get_identifier( - cache_value, - &cache_value_file_index, - &cache_value_offset, - &cache_value_timestamp, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve cache value identifier.", - function ); + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve cache value identifier.", + function ); - return( -1 ); - } + return( -1 ); } if( ( element_file_index != cache_value_file_index ) - || ( element_offset != cache_value_offset ) + || ( element_data_offset != cache_value_offset ) || ( element_timestamp != cache_value_timestamp ) ) { libcerror_error_set( @@ -4138,8 +4093,9 @@ error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve element at offset: 0x%08" PRIx64 ".", + "%s: unable to retrieve element at offset: %" PRIi64 " (0x%08" PRIx64 ").", function, + offset, offset ); return( -1 ); @@ -4189,43 +4145,39 @@ uint8_t write_flags, libcerror_error_t **error ) { - static char *function = "libfdata_list_set_element_value"; - size64_t element_size = 0; - off64_t element_offset = 0; - int64_t element_timestamp = 0; - uint32_t element_flags = 0; - int element_file_index = -1; - int element_index = -1; + static char *function = "libfdata_list_set_element_value"; + size64_t element_data_size = 0; + off64_t element_data_offset = 0; + int64_t element_timestamp = 0; + uint32_t element_data_flags = 0; + int element_file_index = -1; LIBFDATA_UNREFERENCED_PARAMETER( file_io_handle ) - if( libfdata_list_element_get_data_range( - element, - &element_file_index, - &element_offset, - &element_size, - &element_flags, - error ) != 1 ) + if( list == NULL ) { libcerror_error_set( error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve data range from list element.", + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid list.", function ); return( -1 ); } - if( libfdata_list_element_get_element_index( + if( libfdata_list_element_get_data_range( element, - &element_index, + &element_file_index, + &element_data_offset, + &element_data_size, + &element_data_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve element index from list element.", + "%s: unable to retrieve data range from list element.", function ); return( -1 ); @@ -4244,14 +4196,10 @@ return( -1 ); } - if( libfdata_list_cache_element_value( - list, - cache, - element_index, + if( libfcache_cache_set_value_by_identifier( + (libfcache_cache_t *) cache, element_file_index, - element_offset, - element_size, - element_flags, + element_data_offset, element_timestamp, element_value, free_element_value, @@ -4262,7 +4210,7 @@ error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to cache element value.", + "%s: unable to set value in cache.", function ); return( -1 ); @@ -4387,8 +4335,9 @@ error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve element at offset: 0x%08" PRIx64 ".", + "%s: unable to retrieve element at offset: %" PRIi64 " (0x%08" PRIx64 ").", function, + offset, offset ); return( -1 ); diff -Nru libfshfs-20201104/libfdata/libfdata_list.h libfshfs-20240221/libfdata/libfdata_list.h --- libfshfs-20201104/libfdata/libfdata_list.h 2020-11-04 11:56:03.000000000 +0000 +++ libfshfs-20240221/libfdata/libfdata_list.h 2024-02-21 06:04:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * The list functions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -63,16 +63,6 @@ */ uint8_t flags; - /* The calculate cache entry index value - */ - int (*calculate_cache_entry_index)( - int element_index, - int element_file_index, - off64_t element_offset, - size64_t element_size, - uint32_t element_flags, - int number_of_cache_entries ); - /* The data handle */ intptr_t *data_handle; @@ -255,6 +245,14 @@ /* Mapped range functions */ LIBFDATA_EXTERN \ +int libfdata_list_get_element_mapped_range( + libfdata_list_t *list, + int element_index, + off64_t *mapped_range_offset, + size64_t *mapped_range_size, + libcerror_error_t **error ); + +LIBFDATA_EXTERN \ int libfdata_list_get_mapped_offset( libfdata_list_t *list, off64_t *mapped_offset, @@ -358,9 +356,9 @@ libfdata_cache_t *cache, int element_index, int element_file_index, - off64_t element_offset, - size64_t element_size, - uint32_t element_flags, + off64_t element_data_offset, + size64_t element_data_size, + uint32_t element_data_flags, int64_t element_timestamp, intptr_t *element_value, int (*free_element_value)( diff -Nru libfshfs-20201104/libfdata/libfdata_list_element.c libfshfs-20240221/libfdata/libfdata_list_element.c --- libfshfs-20201104/libfdata/libfdata_list_element.c 2020-11-04 11:56:03.000000000 +0000 +++ libfshfs-20240221/libfdata/libfdata_list_element.c 2024-02-21 06:04:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * The list element functions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfdata/libfdata_list_element.h libfshfs-20240221/libfdata/libfdata_list_element.h --- libfshfs-20201104/libfdata/libfdata_list_element.h 2020-11-04 11:56:03.000000000 +0000 +++ libfshfs-20240221/libfdata/libfdata_list_element.h 2024-02-21 06:04:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * The list element functions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -79,6 +79,7 @@ libfdata_list_element_t *source_element, libcerror_error_t **error ); +LIBFDATA_EXTERN \ int libfdata_list_element_get_element_index( libfdata_list_element_t *element, int *element_index, @@ -96,6 +97,7 @@ /* Data range functions */ +LIBFDATA_EXTERN \ int libfdata_list_element_get_data_range( libfdata_list_element_t *element, int *file_index, diff -Nru libfshfs-20201104/libfdata/libfdata_mapped_range.c libfshfs-20240221/libfdata/libfdata_mapped_range.c --- libfshfs-20201104/libfdata/libfdata_mapped_range.c 2020-11-04 11:56:03.000000000 +0000 +++ libfshfs-20240221/libfdata/libfdata_mapped_range.c 2024-02-21 06:04:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * The (data) mapped range functions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfdata/libfdata_mapped_range.h libfshfs-20240221/libfdata/libfdata_mapped_range.h --- libfshfs-20201104/libfdata/libfdata_mapped_range.h 2020-11-04 11:56:03.000000000 +0000 +++ libfshfs-20240221/libfdata/libfdata_mapped_range.h 2024-02-21 06:04:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * The (data) mapped range functions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfdata/libfdata_notify.c libfshfs-20240221/libfdata/libfdata_notify.c --- libfshfs-20201104/libfdata/libfdata_notify.c 2020-11-04 11:56:03.000000000 +0000 +++ libfshfs-20240221/libfdata/libfdata_notify.c 2024-02-21 06:04:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * Notification functions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfdata/libfdata_notify.h libfshfs-20240221/libfdata/libfdata_notify.h --- libfshfs-20201104/libfdata/libfdata_notify.h 2020-11-04 11:56:03.000000000 +0000 +++ libfshfs-20240221/libfdata/libfdata_notify.h 2024-02-21 06:04:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * Notification functions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfdata/libfdata_range.c libfshfs-20240221/libfdata/libfdata_range.c --- libfshfs-20201104/libfdata/libfdata_range.c 2020-11-04 11:56:03.000000000 +0000 +++ libfshfs-20240221/libfdata/libfdata_range.c 2024-02-21 06:04:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * The range functions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfdata/libfdata_range.h libfshfs-20240221/libfdata/libfdata_range.h --- libfshfs-20201104/libfdata/libfdata_range.h 2020-11-04 11:56:03.000000000 +0000 +++ libfshfs-20240221/libfdata/libfdata_range.h 2024-02-21 06:04:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * The range functions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfdata/libfdata_range_list.c libfshfs-20240221/libfdata/libfdata_range_list.c --- libfshfs-20201104/libfdata/libfdata_range_list.c 2020-11-04 11:56:03.000000000 +0000 +++ libfshfs-20240221/libfdata/libfdata_range_list.c 2024-02-21 06:04:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * The range list functions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfdata/libfdata_range_list.h libfshfs-20240221/libfdata/libfdata_range_list.h --- libfshfs-20201104/libfdata/libfdata_range_list.h 2020-11-04 11:56:03.000000000 +0000 +++ libfshfs-20240221/libfdata/libfdata_range_list.h 2024-02-21 06:04:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * The range list functions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfdata/libfdata_segments_array.c libfshfs-20240221/libfdata/libfdata_segments_array.c --- libfshfs-20201104/libfdata/libfdata_segments_array.c 2020-11-04 11:56:03.000000000 +0000 +++ libfshfs-20240221/libfdata/libfdata_segments_array.c 2024-02-21 06:04:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * The segments array functions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfdata/libfdata_segments_array.h libfshfs-20240221/libfdata/libfdata_segments_array.h --- libfshfs-20201104/libfdata/libfdata_segments_array.h 2020-11-04 11:56:03.000000000 +0000 +++ libfshfs-20240221/libfdata/libfdata_segments_array.h 2024-02-21 06:04:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * The segments array functions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfdata/libfdata_stream.c libfshfs-20240221/libfdata/libfdata_stream.c --- libfshfs-20201104/libfdata/libfdata_stream.c 2020-11-04 11:56:03.000000000 +0000 +++ libfshfs-20240221/libfdata/libfdata_stream.c 2024-02-21 06:04:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * The stream functions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -190,6 +190,7 @@ goto on_error; } + internal_stream->segment_offset = -1; internal_stream->flags |= flags; internal_stream->data_handle = data_handle; internal_stream->free_data_handle = free_data_handle; @@ -1103,8 +1104,9 @@ if( libcnotify_verbose != 0 ) { libcnotify_printf( - "%s: requested offset: 0x%08" PRIx64 "\n", + "%s: requested offset: %" PRIi64 " (0x%08" PRIx64 ")\n", function, + offset, offset ); } #endif @@ -1359,15 +1361,18 @@ return( -1 ); } libcnotify_printf( - "%s: segment: %03d\tfile index: %03d offset: 0x%08" PRIx64 " - 0x%08" PRIx64 " (size: %" PRIu64 ")\n", + "%s: segment: %03d\tfile index: %03d offset: %" PRIi64 " - %" PRIi64 " (0x%08" PRIx64 " - 0x%08" PRIx64 ") (size: %" PRIu64 ")\n", function, search_segment_index, segment_file_index, segment_offset, segment_offset + segment_size, + segment_offset, + segment_offset + segment_size, segment_size ); } -#endif +#endif /* defined( HAVE_DEBUG_OUTPUT ) */ + result = 1; } if( result == 1 ) @@ -1441,8 +1446,9 @@ error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve segment index at offset: 0x%08" PRIx64 ".", + "%s: unable to retrieve segment index at offset: %" PRIi64 " (0x%08" PRIx64 ").", function, + offset, offset ); return( -1 ); @@ -1502,7 +1508,6 @@ libcerror_error_t **error ) { libfdata_internal_stream_t *internal_stream = NULL; - libfdata_range_t *segment_data_range = NULL; static char *function = "libfdata_stream_read_buffer"; off64_t result_offset = 0; off64_t segment_offset = 0; @@ -1593,33 +1598,39 @@ } /* Bail out early for requests to read empty buffers and beyond the end of the stream */ - if( ( buffer_size == 0 ) - || ( (size64_t) internal_stream->current_offset >= stream_size ) ) + if( (size64_t) internal_stream->current_offset >= stream_size ) { - return( 0 ); + buffer_size = 0; } - if( (size64_t) ( internal_stream->current_offset + buffer_size ) > stream_size ) + else if( (size64_t) buffer_size > ( stream_size - internal_stream->current_offset ) ) { buffer_size = (size_t) ( stream_size - internal_stream->current_offset ); } - if( libcdata_array_get_entry_by_index( - internal_stream->segments_array, - internal_stream->current_segment_index, - (intptr_t **) &segment_data_range, - error ) != 1 ) + if( buffer_size == 0 ) { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve entry: %d from segments array.", - function, - internal_stream->current_segment_index ); + return( 0 ); + } + if( internal_stream->current_segment_data_range == NULL ) + { + if( libcdata_array_get_entry_by_index( + internal_stream->segments_array, + internal_stream->current_segment_index, + (intptr_t **) &( internal_stream->current_segment_data_range ), + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve entry: %d from segments array.", + function, + internal_stream->current_segment_index ); - return( -1 ); + return( -1 ); + } } if( libfdata_range_get( - segment_data_range, + internal_stream->current_segment_data_range, &segment_file_index, &segment_offset, &segment_size, @@ -1637,6 +1648,7 @@ return( -1 ); } if( ( internal_stream->segment_data_offset < 0 ) + || ( segment_offset > ( INT64_MAX - internal_stream->segment_data_offset ) ) || ( (size64_t) internal_stream->segment_data_offset >= segment_size ) ) { libcerror_error_set( @@ -1652,6 +1664,8 @@ segment_data_size = segment_size - internal_stream->segment_data_offset; + /* Make sure the file IO handle is pointing to the correct offset + */ result_offset = internal_stream->seek_segment_offset( internal_stream->data_handle, file_io_handle, @@ -1666,13 +1680,16 @@ error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, - "%s: unable to seek segment: %d offset: %" PRIi64 ".", + "%s: unable to seek segment: %d offset: %" PRIi64 " (0x%08" PRIx64 ").", function, internal_stream->current_segment_index, + segment_offset, segment_offset ); return( -1 ); } + internal_stream->segment_offset = segment_offset; + while( buffer_size > 0 ) { if( (size64_t) buffer_size <= segment_data_size ) @@ -1704,14 +1721,16 @@ error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, - "%s: unable to read segment: %d data at offset: 0x%08" PRIx64 ".", + "%s: unable to read segment: %d data at offset: %" PRIi64 " (0x%08" PRIx64 ").", function, internal_stream->current_segment_index, + segment_offset, segment_offset ); return( -1 ); } internal_stream->current_offset += read_size; + internal_stream->segment_offset += read_size; internal_stream->segment_data_offset += read_size; segment_offset += read_size; segment_data_size -= read_size; @@ -1736,13 +1755,13 @@ return( -1 ); } internal_stream->current_segment_index++; - - internal_stream->segment_data_offset = 0; + internal_stream->current_segment_data_range = NULL; + internal_stream->segment_data_offset = 0; if( libcdata_array_get_entry_by_index( internal_stream->segments_array, internal_stream->current_segment_index, - (intptr_t **) &segment_data_range, + (intptr_t **) &( internal_stream->current_segment_data_range ), error ) != 1 ) { libcerror_error_set( @@ -1756,7 +1775,7 @@ return( -1 ); } if( libfdata_range_get( - segment_data_range, + internal_stream->current_segment_data_range, &segment_file_index, &segment_offset, &segment_size, @@ -1789,13 +1808,15 @@ error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, - "%s: unable to seek segment: %d offset: %" PRIi64 ".", + "%s: unable to seek segment: %d offset: %" PRIi64 " (0x%08" PRIx64 ").", function, internal_stream->current_segment_index, + segment_offset, segment_offset ); return( -1 ); } + internal_stream->segment_offset = segment_offset; } } return( (ssize_t) buffer_offset ); @@ -1865,7 +1886,6 @@ libcerror_error_t **error ) { libfdata_internal_stream_t *internal_stream = NULL; - libfdata_range_t *segment_data_range = NULL; static char *function = "libfdata_stream_write_buffer"; off64_t result_offset = 0; off64_t segment_offset = 0; @@ -1981,24 +2001,27 @@ } if( (size64_t) internal_stream->current_offset < internal_stream->size ) { - if( libcdata_array_get_entry_by_index( - internal_stream->segments_array, - internal_stream->current_segment_index, - (intptr_t **) &segment_data_range, - error ) != 1 ) + if( internal_stream->current_segment_data_range == NULL ) { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve entry: %d from segments array.", - function, - internal_stream->current_segment_index ); + if( libcdata_array_get_entry_by_index( + internal_stream->segments_array, + internal_stream->current_segment_index, + (intptr_t **) &( internal_stream->current_segment_data_range ), + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve entry: %d from segments array.", + function, + internal_stream->current_segment_index ); - return( -1 ); + return( -1 ); + } } if( libfdata_range_get( - segment_data_range, + internal_stream->current_segment_data_range, &segment_file_index, &segment_offset, &segment_size, @@ -2036,6 +2059,7 @@ if( internal_stream->current_segment_index < number_of_segments ) { internal_stream->current_segment_index++; + internal_stream->current_segment_data_range = NULL; } internal_stream->segment_data_offset = 0; @@ -2098,6 +2122,8 @@ segment_data_size = segment_size; } + /* Make sure the file IO handle is pointing to the correct offset + */ result_offset = internal_stream->seek_segment_offset( internal_stream->data_handle, file_io_handle, @@ -2112,13 +2138,16 @@ error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, - "%s: unable to seek segment: %d offset: %" PRIi64 ".", + "%s: unable to seek segment: %d offset: %" PRIi64 " (0x%08" PRIx64 ").", function, internal_stream->current_segment_index, + segment_offset, segment_offset ); return( -1 ); } + internal_stream->segment_offset = segment_offset; + while( buffer_size > 0 ) { if( (size64_t) buffer_size <= segment_data_size ) @@ -2150,14 +2179,16 @@ error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, - "%s: unable to write segment: %d data at offset: 0x%08" PRIx64 ".", + "%s: unable to write segment: %d data at offset: %" PRIi64 " (0x%08" PRIx64 ").", function, internal_stream->current_segment_index, + segment_offset + internal_stream->segment_data_offset, segment_offset + internal_stream->segment_data_offset ); return( -1 ); } internal_stream->current_offset += write_size; + internal_stream->segment_offset += write_size; internal_stream->segment_data_offset += write_size; segment_offset += write_size; segment_data_size -= write_size; @@ -2178,15 +2209,15 @@ return( -1 ); } internal_stream->current_segment_index++; - - internal_stream->segment_data_offset = 0; + internal_stream->current_segment_data_range = NULL; + internal_stream->segment_data_offset = 0; if( internal_stream->current_segment_index < number_of_segments ) { if( libcdata_array_get_entry_by_index( internal_stream->segments_array, internal_stream->current_segment_index, - (intptr_t **) &segment_data_range, + (intptr_t **) &( internal_stream->current_segment_data_range ), error ) != 1 ) { libcerror_error_set( @@ -2200,7 +2231,7 @@ return( -1 ); } if( libfdata_range_get( - segment_data_range, + internal_stream->current_segment_data_range, &segment_file_index, &segment_offset, &segment_size, @@ -2293,13 +2324,15 @@ error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, - "%s: unable to seek segment: %d offset: %" PRIi64 ".", + "%s: unable to seek segment: %d offset: %" PRIi64 " (0x%08" PRIx64 ").", function, internal_stream->current_segment_index, + segment_offset, segment_offset ); return( -1 ); } + internal_stream->segment_offset = segment_offset; } } return( (ssize_t) buffer_offset ); @@ -2377,64 +2410,69 @@ if( libcnotify_verbose != 0 ) { libcnotify_printf( - "%s: seeking offset: %" PRIi64 ".\n", + "%s: seeking offset: %" PRIi64 " (0x%08" PRIx64 ").\n", function, + offset, offset ); } #endif - if( offset < 0 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, - "%s: offset value out of bounds.", - function ); - - return( -1 ); - } - if( offset < (off64_t) stream_size ) + if( internal_stream->current_offset != offset ) { - if( libfdata_stream_get_segment_index_at_offset( - stream, - offset, - &segment_index, - &segment_data_offset, - error ) != 1 ) + if( offset < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve segment index at offset: 0x%08" PRIx64 ".", - function, - offset ); + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: offset value out of bounds.", + function ); return( -1 ); } - } - else - { - if( libcdata_array_get_number_of_entries( - internal_stream->segments_array, - &segment_index, - error ) != 1 ) + if( offset < (off64_t) stream_size ) { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve number of entries from segments array.", - function ); + if( libfdata_stream_get_segment_index_at_offset( + stream, + offset, + &segment_index, + &segment_data_offset, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve segment index at offset: %" PRIi64 " (0x%08" PRIx64 ").", + function, + offset, + offset ); - return( -1 ); + return( -1 ); + } } - segment_data_offset = 0; - } - internal_stream->current_segment_index = segment_index; - internal_stream->current_offset = offset; - internal_stream->segment_data_offset = segment_data_offset; + else + { + if( libcdata_array_get_number_of_entries( + internal_stream->segments_array, + &segment_index, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve number of entries from segments array.", + function ); + return( -1 ); + } + segment_data_offset = 0; + } + internal_stream->current_segment_index = segment_index; + internal_stream->current_segment_data_range = NULL; + internal_stream->current_offset = offset; + internal_stream->segment_data_offset = segment_data_offset; + } return( offset ); } diff -Nru libfshfs-20201104/libfdata/libfdata_stream.h libfshfs-20240221/libfdata/libfdata_stream.h --- libfshfs-20201104/libfdata/libfdata_stream.h 2020-11-04 11:56:03.000000000 +0000 +++ libfshfs-20240221/libfdata/libfdata_stream.h 2024-02-21 06:04:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * The stream functions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -44,10 +44,18 @@ */ int current_segment_index; + /* The current segment data range + */ + libfdata_range_t *current_segment_data_range; + /* The current offset */ off64_t current_offset; + /* The (current) segment offset + */ + off64_t segment_offset; + /* The (current) segment data offset */ off64_t segment_data_offset; diff -Nru libfshfs-20201104/libfdata/libfdata_support.c libfshfs-20240221/libfdata/libfdata_support.c --- libfshfs-20201104/libfdata/libfdata_support.c 2020-11-04 11:56:03.000000000 +0000 +++ libfshfs-20240221/libfdata/libfdata_support.c 2024-02-21 06:04:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * Support functions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfdata/libfdata_support.h libfshfs-20240221/libfdata/libfdata_support.h --- libfshfs-20201104/libfdata/libfdata_support.h 2020-11-04 11:56:03.000000000 +0000 +++ libfshfs-20240221/libfdata/libfdata_support.h 2024-02-21 06:04:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * Support functions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfdata/libfdata_tree.c libfshfs-20240221/libfdata/libfdata_tree.c --- libfshfs-20201104/libfdata/libfdata_tree.c 2020-11-04 11:56:03.000000000 +0000 +++ libfshfs-20240221/libfdata/libfdata_tree.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,1256 +0,0 @@ -/* - * The tree functions - * - * Copyright (C) 2010-2020, Joachim Metz - * - * Refer to AUTHORS for acknowledgements. - * - * This program 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 3 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - */ - -#include -#include -#include - -#include "libfdata_definitions.h" -#include "libfdata_libcerror.h" -#include "libfdata_libcnotify.h" -#include "libfdata_libfcache.h" -#include "libfdata_tree.h" -#include "libfdata_tree_node.h" -#include "libfdata_types.h" - -/* Creates a tree - * Make sure the value tree is referencing, is set to NULL - * - * If the flag LIBFDATA_DATA_HANDLE_FLAG_MANAGED is set the tree - * takes over management of the data handle and the data handle is freed when - * no longer needed - * - * Returns 1 if successful or -1 on error - */ -int libfdata_tree_initialize( - libfdata_tree_t **tree, - intptr_t *data_handle, - int (*free_data_handle)( - intptr_t **data_handle, - libcerror_error_t **error ), - int (*clone_data_handle)( - intptr_t **destination_data_handle, - intptr_t *source_data_handle, - libcerror_error_t **error ), - int (*read_node)( - intptr_t *data_handle, - intptr_t *file_io_handle, - libfdata_tree_node_t *node, - libfdata_cache_t *cache, - int node_file_index, - off64_t node_offset, - size64_t node_size, - uint32_t node_flags, - uint8_t read_flags, - libcerror_error_t **error ), - int (*read_sub_nodes)( - intptr_t *data_handle, - intptr_t *file_io_handle, - libfdata_tree_node_t *node, - libfdata_cache_t *cache, - int sub_nodes_file_index, - off64_t sub_nodes_offset, - size64_t sub_nodes_size, - uint32_t sub_nodes_flags, - uint8_t read_flags, - libcerror_error_t **error ), - uint8_t flags, - libcerror_error_t **error ) -{ - libfdata_internal_tree_t *internal_tree = NULL; - static char *function = "libfdata_tree_initialize"; - - if( tree == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid tree.", - function ); - - return( -1 ); - } - if( *tree != NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, - "%s: invalid tree value already set.", - function ); - - return( -1 ); - } - if( read_node == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid read node function.", - function ); - - return( -1 ); - } - if( read_sub_nodes == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid read sub nodes function.", - function ); - - return( -1 ); - } - internal_tree = memory_allocate_structure( - libfdata_internal_tree_t ); - - if( internal_tree == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_INSUFFICIENT, - "%s: unable to create tree.", - function ); - - goto on_error; - } - if( memory_set( - internal_tree, - 0, - sizeof( libfdata_internal_tree_t ) ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_SET_FAILED, - "%s: unable to clear tree.", - function ); - - goto on_error; - } - internal_tree->flags |= flags; - internal_tree->data_handle = data_handle; - internal_tree->free_data_handle = free_data_handle; - internal_tree->clone_data_handle = clone_data_handle; - internal_tree->read_node = read_node; - internal_tree->read_sub_nodes = read_sub_nodes; - - *tree = (libfdata_tree_t *) internal_tree; - - return( 1 ); - -on_error: - if( internal_tree != NULL ) - { - memory_free( - internal_tree ); - } - return( -1 ); -} - -/* Frees a tree - * Returns 1 if successful or -1 on error - */ -int libfdata_tree_free( - libfdata_tree_t **tree, - libcerror_error_t **error ) -{ - libfdata_internal_tree_t *internal_tree = NULL; - static char *function = "libfdata_tree_free"; - int result = 1; - - if( tree == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid tree.", - function ); - - return( -1 ); - } - if( *tree != NULL ) - { - internal_tree = (libfdata_internal_tree_t *) *tree; - *tree = NULL; - - if( internal_tree->root_node != NULL ) - { - if( libfdata_tree_node_free( - &( internal_tree->root_node ), - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, - "%s: unable to free root node.", - function ); - - result = -1; - } - } - if( ( internal_tree->flags & LIBFDATA_DATA_HANDLE_FLAG_MANAGED ) != 0 ) - { - if( internal_tree->data_handle != NULL ) - { - if( internal_tree->free_data_handle == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, - "%s: invalid list - missing free data handle function.", - function ); - - result = -1; - } - else if( internal_tree->free_data_handle( - &( internal_tree->data_handle ), - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, - "%s: unable to free data handle.", - function ); - - result = -1; - } - } - } - memory_free( - internal_tree ); - } - return( result ); -} - -/* Clones (duplicates) the tree - * Returns 1 if successful or -1 on error - */ -int libfdata_tree_clone( - libfdata_tree_t **destination_tree, - libfdata_tree_t *source_tree, - libcerror_error_t **error ) -{ - libfdata_internal_tree_t *internal_source_tree = NULL; - libfdata_tree_node_t *source_tree_root_node = NULL; - intptr_t *destination_data_handle = NULL; - static char *function = "libfdata_tree_clone"; - off64_t node_offset = 0; - size64_t node_size = 0; - uint32_t node_flags = 0; - int node_file_index = -1; - - if( destination_tree == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid destination tree.", - function ); - - return( -1 ); - } - if( *destination_tree != NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, - "%s: invalid destination tree value already set.", - function ); - - return( -1 ); - } - if( source_tree == NULL ) - { - *destination_tree = NULL; - - return( 1 ); - } - internal_source_tree = (libfdata_internal_tree_t *) source_tree; - - if( internal_source_tree->data_handle != NULL ) - { - if( internal_source_tree->free_data_handle == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, - "%s: invalid source tree - missing free data handle function.", - function ); - - goto on_error; - } - if( internal_source_tree->clone_data_handle == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, - "%s: invalid source tree - missing clone data handle function.", - function ); - - goto on_error; - } - if( internal_source_tree->clone_data_handle( - &destination_data_handle, - internal_source_tree->data_handle, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, - "%s: unable to clone data handle.", - function ); - - goto on_error; - } - } - if( libfdata_tree_initialize( - destination_tree, - destination_data_handle, - internal_source_tree->free_data_handle, - internal_source_tree->clone_data_handle, - internal_source_tree->read_node, - internal_source_tree->read_sub_nodes, - LIBFDATA_DATA_HANDLE_FLAG_MANAGED, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, - "%s: unable to create destination tree.", - function ); - - goto on_error; - } - destination_data_handle = NULL; - - if( libfdata_tree_get_root_node( - source_tree, - &source_tree_root_node, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve source tree root node.", - function ); - - goto on_error; - } - if( libfdata_tree_node_get_data_range( - source_tree_root_node, - &node_file_index, - &node_offset, - &node_size, - &node_flags, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve source tree root node data range.", - function ); - - goto on_error; - } - if( libfdata_tree_set_root_node( - *destination_tree, - node_file_index, - node_offset, - node_size, - node_flags, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to set destination tree root node.", - function ); - - goto on_error; - } - /* TODO or clone all the tree nodes ? */ - - return( 1 ); - -on_error: - if( *destination_tree != NULL ) - { - libfdata_tree_free( - destination_tree, - NULL ); - } - if( destination_data_handle != NULL ) - { - internal_source_tree->free_data_handle( - &destination_data_handle, - NULL ); - } - return( -1 ); -} - -/* Retrieves the node value of the node - * Returns 1 if successful or -1 on error - */ -int libfdata_tree_get_node_value( - libfdata_tree_t *tree, - intptr_t *file_io_handle, - libfdata_cache_t *cache, - libfdata_tree_node_t *node, - intptr_t **node_value, - uint8_t read_flags, - libcerror_error_t **error ) -{ - libfcache_cache_value_t *cache_value = NULL; - libfdata_internal_tree_t *internal_tree = NULL; - static char *function = "libfdata_tree_get_node_value"; - size64_t node_size = 0; - off64_t cache_value_offset = (off64_t) -1; - off64_t node_offset = 0; - int64_t cache_value_timestamp = 0; - int64_t node_timestamp = 0; - uint32_t node_flags = 0; - int cache_entry_index = -1; - int cache_value_file_index = -1; - int node_file_index = -1; - int number_of_cache_entries = 0; - int result = 0; - - if( tree == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid tree.", - function ); - - return( -1 ); - } - internal_tree = (libfdata_internal_tree_t *) tree; - - if( internal_tree->read_node == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, - "%s: invalid tree - missing read node function.", - function ); - - return( -1 ); - } - if( libfdata_tree_node_get_data_range( - node, - &node_file_index, - &node_offset, - &node_size, - &node_flags, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve data range from tree node.", - function ); - - return( -1 ); - } - if( libfcache_cache_get_number_of_entries( - (libfcache_cache_t *) cache, - &number_of_cache_entries, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve number of cache entries.", - function ); - - return( -1 ); - } - if( number_of_cache_entries <= 0 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, - "%s: invalid number of cache entries value out of bounds.", - function ); - - return( -1 ); - } - if( ( read_flags & LIBFDATA_READ_FLAG_IGNORE_CACHE ) == 0 ) - { - if( ( ( ( (libfdata_internal_tree_node_t *) node )->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) == 0 ) - && ( ( ( (libfdata_internal_tree_node_t *) node )->flags & LIBFDATA_TREE_NODE_FLAG_IS_LEAF ) != 0 ) ) - { - cache_entry_index = libfdata_tree_node_calculate_leaf_node_cache_entry_index( - node_offset, - number_of_cache_entries ); - } - else - { - cache_entry_index = libfdata_tree_node_calculate_branch_node_cache_entry_index( - node_offset, - number_of_cache_entries ); - } - if( libfcache_cache_get_value_by_index( - (libfcache_cache_t *) cache, - cache_entry_index, - &cache_value, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve cache entry: %d from cache.", - function, - cache_entry_index ); - - return( -1 ); - } - if( cache_value != NULL ) - { - if( libfdata_tree_node_get_timestamp( - node, - &node_timestamp, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve time stamp from tree node.", - function ); - - return( -1 ); - } - if( libfcache_cache_value_get_identifier( - cache_value, - &cache_value_file_index, - &cache_value_offset, - &cache_value_timestamp, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve cache value identifier.", - function ); - - return( -1 ); - } - } - if( ( node_file_index == cache_value_file_index ) - && ( node_offset == cache_value_offset ) - && ( node_timestamp == cache_value_timestamp ) ) - { - result = 1; - } -#if defined( HAVE_DEBUG_OUTPUT ) - if( libcnotify_verbose != 0 ) - { - if( result == 0 ) - { - libcnotify_printf( - "%s: cache: 0x%08" PRIjx " miss (entry: %d, want: %" PRIi64 ", got: %" PRIi64 ")\n", - function, - (intptr_t) cache, - cache_entry_index, - node_offset, - cache_value_offset ); - } - else - { - libcnotify_printf( - "%s: cache: 0x%08" PRIjx " hit (entry: %d)\n", - function, - (intptr_t) cache, - cache_entry_index ); - } - } -#endif - } - if( result == 0 ) - { -#if defined( HAVE_DEBUG_OUTPUT ) - if( libcnotify_verbose != 0 ) - { - libcnotify_printf( - "%s: reading node at offset: %" PRIi64 " (0x%08" PRIx64 ") of size: %" PRIu64 "\n", - function, - node_offset, - node_offset, - node_size ); - } -#endif - if( internal_tree->read_node( - internal_tree->data_handle, - file_io_handle, - node, - cache, - node_file_index, - node_offset, - node_size, - node_flags, - read_flags, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_IO, - LIBCERROR_IO_ERROR_READ_FAILED, - "%s: unable to read node at offset: 0x%08" PRIx64 ".", - function, - node_offset ); - - return( -1 ); - } - if( ( ( ( (libfdata_internal_tree_node_t *) node )->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) == 0 ) - && ( ( ( (libfdata_internal_tree_node_t *) node )->flags & LIBFDATA_TREE_NODE_FLAG_IS_LEAF ) != 0 ) ) - { - cache_entry_index = libfdata_tree_node_calculate_leaf_node_cache_entry_index( - node_offset, - number_of_cache_entries ); - } - else - { - cache_entry_index = libfdata_tree_node_calculate_branch_node_cache_entry_index( - node_offset, - number_of_cache_entries ); - } - if( libfcache_cache_get_value_by_index( - (libfcache_cache_t *) cache, - cache_entry_index, - &cache_value, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve cache entry: %d from cache.", - function, - cache_entry_index ); - - return( -1 ); - } - if( cache_value != NULL ) - { - if( libfdata_tree_node_get_timestamp( - node, - &node_timestamp, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve time stamp from tree node.", - function ); - - return( -1 ); - } - if( libfcache_cache_value_get_identifier( - cache_value, - &cache_value_file_index, - &cache_value_offset, - &cache_value_timestamp, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve cache value identifier.", - function ); - - return( -1 ); - } - } - if( ( node_file_index != cache_value_file_index ) - || ( node_offset != cache_value_offset ) - || ( node_timestamp != cache_value_timestamp ) ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, - "%s: missing cache value.", - function ); - - return( -1 ); - } - } - if( libfcache_cache_value_get_value( - cache_value, - node_value, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve node value.", - function ); - - return( -1 ); - } - return( 1 ); -} - -/* Sets the node value of the node - * - * If the flag LIBFDATA_TREE_NODE_VALUE_FLAG_MANAGED is set the tree - * takes over management of the value and the value is freed when - * no longer needed. - * - * Returns 1 if successful or -1 on error - */ -int libfdata_tree_set_node_value( - libfdata_tree_t *tree, - libfdata_cache_t *cache, - libfdata_tree_node_t *node, - intptr_t *node_value, - int (*free_node_value)( - intptr_t **node_value, - libcerror_error_t **error ), - uint8_t flags, - libcerror_error_t **error ) -{ - static char *function = "libfdata_tree_set_node_value"; - size64_t node_size = 0; - off64_t node_offset = 0; - int64_t node_timestamp = 0; - uint32_t node_flags = 0; - int cache_entry_index = -1; - int node_file_index = -1; - int number_of_cache_entries = 0; - - if( tree == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid tree.", - function ); - - return( -1 ); - } - if( libfdata_tree_node_get_data_range( - node, - &node_file_index, - &node_offset, - &node_size, - &node_flags, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve data range from tree node.", - function ); - - return( -1 ); - } - if( libfdata_tree_node_get_timestamp( - node, - &node_timestamp, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve timestamp from tree node.", - function ); - - return( -1 ); - } - if( libfcache_cache_get_number_of_entries( - (libfcache_cache_t *) cache, - &number_of_cache_entries, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve number of cache entries.", - function ); - - return( -1 ); - } - if( number_of_cache_entries <= 0 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, - "%s: invalid number of cache entries value out of bounds.", - function ); - - return( -1 ); - } - if( ( ( ( (libfdata_internal_tree_node_t *) node )->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) == 0 ) - && ( ( ( (libfdata_internal_tree_node_t *) node )->flags & LIBFDATA_TREE_NODE_FLAG_IS_LEAF ) != 0 ) ) - { - cache_entry_index = libfdata_tree_node_calculate_leaf_node_cache_entry_index( - node_offset, - number_of_cache_entries ); - } - else - { - cache_entry_index = libfdata_tree_node_calculate_branch_node_cache_entry_index( - node_offset, - number_of_cache_entries ); - } - if( libfcache_cache_set_value_by_index( - (libfcache_cache_t *) cache, - cache_entry_index, - node_file_index, - node_offset, - node_timestamp, - node_value, - free_node_value, - flags, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to set value in cache entry: %d.", - function, - cache_entry_index ); - - return( -1 ); - } - return( 1 ); -} - -/* Reads the sub nodes of the node - * Returns 1 if successful or -1 on error - */ -int libfdata_tree_read_sub_nodes( - libfdata_tree_t *tree, - intptr_t *file_io_handle, - libfdata_cache_t *cache, - libfdata_tree_node_t *node, - uint8_t read_flags, - libcerror_error_t **error ) -{ - libfdata_internal_tree_t *internal_tree = NULL; - static char *function = "libfdata_tree_read_sub_nodes"; - off64_t sub_nodes_offset = 0; - size64_t sub_nodes_size = 0; - uint32_t sub_nodes_flags = 0; - int sub_nodes_file_index = -1; - - if( tree == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid tree.", - function ); - - return( -1 ); - } - internal_tree = (libfdata_internal_tree_t *) tree; - - if( internal_tree->read_sub_nodes == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, - "%s: invalid tree - missing read sub nodes function.", - function ); - - return( -1 ); - } - if( libfdata_tree_node_get_sub_nodes_data_range( - node, - &sub_nodes_file_index, - &sub_nodes_offset, - &sub_nodes_size, - &sub_nodes_flags, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve sub nodes data range.", - function ); - - return( -1 ); - } - if( internal_tree->read_sub_nodes( - internal_tree->data_handle, - file_io_handle, - node, - cache, - sub_nodes_file_index, - sub_nodes_offset, - sub_nodes_size, - sub_nodes_flags, - read_flags, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_IO, - LIBCERROR_IO_ERROR_READ_FAILED, - "%s: unable to read sub nodes at offset: 0x%08" PRIx64 ".", - function, - sub_nodes_offset ); - - return( -1 ); - } - return( 1 ); -} - -/* Retrieves the offset and size of the root node - * Returns 1 if successful or -1 on error - */ -int libfdata_tree_get_root_node( - libfdata_tree_t *tree, - libfdata_tree_node_t **root_node, - libcerror_error_t **error ) -{ - libfdata_internal_tree_t *internal_tree = NULL; - static char *function = "libfdata_tree_get_root_node"; - - if( tree == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid tree.", - function ); - - return( -1 ); - } - internal_tree = (libfdata_internal_tree_t *) tree; - - if( root_node == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid root node.", - function ); - - return( -1 ); - } - *root_node = internal_tree->root_node; - - return( 1 ); -} - -/* Sets the root node - * Returns 1 if successful or -1 on error - */ -int libfdata_tree_set_root_node( - libfdata_tree_t *tree, - int node_file_index, - off64_t node_offset, - size64_t node_size, - uint32_t node_flags, - libcerror_error_t **error ) -{ - libfdata_internal_tree_t *internal_tree = NULL; - static char *function = "libfdata_tree_set_root_node"; - - if( tree == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid tree.", - function ); - - return( -1 ); - } - internal_tree = (libfdata_internal_tree_t *) tree; - - if( internal_tree->root_node == NULL ) - { - if( libfdata_tree_node_initialize( - &( internal_tree->root_node ), - tree, - NULL, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, - "%s: unable to create root node.", - function ); - - return( -1 ); - } - } - if( libfdata_tree_node_set_data_range( - internal_tree->root_node, - node_file_index, - node_offset, - node_size, - node_flags, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to set root node data range.", - function ); - - return( -1 ); - } - return( 1 ); -} - -/* Retrieves the number of leaf nodes in the tree - * Returns 1 if successful or -1 on error - */ -int libfdata_tree_get_number_of_leaf_nodes( - libfdata_tree_t *tree, - intptr_t *file_io_handle, - libfdata_cache_t *cache, - int *number_of_leaf_nodes, - uint8_t read_flags, - libcerror_error_t **error ) -{ - libfdata_internal_tree_t *internal_tree = NULL; - static char *function = "libfdata_tree_get_number_of_leaf_nodes"; - - if( tree == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid tree.", - function ); - - return( -1 ); - } - internal_tree = (libfdata_internal_tree_t *) tree; - - if( libfdata_tree_node_get_number_of_leaf_nodes( - internal_tree->root_node, - file_io_handle, - cache, - number_of_leaf_nodes, - read_flags, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve number of leaf nodes from root node.", - function ); - - return( -1 ); - } - return( 1 ); -} - -/* Retrieves a leaf nodes at a specific index - * Returns 1 if successful or -1 on error - */ -int libfdata_tree_get_leaf_node_by_index( - libfdata_tree_t *tree, - intptr_t *file_io_handle, - libfdata_cache_t *cache, - int leaf_node_index, - libfdata_tree_node_t **leaf_node, - uint8_t read_flags, - libcerror_error_t **error ) -{ - libfdata_internal_tree_t *internal_tree = NULL; - static char *function = "libfdata_tree_get_leaf_node_by_index"; - - if( tree == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid tree.", - function ); - - return( -1 ); - } - internal_tree = (libfdata_internal_tree_t *) tree; - - if( libfdata_tree_node_get_leaf_node_by_index( - internal_tree->root_node, - file_io_handle, - cache, - leaf_node_index, - leaf_node, - read_flags, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve leaf node: %d from root node.", - function, - leaf_node_index ); - - return( -1 ); - } - return( 1 ); -} - -/* Retrieves the number of deleted leaf nodes in the tree - * Returns 1 if successful or -1 on error - */ -int libfdata_tree_get_number_of_deleted_leaf_nodes( - libfdata_tree_t *tree, - intptr_t *file_io_handle, - libfdata_cache_t *cache, - int *number_of_deleted_leaf_nodes, - uint8_t read_flags, - libcerror_error_t **error ) -{ - libfdata_internal_tree_t *internal_tree = NULL; - static char *function = "libfdata_tree_get_number_of_deleted_leaf_nodes"; - - if( tree == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid tree.", - function ); - - return( -1 ); - } - internal_tree = (libfdata_internal_tree_t *) tree; - - if( libfdata_tree_node_get_number_of_deleted_leaf_nodes( - internal_tree->root_node, - file_io_handle, - cache, - number_of_deleted_leaf_nodes, - read_flags, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve number of deleted leaf nodes from root node.", - function ); - - return( -1 ); - } - return( 1 ); -} - -/* Retrieves a deleted leaf nodes at a specific index - * Returns 1 if successful or -1 on error - */ -int libfdata_tree_get_deleted_leaf_node_by_index( - libfdata_tree_t *tree, - intptr_t *file_io_handle, - libfdata_cache_t *cache, - int deleted_leaf_node_index, - libfdata_tree_node_t **deleted_leaf_node, - uint8_t read_flags, - libcerror_error_t **error ) -{ - libfdata_internal_tree_t *internal_tree = NULL; - static char *function = "libfdata_tree_get_deleted_leaf_node_by_index"; - - if( tree == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid tree.", - function ); - - return( -1 ); - } - internal_tree = (libfdata_internal_tree_t *) tree; - - if( libfdata_tree_node_get_deleted_leaf_node_by_index( - internal_tree->root_node, - file_io_handle, - cache, - deleted_leaf_node_index, - deleted_leaf_node, - read_flags, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve number of deleted leaf node: %d from root node.", - function, - deleted_leaf_node_index ); - - return( -1 ); - } - return( 1 ); -} - diff -Nru libfshfs-20201104/libfdata/libfdata_tree.h libfshfs-20240221/libfdata/libfdata_tree.h --- libfshfs-20201104/libfdata/libfdata_tree.h 2020-11-04 11:56:03.000000000 +0000 +++ libfshfs-20240221/libfdata/libfdata_tree.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,246 +0,0 @@ -/* - * The tree functions - * - * Copyright (C) 2010-2020, Joachim Metz - * - * Refer to AUTHORS for acknowledgements. - * - * This program 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 3 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - */ - -#if !defined( _LIBFDATA_INTERNAL_TREE_H ) -#define _LIBFDATA_INTERNAL_TREE_H - -#include -#include - -#include "libfdata_extern.h" -#include "libfdata_libcerror.h" -#include "libfdata_libfcache.h" -#include "libfdata_types.h" - -#if defined( __cplusplus ) -extern "C" { -#endif - -typedef struct libfdata_internal_tree libfdata_internal_tree_t; - -struct libfdata_internal_tree -{ - /* The root node - */ - libfdata_tree_node_t *root_node; - - /* The flags - */ - uint8_t flags; - - /* The calculate cache entry index value - */ - int (*calculate_cache_entry_index)( - int node_index, - int node_file_index, - off64_t node_offset, - size64_t node_size, - uint32_t node_flags, - int number_of_cache_entries ); - - /* The data handle - */ - intptr_t *data_handle; - - /* The free data handle function - */ - int (*free_data_handle)( - intptr_t **data_handle, - libcerror_error_t **error ); - - /* The clone (duplicate) data handle function - */ - int (*clone_data_handle)( - intptr_t **destination_data_handle, - intptr_t *source_data_handle, - libcerror_error_t **error ); - - /* The read node function - */ - int (*read_node)( - intptr_t *data_handle, - intptr_t *file_io_handle, - libfdata_tree_node_t *node, - libfdata_cache_t *cache, - int node_file_index, - off64_t node_offset, - size64_t node_size, - uint32_t node_flags, - uint8_t read_flags, - libcerror_error_t **error ); - - /* The read sub nodes function - */ - int (*read_sub_nodes)( - intptr_t *data_handle, - intptr_t *file_io_handle, - libfdata_tree_node_t *node, - libfdata_cache_t *cache, - int sub_nodes_file_index, - off64_t sub_nodes_offset, - size64_t sub_nodes_size, - uint32_t sub_nodes_flags, - uint8_t read_flags, - libcerror_error_t **error ); -}; - -LIBFDATA_EXTERN \ -int libfdata_tree_initialize( - libfdata_tree_t **tree, - intptr_t *data_handle, - int (*free_data_handle)( - intptr_t **data_handle, - libcerror_error_t **error ), - int (*clone_data_handle)( - intptr_t **destination_data_handle, - intptr_t *source_data_handle, - libcerror_error_t **error ), - int (*read_node)( - intptr_t *data_handle, - intptr_t *file_io_handle, - libfdata_tree_node_t *node, - libfdata_cache_t *cache, - int node_file_index, - off64_t node_offset, - size64_t node_size, - uint32_t node_flags, - uint8_t read_flags, - libcerror_error_t **error ), - int (*read_sub_nodes)( - intptr_t *data_handle, - intptr_t *file_io_handle, - libfdata_tree_node_t *node, - libfdata_cache_t *cache, - int sub_nodes_file_index, - off64_t sub_nodes_offset, - size64_t sub_nodes_size, - uint32_t sub_nodes_flags, - uint8_t read_flags, - libcerror_error_t **error ), - uint8_t flags, - libcerror_error_t **error ); - -LIBFDATA_EXTERN \ -int libfdata_tree_free( - libfdata_tree_t **tree, - libcerror_error_t **error ); - -LIBFDATA_EXTERN \ -int libfdata_tree_clone( - libfdata_tree_t **destination_tree, - libfdata_tree_t *source_tree, - libcerror_error_t **error ); - -/* Node value functions - */ -int libfdata_tree_get_node_value( - libfdata_tree_t *tree, - intptr_t *file_io_handle, - libfdata_cache_t *cache, - libfdata_tree_node_t *node, - intptr_t **node_value, - uint8_t read_flags, - libcerror_error_t **error ); - -int libfdata_tree_set_node_value( - libfdata_tree_t *tree, - libfdata_cache_t *cache, - libfdata_tree_node_t *node, - intptr_t *node_value, - int (*free_node_value)( - intptr_t **node_value, - libcerror_error_t **error ), - uint8_t flags, - libcerror_error_t **error ); - -/* Sub node functions - */ -int libfdata_tree_read_sub_nodes( - libfdata_tree_t *tree, - intptr_t *file_io_handle, - libfdata_cache_t *cache, - libfdata_tree_node_t *node, - uint8_t read_flags, - libcerror_error_t **error ); - -/* Root node functions - */ -LIBFDATA_EXTERN \ -int libfdata_tree_get_root_node( - libfdata_tree_t *tree, - libfdata_tree_node_t **root_node, - libcerror_error_t **error ); - -LIBFDATA_EXTERN \ -int libfdata_tree_set_root_node( - libfdata_tree_t *tree, - int node_file_index, - off64_t node_offset, - size64_t node_size, - uint32_t node_flags, - libcerror_error_t **error ); - -/* Leaf node functions - */ -LIBFDATA_EXTERN \ -int libfdata_tree_get_number_of_leaf_nodes( - libfdata_tree_t *tree, - intptr_t *file_io_handle, - libfdata_cache_t *cache, - int *number_of_leaf_nodes, - uint8_t read_flags, - libcerror_error_t **error ); - -LIBFDATA_EXTERN \ -int libfdata_tree_get_leaf_node_by_index( - libfdata_tree_t *tree, - intptr_t *file_io_handle, - libfdata_cache_t *cache, - int leaf_node_index, - libfdata_tree_node_t **leaf_node, - uint8_t read_flags, - libcerror_error_t **error ); - -LIBFDATA_EXTERN \ -int libfdata_tree_get_number_of_deleted_leaf_nodes( - libfdata_tree_t *tree, - intptr_t *file_io_handle, - libfdata_cache_t *cache, - int *number_of_deleted_leaf_nodes, - uint8_t read_flags, - libcerror_error_t **error ); - -LIBFDATA_EXTERN \ -int libfdata_tree_get_deleted_leaf_node_by_index( - libfdata_tree_t *tree, - intptr_t *file_io_handle, - libfdata_cache_t *cache, - int deleted_leaf_node_index, - libfdata_tree_node_t **deleted_leaf_node, - uint8_t read_flags, - libcerror_error_t **error ); - -#if defined( __cplusplus ) -} -#endif - -#endif /* !defined( _LIBFDATA_INTERNAL_TREE_H ) */ - diff -Nru libfshfs-20201104/libfdata/libfdata_tree_node.c libfshfs-20240221/libfdata/libfdata_tree_node.c --- libfshfs-20201104/libfdata/libfdata_tree_node.c 2020-11-04 11:56:03.000000000 +0000 +++ libfshfs-20240221/libfdata/libfdata_tree_node.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,3461 +0,0 @@ -/* - * The tree node functions - * - * Copyright (C) 2010-2020, Joachim Metz - * - * Refer to AUTHORS for acknowledgements. - * - * This program 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 3 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - */ - -#include -#include -#include - -#include "libfdata_definitions.h" -#include "libfdata_libcdata.h" -#include "libfdata_libcerror.h" -#include "libfdata_libfcache.h" -#include "libfdata_range.h" -#include "libfdata_tree_node.h" -#include "libfdata_types.h" - -/* Creates a node - * Make sure the value node is referencing, is set to NULL - * Returns 1 if successful or -1 on error - */ -int libfdata_tree_node_initialize( - libfdata_tree_node_t **node, - libfdata_tree_t *tree, - libfdata_tree_node_t *parent_node, - libcerror_error_t **error ) -{ - libfdata_internal_tree_node_t *internal_tree_node = NULL; - static char *function = "libfdata_tree_node_initialize"; - - if( node == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid node.", - function ); - - return( -1 ); - } - if( *node != NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, - "%s: invalid node value already set.", - function ); - - return( -1 ); - } - if( tree == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid tree.", - function ); - - return( -1 ); - } - internal_tree_node = memory_allocate_structure( - libfdata_internal_tree_node_t ); - - if( internal_tree_node == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_INSUFFICIENT, - "%s: unable to create node.", - function ); - - goto on_error; - } - if( memory_set( - internal_tree_node, - 0, - sizeof( libfdata_internal_tree_node_t ) ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_SET_FAILED, - "%s: unable to clear node.", - function ); - - memory_free( - internal_tree_node ); - - return( -1 ); - } - if( libfdata_range_initialize( - &( internal_tree_node->node_data_range ), - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, - "%s: unable to create node data range.", - function ); - - goto on_error; - } - if( libfdata_range_initialize( - &( internal_tree_node->sub_nodes_data_range ), - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, - "%s: unable to create sub nodes data range.", - function ); - - goto on_error; - } - if( libcdata_array_initialize( - &( internal_tree_node->sub_nodes ), - 0, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, - "%s: unable to create sub nodes array.", - function ); - - goto on_error; - } - if( libfcache_date_time_get_timestamp( - &( internal_tree_node->timestamp ), - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve cache timestamp.", - function ); - - goto on_error; - } - internal_tree_node->tree = tree; - internal_tree_node->parent_node = parent_node; - internal_tree_node->flags = LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES; - - *node = (libfdata_tree_node_t *) internal_tree_node; - - return( 1 ); - -on_error: - if( internal_tree_node != NULL ) - { - if( internal_tree_node->sub_nodes != NULL ) - { - libcdata_array_free( - &( internal_tree_node->sub_nodes ), - NULL, - NULL ); - } - if( internal_tree_node->sub_nodes_data_range != NULL ) - { - libfdata_range_free( - &( internal_tree_node->sub_nodes_data_range ), - NULL ); - } - if( internal_tree_node->node_data_range != NULL ) - { - libfdata_range_free( - &( internal_tree_node->node_data_range ), - NULL ); - } - memory_free( - internal_tree_node ); - } - return( -1 ); -} - -/* Frees a node - * Returns 1 if successful or -1 on error - */ -int libfdata_tree_node_free( - libfdata_tree_node_t **node, - libcerror_error_t **error ) -{ - libfdata_internal_tree_node_t *internal_tree_node = NULL; - static char *function = "libfdata_tree_node_free"; - int result = 1; - - if( node == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid node.", - function ); - - return( -1 ); - } - if( *node != NULL ) - { - internal_tree_node = (libfdata_internal_tree_node_t *) *node; - *node = NULL; - - if( internal_tree_node->node_data_range != NULL ) - { - if( libfdata_range_free( - &( internal_tree_node->node_data_range ), - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, - "%s: unable to free node data range.", - function ); - - result = -1; - } - } - if( internal_tree_node->sub_nodes_data_range != NULL ) - { - if( libfdata_range_free( - &( internal_tree_node->sub_nodes_data_range ), - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, - "%s: unable to free sub nodes data range.", - function ); - - result = -1; - } - } - if( libcdata_array_free( - &( internal_tree_node->sub_nodes ), - (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_tree_node_free, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, - "%s: unable to free the sub nodes array.", - function ); - - result = -1; - } - memory_free( - internal_tree_node ); - } - return( result ); -} - -/* Frees a node, but not its sub nodes - * Returns 1 if successful or -1 on error - */ -int libfdata_tree_node_free_single( - libfdata_tree_node_t **node, - libcerror_error_t **error ) -{ - libfdata_internal_tree_node_t *internal_tree_node = NULL; - static char *function = "libfdata_tree_node_free_single"; - int result = 1; - - if( node == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid node.", - function ); - - return( -1 ); - } - if( *node != NULL ) - { - internal_tree_node = (libfdata_internal_tree_node_t *) node; - *node = NULL; - - if( libcdata_array_free( - &( internal_tree_node->sub_nodes ), - NULL, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, - "%s: unable to free the sub nodes array.", - function ); - - result = -1; - } - memory_free( - internal_tree_node ); - } - return( result ); -} - -/* Sets the parent node - * Returns 1 if successful or -1 on error - */ -int libfdata_tree_node_set_parent_node( - libfdata_tree_node_t *node, - libfdata_tree_node_t *parent_node, - libcerror_error_t **error ) -{ - libfdata_internal_tree_node_t *internal_tree_node = NULL; - static char *function = "libfdata_tree_node_set_parent_node"; - - if( node == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid node.", - function ); - - return( -1 ); - } - internal_tree_node = (libfdata_internal_tree_node_t *) node; - - internal_tree_node->parent_node = parent_node; - - return( 1 ); -} - -/* Determines if the node is a root node - * Returns 1 if a root node, 0 if not or -1 on error - */ -int libfdata_tree_node_is_root( - libfdata_tree_node_t *node, - libcerror_error_t **error ) -{ - libfdata_internal_tree_node_t *internal_tree_node = NULL; - static char *function = "libfdata_tree_node_is_root"; - - if( node == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid node.", - function ); - - return( -1 ); - } - internal_tree_node = (libfdata_internal_tree_node_t *) node; - - if( internal_tree_node->parent_node == NULL ) - { - return( 1 ); - } - return( 0 ); -} - -/* Retrieves the data offset and size - * Returns 1 if successful or -1 on error - */ -int libfdata_tree_node_get_data_range( - libfdata_tree_node_t *node, - int *node_file_index, - off64_t *node_offset, - size64_t *node_size, - uint32_t *node_flags, - libcerror_error_t **error ) -{ - libfdata_internal_tree_node_t *internal_tree_node = NULL; - static char *function = "libfdata_tree_node_get_data_range"; - - if( node == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid node.", - function ); - - return( -1 ); - } - internal_tree_node = (libfdata_internal_tree_node_t *) node; - - if( libfdata_range_get( - internal_tree_node->node_data_range, - node_file_index, - node_offset, - node_size, - node_flags, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve node data range.", - function ); - - return( -1 ); - } - return( 1 ); -} - -/* Sets the data offset and size - * Returns 1 if successful or -1 on error - */ -int libfdata_tree_node_set_data_range( - libfdata_tree_node_t *node, - int node_file_index, - off64_t node_offset, - size64_t node_size, - uint32_t node_flags, - libcerror_error_t **error ) -{ - libfdata_internal_tree_node_t *internal_tree_node = NULL; - static char *function = "libfdata_tree_node_set_data_range"; - - if( node == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid node.", - function ); - - return( -1 ); - } - internal_tree_node = (libfdata_internal_tree_node_t *) node; - - if( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) != 0 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, - "%s: invalid node - node is virtual.", - function ); - - return( -1 ); - } - if( libfdata_range_set( - internal_tree_node->node_data_range, - node_file_index, - node_offset, - node_size, - node_flags, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to set node data range.", - function ); - - return( -1 ); - } - if( libfcache_date_time_get_timestamp( - &( internal_tree_node->timestamp ), - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve cache timestamp.", - function ); - - return( -1 ); - } - return( 1 ); -} - -/* Determines if the sub nodes data range has been set - * Returns 1 if sub nodes have been set, 0 if not or -1 on error - */ -int libfdata_tree_node_sub_nodes_data_range_is_set( - libfdata_tree_node_t *node, - libcerror_error_t **error ) -{ - libfdata_internal_tree_node_t *internal_tree_node = NULL; - static char *function = "libfdata_tree_node_sub_nodes_data_range_is_set"; - - if( node == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid node.", - function ); - - return( -1 ); - } - internal_tree_node = (libfdata_internal_tree_node_t *) node; - - if( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_SUB_NODES_DATA_RANGE_SET ) != 0 ) - { - return( 1 ); - } - return( 0 ); -} - -/* Retrieves the sub nodes data range - * Returns 1 if successful or -1 on error - */ -int libfdata_tree_node_get_sub_nodes_data_range( - libfdata_tree_node_t *node, - int *sub_nodes_file_index, - off64_t *sub_nodes_offset, - size64_t *sub_nodes_size, - uint32_t *sub_nodes_flags, - libcerror_error_t **error ) -{ - libfdata_internal_tree_node_t *internal_tree_node = NULL; - static char *function = "libfdata_tree_node_get_sub_nodes_data_range"; - - if( node == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid node.", - function ); - - return( -1 ); - } - internal_tree_node = (libfdata_internal_tree_node_t *) node; - - if( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_SUB_NODES_DATA_RANGE_SET ) == 0 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, - "%s: invalid node - sub nodes range has not been set.", - function ); - - return( -1 ); - } - if( libfdata_range_get( - internal_tree_node->sub_nodes_data_range, - sub_nodes_file_index, - sub_nodes_offset, - sub_nodes_size, - sub_nodes_flags, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve sub nodes data range.", - function ); - - return( -1 ); - } - return( 1 ); -} - -/* Sets the sub nodes data range - * The sub nodes data range cannot be set after the sub nodes have been read - * Returns 1 if successful or -1 on error - */ -int libfdata_tree_node_set_sub_nodes_data_range( - libfdata_tree_node_t *node, - int sub_nodes_file_index, - off64_t sub_nodes_offset, - size64_t sub_nodes_size, - uint32_t sub_nodes_flags, - libcerror_error_t **error ) -{ - libfdata_internal_tree_node_t *internal_tree_node = NULL; - static char *function = "libfdata_tree_node_set_sub_nodes_data_range"; - - if( node == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid node.", - function ); - - return( -1 ); - } - internal_tree_node = (libfdata_internal_tree_node_t *) node; - - if( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) != 0 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, - "%s: invalid node - node is virtual.", - function ); - - return( -1 ); - } - if( ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) == 0 ) - && ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_LEAF ) != 0 ) ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, - "%s: invalid node - node is a leaf.", - function ); - - return( -1 ); - } - if( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_SUB_NODES_READ ) != 0 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, - "%s: invalid node - sub nodes range has already been read.", - function ); - - return( -1 ); - } - if( libfdata_range_set( - internal_tree_node->sub_nodes_data_range, - sub_nodes_file_index, - sub_nodes_offset, - sub_nodes_size, - sub_nodes_flags, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to set sub nodes data range.", - function ); - - return( -1 ); - } - internal_tree_node->flags |= LIBFDATA_TREE_NODE_FLAG_SUB_NODES_DATA_RANGE_SET; - - return( 1 ); -} - -/* Retrieves the time stamp - * Returns 1 if successful or -1 on error - */ -int libfdata_tree_node_get_timestamp( - libfdata_tree_node_t *node, - int64_t *timestamp, - libcerror_error_t **error ) -{ - libfdata_internal_tree_node_t *internal_tree_node = NULL; - static char *function = "libfdata_tree_node_get_timestamp"; - - if( node == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid node.", - function ); - - return( -1 ); - } - internal_tree_node = (libfdata_internal_tree_node_t *) node; - - if( timestamp == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid node time stamp.", - function ); - - return( -1 ); - } - *timestamp = internal_tree_node->timestamp; - - return( 1 ); -} - -/* Retrieves the first leaf node index - * Returns 1 if successful or -1 on error - */ -int libfdata_tree_node_get_first_leaf_node_index( - libfdata_tree_node_t *node, - int *first_leaf_node_index, - int *deleted_first_leaf_node_index, - libcerror_error_t **error ) -{ - libfdata_internal_tree_node_t *internal_tree_node = NULL; - static char *function = "libfdata_tree_node_get_first_leaf_node_index"; - - if( node == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid node.", - function ); - - return( -1 ); - } - internal_tree_node = (libfdata_internal_tree_node_t *) node; - - if( first_leaf_node_index == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid first leaf node index.", - function ); - - return( -1 ); - } - if( deleted_first_leaf_node_index == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid first deleted leaf node index.", - function ); - - return( -1 ); - } - *first_leaf_node_index = internal_tree_node->first_leaf_node_index; - *deleted_first_leaf_node_index = internal_tree_node->first_deleted_leaf_node_index; - - return( 1 ); -} - -/* Sets the first leaf node index - * Returns 1 if successful or -1 on error - */ -int libfdata_tree_node_set_first_leaf_node_index( - libfdata_tree_node_t *node, - int first_leaf_node_index, - int first_deleted_leaf_node_index, - libcerror_error_t **error ) -{ - libfdata_internal_tree_node_t *internal_tree_node = NULL; - static char *function = "libfdata_tree_node_set_first_leaf_node_index"; - - if( node == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid node.", - function ); - - return( -1 ); - } - internal_tree_node = (libfdata_internal_tree_node_t *) node; - - if( first_leaf_node_index < 0 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO, - "%s: invalid first leaf node index value less than zero.", - function ); - - return( -1 ); - } - if( first_deleted_leaf_node_index < 0 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO, - "%s: invalid first deleted leaf node index value less than zero.", - function ); - - return( -1 ); - } - internal_tree_node->first_leaf_node_index = first_leaf_node_index; - internal_tree_node->first_deleted_leaf_node_index = first_deleted_leaf_node_index; - - return( 1 ); -} - -/* Retrieves the node value - * Returns 1 if successful or -1 on error - */ -int libfdata_tree_node_get_node_value( - libfdata_tree_node_t *node, - intptr_t *file_io_handle, - libfdata_cache_t *cache, - intptr_t **node_value, - uint8_t read_flags, - libcerror_error_t **error ) -{ - libfdata_internal_tree_node_t *internal_tree_node = NULL; - static char *function = "libfdata_tree_node_get_node_value"; - - if( node == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid node.", - function ); - - return( -1 ); - } - internal_tree_node = (libfdata_internal_tree_node_t *) node; - - if( libfdata_tree_get_node_value( - internal_tree_node->tree, - file_io_handle, - cache, - node, - node_value, - read_flags, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve node value.", - function ); - - return( -1 ); - } - internal_tree_node->flags |= LIBFDATA_TREE_NODE_FLAG_NOTE_DATA_READ; - - return( 1 ); -} - -/* Sets the node value - * - * If the flag LIBFDATA_TREE_NODE_VALUE_FLAG_MANAGED is set the node - * takes over management of the value and the value is freed when - * no longer needed. - * - * Returns 1 if successful or -1 on error - */ -int libfdata_tree_node_set_node_value( - libfdata_tree_node_t *node, - libfdata_cache_t *cache, - intptr_t *node_value, - int (*free_node_value)( - intptr_t **node_value, - libcerror_error_t **error ), - uint8_t flags, - libcerror_error_t **error ) -{ - libfdata_internal_tree_node_t *internal_tree_node = NULL; - static char *function = "libfdata_tree_node_set_node_value"; - - if( node == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid node.", - function ); - - return( -1 ); - } - internal_tree_node = (libfdata_internal_tree_node_t *) node; - - if( libfdata_tree_set_node_value( - internal_tree_node->tree, - cache, - node, - node_value, - free_node_value, - flags, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to set node value.", - function ); - - return( -1 ); - } - return( 1 ); -} - -/* Resizes the sub nodes - * Returns 1 if successful or -1 on error - */ -int libfdata_tree_node_resize_sub_nodes( - libfdata_tree_node_t *node, - int number_of_sub_nodes, - libcerror_error_t **error ) -{ - libfdata_internal_tree_node_t *internal_tree_node = NULL; - static char *function = "libfdata_tree_node_resize_sub_nodes"; - - if( node == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid node.", - function ); - - return( -1 ); - } - internal_tree_node = (libfdata_internal_tree_node_t *) node; - - if( ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) == 0 ) - && ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_LEAF ) != 0 ) ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, - "%s: invalid node - node is a leaf.", - function ); - - return( -1 ); - } - if( libcdata_array_resize( - internal_tree_node->sub_nodes, - number_of_sub_nodes, - (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_tree_node_free_single, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, - "%s: unable to resize sub nodes array.", - function ); - - return( -1 ); - } - return( 1 ); -} - -/* Retrieves the number of sub nodes - * Returns 1 if successful or -1 on error - */ -int libfdata_tree_node_get_number_of_sub_nodes( - libfdata_tree_node_t *node, - intptr_t *file_io_handle, - libfdata_cache_t *cache, - int *number_of_sub_nodes, - uint8_t read_flags, - libcerror_error_t **error ) -{ - libfdata_internal_tree_node_t *internal_tree_node = NULL; - intptr_t *node_value = NULL; - static char *function = "libfdata_tree_node_get_number_of_sub_nodes"; - - if( node == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid node.", - function ); - - return( -1 ); - } - internal_tree_node = (libfdata_internal_tree_node_t *) node; - - if( ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) == 0 ) - && ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_SUB_NODES_READ ) == 0 ) ) - { - /* Make sure the node data is read before the sub nodes - */ - if( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_NOTE_DATA_READ ) == 0 ) - { - if( libfdata_tree_get_node_value( - internal_tree_node->tree, - file_io_handle, - cache, - node, - &node_value, - read_flags, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve node value.", - function ); - - return( -1 ); - } - internal_tree_node->flags |= LIBFDATA_TREE_NODE_FLAG_NOTE_DATA_READ; - } - if( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_SUB_NODES_DATA_RANGE_SET ) != 0 ) - { - if( libfdata_tree_read_sub_nodes( - internal_tree_node->tree, - file_io_handle, - cache, - node, - read_flags, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_IO, - LIBCERROR_IO_ERROR_READ_FAILED, - "%s: unable to read sub nodes.", - function ); - - return( -1 ); - } - } - internal_tree_node->flags |= LIBFDATA_TREE_NODE_FLAG_SUB_NODES_READ; - } - if( libcdata_array_get_number_of_entries( - internal_tree_node->sub_nodes, - number_of_sub_nodes, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve number of entries from sub nodes array.", - function ); - - return( -1 ); - } - return( 1 ); -} - -/* Retrieves a specific sub node - * Returns 1 if successful or -1 on error - */ -int libfdata_tree_node_get_sub_node_by_index( - libfdata_tree_node_t *node, - intptr_t *file_io_handle, - libfdata_cache_t *cache, - int sub_node_index, - libfdata_tree_node_t **sub_node, - uint8_t read_flags, - libcerror_error_t **error ) -{ - libfdata_internal_tree_node_t *internal_tree_node = NULL; - intptr_t *node_value = NULL; - static char *function = "libfdata_tree_node_get_sub_node_by_index"; - - if( node == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid node.", - function ); - - return( -1 ); - } - internal_tree_node = (libfdata_internal_tree_node_t *) node; - - if( ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) == 0 ) - && ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_LEAF ) != 0 ) ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, - "%s: invalid node - node is a leaf.", - function ); - - return( -1 ); - } - if( ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) == 0 ) - && ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_SUB_NODES_READ ) == 0 ) ) - { - /* Make sure the node data is read before the sub nodes - */ - if( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_NOTE_DATA_READ ) == 0 ) - { - if( libfdata_tree_get_node_value( - internal_tree_node->tree, - file_io_handle, - cache, - node, - &node_value, - read_flags, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve node value.", - function ); - - return( -1 ); - } - internal_tree_node->flags |= LIBFDATA_TREE_NODE_FLAG_NOTE_DATA_READ; - } - if( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_SUB_NODES_DATA_RANGE_SET ) != 0 ) - { - if( libfdata_tree_read_sub_nodes( - internal_tree_node->tree, - file_io_handle, - cache, - node, - read_flags, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_IO, - LIBCERROR_IO_ERROR_READ_FAILED, - "%s: unable to read sub nodes.", - function ); - - return( -1 ); - } - } - internal_tree_node->flags |= LIBFDATA_TREE_NODE_FLAG_SUB_NODES_READ; - } - if( libcdata_array_get_entry_by_index( - internal_tree_node->sub_nodes, - sub_node_index, - (intptr_t **) sub_node, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve entry: %d from sub nodes array.", - function, - sub_node_index ); - - return( -1 ); - } - return( 1 ); -} - -/* Sets the offset and size of a specific sub node - * Returns 1 if successful or -1 on error - */ -int libfdata_tree_node_set_sub_node_by_index( - libfdata_tree_node_t *node, - int sub_node_index, - int node_file_index, - off64_t node_offset, - size64_t node_size, - uint32_t node_flags, - libcerror_error_t **error ) -{ - libfdata_internal_tree_node_t *internal_tree_node = NULL; - libfdata_tree_node_t *sub_node = NULL; - static char *function = "libfdata_tree_node_set_sub_node_by_index"; - off64_t previous_node_offset = 0; - size64_t previous_node_size = 0; - uint32_t previous_node_flags = 0; - int previous_node_file_index = -1; - - if( node == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid node.", - function ); - - return( -1 ); - } - internal_tree_node = (libfdata_internal_tree_node_t *) node; - - if( ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) == 0 ) - && ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_LEAF ) != 0 ) ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, - "%s: invalid node - node is a leaf.", - function ); - - return( -1 ); - } - if( libcdata_array_get_entry_by_index( - internal_tree_node->sub_nodes, - sub_node_index, - (intptr_t **) &sub_node, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve entry: %d from sub nodes array.", - function, - sub_node_index ); - - return( -1 ); - } - if( sub_node == NULL ) - { - if( libfdata_tree_node_initialize( - &sub_node, - internal_tree_node->tree, - node, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, - "%s: unable to create sub node.", - function ); - - return( -1 ); - } - if( libcdata_array_set_entry_by_index( - internal_tree_node->sub_nodes, - sub_node_index, - (intptr_t *) sub_node, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to set sub node: %d in sub nodes array.", - function, - sub_node_index ); - - libfdata_tree_node_free( - &sub_node, - NULL ); - - return( -1 ); - } - } - else - { - if( libfdata_tree_node_get_data_range( - sub_node, - &previous_node_file_index, - &previous_node_offset, - &previous_node_size, - &previous_node_flags, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve sub node: %d data range.", - function, - sub_node_index ); - - return( -1 ); - } - } - if( libfdata_tree_node_set_data_range( - sub_node, - node_file_index, - node_offset, - node_size, - node_flags, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to set sub node: %d data range.", - function, - sub_node_index ); - - return( -1 ); - } - return( 1 ); -} - -/* Appends a sub node offset and size - * Returns 1 if successful or -1 on error - */ -int libfdata_tree_node_append_sub_node( - libfdata_tree_node_t *node, - int *sub_node_index, - int node_file_index, - off64_t node_offset, - size64_t node_size, - uint32_t node_flags, - libcerror_error_t **error ) -{ - libfdata_internal_tree_node_t *internal_tree_node = NULL; - libfdata_tree_node_t *sub_node = NULL; - static char *function = "libfdata_tree_node_append_sub_node"; - - if( node == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid node.", - function ); - - return( -1 ); - } - internal_tree_node = (libfdata_internal_tree_node_t *) node; - - if( ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) == 0 ) - && ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_LEAF ) != 0 ) ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, - "%s: invalid node - node is a leaf.", - function ); - - return( -1 ); - } - if( libfdata_tree_node_initialize( - &sub_node, - internal_tree_node->tree, - node, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, - "%s: unable to create sub node.", - function ); - - goto on_error; - } - if( libfdata_tree_node_set_data_range( - sub_node, - node_file_index, - node_offset, - node_size, - node_flags, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to set sub node data range.", - function ); - - goto on_error; - } - if( libcdata_array_append_entry( - internal_tree_node->sub_nodes, - sub_node_index, - (intptr_t *) sub_node, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, - "%s: unable to append sub node to sub nodes array.", - function ); - - goto on_error; - } - return( 1 ); - -on_error: - if( sub_node != NULL ) - { - libfdata_tree_node_free( - &sub_node, - NULL ); - } - return( -1 ); -} - -/* Inserts a sub node offset and size - * - * Uses the node_value_compare_function to determine the order of the sub nodes - * The node_value_compare_function should return LIBFDATA_COMPARE_LESS, - * LIBFDATA_COMPARE_EQUAL, LIBFDATA_COMPARE_GREATER if successful or -1 on error - * - * Duplicate entries are allowed by default and inserted after the last duplicate entry. - * Only allowing unique entries can be enforced by setting the flag LIBFDATA_TREE_NODE_INSERT_FLAG_UNIQUE_ENTRIES - * - * Returns 1 if successful, 0 if the node already exists or -1 on error - */ -int libfdata_tree_node_insert_sub_node( - libfdata_tree_node_t *node, - intptr_t *file_io_handle, - libfdata_cache_t *cache, - int *sub_node_index, - int node_file_index, - off64_t node_offset, - size64_t node_size, - uint32_t node_flags, - int (*node_value_compare_function)( - intptr_t *first_node_value, - intptr_t *second_node_value, - libcerror_error_t **error ), - uint8_t insert_flags, - uint8_t read_flags, - libcerror_error_t **error ) -{ - libfcache_cache_t *insert_cache = NULL; - libfdata_internal_tree_node_t *internal_tree_node = NULL; - libfdata_tree_node_t *insert_sub_node = NULL; - libfdata_tree_node_t *sub_node = NULL; - intptr_t *insert_sub_node_value = NULL; - intptr_t *sub_node_value = NULL; - static char *function = "libfdata_tree_node_insert_sub_node"; - int number_of_sub_nodes = 0; - int result = 0; - int sub_node_iterator = 0; - - if( node == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid node.", - function ); - - return( -1 ); - } - internal_tree_node = (libfdata_internal_tree_node_t *) node; - - if( sub_node_index == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid sub node index.", - function ); - - return( -1 ); - } - if( ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) == 0 ) - && ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_LEAF ) != 0 ) ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, - "%s: invalid node - node is a leaf.", - function ); - - return( -1 ); - } - if( node_value_compare_function == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid node value compare function.", - function ); - - return( -1 ); - } - if( ( insert_flags & ~( LIBFDATA_TREE_NODE_INSERT_FLAG_UNIQUE_SUB_NODE_VALUES ) ) != 0 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, - "%s: unsupported insert flags: 0x%02" PRIx8 ".", - function, - insert_flags ); - - return( -1 ); - } - if( libfdata_tree_node_initialize( - &insert_sub_node, - internal_tree_node->tree, - node, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, - "%s: unable to create insert sub node.", - function ); - - goto on_error; - } - if( libfdata_tree_node_set_data_range( - insert_sub_node, - node_file_index, - node_offset, - node_size, - node_flags, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to set insert sub node data range.", - function ); - - goto on_error; - } - if( libcdata_array_get_number_of_entries( - internal_tree_node->sub_nodes, - &number_of_sub_nodes, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve number of entries from sub nodes array.", - function ); - - goto on_error; - } - if( libfcache_cache_initialize( - &insert_cache, - 1, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, - "%s: unable to create insert cache.", - function ); - - goto on_error; - } - if( libfdata_tree_get_node_value( - internal_tree_node->tree, - file_io_handle, - (libfdata_cache_t *) insert_cache, - insert_sub_node, - &insert_sub_node_value, - read_flags, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve insert sub node value.", - function ); - - goto on_error; - } - for( sub_node_iterator = 0; - sub_node_iterator < number_of_sub_nodes; - sub_node_iterator++ ) - { - if( libcdata_array_get_entry_by_index( - internal_tree_node->sub_nodes, - sub_node_iterator, - (intptr_t **) &sub_node, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve entry: %d from sub nodes array.", - function, - sub_node_iterator ); - - goto on_error; - } - if( libfdata_tree_get_node_value( - internal_tree_node->tree, - file_io_handle, - cache, - sub_node, - &sub_node_value, - read_flags, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve sub node value: %d.", - function, - sub_node_iterator ); - - goto on_error; - } - result = node_value_compare_function( - insert_sub_node_value, - sub_node_value, - error ); - - if( result == -1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to compare sub node value: %d.", - function, - sub_node_iterator ); - - goto on_error; - } - else if( result == LIBFDATA_COMPARE_EQUAL ) - { - if( ( insert_flags & LIBFDATA_TREE_NODE_INSERT_FLAG_UNIQUE_SUB_NODE_VALUES ) != 0 ) - { - if( libfcache_cache_free( - &insert_cache, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, - "%s: unable to free the insert cache.", - function ); - - goto on_error; - } - if( libfdata_tree_node_free( - &insert_sub_node, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, - "%s: unable to free the insert sub node.", - function ); - - goto on_error; - } - return( 0 ); - } - } - else if( result == LIBFDATA_COMPARE_LESS ) - { - break; - } - else if( result != LIBFDATA_COMPARE_GREATER ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, - "%s: unsupported node value compare function return value: %d.", - function, - result ); - - goto on_error; - } - } - if( libfcache_cache_free( - &insert_cache, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, - "%s: unable to free the insert cache.", - function ); - - goto on_error; - } - if( ( number_of_sub_nodes > 0 ) - && ( result == LIBCDATA_COMPARE_LESS ) ) - { - *sub_node_index = sub_node_iterator; - - if( libcdata_array_resize( - internal_tree_node->sub_nodes, - number_of_sub_nodes + 1, - (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_tree_node_free_single, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, - "%s: unable to resize sub nodes array.", - function ); - - goto on_error; - } - for( sub_node_iterator = number_of_sub_nodes; - sub_node_iterator > *sub_node_index; - sub_node_iterator-- ) - { - if( libcdata_array_get_entry_by_index( - internal_tree_node->sub_nodes, - sub_node_iterator - 1, - (intptr_t **) &sub_node, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve sub node: %d from sub nodes array.", - function, - sub_node_iterator - 1 ); - - goto on_error; - } - if( libcdata_array_set_entry_by_index( - internal_tree_node->sub_nodes, - sub_node_iterator, - (intptr_t *) sub_node, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to set sub node: %d in sub nodes array.", - function, - sub_node_iterator ); - - goto on_error; - } - } - if( libcdata_array_set_entry_by_index( - internal_tree_node->sub_nodes, - *sub_node_index, - (intptr_t *) insert_sub_node, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to set insert sub node: %d in sub nodes array.", - function, - *sub_node_index ); - - goto on_error; - } - } - else - { - *sub_node_index = number_of_sub_nodes; - - if( libcdata_array_resize( - internal_tree_node->sub_nodes, - number_of_sub_nodes + 1, - (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_tree_node_free_single, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, - "%s: unable to resize sub nodes array.", - function ); - - goto on_error; - } - if( libcdata_array_set_entry_by_index( - internal_tree_node->sub_nodes, - *sub_node_index, - (intptr_t *) insert_sub_node, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to set insert sub node: %d in sub nodes array.", - function, - *sub_node_index ); - - goto on_error; - } - } - return( 1 ); - -on_error: - if( insert_cache != NULL ) - { - libfcache_cache_free( - &insert_cache, - NULL ); - } - if( insert_sub_node != NULL ) - { - libfdata_tree_node_free( - &insert_sub_node, - NULL ); - } - return( -1 ); -} - -/* Splits the sub nodes - * Returns 1 if successful or -1 on error - */ -int libfdata_tree_node_split_sub_nodes( - libfdata_tree_node_t *node, - int number_of_splits, - libcerror_error_t **error ) -{ - libcdata_array_t *virtual_sub_nodes_array = NULL; - libfdata_internal_tree_node_t *internal_tree_node = NULL; - libfdata_tree_node_t *sub_node = NULL; - libfdata_tree_node_t *virtual_sub_node = NULL; - static char *function = "libfdata_tree_node_split_sub_nodes"; - int number_of_split_sub_nodes = 0; - int number_of_sub_nodes = 0; - int result = 1; - int last_sub_node_index = 0; - int split_sub_node_index = 0; - int sub_node_index = 0; - int virtual_sub_node_index = 0; - - if( node == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid node.", - function ); - - return( -1 ); - } - internal_tree_node = (libfdata_internal_tree_node_t *) node; - - if( ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) == 0 ) - && ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_LEAF ) != 0 ) ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, - "%s: invalid node - node is a leaf.", - function ); - - return( -1 ); - } - if( number_of_splits < 0 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO, - "%s: invalid number of splits value less than zero.", - function ); - - return( -1 ); - } - if( number_of_splits == 0 ) - { - return( 1 ); - } - if( libcdata_array_get_number_of_entries( - internal_tree_node->sub_nodes, - &number_of_sub_nodes, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve number of entries from sub nodes array.", - function ); - - return( -1 ); - } - number_of_split_sub_nodes = number_of_sub_nodes / number_of_splits; - - if( number_of_split_sub_nodes < 2 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, - "%s: number of sub nodes too small to split in: %d.", - function, - number_of_splits ); - - return( -1 ); - } - if( libcdata_array_initialize( - &virtual_sub_nodes_array, - number_of_splits, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, - "%s: unable to create virtual sub nodes array.", - function ); - - return( -1 ); - } - for( virtual_sub_node_index = 0; - virtual_sub_node_index < number_of_splits; - virtual_sub_node_index++ ) - { - if( libfdata_tree_node_initialize( - &virtual_sub_node, - internal_tree_node->tree, - node, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, - "%s: unable to create virtual sub node: %d.", - function, - virtual_sub_node_index ); - - libcdata_array_free( - &virtual_sub_nodes_array, - (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_tree_node_free_single, - NULL ); - - result = -1; - - break; - } - ( (libfdata_internal_tree_node_t *) virtual_sub_node )->flags |= LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL; - - if( libcdata_array_set_entry_by_index( - virtual_sub_nodes_array, - virtual_sub_node_index, - (intptr_t *) virtual_sub_node, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to set virtual sub node: %d in virtual sub nodes array.", - function, - virtual_sub_node_index ); - - libfdata_tree_node_free( - &virtual_sub_node, - NULL ); - libcdata_array_free( - &virtual_sub_nodes_array, - (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_tree_node_free_single, - NULL ); - - result = -1; - - break; - } - last_sub_node_index = ( number_of_split_sub_nodes * ( virtual_sub_node_index + 1 ) ) - 1; - - if( virtual_sub_node_index == ( number_of_splits - 1 ) ) - { - last_sub_node_index += number_of_sub_nodes % number_of_splits; - } - if( last_sub_node_index > number_of_sub_nodes ) - { - last_sub_node_index = number_of_sub_nodes - 1; - } - if( libcdata_array_resize( - ( (libfdata_internal_tree_node_t *) virtual_sub_node )->sub_nodes, - last_sub_node_index + 1 - sub_node_index, - (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_tree_node_free_single, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, - "%s: unable to resize sub nodes array of virtual sub node: %d.", - function, - virtual_sub_node_index ); - - libcdata_array_free( - &virtual_sub_nodes_array, - (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_tree_node_free_single, - NULL ); - - result = -1; - - break; - } - split_sub_node_index = 0; - - while( sub_node_index <= last_sub_node_index ) - { - if( libcdata_array_get_entry_by_index( - internal_tree_node->sub_nodes, - sub_node_index, - (intptr_t **) &sub_node, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve entry: %d from sub nodes array.", - function, - sub_node_index ); - - libcdata_array_free( - &virtual_sub_nodes_array, - (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_tree_node_free_single, - NULL ); - - result = -1; - - break; - } - if( split_sub_node_index == 0 ) - { - if( sub_node == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, - "%s: missing sub node: %d.", - function, - sub_node_index ); - - libcdata_array_free( - &virtual_sub_nodes_array, - (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_tree_node_free_single, - NULL ); - - result = -1; - - break; - } - if( ( (libfdata_internal_tree_node_t *) sub_node )->node_data_range == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, - "%s: invalid sub node: %d - missing node data range.", - function, - sub_node_index ); - - libcdata_array_free( - &virtual_sub_nodes_array, - (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_tree_node_free_single, - NULL ); - - result = -1; - - break; - } - /* The node data range of a virtual node cannot be set by the set_data_range function - */ - if( libfdata_tree_node_get_data_range( - sub_node, - &( ( (libfdata_internal_tree_node_t *) virtual_sub_node )->node_data_range->file_index ), - &( ( (libfdata_internal_tree_node_t *) virtual_sub_node )->node_data_range->offset ), - &( ( (libfdata_internal_tree_node_t *) virtual_sub_node )->node_data_range->size ), - &( ( (libfdata_internal_tree_node_t *) virtual_sub_node )->node_data_range->flags ), - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to set virtual sub node data range.", - function ); - - libcdata_array_free( - &virtual_sub_nodes_array, - (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_tree_node_free_single, - NULL ); - - result = -1; - - break; - } - } - if( libcdata_array_set_entry_by_index( - ( (libfdata_internal_tree_node_t *) virtual_sub_node )->sub_nodes, - split_sub_node_index, - (intptr_t *) sub_node, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to set entry: %d in sub nodes array of virtual sub node: %d.", - function, - split_sub_node_index, - virtual_sub_node_index ); - - libcdata_array_free( - &virtual_sub_nodes_array, - (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_tree_node_free_single, - NULL ); - - result = -1; - - break; - } - if( libfdata_tree_node_set_parent_node( - sub_node, - virtual_sub_node, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to set parent node in sub node: %d.", - function, - split_sub_node_index ); - - libcdata_array_free( - &virtual_sub_nodes_array, - (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_tree_node_free_single, - NULL ); - - result = -1; - - break; - } - sub_node_index++; - split_sub_node_index++; - } - virtual_sub_node = NULL; - } - if( result != 1 ) - { - /* Set the parent values in the sub nodes back to their orginal value - */ - for( sub_node_index = 0; - sub_node_index < number_of_sub_nodes; - sub_node_index++ ) - { - if( libcdata_array_get_entry_by_index( - internal_tree_node->sub_nodes, - sub_node_index, - (intptr_t **) &sub_node, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve entry: %d from sub nodes array.", - function, - sub_node_index ); - - continue; - } - if( libfdata_tree_node_set_parent_node( - sub_node, - node, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to set parent node in sub node: %d.", - function, - sub_node_index ); - - continue; - } - } - return( -1 ); - } - if( libcdata_array_free( - &( internal_tree_node->sub_nodes ), - NULL, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, - "%s: unable to free the sub nodes array.", - function ); - - result = -1; - } - internal_tree_node->sub_nodes = virtual_sub_nodes_array; - - return( result ); -} - -/* Determines if the node is deleted - * Returns 1 if deleted, 0 if not or -1 on error - */ -int libfdata_tree_node_is_deleted( - libfdata_tree_node_t *node, - libcerror_error_t **error ) -{ - libfdata_internal_tree_node_t *internal_tree_node = NULL; - static char *function = "libfdata_tree_node_is_deleted"; - - if( node == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid node.", - function ); - - return( -1 ); - } - internal_tree_node = (libfdata_internal_tree_node_t *) node; - - if( ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) == 0 ) - && ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_DELETED ) != 0 ) ) - { - return( 1 ); - } - return( 0 ); -} - -/* Marks a node as deleted - * Returns 1 if successful or -1 on error - */ -int libfdata_tree_node_set_deleted( - libfdata_tree_node_t *node, - libcerror_error_t **error ) -{ - libfdata_internal_tree_node_t *internal_tree_node = NULL; - static char *function = "libfdata_tree_node_set_deleted"; - - if( node == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid node.", - function ); - - return( -1 ); - } - internal_tree_node = (libfdata_internal_tree_node_t *) node; - -/* TODO add deleted branch node support */ - if( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_SUB_NODES_DATA_RANGE_SET ) != 0 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, - "%s: invalid node - currently only deleted leaf nodes are supported.", - function ); - - return( -1 ); - } - internal_tree_node->flags |= LIBFDATA_TREE_NODE_FLAG_IS_DELETED; - - if( libfdata_tree_node_set_calculate_leaf_node_values( - node, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to set calculate leaf node values.", - function ); - - return( -1 ); - } - return( 1 ); -} - -/* Makes a deleted node of a specific sub node - * Returns 1 if successful or -1 on error - */ -int libfdata_tree_node_set_deleted_sub_node( - libfdata_tree_node_t *node, - int sub_node_index, - libcerror_error_t **error ) -{ - libfdata_internal_tree_node_t *internal_tree_node = NULL; - libfdata_tree_node_t *sub_node = NULL; - static char *function = "libfdata_tree_node_set_deleted_sub_node"; - - if( node == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid node.", - function ); - - return( -1 ); - } - internal_tree_node = (libfdata_internal_tree_node_t *) node; - - if( libcdata_array_get_entry_by_index( - internal_tree_node->sub_nodes, - sub_node_index, - (intptr_t **) &sub_node, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve entry: %d from sub nodes array.", - function, - sub_node_index ); - - return( -1 ); - } - if( sub_node == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, - "%s: missing sub node: %d.", - function, - sub_node_index ); - - return( -1 ); - } - if( libfdata_tree_node_set_deleted( - sub_node, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_SET_FAILED, - "%s: unable to set deleted in sub node: %d.", - function, - sub_node_index ); - - return( -1 ); - } - return( 1 ); -} - -/* Sets the flag to calculate the leaf node values and propagates this up to its parent node - * Returns 1 if the successful or -1 on error - */ -int libfdata_tree_node_set_calculate_leaf_node_values( - libfdata_tree_node_t *node, - libcerror_error_t **error ) -{ - libfdata_internal_tree_node_t *internal_tree_node = NULL; - static char *function = "libfdata_tree_node_set_calculate_leaf_node_values"; - - if( node == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid node.", - function ); - - return( -1 ); - } - internal_tree_node = (libfdata_internal_tree_node_t *) node; - - if( internal_tree_node->parent_node != NULL ) - { - if( libfdata_tree_node_set_calculate_leaf_node_values( - internal_tree_node->parent_node, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to set calculate leaf node values in parent node.", - function ); - - return( -1 ); - } - } - internal_tree_node->flags |= LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES; - - return( 1 ); -} - -/* Reads the leaf node values - * Returns 1 if the successful or -1 on error - */ -int libfdata_tree_node_read_leaf_node_values( - libfdata_tree_node_t *node, - intptr_t *file_io_handle, - libfdata_cache_t *cache, - uint8_t read_flags, - libcerror_error_t **error ) -{ - libfdata_internal_tree_node_t *internal_tree_node = NULL; - libfdata_tree_node_t *sub_node = NULL; - intptr_t *node_value = NULL; - static char *function = "libfdata_tree_node_read_leaf_node_values"; - int number_of_deleted_leaf_nodes = 0; - int number_of_leaf_nodes = 0; - int number_of_sub_nodes = 0; - int result = 0; - int sub_node_index = 0; - - if( node == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid node.", - function ); - - return( -1 ); - } - internal_tree_node = (libfdata_internal_tree_node_t *) node; - - if( ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) == 0 ) - && ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_SUB_NODES_READ ) == 0 ) ) - { - /* Make sure the node data is read before the sub nodes - */ - if( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_NOTE_DATA_READ ) == 0 ) - { - if( libfdata_tree_get_node_value( - internal_tree_node->tree, - file_io_handle, - cache, - node, - &node_value, - read_flags, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve node value.", - function ); - - return( -1 ); - } - internal_tree_node->flags |= LIBFDATA_TREE_NODE_FLAG_NOTE_DATA_READ; - } - if( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_SUB_NODES_DATA_RANGE_SET ) != 0 ) - { - if( libfdata_tree_read_sub_nodes( - internal_tree_node->tree, - file_io_handle, - cache, - node, - read_flags, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_IO, - LIBCERROR_IO_ERROR_READ_FAILED, - "%s: unable to read sub nodes.", - function ); - - return( -1 ); - } - } - internal_tree_node->flags |= LIBFDATA_TREE_NODE_FLAG_SUB_NODES_READ; - } - internal_tree_node->number_of_leaf_nodes = 0; - internal_tree_node->number_of_deleted_leaf_nodes = 0; - - if( libcdata_array_get_number_of_entries( - internal_tree_node->sub_nodes, - &number_of_sub_nodes, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve number of entries from sub nodes array.", - function ); - - return( -1 ); - } - for( sub_node_index = 0; - sub_node_index < number_of_sub_nodes; - sub_node_index++ ) - { - if( libcdata_array_get_entry_by_index( - internal_tree_node->sub_nodes, - sub_node_index, - (intptr_t **) &sub_node, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve entry: %d from sub nodes array.", - function, - sub_node_index ); - - return( -1 ); - } - if( libfdata_tree_node_get_number_of_leaf_nodes( - sub_node, - file_io_handle, - cache, - &number_of_leaf_nodes, - read_flags, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve number of leaf nodes from sub node: %d.", - function, - sub_node_index ); - - return( -1 ); - } - if( libfdata_tree_node_get_number_of_deleted_leaf_nodes( - sub_node, - file_io_handle, - cache, - &number_of_deleted_leaf_nodes, - read_flags, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve number of deleted leaf nodes from sub node: %d.", - function, - sub_node_index ); - - return( -1 ); - } - if( libfdata_tree_node_set_first_leaf_node_index( - sub_node, - internal_tree_node->number_of_leaf_nodes, - internal_tree_node->number_of_deleted_leaf_nodes, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to set first leaf node index in sub node: %d.", - function, - sub_node_index ); - - return( -1 ); - } - if( ( number_of_leaf_nodes == 0 ) - && ( number_of_deleted_leaf_nodes == 0 ) ) - { - /* It is possible to have branch nodes without leaf nodes - */ - result = libfdata_tree_node_is_leaf( - sub_node, - file_io_handle, - cache, - read_flags, - error ); - - if( result == -1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to determine if sub node: %d is a leaf.", - function, - sub_node_index ); - - return( -1 ); - } - else if( result != 0 ) - { - result = libfdata_tree_node_is_deleted( - sub_node, - error ); - - if( result == -1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to determine if sub node: %d is deleted.", - function, - sub_node_index ); - - return( -1 ); - } - else if( result == 0 ) - { - internal_tree_node->number_of_leaf_nodes++; - } - else - { - internal_tree_node->number_of_deleted_leaf_nodes++; - } - } - } - else - { - internal_tree_node->number_of_leaf_nodes += number_of_leaf_nodes; - internal_tree_node->number_of_deleted_leaf_nodes += number_of_deleted_leaf_nodes; - } - } - return( 1 ); -} - -/* Determines if the node is a leaf node - * Returns 1 if a leaf node, 0 if not or -1 on error - */ -int libfdata_tree_node_is_leaf( - libfdata_tree_node_t *node, - intptr_t *file_io_handle, - libfdata_cache_t *cache, - uint8_t read_flags, - libcerror_error_t **error ) -{ - libfdata_internal_tree_node_t *internal_tree_node = NULL; - intptr_t *node_value = NULL; - static char *function = "libfdata_tree_node_is_leaf"; - - if( node == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid node.", - function ); - - return( -1 ); - } - internal_tree_node = (libfdata_internal_tree_node_t *) node; - - if( ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) == 0 ) - && ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_SUB_NODES_READ ) == 0 ) ) - { - /* Make sure the node data is read before the sub nodes - */ - if( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_NOTE_DATA_READ ) == 0 ) - { - if( libfdata_tree_get_node_value( - internal_tree_node->tree, - file_io_handle, - cache, - node, - &node_value, - read_flags, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve node value.", - function ); - - return( -1 ); - } - internal_tree_node->flags |= LIBFDATA_TREE_NODE_FLAG_NOTE_DATA_READ; - } - if( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_SUB_NODES_DATA_RANGE_SET ) != 0 ) - { - if( libfdata_tree_read_sub_nodes( - internal_tree_node->tree, - file_io_handle, - cache, - node, - read_flags, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_IO, - LIBCERROR_IO_ERROR_READ_FAILED, - "%s: unable to read sub nodes.", - function ); - - return( -1 ); - } - } - internal_tree_node->flags |= LIBFDATA_TREE_NODE_FLAG_SUB_NODES_READ; - } - if( ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) == 0 ) - && ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_LEAF ) != 0 ) ) - { - return( 1 ); - } - return( 0 ); -} - -/* Makes a leaf node - * Returns 1 if successful or -1 on error - */ -int libfdata_tree_node_set_leaf( - libfdata_tree_node_t *node, - libcerror_error_t **error ) -{ - libfdata_internal_tree_node_t *internal_tree_node = NULL; - static char *function = "libfdata_tree_node_set_leaf"; - - if( node == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid node.", - function ); - - return( -1 ); - } - internal_tree_node = (libfdata_internal_tree_node_t *) node; - - if( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_SUB_NODES_DATA_RANGE_SET ) != 0 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, - "%s: invalid node - sub nodes range was set.", - function ); - - return( -1 ); - } - internal_tree_node->flags |= LIBFDATA_TREE_NODE_FLAG_IS_LEAF; - - if( libfdata_tree_node_set_calculate_leaf_node_values( - node, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to set calculate leaf node values.", - function ); - - return( -1 ); - } - return( 1 ); -} - -/* Makes a leaf node of a specific sub node - * Returns 1 if successful or -1 on error - */ -int libfdata_tree_node_set_leaf_sub_node( - libfdata_tree_node_t *node, - int sub_node_index, - libcerror_error_t **error ) -{ - libfdata_internal_tree_node_t *internal_tree_node = NULL; - libfdata_tree_node_t *sub_node = NULL; - static char *function = "libfdata_tree_node_set_leaf_sub_node"; - - if( node == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid node.", - function ); - - return( -1 ); - } - internal_tree_node = (libfdata_internal_tree_node_t *) node; - - if( libcdata_array_get_entry_by_index( - internal_tree_node->sub_nodes, - sub_node_index, - (intptr_t **) &sub_node, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve entry: %d from sub nodes array.", - function, - sub_node_index ); - - return( -1 ); - } - if( sub_node == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, - "%s: missing sub node: %d.", - function, - sub_node_index ); - - return( -1 ); - } - if( libfdata_tree_node_set_leaf( - sub_node, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_SET_FAILED, - "%s: unable to set leaf in sub node: %d.", - function, - sub_node_index ); - - return( -1 ); - } - return( 1 ); -} - -/* Retrieves the number of leaf nodes - * Returns 1 if successful or -1 on error - */ -int libfdata_tree_node_get_number_of_leaf_nodes( - libfdata_tree_node_t *node, - intptr_t *file_io_handle, - libfdata_cache_t *cache, - int *number_of_leaf_nodes, - uint8_t read_flags, - libcerror_error_t **error ) -{ - libfdata_internal_tree_node_t *internal_tree_node = NULL; - static char *function = "libfdata_tree_node_get_number_of_leaf_nodes"; - - if( node == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid node.", - function ); - - return( -1 ); - } - internal_tree_node = (libfdata_internal_tree_node_t *) node; - - if( number_of_leaf_nodes == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid number of leaf nodes.", - function ); - - return( -1 ); - } - if( ( internal_tree_node->flags & LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES ) != 0 ) - { - if( libfdata_tree_node_read_leaf_node_values( - node, - file_io_handle, - cache, - read_flags, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve node value.", - function ); - - return( -1 ); - } - internal_tree_node->flags &= ~( LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES ); - } - *number_of_leaf_nodes = internal_tree_node->number_of_leaf_nodes; - - return( 1 ); -} - -/* Retrieves a specific leaf node - * Returns 1 if successful or -1 on error - */ -int libfdata_tree_node_get_leaf_node_by_index( - libfdata_tree_node_t *node, - intptr_t *file_io_handle, - libfdata_cache_t *cache, - int leaf_node_index, - libfdata_tree_node_t **leaf_node, - uint8_t read_flags, - libcerror_error_t **error ) -{ - libfdata_internal_tree_node_t *internal_tree_node = NULL; - libfdata_tree_node_t *sub_node = NULL; - static char *function = "libfdata_tree_node_get_leaf_node_by_index"; - int first_deleted_leaf_node_index = 0; - int first_leaf_node_index = 0; - int number_of_leaf_nodes = 0; - int number_of_sub_nodes = 0; - int result = 0; - int sub_node_index = 0; - - if( node == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid node.", - function ); - - return( -1 ); - } - internal_tree_node = (libfdata_internal_tree_node_t *) node; - - if( leaf_node == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid leaf node.", - function ); - - return( -1 ); - } - if( ( internal_tree_node->flags & LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES ) != 0 ) - { - if( libfdata_tree_node_read_leaf_node_values( - node, - file_io_handle, - cache, - read_flags, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve node value.", - function ); - - return( -1 ); - } - internal_tree_node->flags &= ~( LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES ); - } - if( libcdata_array_get_number_of_entries( - internal_tree_node->sub_nodes, - &number_of_sub_nodes, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve number of entries from sub nodes array.", - function ); - - return( -1 ); - } - for( sub_node_index = 0; - sub_node_index < number_of_sub_nodes; - sub_node_index++ ) - { - if( libcdata_array_get_entry_by_index( - internal_tree_node->sub_nodes, - sub_node_index, - (intptr_t **) &sub_node, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve entry: %d from sub nodes array.", - function, - sub_node_index ); - - return( -1 ); - } - if( libfdata_tree_node_get_number_of_leaf_nodes( - sub_node, - file_io_handle, - cache, - &number_of_leaf_nodes, - read_flags, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve number of leaf nodes from sub node: %d.", - function, - sub_node_index ); - - return( -1 ); - } - if( libfdata_tree_node_get_first_leaf_node_index( - sub_node, - &first_leaf_node_index, - &first_deleted_leaf_node_index, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve first leaf node index from sub node: %d.", - function, - sub_node_index ); - - return( -1 ); - } - if( number_of_leaf_nodes == 0 ) - { - /* It is possible to have branch nodes without leaf nodes - */ - result = libfdata_tree_node_is_leaf( - sub_node, - file_io_handle, - cache, - read_flags, - error ); - - if( result == -1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to determine if sub node: %d is a leaf.", - function, - sub_node_index ); - - return( -1 ); - } - else if( result != 0 ) - { - result = libfdata_tree_node_is_deleted( - sub_node, - error ); - - if( result == -1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to determine if sub node: %d is deleted.", - function, - sub_node_index ); - - return( -1 ); - } - else if( result == 0 ) - { - if( leaf_node_index == first_leaf_node_index ) - { - *leaf_node = sub_node; - - break; - } - } - } - } - else if( ( leaf_node_index >= first_leaf_node_index ) - && ( leaf_node_index < ( first_leaf_node_index + number_of_leaf_nodes ) ) ) - { - /* Note that the first_leaf_node_index is relative for a branch - */ - if( libfdata_tree_node_get_leaf_node_by_index( - sub_node, - file_io_handle, - cache, - leaf_node_index - first_leaf_node_index, - leaf_node, - read_flags, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve leaf node: %d from sub node: %d.", - function, - leaf_node_index - first_leaf_node_index, - sub_node_index ); - - return( -1 ); - } - break; - } - } - if( sub_node_index >= number_of_sub_nodes ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, - "%s: invalid sub node index value out of bounds.", - function ); - - return( -1 ); - } - return( 1 ); -} - -/* Retrieves the number of deleted leaf nodes - * Returns 1 if successful or -1 on error - */ -int libfdata_tree_node_get_number_of_deleted_leaf_nodes( - libfdata_tree_node_t *node, - intptr_t *file_io_handle, - libfdata_cache_t *cache, - int *number_of_deleted_leaf_nodes, - uint8_t read_flags, - libcerror_error_t **error ) -{ - libfdata_internal_tree_node_t *internal_tree_node = NULL; - static char *function = "libfdata_tree_node_get_number_of_deleted_leaf_nodes"; - - if( node == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid node.", - function ); - - return( -1 ); - } - internal_tree_node = (libfdata_internal_tree_node_t *) node; - - if( number_of_deleted_leaf_nodes == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid number of deleted leaf nodes.", - function ); - - return( -1 ); - } - if( ( internal_tree_node->flags & LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES ) != 0 ) - { - if( libfdata_tree_node_read_leaf_node_values( - node, - file_io_handle, - cache, - read_flags, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve node value.", - function ); - - return( -1 ); - } - internal_tree_node->flags &= ~( LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES ); - } - *number_of_deleted_leaf_nodes = internal_tree_node->number_of_deleted_leaf_nodes; - - return( 1 ); -} - -/* Retrieves a specific deleted leaf node - * Returns 1 if successful or -1 on error - */ -int libfdata_tree_node_get_deleted_leaf_node_by_index( - libfdata_tree_node_t *node, - intptr_t *file_io_handle, - libfdata_cache_t *cache, - int deleted_leaf_node_index, - libfdata_tree_node_t **deleted_leaf_node, - uint8_t read_flags, - libcerror_error_t **error ) -{ - libfdata_internal_tree_node_t *internal_tree_node = NULL; - libfdata_tree_node_t *sub_node = NULL; - static char *function = "libfdata_tree_node_get_deleted_leaf_node_by_index"; - int first_deleted_leaf_node_index = 0; - int first_leaf_node_index = 0; - int number_of_deleted_leaf_nodes = 0; - int number_of_sub_nodes = 0; - int result = 0; - int sub_node_index = 0; - - if( node == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid node.", - function ); - - return( -1 ); - } - internal_tree_node = (libfdata_internal_tree_node_t *) node; - - if( deleted_leaf_node == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid deleted leaf node.", - function ); - - return( -1 ); - } - if( ( internal_tree_node->flags & LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES ) != 0 ) - { - if( libfdata_tree_node_read_leaf_node_values( - node, - file_io_handle, - cache, - read_flags, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve node value.", - function ); - - return( -1 ); - } - internal_tree_node->flags &= ~( LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES ); - } - if( libcdata_array_get_number_of_entries( - internal_tree_node->sub_nodes, - &number_of_sub_nodes, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve number of entries from sub nodes array.", - function ); - - return( -1 ); - } - for( sub_node_index = 0; - sub_node_index < number_of_sub_nodes; - sub_node_index++ ) - { - if( libcdata_array_get_entry_by_index( - internal_tree_node->sub_nodes, - sub_node_index, - (intptr_t **) &sub_node, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve entry: %d from sub nodes array.", - function, - sub_node_index ); - - return( -1 ); - } - if( libfdata_tree_node_get_number_of_deleted_leaf_nodes( - sub_node, - file_io_handle, - cache, - &number_of_deleted_leaf_nodes, - read_flags, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve number of leaf nodes from sub node: %d.", - function, - sub_node_index ); - - return( -1 ); - } - if( libfdata_tree_node_get_first_leaf_node_index( - sub_node, - &first_leaf_node_index, - &first_deleted_leaf_node_index, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve first leaf node index from sub node: %d.", - function, - sub_node_index ); - - return( -1 ); - } - if( number_of_deleted_leaf_nodes == 0 ) - { - /* It is possible to have branch nodes without leaf nodes - */ - result = libfdata_tree_node_is_leaf( - sub_node, - file_io_handle, - cache, - read_flags, - error ); - - if( result == -1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to determine if sub node: %d is a leaf.", - function, - sub_node_index ); - - return( -1 ); - } - else if( result != 0 ) - { - result = libfdata_tree_node_is_deleted( - sub_node, - error ); - - if( result == -1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to determine if sub node: %d is deleted.", - function, - sub_node_index ); - - return( -1 ); - } - else if( result != 0 ) - { - if( deleted_leaf_node_index == first_deleted_leaf_node_index ) - { - *deleted_leaf_node = sub_node; - - break; - } - } - } - } - else if( ( deleted_leaf_node_index >= first_deleted_leaf_node_index ) - && ( deleted_leaf_node_index < ( first_deleted_leaf_node_index + number_of_deleted_leaf_nodes ) ) ) - { - /* Note that the first_deleted_leaf_node_index is relative for a branch - */ - if( libfdata_tree_node_get_deleted_leaf_node_by_index( - sub_node, - file_io_handle, - cache, - deleted_leaf_node_index - first_deleted_leaf_node_index, - deleted_leaf_node, - read_flags, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve deleted leaf node: %d from sub node: %d.", - function, - deleted_leaf_node_index - first_deleted_leaf_node_index, - sub_node_index ); - - return( -1 ); - } - break; - } - } - if( sub_node_index >= number_of_sub_nodes ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, - "%s: invalid sub node index value out of bounds.", - function ); - - return( -1 ); - } - return( 1 ); -} - diff -Nru libfshfs-20201104/libfdata/libfdata_tree_node.h libfshfs-20240221/libfdata/libfdata_tree_node.h --- libfshfs-20201104/libfdata/libfdata_tree_node.h 2020-11-04 11:56:03.000000000 +0000 +++ libfshfs-20240221/libfdata/libfdata_tree_node.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,359 +0,0 @@ -/* - * The tree node functions - * - * Copyright (C) 2010-2020, Joachim Metz - * - * Refer to AUTHORS for acknowledgements. - * - * This program 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 3 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - */ - -#if !defined( _LIBFDATA_INTERNAL_TREE_NODE_H ) -#define _LIBFDATA_INTERNAL_TREE_NODE_H - -#include -#include - -#include "libfdata_extern.h" -#include "libfdata_libcdata.h" -#include "libfdata_libcerror.h" -#include "libfdata_libfcache.h" -#include "libfdata_range.h" -#include "libfdata_tree.h" -#include "libfdata_types.h" - -#if defined( __cplusplus ) -extern "C" { -#endif - -#define libfdata_tree_node_calculate_branch_node_cache_entry_index( node_offset, number_of_cache_entries ) \ - ( number_of_cache_entries > 4 ) ? ( node_offset % ( number_of_cache_entries / 4 ) ) : ( node_offset % number_of_cache_entries ) - -#define libfdata_tree_node_calculate_leaf_node_cache_entry_index( node_offset, number_of_cache_entries ) \ - ( number_of_cache_entries > 4 ) ? ( number_of_cache_entries / 4 ) + ( node_offset % ( ( number_of_cache_entries * 3 ) / 4 ) ) : ( node_offset % number_of_cache_entries ) - -typedef struct libfdata_internal_tree_node libfdata_internal_tree_node_t; - -struct libfdata_internal_tree_node -{ - /* The tree reference - */ - libfdata_tree_t *tree; - - /* The parent (tree) node reference - */ - libfdata_tree_node_t *parent_node; - - /* The node data range - */ - libfdata_range_t *node_data_range; - - /* The sub nodes data range - */ - libfdata_range_t *sub_nodes_data_range; - - /* The timestamp - */ - int64_t timestamp; - - /* The flags - */ - uint8_t flags; - - /* The sub nodes (array) - */ - libcdata_array_t *sub_nodes; - - /* The number of leaf nodes - */ - int number_of_leaf_nodes; - - /* The number of deleted leaf nodes - */ - int number_of_deleted_leaf_nodes; - - /* The relative first leaf node index - */ - int first_leaf_node_index; - - /* The relative first deleted leaf node index - */ - int first_deleted_leaf_node_index; -}; - -int libfdata_tree_node_initialize( - libfdata_tree_node_t **node, - libfdata_tree_t *tree, - libfdata_tree_node_t *parent_node, - libcerror_error_t **error ); - -int libfdata_tree_node_free( - libfdata_tree_node_t **node, - libcerror_error_t **error ); - -int libfdata_tree_node_free_single( - libfdata_tree_node_t **node, - libcerror_error_t **error ); - -int libfdata_tree_node_set_parent_node( - libfdata_tree_node_t *node, - libfdata_tree_node_t *parent_node, - libcerror_error_t **error ); - -LIBFDATA_EXTERN \ -int libfdata_tree_node_is_root( - libfdata_tree_node_t *node, - libcerror_error_t **error ); - -LIBFDATA_EXTERN \ -int libfdata_tree_node_get_data_range( - libfdata_tree_node_t *node, - int *node_file_index, - off64_t *node_offset, - size64_t *node_size, - uint32_t *node_flags, - libcerror_error_t **error ); - -LIBFDATA_EXTERN \ -int libfdata_tree_node_set_data_range( - libfdata_tree_node_t *node, - int node_file_index, - off64_t node_offset, - size64_t node_size, - uint32_t node_flags, - libcerror_error_t **error ); - -LIBFDATA_EXTERN \ -int libfdata_tree_node_sub_nodes_data_range_is_set( - libfdata_tree_node_t *node, - libcerror_error_t **error ); - -LIBFDATA_EXTERN \ -int libfdata_tree_node_get_sub_nodes_data_range( - libfdata_tree_node_t *node, - int *sub_nodes_file_index, - off64_t *sub_nodes_offset, - size64_t *sub_nodes_size, - uint32_t *sub_nodes_flags, - libcerror_error_t **error ); - -LIBFDATA_EXTERN \ -int libfdata_tree_node_set_sub_nodes_data_range( - libfdata_tree_node_t *node, - int sub_nodes_file_index, - off64_t sub_nodes_offset, - size64_t sub_nodes_size, - uint32_t sub_nodes_flags, - libcerror_error_t **error ); - -int libfdata_tree_node_get_timestamp( - libfdata_tree_node_t *node, - int64_t *timestamp, - libcerror_error_t **error ); - -int libfdata_tree_node_get_first_leaf_node_index( - libfdata_tree_node_t *node, - int *first_leaf_node_index, - int *deleted_first_leaf_node_index, - libcerror_error_t **error ); - -int libfdata_tree_node_set_first_leaf_node_index( - libfdata_tree_node_t *node, - int first_leaf_node_index, - int deleted_first_leaf_node_index, - libcerror_error_t **error ); - -/* Node value functions - */ -LIBFDATA_EXTERN \ -int libfdata_tree_node_get_node_value( - libfdata_tree_node_t *node, - intptr_t *file_io_handle, - libfdata_cache_t *cache, - intptr_t **node_value, - uint8_t read_flags, - libcerror_error_t **error ); - -LIBFDATA_EXTERN \ -int libfdata_tree_node_set_node_value( - libfdata_tree_node_t *node, - libfdata_cache_t *cache, - intptr_t *node_value, - int (*free_node_value)( - intptr_t **node_value, - libcerror_error_t **error ), - uint8_t flags, - libcerror_error_t **error ); - -/* Sub node functions - */ -LIBFDATA_EXTERN \ -int libfdata_tree_node_resize_sub_nodes( - libfdata_tree_node_t *node, - int number_of_sub_nodes, - libcerror_error_t **error ); - -LIBFDATA_EXTERN \ -int libfdata_tree_node_get_number_of_sub_nodes( - libfdata_tree_node_t *node, - intptr_t *file_io_handle, - libfdata_cache_t *cache, - int *number_of_sub_nodes, - uint8_t read_flags, - libcerror_error_t **error ); - -LIBFDATA_EXTERN \ -int libfdata_tree_node_get_sub_node_by_index( - libfdata_tree_node_t *node, - intptr_t *file_io_handle, - libfdata_cache_t *cache, - int sub_node_index, - libfdata_tree_node_t **sub_node, - uint8_t read_flags, - libcerror_error_t **error ); - -LIBFDATA_EXTERN \ -int libfdata_tree_node_set_sub_node_by_index( - libfdata_tree_node_t *node, - int sub_node_index, - int node_file_index, - off64_t node_offset, - size64_t node_size, - uint32_t node_flags, - libcerror_error_t **error ); - -LIBFDATA_EXTERN \ -int libfdata_tree_node_append_sub_node( - libfdata_tree_node_t *node, - int *sub_node_index, - int node_file_index, - off64_t node_offset, - size64_t node_size, - uint32_t node_flags, - libcerror_error_t **error ); - -LIBFDATA_EXTERN \ -int libfdata_tree_node_insert_sub_node( - libfdata_tree_node_t *node, - intptr_t *file_io_handle, - libfdata_cache_t *cache, - int *sub_node_index, - int node_file_index, - off64_t node_offset, - size64_t node_size, - uint32_t node_flags, - int (*node_value_compare_function)( - intptr_t *first_node_value, - intptr_t *second_node_value, - libcerror_error_t **error ), - uint8_t insert_flags, - uint8_t read_flags, - libcerror_error_t **error ); - -LIBFDATA_EXTERN \ -int libfdata_tree_node_split_sub_nodes( - libfdata_tree_node_t *node, - int number_of_splits, - libcerror_error_t **error ); - -/* Deleted node functions - */ -LIBFDATA_EXTERN \ -int libfdata_tree_node_is_deleted( - libfdata_tree_node_t *node, - libcerror_error_t **error ); - -LIBFDATA_EXTERN \ -int libfdata_tree_node_set_deleted( - libfdata_tree_node_t *node, - libcerror_error_t **error ); - -LIBFDATA_EXTERN \ -int libfdata_tree_node_set_deleted_sub_node( - libfdata_tree_node_t *node, - int sub_node_index, - libcerror_error_t **error ); - -/* Leaf node functions - */ -int libfdata_tree_node_set_calculate_leaf_node_values( - libfdata_tree_node_t *node, - libcerror_error_t **error ); - -int libfdata_tree_node_read_leaf_node_values( - libfdata_tree_node_t *node, - intptr_t *file_io_handle, - libfdata_cache_t *cache, - uint8_t read_flags, - libcerror_error_t **error ); - -LIBFDATA_EXTERN \ -int libfdata_tree_node_is_leaf( - libfdata_tree_node_t *node, - intptr_t *file_io_handle, - libfdata_cache_t *cache, - uint8_t read_flags, - libcerror_error_t **error ); - -LIBFDATA_EXTERN \ -int libfdata_tree_node_set_leaf( - libfdata_tree_node_t *node, - libcerror_error_t **error ); - -LIBFDATA_EXTERN \ -int libfdata_tree_node_set_leaf_sub_node( - libfdata_tree_node_t *node, - int sub_node_index, - libcerror_error_t **error ); - -int libfdata_tree_node_get_number_of_leaf_nodes( - libfdata_tree_node_t *node, - intptr_t *file_io_handle, - libfdata_cache_t *cache, - int *number_of_leaf_nodes, - uint8_t read_flags, - libcerror_error_t **error ); - -int libfdata_tree_node_get_leaf_node_by_index( - libfdata_tree_node_t *node, - intptr_t *file_io_handle, - libfdata_cache_t *cache, - int leaf_node_index, - libfdata_tree_node_t **leaf_node, - uint8_t read_flags, - libcerror_error_t **error ); - -int libfdata_tree_node_get_number_of_deleted_leaf_nodes( - libfdata_tree_node_t *node, - intptr_t *file_io_handle, - libfdata_cache_t *cache, - int *number_of_deleted_leaf_nodes, - uint8_t read_flags, - libcerror_error_t **error ); - -int libfdata_tree_node_get_deleted_leaf_node_by_index( - libfdata_tree_node_t *node, - intptr_t *file_io_handle, - libfdata_cache_t *cache, - int deleted_leaf_node_index, - libfdata_tree_node_t **deleted_leaf_node, - uint8_t read_flags, - libcerror_error_t **error ); - -#if defined( __cplusplus ) -} -#endif - -#endif /* !defined( _LIBFDATA_INTERNAL_TREE_NODE_H ) */ - diff -Nru libfshfs-20201104/libfdata/libfdata_types.h libfshfs-20240221/libfdata/libfdata_types.h --- libfshfs-20201104/libfdata/libfdata_types.h 2020-11-04 11:56:03.000000000 +0000 +++ libfshfs-20240221/libfdata/libfdata_types.h 2024-02-21 06:04:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * The internal type definitions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -35,28 +35,20 @@ */ #if defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) typedef struct libfdata_area {} libfdata_area_t; -typedef struct libfdata_btree {} libfdata_btree_t; -typedef struct libfdata_btree_node {} libfdata_btree_node_t; typedef struct libfdata_cache {} libfdata_cache_t; typedef struct libfdata_list {} libfdata_list_t; typedef struct libfdata_list_element {} libfdata_list_element_t; typedef struct libfdata_range_list {} libfdata_range_list_t; typedef struct libfdata_stream {} libfdata_stream_t; -typedef struct libfdata_tree {} libfdata_tree_t; -typedef struct libfdata_tree_node {} libfdata_tree_node_t; typedef struct libfdata_vector {} libfdata_vector_t; #else typedef intptr_t libfdata_area_t; -typedef intptr_t libfdata_btree_t; -typedef intptr_t libfdata_btree_node_t; typedef intptr_t libfdata_cache_t; typedef intptr_t libfdata_list_t; typedef intptr_t libfdata_list_element_t; typedef intptr_t libfdata_range_list_t; typedef intptr_t libfdata_stream_t; -typedef intptr_t libfdata_tree_t; -typedef intptr_t libfdata_tree_node_t; typedef intptr_t libfdata_vector_t; #endif /* defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) */ diff -Nru libfshfs-20201104/libfdata/libfdata_unused.h libfshfs-20240221/libfdata/libfdata_unused.h --- libfshfs-20201104/libfdata/libfdata_unused.h 2020-11-04 11:56:03.000000000 +0000 +++ libfshfs-20240221/libfdata/libfdata_unused.h 2024-02-21 06:04:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * Definitions to silence compiler warnings about unused function attributes/parameters. * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfdata/libfdata_vector.c libfshfs-20240221/libfdata/libfdata_vector.c --- libfshfs-20201104/libfdata/libfdata_vector.c 2020-11-04 11:56:03.000000000 +0000 +++ libfshfs-20240221/libfdata/libfdata_vector.c 2024-02-21 06:04:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * The vector functions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -1097,8 +1097,9 @@ if( libcnotify_verbose != 0 ) { libcnotify_printf( - "%s: requested offset: 0x%08" PRIx64 "\n", + "%s: requested offset: %" PRIi64 " (0x%08" PRIx64 ")\n", function, + element_value_offset, element_value_offset ); } #endif @@ -1180,11 +1181,13 @@ if( libcnotify_verbose != 0 ) { libcnotify_printf( - "%s: segment: %03d\tmapped range: 0x%08" PRIx64 " - 0x%08" PRIx64 " (size: %" PRIu64 ")\n", + "%s: segment: %03d\tmapped range: %" PRIi64 " - %" PRIi64 " (0x%08" PRIx64 " - 0x%08" PRIx64 ") (size: %" PRIu64 ")\n", function, segment_index, mapped_range_start_offset, mapped_range_end_offset, + mapped_range_start_offset, + mapped_range_end_offset, mapped_range_size ); } #endif @@ -1262,11 +1265,13 @@ if( libcnotify_verbose != 0 ) { libcnotify_printf( - "%s: segment: %03d\tmapped range: 0x%08" PRIx64 " - 0x%08" PRIx64 " (size: %" PRIu64 ")\n", + "%s: segment: %03d\tmapped range: %" PRIi64 " - %" PRIi64 " (0x%08" PRIx64 " - 0x%08" PRIx64 ") (size: %" PRIu64 ")\n", function, segment_index, mapped_range_start_offset, mapped_range_end_offset, + mapped_range_start_offset, + mapped_range_end_offset, mapped_range_size ); } #endif @@ -1329,15 +1334,18 @@ return( -1 ); } libcnotify_printf( - "%s: segment: %03d\tfile index: %03d offset: 0x%08" PRIx64 " - 0x%08" PRIx64 " (size: %" PRIu64 ")\n", + "%s: segment: %03d\tfile index: %03d offset: %" PRIi64 " - %" PRIi64 " (0x%08" PRIx64 " - 0x%08" PRIx64 ") (size: %" PRIu64 ")\n", function, segment_index, segment_file_index, segment_offset, segment_offset + segment_size, + segment_offset, + segment_offset + segment_size, segment_size ); } -#endif +#endif /* defined( HAVE_DEBUG_OUTPUT ) */ + calculated_element_index = (uint64_t) element_value_offset / internal_vector->element_data_size; if( calculated_element_index > (uint64_t) INT_MAX ) @@ -1447,7 +1455,7 @@ return( -1 ); } if( ( element_index < 0 ) - || ( element_index > ( (off64_t) INT64_MAX / internal_vector->element_data_size ) ) ) + || ( (uint64_t) element_index > ( (uint64_t) INT64_MAX / internal_vector->element_data_size ) ) ) { libcerror_error_set( error, @@ -1482,8 +1490,9 @@ error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve segment data range for offset: 0x%08" PRIx64 ".", + "%s: unable to retrieve segment data range for offset: %" PRIi64 " (0x%08" PRIx64 ").", function, + element_data_offset, element_data_offset ); return( -1 ); @@ -1584,8 +1593,9 @@ error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, - "%s: unable to read element data at offset: 0x%08" PRIx64 ".", + "%s: unable to read element data at offset: %" PRIi64 " (0x%08" PRIx64 ").", function, + element_data_offset, element_data_offset ); return( -1 ); @@ -1681,8 +1691,9 @@ error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve element index at offset: 0x%08" PRIx64 ".", + "%s: unable to retrieve element index at offset: %" PRIi64 " (0x%08" PRIx64 ").", function, + element_value_offset, element_value_offset ); return( -1 ); @@ -1773,7 +1784,7 @@ return( -1 ); } if( ( element_index < 0 ) - || ( element_index > ( (off64_t) INT64_MAX / internal_vector->element_data_size ) ) ) + || ( (uint64_t) element_index > ( (uint64_t) INT64_MAX / internal_vector->element_data_size ) ) ) { libcerror_error_set( error, @@ -1808,8 +1819,9 @@ error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve segment data range for offset: 0x%08" PRIx64 ".", + "%s: unable to retrieve segment data range for offset: %" PRIi64 " (0x%08" PRIx64 ").", function, + element_data_offset, element_data_offset ); return( -1 ); diff -Nru libfshfs-20201104/libfdata/libfdata_vector.h libfshfs-20240221/libfdata/libfdata_vector.h --- libfshfs-20201104/libfdata/libfdata_vector.h 2020-11-04 11:56:03.000000000 +0000 +++ libfshfs-20240221/libfdata/libfdata_vector.h 2024-02-21 06:04:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * The vector functions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfdatetime/Makefile.am libfshfs-20240221/libfdatetime/Makefile.am --- libfshfs-20201104/libfdatetime/Makefile.am 2020-11-04 11:56:06.000000000 +0000 +++ libfshfs-20240221/libfdatetime/Makefile.am 2024-02-21 06:04:09.000000000 +0000 @@ -28,9 +28,11 @@ Makefile.in distclean: clean - /bin/rm -f Makefile + -rm -f Makefile -splint: +sources-local: $(BUILT_SOURCES) + +splint-local: @echo "Running splint on libfdatetime ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfdatetime_la_SOURCES) diff -Nru libfshfs-20201104/libfdatetime/Makefile.in libfshfs-20240221/libfdatetime/Makefile.in --- libfshfs-20201104/libfdatetime/Makefile.in 2020-11-04 11:56:31.000000000 +0000 +++ libfshfs-20240221/libfdatetime/Makefile.in 2024-02-21 06:04:26.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -91,25 +91,26 @@ subdir = libfdatetime ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcdata.m4 \ - $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \ - $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \ - $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcrypto.m4 \ - $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcthreads.m4 \ - $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ - $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ - $(top_srcdir)/m4/libhmac.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/libuna.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \ - $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \ - $(top_srcdir)/m4/zlib.m4 $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libbfio.m4 \ + $(top_srcdir)/m4/libcdata.m4 $(top_srcdir)/m4/libcerror.m4 \ + $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ + $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ + $(top_srcdir)/m4/libcrypto.m4 $(top_srcdir)/m4/libcsplit.m4 \ + $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \ + $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ + $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmos.m4 \ + $(top_srcdir)/m4/libfuse.m4 $(top_srcdir)/m4/libhmac.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/pthread.m4 \ + $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ + $(top_srcdir)/m4/types.m4 $(top_srcdir)/m4/zlib.m4 \ + $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) @@ -199,6 +200,7 @@ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -216,8 +218,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ @@ -234,6 +234,8 @@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ @@ -249,8 +251,10 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -270,6 +274,8 @@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ +HAVE_LIBFMOS = @HAVE_LIBFMOS@ +HAVE_LIBFUSE = @HAVE_LIBFUSE@ HAVE_LIBHMAC = @HAVE_LIBHMAC@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ @@ -285,6 +291,7 @@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ +HAVE_LOCAL_LIBFMOS = @HAVE_LOCAL_LIBFMOS@ HAVE_LOCAL_LIBHMAC = @HAVE_LOCAL_LIBHMAC@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ @@ -338,8 +345,12 @@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ +LIBFMOS_CPPFLAGS = @LIBFMOS_CPPFLAGS@ +LIBFMOS_LIBADD = @LIBFMOS_LIBADD@ LIBFSHFS_DLL_EXPORT = @LIBFSHFS_DLL_EXPORT@ LIBFSHFS_DLL_IMPORT = @LIBFSHFS_DLL_IMPORT@ +LIBFUSE_CPPFLAGS = @LIBFUSE_CPPFLAGS@ +LIBFUSE_LIBADD = @LIBFUSE_LIBADD@ LIBHMAC_CPPFLAGS = @LIBHMAC_CPPFLAGS@ LIBHMAC_LIBADD = @LIBHMAC_LIBADD@ LIBICONV = @LIBICONV@ @@ -361,8 +372,8 @@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ @@ -385,26 +396,6 @@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ -PYTHON2 = @PYTHON2@ -PYTHON2_CONFIG = @PYTHON2_CONFIG@ -PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ -PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ -PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ -PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ -PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ -PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ -PYTHON2_PREFIX = @PYTHON2_PREFIX@ -PYTHON2_VERSION = @PYTHON2_VERSION@ -PYTHON3 = @PYTHON3@ -PYTHON3_CONFIG = @PYTHON3_CONFIG@ -PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ -PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ -PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ -PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ -PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ -PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ -PYTHON3_PREFIX = @PYTHON3_PREFIX@ -PYTHON3_VERSION = @PYTHON3_VERSION@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ @@ -482,6 +473,12 @@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ +ax_libfmos_pc_libs_private = @ax_libfmos_pc_libs_private@ +ax_libfmos_spec_build_requires = @ax_libfmos_spec_build_requires@ +ax_libfmos_spec_requires = @ax_libfmos_spec_requires@ +ax_libfuse_pc_libs_private = @ax_libfuse_pc_libs_private@ +ax_libfuse_spec_build_requires = @ax_libfuse_spec_build_requires@ +ax_libfuse_spec_requires = @ax_libfuse_spec_requires@ ax_libhmac_pc_libs_private = @ax_libhmac_pc_libs_private@ ax_libhmac_spec_build_requires = @ax_libhmac_spec_build_requires@ ax_libhmac_spec_requires = @ax_libhmac_spec_requires@ @@ -506,6 +503,8 @@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +fuse_CFLAGS = @fuse_CFLAGS@ +fuse_LIBS = @fuse_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -543,6 +542,8 @@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ +libfmos_CFLAGS = @libfmos_CFLAGS@ +libfmos_LIBS = @libfmos_LIBS@ libfshfs_spec_requires = @libfshfs_spec_requires@ libfshfs_spec_tools_build_requires = @libfshfs_spec_tools_build_requires@ libhmac_CFLAGS = @libhmac_CFLAGS@ @@ -561,11 +562,8 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ -pyexecdir2 = @pyexecdir2@ -pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ -pythondir2 = @pythondir2@ -pythondir3 = @pythondir3@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -699,6 +697,8 @@ clean-libtool: -rm -rf .libs _libs +sources-local: +splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique @@ -751,7 +751,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am @@ -895,6 +894,14 @@ ps-am: +sources: sources-am + +sources-am: sources-local + +splint: splint-am + +splint-am: splint-local + uninstall-am: .MAKE: install-am install-strip @@ -911,15 +918,18 @@ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am + sources-am sources-local splint-am splint-local tags tags-am \ + uninstall uninstall-am .PRECIOUS: Makefile distclean: clean - /bin/rm -f Makefile + -rm -f Makefile + +sources-local: $(BUILT_SOURCES) -splint: +splint-local: @echo "Running splint on libfdatetime ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfdatetime_la_SOURCES) diff -Nru libfshfs-20201104/libfdatetime/libfdatetime_date_time_values.c libfshfs-20240221/libfdatetime/libfdatetime_date_time_values.c --- libfshfs-20201104/libfdatetime/libfdatetime_date_time_values.c 2020-11-04 11:56:06.000000000 +0000 +++ libfshfs-20240221/libfdatetime/libfdatetime_date_time_values.c 2024-02-21 06:04:09.000000000 +0000 @@ -1,22 +1,22 @@ /* * Date and time values functions * - * Copyright (C) 2009-2018, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * - * This software is free software: you can redistribute it and/or modify + * This program 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 3 of the License, or * (at your option) any later version. * - * This software is distributed in the hope that it will be useful, + * This program 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 General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with this software. If not, see . + * along with this program. If not, see . */ #include diff -Nru libfshfs-20201104/libfdatetime/libfdatetime_date_time_values.h libfshfs-20240221/libfdatetime/libfdatetime_date_time_values.h --- libfshfs-20201104/libfdatetime/libfdatetime_date_time_values.h 2020-11-04 11:56:06.000000000 +0000 +++ libfshfs-20240221/libfdatetime/libfdatetime_date_time_values.h 2024-02-21 06:04:09.000000000 +0000 @@ -1,22 +1,22 @@ /* * Date and time values functions * - * Copyright (C) 2009-2018, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * - * This software is free software: you can redistribute it and/or modify + * This program 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 3 of the License, or * (at your option) any later version. * - * This software is distributed in the hope that it will be useful, + * This program 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 General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with this software. If not, see . + * along with this program. If not, see . */ #if !defined( _LIBFDATETIME_DATE_TIME_VALUES_H ) diff -Nru libfshfs-20201104/libfdatetime/libfdatetime_definitions.h libfshfs-20240221/libfdatetime/libfdatetime_definitions.h --- libfshfs-20201104/libfdatetime/libfdatetime_definitions.h 2020-11-04 11:56:06.000000000 +0000 +++ libfshfs-20240221/libfdatetime/libfdatetime_definitions.h 2024-02-21 06:04:09.000000000 +0000 @@ -1,22 +1,22 @@ /* * The internal definitions * - * Copyright (C) 2009-2018, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * - * This software is free software: you can redistribute it and/or modify + * This program 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 3 of the License, or * (at your option) any later version. * - * This software is distributed in the hope that it will be useful, + * This program 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 General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with this software. If not, see . + * along with this program. If not, see . */ #if !defined( LIBFDATETIME_INTERNAL_DEFINITIONS_H ) @@ -36,11 +36,11 @@ #else #include -#define LIBFDATETIME_VERSION 20180910 +#define LIBFDATETIME_VERSION 20240115 /* The version string */ -#define LIBFDATETIME_VERSION_STRING "20180910" +#define LIBFDATETIME_VERSION_STRING "20240115" /* The byte order definitions */ diff -Nru libfshfs-20201104/libfdatetime/libfdatetime_error.c libfshfs-20240221/libfdatetime/libfdatetime_error.c --- libfshfs-20201104/libfdatetime/libfdatetime_error.c 2020-11-04 11:56:06.000000000 +0000 +++ libfshfs-20240221/libfdatetime/libfdatetime_error.c 2024-02-21 06:04:09.000000000 +0000 @@ -1,22 +1,22 @@ /* * Error functions * - * Copyright (C) 2009-2018, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * - * This software is free software: you can redistribute it and/or modify + * This program 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 3 of the License, or * (at your option) any later version. * - * This software is distributed in the hope that it will be useful, + * This program 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 General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with this software. If not, see . + * along with this program. If not, see . */ #include diff -Nru libfshfs-20201104/libfdatetime/libfdatetime_error.h libfshfs-20240221/libfdatetime/libfdatetime_error.h --- libfshfs-20201104/libfdatetime/libfdatetime_error.h 2020-11-04 11:56:06.000000000 +0000 +++ libfshfs-20240221/libfdatetime/libfdatetime_error.h 2024-02-21 06:04:09.000000000 +0000 @@ -1,22 +1,22 @@ /* * Error functions * - * Copyright (C) 2009-2018, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * - * This software is free software: you can redistribute it and/or modify + * This program 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 3 of the License, or * (at your option) any later version. * - * This software is distributed in the hope that it will be useful, + * This program 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 General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with this software. If not, see . + * along with this program. If not, see . */ #if !defined( _LIBFDATETIME_INTERNAL_ERROR_H ) diff -Nru libfshfs-20201104/libfdatetime/libfdatetime_extern.h libfshfs-20240221/libfdatetime/libfdatetime_extern.h --- libfshfs-20201104/libfdatetime/libfdatetime_extern.h 2020-11-04 11:56:06.000000000 +0000 +++ libfshfs-20240221/libfdatetime/libfdatetime_extern.h 2024-02-21 06:04:09.000000000 +0000 @@ -1,22 +1,22 @@ /* * The internal extern definition * - * Copyright (C) 2009-2018, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * - * This software is free software: you can redistribute it and/or modify + * This program 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 3 of the License, or * (at your option) any later version. * - * This software is distributed in the hope that it will be useful, + * This program 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 General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with this software. If not, see . + * along with this program. If not, see . */ #if !defined( _LIBFDATETIME_INTERNAL_EXTERN_H ) @@ -30,7 +30,11 @@ #include +#if defined( __CYGWIN__ ) || defined( __MINGW32__ ) +#define LIBFDATETIME_EXTERN_VARIABLE extern +#else #define LIBFDATETIME_EXTERN_VARIABLE LIBFDATETIME_EXTERN +#endif #else #define LIBFDATETIME_EXTERN /* extern */ diff -Nru libfshfs-20201104/libfdatetime/libfdatetime_fat_date_time.c libfshfs-20240221/libfdatetime/libfdatetime_fat_date_time.c --- libfshfs-20201104/libfdatetime/libfdatetime_fat_date_time.c 2020-11-04 11:56:06.000000000 +0000 +++ libfshfs-20240221/libfdatetime/libfdatetime_fat_date_time.c 2024-02-21 06:04:09.000000000 +0000 @@ -1,22 +1,22 @@ /* * FAT date and time functions * - * Copyright (C) 2009-2018, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * - * This software is free software: you can redistribute it and/or modify + * This program 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 3 of the License, or * (at your option) any later version. * - * This software is distributed in the hope that it will be useful, + * This program 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 General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with this software. If not, see . + * along with this program. If not, see . */ #include diff -Nru libfshfs-20201104/libfdatetime/libfdatetime_fat_date_time.h libfshfs-20240221/libfdatetime/libfdatetime_fat_date_time.h --- libfshfs-20201104/libfdatetime/libfdatetime_fat_date_time.h 2020-11-04 11:56:06.000000000 +0000 +++ libfshfs-20240221/libfdatetime/libfdatetime_fat_date_time.h 2024-02-21 06:04:09.000000000 +0000 @@ -1,22 +1,22 @@ /* * FAT date and time functions * - * Copyright (C) 2009-2018, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * - * This software is free software: you can redistribute it and/or modify + * This program 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 3 of the License, or * (at your option) any later version. * - * This software is distributed in the hope that it will be useful, + * This program 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 General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with this software. If not, see . + * along with this program. If not, see . */ #if !defined( _LIBFDATETIME_INTERNAL_FAT_DATE_TIME_H ) diff -Nru libfshfs-20201104/libfdatetime/libfdatetime_filetime.c libfshfs-20240221/libfdatetime/libfdatetime_filetime.c --- libfshfs-20201104/libfdatetime/libfdatetime_filetime.c 2020-11-04 11:56:06.000000000 +0000 +++ libfshfs-20240221/libfdatetime/libfdatetime_filetime.c 2024-02-21 06:04:09.000000000 +0000 @@ -1,22 +1,22 @@ /* * FILETIME functions * - * Copyright (C) 2009-2018, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * - * This software is free software: you can redistribute it and/or modify + * This program 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 3 of the License, or * (at your option) any later version. * - * This software is distributed in the hope that it will be useful, + * This program 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 General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with this software. If not, see . + * along with this program. If not, see . */ #include diff -Nru libfshfs-20201104/libfdatetime/libfdatetime_filetime.h libfshfs-20240221/libfdatetime/libfdatetime_filetime.h --- libfshfs-20201104/libfdatetime/libfdatetime_filetime.h 2020-11-04 11:56:06.000000000 +0000 +++ libfshfs-20240221/libfdatetime/libfdatetime_filetime.h 2024-02-21 06:04:09.000000000 +0000 @@ -1,22 +1,22 @@ /* * FILETIME functions * - * Copyright (C) 2009-2018, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * - * This software is free software: you can redistribute it and/or modify + * This program 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 3 of the License, or * (at your option) any later version. * - * This software is distributed in the hope that it will be useful, + * This program 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 General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with this software. If not, see . + * along with this program. If not, see . */ #if !defined( _LIBFDATETIME_INTERNAL_FILETIME_H ) diff -Nru libfshfs-20201104/libfdatetime/libfdatetime_floatingtime.c libfshfs-20240221/libfdatetime/libfdatetime_floatingtime.c --- libfshfs-20201104/libfdatetime/libfdatetime_floatingtime.c 2020-11-04 11:56:06.000000000 +0000 +++ libfshfs-20240221/libfdatetime/libfdatetime_floatingtime.c 2024-02-21 06:04:09.000000000 +0000 @@ -1,22 +1,22 @@ /* * Floatingtime functions * - * Copyright (C) 2009-2018, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * - * This software is free software: you can redistribute it and/or modify + * This program 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 3 of the License, or * (at your option) any later version. * - * This software is distributed in the hope that it will be useful, + * This program 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 General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with this software. If not, see . + * along with this program. If not, see . */ #include diff -Nru libfshfs-20201104/libfdatetime/libfdatetime_floatingtime.h libfshfs-20240221/libfdatetime/libfdatetime_floatingtime.h --- libfshfs-20201104/libfdatetime/libfdatetime_floatingtime.h 2020-11-04 11:56:06.000000000 +0000 +++ libfshfs-20240221/libfdatetime/libfdatetime_floatingtime.h 2024-02-21 06:04:09.000000000 +0000 @@ -1,22 +1,22 @@ /* * Floatingtime functions * - * Copyright (C) 2009-2018, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * - * This software is free software: you can redistribute it and/or modify + * This program 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 3 of the License, or * (at your option) any later version. * - * This software is distributed in the hope that it will be useful, + * This program 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 General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with this software. If not, see . + * along with this program. If not, see . */ #if !defined( _LIBFDATETIME_INTERNAL_FLOATINGTIME_H ) diff -Nru libfshfs-20201104/libfdatetime/libfdatetime_hfs_time.c libfshfs-20240221/libfdatetime/libfdatetime_hfs_time.c --- libfshfs-20201104/libfdatetime/libfdatetime_hfs_time.c 2020-11-04 11:56:06.000000000 +0000 +++ libfshfs-20240221/libfdatetime/libfdatetime_hfs_time.c 2024-02-21 06:04:09.000000000 +0000 @@ -1,22 +1,22 @@ /* * HFS time functions * - * Copyright (C) 2009-2018, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * - * This software is free software: you can redistribute it and/or modify + * This program 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 3 of the License, or * (at your option) any later version. * - * This software is distributed in the hope that it will be useful, + * This program 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 General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with this software. If not, see . + * along with this program. If not, see . */ #include diff -Nru libfshfs-20201104/libfdatetime/libfdatetime_hfs_time.h libfshfs-20240221/libfdatetime/libfdatetime_hfs_time.h --- libfshfs-20201104/libfdatetime/libfdatetime_hfs_time.h 2020-11-04 11:56:06.000000000 +0000 +++ libfshfs-20240221/libfdatetime/libfdatetime_hfs_time.h 2024-02-21 06:04:09.000000000 +0000 @@ -1,22 +1,22 @@ /* * HFS time functions * - * Copyright (C) 2009-2018, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * - * This software is free software: you can redistribute it and/or modify + * This program 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 3 of the License, or * (at your option) any later version. * - * This software is distributed in the hope that it will be useful, + * This program 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 General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with this software. If not, see . + * along with this program. If not, see . */ #if !defined( _LIBFDATETIME_INTERNAL_HFS_TIME_H ) diff -Nru libfshfs-20201104/libfdatetime/libfdatetime_libcerror.h libfshfs-20240221/libfdatetime/libfdatetime_libcerror.h --- libfshfs-20201104/libfdatetime/libfdatetime_libcerror.h 2020-11-04 11:56:06.000000000 +0000 +++ libfshfs-20240221/libfdatetime/libfdatetime_libcerror.h 2024-02-21 06:04:09.000000000 +0000 @@ -1,22 +1,22 @@ /* * The libcerror header wrapper * - * Copyright (C) 2009-2018, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * - * This software is free software: you can redistribute it and/or modify + * This program 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 3 of the License, or * (at your option) any later version. * - * This software is distributed in the hope that it will be useful, + * This program 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 General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with this software. If not, see . + * along with this program. If not, see . */ #if !defined( _LIBFDATETIME_LIBCERROR_H ) diff -Nru libfshfs-20201104/libfdatetime/libfdatetime_nsf_timedate.c libfshfs-20240221/libfdatetime/libfdatetime_nsf_timedate.c --- libfshfs-20201104/libfdatetime/libfdatetime_nsf_timedate.c 2020-11-04 11:56:06.000000000 +0000 +++ libfshfs-20240221/libfdatetime/libfdatetime_nsf_timedate.c 2024-02-21 06:04:09.000000000 +0000 @@ -1,22 +1,22 @@ /* * Notes Storage Facility (NSF) timedate functions * - * Copyright (C) 2009-2018, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * - * This software is free software: you can redistribute it and/or modify + * This program 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 3 of the License, or * (at your option) any later version. * - * This software is distributed in the hope that it will be useful, + * This program 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 General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with this software. If not, see . + * along with this program. If not, see . */ #include diff -Nru libfshfs-20201104/libfdatetime/libfdatetime_nsf_timedate.h libfshfs-20240221/libfdatetime/libfdatetime_nsf_timedate.h --- libfshfs-20201104/libfdatetime/libfdatetime_nsf_timedate.h 2020-11-04 11:56:06.000000000 +0000 +++ libfshfs-20240221/libfdatetime/libfdatetime_nsf_timedate.h 2024-02-21 06:04:09.000000000 +0000 @@ -1,22 +1,22 @@ /* * Notes Storage Facility (NSF) timedate functions * - * Copyright (C) 2009-2018, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * - * This software is free software: you can redistribute it and/or modify + * This program 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 3 of the License, or * (at your option) any later version. * - * This software is distributed in the hope that it will be useful, + * This program 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 General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with this software. If not, see . + * along with this program. If not, see . */ #if !defined( _LIBFDATETIME_INTERNAL_NSF_TIMEDATE_H ) diff -Nru libfshfs-20201104/libfdatetime/libfdatetime_posix_time.c libfshfs-20240221/libfdatetime/libfdatetime_posix_time.c --- libfshfs-20201104/libfdatetime/libfdatetime_posix_time.c 2020-11-04 11:56:06.000000000 +0000 +++ libfshfs-20240221/libfdatetime/libfdatetime_posix_time.c 2024-02-21 06:04:09.000000000 +0000 @@ -1,22 +1,22 @@ /* * POSIX time functions * - * Copyright (C) 2009-2018, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * - * This software is free software: you can redistribute it and/or modify + * This program 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 3 of the License, or * (at your option) any later version. * - * This software is distributed in the hope that it will be useful, + * This program 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 General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with this software. If not, see . + * along with this program. If not, see . */ #include diff -Nru libfshfs-20201104/libfdatetime/libfdatetime_posix_time.h libfshfs-20240221/libfdatetime/libfdatetime_posix_time.h --- libfshfs-20201104/libfdatetime/libfdatetime_posix_time.h 2020-11-04 11:56:06.000000000 +0000 +++ libfshfs-20240221/libfdatetime/libfdatetime_posix_time.h 2024-02-21 06:04:09.000000000 +0000 @@ -1,22 +1,22 @@ /* * POSIX time functions * - * Copyright (C) 2009-2018, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * - * This software is free software: you can redistribute it and/or modify + * This program 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 3 of the License, or * (at your option) any later version. * - * This software is distributed in the hope that it will be useful, + * This program 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 General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with this software. If not, see . + * along with this program. If not, see . */ #if !defined( _LIBFDATETIME_INTERNAL_POSIX_TIME_H ) diff -Nru libfshfs-20201104/libfdatetime/libfdatetime_support.c libfshfs-20240221/libfdatetime/libfdatetime_support.c --- libfshfs-20201104/libfdatetime/libfdatetime_support.c 2020-11-04 11:56:06.000000000 +0000 +++ libfshfs-20240221/libfdatetime/libfdatetime_support.c 2024-02-21 06:04:09.000000000 +0000 @@ -1,22 +1,22 @@ /* * Support functions * - * Copyright (C) 2009-2018, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * - * This software is free software: you can redistribute it and/or modify + * This program 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 3 of the License, or * (at your option) any later version. * - * This software is distributed in the hope that it will be useful, + * This program 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 General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with this software. If not, see . + * along with this program. If not, see . */ #include diff -Nru libfshfs-20201104/libfdatetime/libfdatetime_support.h libfshfs-20240221/libfdatetime/libfdatetime_support.h --- libfshfs-20201104/libfdatetime/libfdatetime_support.h 2020-11-04 11:56:06.000000000 +0000 +++ libfshfs-20240221/libfdatetime/libfdatetime_support.h 2024-02-21 06:04:09.000000000 +0000 @@ -1,22 +1,22 @@ /* * Support functions * - * Copyright (C) 2009-2018, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * - * This software is free software: you can redistribute it and/or modify + * This program 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 3 of the License, or * (at your option) any later version. * - * This software is distributed in the hope that it will be useful, + * This program 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 General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with this software. If not, see . + * along with this program. If not, see . */ #if !defined( _LIBFDATETIME_SUPPORT_H ) diff -Nru libfshfs-20201104/libfdatetime/libfdatetime_systemtime.c libfshfs-20240221/libfdatetime/libfdatetime_systemtime.c --- libfshfs-20201104/libfdatetime/libfdatetime_systemtime.c 2020-11-04 11:56:06.000000000 +0000 +++ libfshfs-20240221/libfdatetime/libfdatetime_systemtime.c 2024-02-21 06:04:09.000000000 +0000 @@ -1,22 +1,22 @@ /* * SYSTEMTIME functions * - * Copyright (C) 2009-2018, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * - * This software is free software: you can redistribute it and/or modify + * This program 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 3 of the License, or * (at your option) any later version. * - * This software is distributed in the hope that it will be useful, + * This program 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 General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with this software. If not, see . + * along with this program. If not, see . */ #include diff -Nru libfshfs-20201104/libfdatetime/libfdatetime_systemtime.h libfshfs-20240221/libfdatetime/libfdatetime_systemtime.h --- libfshfs-20201104/libfdatetime/libfdatetime_systemtime.h 2020-11-04 11:56:06.000000000 +0000 +++ libfshfs-20240221/libfdatetime/libfdatetime_systemtime.h 2024-02-21 06:04:09.000000000 +0000 @@ -1,22 +1,22 @@ /* * SYSTEMTIME functions * - * Copyright (C) 2009-2018, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * - * This software is free software: you can redistribute it and/or modify + * This program 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 3 of the License, or * (at your option) any later version. * - * This software is distributed in the hope that it will be useful, + * This program 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 General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with this software. If not, see . + * along with this program. If not, see . */ #if !defined( _LIBFDATETIME_INTERNAL_SYSTEMTIME_H ) diff -Nru libfshfs-20201104/libfdatetime/libfdatetime_types.h libfshfs-20240221/libfdatetime/libfdatetime_types.h --- libfshfs-20201104/libfdatetime/libfdatetime_types.h 2020-11-04 11:56:06.000000000 +0000 +++ libfshfs-20240221/libfdatetime/libfdatetime_types.h 2024-02-21 06:04:09.000000000 +0000 @@ -1,22 +1,22 @@ /* * The internal type definitions * - * Copyright (C) 2009-2018, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * - * This software is free software: you can redistribute it and/or modify + * This program 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 3 of the License, or * (at your option) any later version. * - * This software is distributed in the hope that it will be useful, + * This program 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 General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with this software. If not, see . + * along with this program. If not, see . */ #if !defined( _LIBFDATETIME_INTERNAL_TYPES_H ) diff -Nru libfshfs-20201104/libfdatetime/libfdatetime_unused.h libfshfs-20240221/libfdatetime/libfdatetime_unused.h --- libfshfs-20201104/libfdatetime/libfdatetime_unused.h 2020-11-04 11:56:06.000000000 +0000 +++ libfshfs-20240221/libfdatetime/libfdatetime_unused.h 2024-02-21 06:04:09.000000000 +0000 @@ -1,26 +1,26 @@ /* - * The internal unused definition + * Definitions to silence compiler warnings about unused function attributes/parameters. * - * Copyright (C) 2009-2018, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * - * This software is free software: you can redistribute it and/or modify + * This program 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 3 of the License, or * (at your option) any later version. * - * This software is distributed in the hope that it will be useful, + * This program 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 General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with this software. If not, see . + * along with this program. If not, see . */ -#if !defined( _LIBFDATETIME_INTERNAL_UNUSED_H ) -#define _LIBFDATETIME_INTERNAL_UNUSED_H +#if !defined( _LIBFDATETIME_UNUSED_H ) +#define _LIBFDATETIME_UNUSED_H #include @@ -40,5 +40,5 @@ /* parameter */ #endif -#endif /* !defined( _LIBFDATETIME_INTERNAL_UNUSED_H ) */ +#endif /* !defined( _LIBFDATETIME_UNUSED_H ) */ diff -Nru libfshfs-20201104/libfguid/Makefile.am libfshfs-20240221/libfguid/Makefile.am --- libfshfs-20201104/libfguid/Makefile.am 2020-11-04 11:56:09.000000000 +0000 +++ libfshfs-20240221/libfguid/Makefile.am 2024-02-21 06:04:10.000000000 +0000 @@ -2,7 +2,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/common \ - @LIBCERROR_CPPFLAGS@ + @LIBCERROR_CPPFLAGS@ noinst_LTLIBRARIES = libfguid.la @@ -21,9 +21,11 @@ Makefile.in distclean: clean - /bin/rm -f Makefile + -rm -f Makefile -splint: +sources-local: $(BUILT_SOURCES) + +splint-local: @echo "Running splint on libfguid ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfguid_la_SOURCES) diff -Nru libfshfs-20201104/libfguid/Makefile.in libfshfs-20240221/libfguid/Makefile.in --- libfshfs-20201104/libfguid/Makefile.in 2020-11-04 11:56:31.000000000 +0000 +++ libfshfs-20240221/libfguid/Makefile.in 2024-02-21 06:04:26.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -91,25 +91,26 @@ subdir = libfguid ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcdata.m4 \ - $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \ - $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \ - $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcrypto.m4 \ - $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcthreads.m4 \ - $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ - $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ - $(top_srcdir)/m4/libhmac.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/libuna.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \ - $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \ - $(top_srcdir)/m4/zlib.m4 $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libbfio.m4 \ + $(top_srcdir)/m4/libcdata.m4 $(top_srcdir)/m4/libcerror.m4 \ + $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ + $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ + $(top_srcdir)/m4/libcrypto.m4 $(top_srcdir)/m4/libcsplit.m4 \ + $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \ + $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ + $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmos.m4 \ + $(top_srcdir)/m4/libfuse.m4 $(top_srcdir)/m4/libhmac.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/pthread.m4 \ + $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ + $(top_srcdir)/m4/types.m4 $(top_srcdir)/m4/zlib.m4 \ + $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) @@ -177,6 +178,7 @@ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -194,8 +196,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ @@ -212,6 +212,8 @@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ @@ -227,8 +229,10 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -248,6 +252,8 @@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ +HAVE_LIBFMOS = @HAVE_LIBFMOS@ +HAVE_LIBFUSE = @HAVE_LIBFUSE@ HAVE_LIBHMAC = @HAVE_LIBHMAC@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ @@ -263,6 +269,7 @@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ +HAVE_LOCAL_LIBFMOS = @HAVE_LOCAL_LIBFMOS@ HAVE_LOCAL_LIBHMAC = @HAVE_LOCAL_LIBHMAC@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ @@ -316,8 +323,12 @@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ +LIBFMOS_CPPFLAGS = @LIBFMOS_CPPFLAGS@ +LIBFMOS_LIBADD = @LIBFMOS_LIBADD@ LIBFSHFS_DLL_EXPORT = @LIBFSHFS_DLL_EXPORT@ LIBFSHFS_DLL_IMPORT = @LIBFSHFS_DLL_IMPORT@ +LIBFUSE_CPPFLAGS = @LIBFUSE_CPPFLAGS@ +LIBFUSE_LIBADD = @LIBFUSE_LIBADD@ LIBHMAC_CPPFLAGS = @LIBHMAC_CPPFLAGS@ LIBHMAC_LIBADD = @LIBHMAC_LIBADD@ LIBICONV = @LIBICONV@ @@ -339,8 +350,8 @@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ @@ -363,26 +374,6 @@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ -PYTHON2 = @PYTHON2@ -PYTHON2_CONFIG = @PYTHON2_CONFIG@ -PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ -PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ -PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ -PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ -PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ -PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ -PYTHON2_PREFIX = @PYTHON2_PREFIX@ -PYTHON2_VERSION = @PYTHON2_VERSION@ -PYTHON3 = @PYTHON3@ -PYTHON3_CONFIG = @PYTHON3_CONFIG@ -PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ -PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ -PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ -PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ -PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ -PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ -PYTHON3_PREFIX = @PYTHON3_PREFIX@ -PYTHON3_VERSION = @PYTHON3_VERSION@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ @@ -460,6 +451,12 @@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ +ax_libfmos_pc_libs_private = @ax_libfmos_pc_libs_private@ +ax_libfmos_spec_build_requires = @ax_libfmos_spec_build_requires@ +ax_libfmos_spec_requires = @ax_libfmos_spec_requires@ +ax_libfuse_pc_libs_private = @ax_libfuse_pc_libs_private@ +ax_libfuse_spec_build_requires = @ax_libfuse_spec_build_requires@ +ax_libfuse_spec_requires = @ax_libfuse_spec_requires@ ax_libhmac_pc_libs_private = @ax_libhmac_pc_libs_private@ ax_libhmac_spec_build_requires = @ax_libhmac_spec_build_requires@ ax_libhmac_spec_requires = @ax_libhmac_spec_requires@ @@ -484,6 +481,8 @@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +fuse_CFLAGS = @fuse_CFLAGS@ +fuse_LIBS = @fuse_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -521,6 +520,8 @@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ +libfmos_CFLAGS = @libfmos_CFLAGS@ +libfmos_LIBS = @libfmos_LIBS@ libfshfs_spec_requires = @libfshfs_spec_requires@ libfshfs_spec_tools_build_requires = @libfshfs_spec_tools_build_requires@ libhmac_CFLAGS = @libhmac_CFLAGS@ @@ -539,11 +540,8 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ -pyexecdir2 = @pyexecdir2@ -pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ -pythondir2 = @pythondir2@ -pythondir3 = @pythondir3@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -557,7 +555,7 @@ @HAVE_LOCAL_LIBFGUID_TRUE@AM_CPPFLAGS = \ @HAVE_LOCAL_LIBFGUID_TRUE@ -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBFGUID_TRUE@ -I$(top_srcdir)/common \ -@HAVE_LOCAL_LIBFGUID_TRUE@ @LIBCERROR_CPPFLAGS@ +@HAVE_LOCAL_LIBFGUID_TRUE@ @LIBCERROR_CPPFLAGS@ @HAVE_LOCAL_LIBFGUID_TRUE@noinst_LTLIBRARIES = libfguid.la @HAVE_LOCAL_LIBFGUID_TRUE@libfguid_la_SOURCES = \ @@ -663,6 +661,8 @@ clean-libtool: -rm -rf .libs _libs +sources-local: +splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique @@ -715,7 +715,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am @@ -852,6 +851,14 @@ ps-am: +sources: sources-am + +sources-am: sources-local + +splint: splint-am + +splint-am: splint-local + uninstall-am: .MAKE: install-am install-strip @@ -868,15 +875,18 @@ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am + sources-am sources-local splint-am splint-local tags tags-am \ + uninstall uninstall-am .PRECIOUS: Makefile distclean: clean - /bin/rm -f Makefile + -rm -f Makefile + +sources-local: $(BUILT_SOURCES) -splint: +splint-local: @echo "Running splint on libfguid ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfguid_la_SOURCES) diff -Nru libfshfs-20201104/libfguid/libfguid_definitions.h libfshfs-20240221/libfguid/libfguid_definitions.h --- libfshfs-20201104/libfguid/libfguid_definitions.h 2020-11-04 11:56:09.000000000 +0000 +++ libfshfs-20240221/libfguid/libfguid_definitions.h 2024-02-21 06:04:10.000000000 +0000 @@ -1,22 +1,22 @@ /* * The internal definitions * - * Copyright (C) 2010-2018, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * - * This software is free software: you can redistribute it and/or modify + * This program 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 3 of the License, or * (at your option) any later version. * - * This software is distributed in the hope that it will be useful, + * This program 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 General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with this software. If not, see . + * along with this program. If not, see . */ #if !defined( LIBFGUID_INTERNAL_DEFINITIONS_H ) @@ -36,11 +36,11 @@ #else #include -#define LIBFGUID_VERSION 20180724 +#define LIBFGUID_VERSION 20240116 /* The version string */ -#define LIBFGUID_VERSION_STRING "20180724" +#define LIBFGUID_VERSION_STRING "20240116" /* The byte order definitions */ diff -Nru libfshfs-20201104/libfguid/libfguid_error.c libfshfs-20240221/libfguid/libfguid_error.c --- libfshfs-20201104/libfguid/libfguid_error.c 2020-11-04 11:56:09.000000000 +0000 +++ libfshfs-20240221/libfguid/libfguid_error.c 2024-02-21 06:04:10.000000000 +0000 @@ -1,22 +1,22 @@ /* * Error functions * - * Copyright (C) 2010-2018, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * - * This software is free software: you can redistribute it and/or modify + * This program 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 3 of the License, or * (at your option) any later version. * - * This software is distributed in the hope that it will be useful, + * This program 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 General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with this software. If not, see . + * along with this program. If not, see . */ #include diff -Nru libfshfs-20201104/libfguid/libfguid_error.h libfshfs-20240221/libfguid/libfguid_error.h --- libfshfs-20201104/libfguid/libfguid_error.h 2020-11-04 11:56:09.000000000 +0000 +++ libfshfs-20240221/libfguid/libfguid_error.h 2024-02-21 06:04:10.000000000 +0000 @@ -1,22 +1,22 @@ /* * Error functions * - * Copyright (C) 2010-2018, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * - * This software is free software: you can redistribute it and/or modify + * This program 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 3 of the License, or * (at your option) any later version. * - * This software is distributed in the hope that it will be useful, + * This program 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 General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with this software. If not, see . + * along with this program. If not, see . */ #if !defined( _LIBFGUID_INTERNAL_ERROR_H ) diff -Nru libfshfs-20201104/libfguid/libfguid_extern.h libfshfs-20240221/libfguid/libfguid_extern.h --- libfshfs-20201104/libfguid/libfguid_extern.h 2020-11-04 11:56:09.000000000 +0000 +++ libfshfs-20240221/libfguid/libfguid_extern.h 2024-02-21 06:04:10.000000000 +0000 @@ -1,22 +1,22 @@ /* * The internal extern definition * - * Copyright (C) 2010-2018, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * - * This software is free software: you can redistribute it and/or modify + * This program 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 3 of the License, or * (at your option) any later version. * - * This software is distributed in the hope that it will be useful, + * This program 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 General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with this software. If not, see . + * along with this program. If not, see . */ #if !defined( _LIBFGUID_INTERNAL_EXTERN_H ) @@ -28,16 +28,13 @@ */ #if !defined( HAVE_LOCAL_LIBFGUID ) -/* If libtool DLL support is enabled set LIBFGUID_DLL_EXPORT - * before including libfguid/extern.h - */ -#if defined( _WIN32 ) && defined( DLL_EXPORT ) -#define LIBFGUID_DLL_EXPORT -#endif - #include +#if defined( __CYGWIN__ ) || defined( __MINGW32__ ) +#define LIBFGUID_EXTERN_VARIABLE extern +#else #define LIBFGUID_EXTERN_VARIABLE LIBFGUID_EXTERN +#endif #else #define LIBFGUID_EXTERN /* extern */ diff -Nru libfshfs-20201104/libfguid/libfguid_identifier.c libfshfs-20240221/libfguid/libfguid_identifier.c --- libfshfs-20201104/libfguid/libfguid_identifier.c 2020-11-04 11:56:09.000000000 +0000 +++ libfshfs-20240221/libfguid/libfguid_identifier.c 2024-02-21 06:04:10.000000000 +0000 @@ -1,22 +1,22 @@ /* * GUID functions * - * Copyright (C) 2010-2018, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * - * This software is free software: you can redistribute it and/or modify + * This program 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 3 of the License, or * (at your option) any later version. * - * This software is distributed in the hope that it will be useful, + * This program 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 General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with this software. If not, see . + * along with this program. If not, see . */ #include diff -Nru libfshfs-20201104/libfguid/libfguid_identifier.h libfshfs-20240221/libfguid/libfguid_identifier.h --- libfshfs-20201104/libfguid/libfguid_identifier.h 2020-11-04 11:56:09.000000000 +0000 +++ libfshfs-20240221/libfguid/libfguid_identifier.h 2024-02-21 06:04:10.000000000 +0000 @@ -1,22 +1,22 @@ /* * Global (or Universal) Unique Identifier (GUID/UUID) functions * - * Copyright (C) 2010-2018, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * - * This software is free software: you can redistribute it and/or modify + * This program 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 3 of the License, or * (at your option) any later version. * - * This software is distributed in the hope that it will be useful, + * This program 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 General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with this software. If not, see . + * along with this program. If not, see . */ #if !defined( _LIBFGUID_INTERNAL_IDENTIFIER_H ) diff -Nru libfshfs-20201104/libfguid/libfguid_libcerror.h libfshfs-20240221/libfguid/libfguid_libcerror.h --- libfshfs-20201104/libfguid/libfguid_libcerror.h 2020-11-04 11:56:09.000000000 +0000 +++ libfshfs-20240221/libfguid/libfguid_libcerror.h 2024-02-21 06:04:10.000000000 +0000 @@ -1,22 +1,22 @@ /* * The libcerror header wrapper * - * Copyright (C) 2010-2018, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * - * This software is free software: you can redistribute it and/or modify + * This program 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 3 of the License, or * (at your option) any later version. * - * This software is distributed in the hope that it will be useful, + * This program 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 General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with this software. If not, see . + * along with this program. If not, see . */ #if !defined( _LIBFGUID_LIBCERROR_H ) diff -Nru libfshfs-20201104/libfguid/libfguid_support.c libfshfs-20240221/libfguid/libfguid_support.c --- libfshfs-20201104/libfguid/libfguid_support.c 2020-11-04 11:56:09.000000000 +0000 +++ libfshfs-20240221/libfguid/libfguid_support.c 2024-02-21 06:04:10.000000000 +0000 @@ -1,22 +1,22 @@ /* * Support functions * - * Copyright (C) 2010-2018, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * - * This software is free software: you can redistribute it and/or modify + * This program 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 3 of the License, or * (at your option) any later version. * - * This software is distributed in the hope that it will be useful, + * This program 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 General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with this software. If not, see . + * along with this program. If not, see . */ #include diff -Nru libfshfs-20201104/libfguid/libfguid_support.h libfshfs-20240221/libfguid/libfguid_support.h --- libfshfs-20201104/libfguid/libfguid_support.h 2020-11-04 11:56:09.000000000 +0000 +++ libfshfs-20240221/libfguid/libfguid_support.h 2024-02-21 06:04:10.000000000 +0000 @@ -1,22 +1,22 @@ /* * Support functions * - * Copyright (C) 2010-2018, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * - * This software is free software: you can redistribute it and/or modify + * This program 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 3 of the License, or * (at your option) any later version. * - * This software is distributed in the hope that it will be useful, + * This program 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 General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with this software. If not, see . + * along with this program. If not, see . */ #if !defined( _LIBFGUID_SUPPORT_H ) diff -Nru libfshfs-20201104/libfguid/libfguid_types.h libfshfs-20240221/libfguid/libfguid_types.h --- libfshfs-20201104/libfguid/libfguid_types.h 2020-11-04 11:56:09.000000000 +0000 +++ libfshfs-20240221/libfguid/libfguid_types.h 2024-02-21 06:04:10.000000000 +0000 @@ -1,22 +1,22 @@ /* * The internal type definitions * - * Copyright (C) 2010-2018, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * - * This software is free software: you can redistribute it and/or modify + * This program 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 3 of the License, or * (at your option) any later version. * - * This software is distributed in the hope that it will be useful, + * This program 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 General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with this software. If not, see . + * along with this program. If not, see . */ #if !defined( _LIBFGUID_INTERNAL_TYPES_H ) diff -Nru libfshfs-20201104/libfguid/libfguid_unused.h libfshfs-20240221/libfguid/libfguid_unused.h --- libfshfs-20201104/libfguid/libfguid_unused.h 2020-11-04 11:56:09.000000000 +0000 +++ libfshfs-20240221/libfguid/libfguid_unused.h 2024-02-21 06:04:10.000000000 +0000 @@ -1,26 +1,26 @@ /* - * The internal unused definition + * Definitions to silence compiler warnings about unused function attributes/parameters. * - * Copyright (C) 2010-2018, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * - * This software is free software: you can redistribute it and/or modify + * This program 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 3 of the License, or * (at your option) any later version. * - * This software is distributed in the hope that it will be useful, + * This program 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 General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with this software. If not, see . + * along with this program. If not, see . */ -#if !defined( _LIBFGUID_INTERNAL_UNUSED_H ) -#define _LIBFGUID_INTERNAL_UNUSED_H +#if !defined( _LIBFGUID_UNUSED_H ) +#define _LIBFGUID_UNUSED_H #include @@ -40,5 +40,5 @@ /* parameter */ #endif -#endif /* !defined( _LIBFGUID_INTERNAL_UNUSED_H ) */ +#endif /* !defined( _LIBFGUID_UNUSED_H ) */ diff -Nru libfshfs-20201104/libfmos/Makefile.am libfshfs-20240221/libfmos/Makefile.am --- libfshfs-20201104/libfmos/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libfmos/Makefile.am 2024-02-21 06:04:11.000000000 +0000 @@ -0,0 +1,40 @@ +if HAVE_LOCAL_LIBFMOS +AM_CPPFLAGS = \ + -I$(top_srcdir)/include \ + -I$(top_srcdir)/common \ + @LIBCERROR_CPPFLAGS@ \ + @LIBCTHREADS_CPPFLAGS@ \ + @LIBCNOTIFY_CPPFLAGS@ \ + @PTHREAD_CPPFLAGS@ + +noinst_LTLIBRARIES = libfmos.la + +libfmos_la_SOURCES = \ + libfmos_adc.c libfmos_adc.h \ + libfmos_definitions.h \ + libfmos_extern.h \ + libfmos_error.c libfmos_error.h \ + libfmos_libcerror.h \ + libfmos_libcnotify.h \ + libfmos_lzfse.c libfmos_lzfse.h \ + libfmos_lzfse_bit_stream.c libfmos_lzfse_bit_stream.h \ + libfmos_lzfse_decoder.c libfmos_lzfse_decoder.h \ + libfmos_lzvn.c libfmos_lzvn.h \ + libfmos_notify.c libfmos_notify.h \ + libfmos_support.c libfmos_support.h \ + libfmos_types.h \ + libfmos_unused.h +endif + +MAINTAINERCLEANFILES = \ + Makefile.in + +distclean: clean + -rm -f Makefile + +sources-local: $(BUILT_SOURCES) + +splint-local: + @echo "Running splint on libfmos ..." + -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfmos_la_SOURCES) + diff -Nru libfshfs-20201104/libfmos/Makefile.in libfshfs-20240221/libfmos/Makefile.in --- libfshfs-20201104/libfmos/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libfmos/Makefile.in 2024-02-21 06:04:26.000000000 +0000 @@ -0,0 +1,923 @@ +# Makefile.in generated by automake 1.16.5 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2021 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = libfmos +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libbfio.m4 \ + $(top_srcdir)/m4/libcdata.m4 $(top_srcdir)/m4/libcerror.m4 \ + $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ + $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ + $(top_srcdir)/m4/libcrypto.m4 $(top_srcdir)/m4/libcsplit.m4 \ + $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \ + $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ + $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmos.m4 \ + $(top_srcdir)/m4/libfuse.m4 $(top_srcdir)/m4/libhmac.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/pthread.m4 \ + $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ + $(top_srcdir)/m4/types.m4 $(top_srcdir)/m4/zlib.m4 \ + $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/common/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libfmos_la_LIBADD = +am__libfmos_la_SOURCES_DIST = libfmos_adc.c libfmos_adc.h \ + libfmos_definitions.h libfmos_extern.h libfmos_error.c \ + libfmos_error.h libfmos_libcerror.h libfmos_libcnotify.h \ + libfmos_lzfse.c libfmos_lzfse.h libfmos_lzfse_bit_stream.c \ + libfmos_lzfse_bit_stream.h libfmos_lzfse_decoder.c \ + libfmos_lzfse_decoder.h libfmos_lzvn.c libfmos_lzvn.h \ + libfmos_notify.c libfmos_notify.h libfmos_support.c \ + libfmos_support.h libfmos_types.h libfmos_unused.h +@HAVE_LOCAL_LIBFMOS_TRUE@am_libfmos_la_OBJECTS = libfmos_adc.lo \ +@HAVE_LOCAL_LIBFMOS_TRUE@ libfmos_error.lo libfmos_lzfse.lo \ +@HAVE_LOCAL_LIBFMOS_TRUE@ libfmos_lzfse_bit_stream.lo \ +@HAVE_LOCAL_LIBFMOS_TRUE@ libfmos_lzfse_decoder.lo \ +@HAVE_LOCAL_LIBFMOS_TRUE@ libfmos_lzvn.lo libfmos_notify.lo \ +@HAVE_LOCAL_LIBFMOS_TRUE@ libfmos_support.lo +libfmos_la_OBJECTS = $(am_libfmos_la_OBJECTS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +@HAVE_LOCAL_LIBFMOS_TRUE@am_libfmos_la_rpath = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/libfmos_adc.Plo \ + ./$(DEPDIR)/libfmos_error.Plo ./$(DEPDIR)/libfmos_lzfse.Plo \ + ./$(DEPDIR)/libfmos_lzfse_bit_stream.Plo \ + ./$(DEPDIR)/libfmos_lzfse_decoder.Plo \ + ./$(DEPDIR)/libfmos_lzvn.Plo ./$(DEPDIR)/libfmos_notify.Plo \ + ./$(DEPDIR)/libfmos_support.Plo +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(libfmos_la_SOURCES) +DIST_SOURCES = $(am__libfmos_la_SOURCES_DIST) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__extra_recursive_targets = sources-recursive splint-recursive +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DPKG_DATE = @DPKG_DATE@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ETAGS = @ETAGS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FILECMD = @FILECMD@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GREP = @GREP@ +HAVE_DLLMAIN = @HAVE_DLLMAIN@ +HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ +HAVE_LIBBFIO = @HAVE_LIBBFIO@ +HAVE_LIBCDATA = @HAVE_LIBCDATA@ +HAVE_LIBCERROR = @HAVE_LIBCERROR@ +HAVE_LIBCFILE = @HAVE_LIBCFILE@ +HAVE_LIBCLOCALE = @HAVE_LIBCLOCALE@ +HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@ +HAVE_LIBCPATH = @HAVE_LIBCPATH@ +HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@ +HAVE_LIBCTHREADS = @HAVE_LIBCTHREADS@ +HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ +HAVE_LIBFDATA = @HAVE_LIBFDATA@ +HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ +HAVE_LIBFGUID = @HAVE_LIBFGUID@ +HAVE_LIBFMOS = @HAVE_LIBFMOS@ +HAVE_LIBFUSE = @HAVE_LIBFUSE@ +HAVE_LIBHMAC = @HAVE_LIBHMAC@ +HAVE_LIBUNA = @HAVE_LIBUNA@ +HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ +HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ +HAVE_LOCAL_LIBCERROR = @HAVE_LOCAL_LIBCERROR@ +HAVE_LOCAL_LIBCFILE = @HAVE_LOCAL_LIBCFILE@ +HAVE_LOCAL_LIBCLOCALE = @HAVE_LOCAL_LIBCLOCALE@ +HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@ +HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@ +HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@ +HAVE_LOCAL_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@ +HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@ +HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ +HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ +HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ +HAVE_LOCAL_LIBFMOS = @HAVE_LOCAL_LIBFMOS@ +HAVE_LOCAL_LIBHMAC = @HAVE_LOCAL_LIBHMAC@ +HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ +HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ +HAVE_OFF64_T = @HAVE_OFF64_T@ +HAVE_OPENSSL_EVP_H = @HAVE_OPENSSL_EVP_H@ +HAVE_PTHREAD = @HAVE_PTHREAD@ +HAVE_SIZE32_T = @HAVE_SIZE32_T@ +HAVE_SIZE64_T = @HAVE_SIZE64_T@ +HAVE_SSIZE32_T = @HAVE_SSIZE32_T@ +HAVE_SSIZE64_T = @HAVE_SSIZE64_T@ +HAVE_STDINT_H = @HAVE_STDINT_H@ +HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ +HAVE_WCHAR_H = @HAVE_WCHAR_H@ +HAVE_WIDE_CHARACTER_TYPE = @HAVE_WIDE_CHARACTER_TYPE@ +HAVE_ZLIB = @HAVE_ZLIB@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ +LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ +LIBCDATA_CPPFLAGS = @LIBCDATA_CPPFLAGS@ +LIBCDATA_LIBADD = @LIBCDATA_LIBADD@ +LIBCERROR_CPPFLAGS = @LIBCERROR_CPPFLAGS@ +LIBCERROR_LIBADD = @LIBCERROR_LIBADD@ +LIBCFILE_CPPFLAGS = @LIBCFILE_CPPFLAGS@ +LIBCFILE_LIBADD = @LIBCFILE_LIBADD@ +LIBCLOCALE_CPPFLAGS = @LIBCLOCALE_CPPFLAGS@ +LIBCLOCALE_LIBADD = @LIBCLOCALE_LIBADD@ +LIBCNOTIFY_CPPFLAGS = @LIBCNOTIFY_CPPFLAGS@ +LIBCNOTIFY_LIBADD = @LIBCNOTIFY_LIBADD@ +LIBCPATH_CPPFLAGS = @LIBCPATH_CPPFLAGS@ +LIBCPATH_LIBADD = @LIBCPATH_LIBADD@ +LIBCRYPTO_CPPFLAGS = @LIBCRYPTO_CPPFLAGS@ +LIBCRYPTO_LIBADD = @LIBCRYPTO_LIBADD@ +LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@ +LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@ +LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@ +LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@ +LIBDL_LIBADD = @LIBDL_LIBADD@ +LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ +LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ +LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ +LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ +LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ +LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ +LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ +LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ +LIBFMOS_CPPFLAGS = @LIBFMOS_CPPFLAGS@ +LIBFMOS_LIBADD = @LIBFMOS_LIBADD@ +LIBFSHFS_DLL_EXPORT = @LIBFSHFS_DLL_EXPORT@ +LIBFSHFS_DLL_IMPORT = @LIBFSHFS_DLL_IMPORT@ +LIBFUSE_CPPFLAGS = @LIBFUSE_CPPFLAGS@ +LIBFUSE_LIBADD = @LIBFUSE_LIBADD@ +LIBHMAC_CPPFLAGS = @LIBHMAC_CPPFLAGS@ +LIBHMAC_LIBADD = @LIBHMAC_LIBADD@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBTOOL_DEPS = @LIBTOOL_DEPS@ +LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ +LIBUNA_LIBADD = @LIBUNA_LIBADD@ +LIB_FUZZING_ENGINE = @LIB_FUZZING_ENGINE@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG = @PKGCONFIG@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +POSUB = @POSUB@ +PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ +PTHREAD_LIBADD = @PTHREAD_LIBADD@ +PYTHON = @PYTHON@ +PYTHON_CONFIG = @PYTHON_CONFIG@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ +PYTHON_LIBRARY_DIR = @PYTHON_LIBRARY_DIR@ +PYTHON_PACKAGE_DIR = @PYTHON_PACKAGE_DIR@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SPEC_DATE = @SPEC_DATE@ +STATIC_LDFLAGS = @STATIC_LDFLAGS@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +ZLIB_CPPFLAGS = @ZLIB_CPPFLAGS@ +ZLIB_LIBADD = @ZLIB_LIBADD@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +ax_libbfio_pc_libs_private = @ax_libbfio_pc_libs_private@ +ax_libbfio_spec_build_requires = @ax_libbfio_spec_build_requires@ +ax_libbfio_spec_requires = @ax_libbfio_spec_requires@ +ax_libcdata_pc_libs_private = @ax_libcdata_pc_libs_private@ +ax_libcdata_spec_build_requires = @ax_libcdata_spec_build_requires@ +ax_libcdata_spec_requires = @ax_libcdata_spec_requires@ +ax_libcerror_pc_libs_private = @ax_libcerror_pc_libs_private@ +ax_libcerror_spec_build_requires = @ax_libcerror_spec_build_requires@ +ax_libcerror_spec_requires = @ax_libcerror_spec_requires@ +ax_libcfile_pc_libs_private = @ax_libcfile_pc_libs_private@ +ax_libcfile_spec_build_requires = @ax_libcfile_spec_build_requires@ +ax_libcfile_spec_requires = @ax_libcfile_spec_requires@ +ax_libclocale_pc_libs_private = @ax_libclocale_pc_libs_private@ +ax_libclocale_spec_build_requires = @ax_libclocale_spec_build_requires@ +ax_libclocale_spec_requires = @ax_libclocale_spec_requires@ +ax_libcnotify_pc_libs_private = @ax_libcnotify_pc_libs_private@ +ax_libcnotify_spec_build_requires = @ax_libcnotify_spec_build_requires@ +ax_libcnotify_spec_requires = @ax_libcnotify_spec_requires@ +ax_libcpath_pc_libs_private = @ax_libcpath_pc_libs_private@ +ax_libcpath_spec_build_requires = @ax_libcpath_spec_build_requires@ +ax_libcpath_spec_requires = @ax_libcpath_spec_requires@ +ax_libcrypto_pc_libs_private = @ax_libcrypto_pc_libs_private@ +ax_libcrypto_spec_build_requires = @ax_libcrypto_spec_build_requires@ +ax_libcrypto_spec_requires = @ax_libcrypto_spec_requires@ +ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@ +ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@ +ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@ +ax_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@ +ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@ +ax_libcthreads_spec_requires = @ax_libcthreads_spec_requires@ +ax_libfcache_pc_libs_private = @ax_libfcache_pc_libs_private@ +ax_libfcache_spec_build_requires = @ax_libfcache_spec_build_requires@ +ax_libfcache_spec_requires = @ax_libfcache_spec_requires@ +ax_libfdata_pc_libs_private = @ax_libfdata_pc_libs_private@ +ax_libfdata_spec_build_requires = @ax_libfdata_spec_build_requires@ +ax_libfdata_spec_requires = @ax_libfdata_spec_requires@ +ax_libfdatetime_pc_libs_private = @ax_libfdatetime_pc_libs_private@ +ax_libfdatetime_spec_build_requires = @ax_libfdatetime_spec_build_requires@ +ax_libfdatetime_spec_requires = @ax_libfdatetime_spec_requires@ +ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ +ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ +ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ +ax_libfmos_pc_libs_private = @ax_libfmos_pc_libs_private@ +ax_libfmos_spec_build_requires = @ax_libfmos_spec_build_requires@ +ax_libfmos_spec_requires = @ax_libfmos_spec_requires@ +ax_libfuse_pc_libs_private = @ax_libfuse_pc_libs_private@ +ax_libfuse_spec_build_requires = @ax_libfuse_spec_build_requires@ +ax_libfuse_spec_requires = @ax_libfuse_spec_requires@ +ax_libhmac_pc_libs_private = @ax_libhmac_pc_libs_private@ +ax_libhmac_spec_build_requires = @ax_libhmac_spec_build_requires@ +ax_libhmac_spec_requires = @ax_libhmac_spec_requires@ +ax_libuna_pc_libs_private = @ax_libuna_pc_libs_private@ +ax_libuna_spec_build_requires = @ax_libuna_spec_build_requires@ +ax_libuna_spec_requires = @ax_libuna_spec_requires@ +ax_pthread_pc_libs_private = @ax_pthread_pc_libs_private@ +ax_zlib_pc_libs_private = @ax_zlib_pc_libs_private@ +ax_zlib_spec_build_requires = @ax_zlib_spec_build_requires@ +ax_zlib_spec_requires = @ax_zlib_spec_requires@ +ax_zlib_static_spec_build_requires = @ax_zlib_static_spec_build_requires@ +ax_zlib_static_spec_requires = @ax_zlib_static_spec_requires@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +fuse_CFLAGS = @fuse_CFLAGS@ +fuse_LIBS = @fuse_LIBS@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libbfio_CFLAGS = @libbfio_CFLAGS@ +libbfio_LIBS = @libbfio_LIBS@ +libcdata_CFLAGS = @libcdata_CFLAGS@ +libcdata_LIBS = @libcdata_LIBS@ +libcerror_CFLAGS = @libcerror_CFLAGS@ +libcerror_LIBS = @libcerror_LIBS@ +libcfile_CFLAGS = @libcfile_CFLAGS@ +libcfile_LIBS = @libcfile_LIBS@ +libclocale_CFLAGS = @libclocale_CFLAGS@ +libclocale_LIBS = @libclocale_LIBS@ +libcnotify_CFLAGS = @libcnotify_CFLAGS@ +libcnotify_LIBS = @libcnotify_LIBS@ +libcpath_CFLAGS = @libcpath_CFLAGS@ +libcpath_LIBS = @libcpath_LIBS@ +libcsplit_CFLAGS = @libcsplit_CFLAGS@ +libcsplit_LIBS = @libcsplit_LIBS@ +libcthreads_CFLAGS = @libcthreads_CFLAGS@ +libcthreads_LIBS = @libcthreads_LIBS@ +libdir = @libdir@ +libexecdir = @libexecdir@ +libfcache_CFLAGS = @libfcache_CFLAGS@ +libfcache_LIBS = @libfcache_LIBS@ +libfdata_CFLAGS = @libfdata_CFLAGS@ +libfdata_LIBS = @libfdata_LIBS@ +libfdatetime_CFLAGS = @libfdatetime_CFLAGS@ +libfdatetime_LIBS = @libfdatetime_LIBS@ +libfguid_CFLAGS = @libfguid_CFLAGS@ +libfguid_LIBS = @libfguid_LIBS@ +libfmos_CFLAGS = @libfmos_CFLAGS@ +libfmos_LIBS = @libfmos_LIBS@ +libfshfs_spec_requires = @libfshfs_spec_requires@ +libfshfs_spec_tools_build_requires = @libfshfs_spec_tools_build_requires@ +libhmac_CFLAGS = @libhmac_CFLAGS@ +libhmac_LIBS = @libhmac_LIBS@ +libuna_CFLAGS = @libuna_CFLAGS@ +libuna_LIBS = @libuna_LIBS@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +openssl_CFLAGS = @openssl_CFLAGS@ +openssl_LIBS = @openssl_LIBS@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +zlib_CFLAGS = @zlib_CFLAGS@ +zlib_LIBS = @zlib_LIBS@ +@HAVE_LOCAL_LIBFMOS_TRUE@AM_CPPFLAGS = \ +@HAVE_LOCAL_LIBFMOS_TRUE@ -I$(top_srcdir)/include \ +@HAVE_LOCAL_LIBFMOS_TRUE@ -I$(top_srcdir)/common \ +@HAVE_LOCAL_LIBFMOS_TRUE@ @LIBCERROR_CPPFLAGS@ \ +@HAVE_LOCAL_LIBFMOS_TRUE@ @LIBCTHREADS_CPPFLAGS@ \ +@HAVE_LOCAL_LIBFMOS_TRUE@ @LIBCNOTIFY_CPPFLAGS@ \ +@HAVE_LOCAL_LIBFMOS_TRUE@ @PTHREAD_CPPFLAGS@ + +@HAVE_LOCAL_LIBFMOS_TRUE@noinst_LTLIBRARIES = libfmos.la +@HAVE_LOCAL_LIBFMOS_TRUE@libfmos_la_SOURCES = \ +@HAVE_LOCAL_LIBFMOS_TRUE@ libfmos_adc.c libfmos_adc.h \ +@HAVE_LOCAL_LIBFMOS_TRUE@ libfmos_definitions.h \ +@HAVE_LOCAL_LIBFMOS_TRUE@ libfmos_extern.h \ +@HAVE_LOCAL_LIBFMOS_TRUE@ libfmos_error.c libfmos_error.h \ +@HAVE_LOCAL_LIBFMOS_TRUE@ libfmos_libcerror.h \ +@HAVE_LOCAL_LIBFMOS_TRUE@ libfmos_libcnotify.h \ +@HAVE_LOCAL_LIBFMOS_TRUE@ libfmos_lzfse.c libfmos_lzfse.h \ +@HAVE_LOCAL_LIBFMOS_TRUE@ libfmos_lzfse_bit_stream.c libfmos_lzfse_bit_stream.h \ +@HAVE_LOCAL_LIBFMOS_TRUE@ libfmos_lzfse_decoder.c libfmos_lzfse_decoder.h \ +@HAVE_LOCAL_LIBFMOS_TRUE@ libfmos_lzvn.c libfmos_lzvn.h \ +@HAVE_LOCAL_LIBFMOS_TRUE@ libfmos_notify.c libfmos_notify.h \ +@HAVE_LOCAL_LIBFMOS_TRUE@ libfmos_support.c libfmos_support.h \ +@HAVE_LOCAL_LIBFMOS_TRUE@ libfmos_types.h \ +@HAVE_LOCAL_LIBFMOS_TRUE@ libfmos_unused.h + +MAINTAINERCLEANFILES = \ + Makefile.in + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libfmos/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu libfmos/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + +libfmos.la: $(libfmos_la_OBJECTS) $(libfmos_la_DEPENDENCIES) $(EXTRA_libfmos_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(am_libfmos_la_rpath) $(libfmos_la_OBJECTS) $(libfmos_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfmos_adc.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfmos_error.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfmos_lzfse.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfmos_lzfse_bit_stream.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfmos_lzfse_decoder.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfmos_lzvn.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfmos_notify.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfmos_support.Plo@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +sources-local: +splint-local: + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f ./$(DEPDIR)/libfmos_adc.Plo + -rm -f ./$(DEPDIR)/libfmos_error.Plo + -rm -f ./$(DEPDIR)/libfmos_lzfse.Plo + -rm -f ./$(DEPDIR)/libfmos_lzfse_bit_stream.Plo + -rm -f ./$(DEPDIR)/libfmos_lzfse_decoder.Plo + -rm -f ./$(DEPDIR)/libfmos_lzvn.Plo + -rm -f ./$(DEPDIR)/libfmos_notify.Plo + -rm -f ./$(DEPDIR)/libfmos_support.Plo + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +sources: sources-am + +sources-am: sources-local + +splint: splint-am + +splint-am: splint-local + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ + clean-generic clean-libtool clean-noinstLTLIBRARIES \ + cscopelist-am ctags ctags-am distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + sources-am sources-local splint-am splint-local tags tags-am \ + uninstall uninstall-am + +.PRECIOUS: Makefile + + +distclean: clean + -rm -f Makefile + +sources-local: $(BUILT_SOURCES) + +splint-local: + @echo "Running splint on libfmos ..." + -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfmos_la_SOURCES) + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru libfshfs-20201104/libfmos/libfmos_adc.c libfshfs-20240221/libfmos/libfmos_adc.c --- libfshfs-20201104/libfmos/libfmos_adc.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libfmos/libfmos_adc.c 2024-02-21 06:04:11.000000000 +0000 @@ -0,0 +1,298 @@ +/* + * ADC (un)compression functions + * + * Copyright (C) 2019-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include +#include + +#include "libfmos_adc.h" +#include "libfmos_libcerror.h" +#include "libfmos_libcnotify.h" + +/* Decompresses ADC compressed data + * Returns 1 on success or -1 on error + */ +int libfmos_adc_decompress( + const uint8_t *compressed_data, + size_t compressed_data_size, + uint8_t *uncompressed_data, + size_t *uncompressed_data_size, + libcerror_error_t **error ) +{ + static char *function = "libfmos_adc_decompress"; + size_t compressed_data_offset = 0; + size_t match_offset = 0; + size_t safe_uncompressed_data_size = 0; + size_t uncompressed_data_offset = 0; + uint16_t distance = 0; + uint8_t oppcode = 0; + uint8_t size = 0; + +#if defined( HAVE_DEBUG_OUTPUT ) + size_t debug_match_offset = 0; + uint16_t debug_match_size = 0; +#endif + + if( compressed_data == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid compressed data.", + function ); + + return( -1 ); + } + if( compressed_data_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid compressed data size value exceeds maximum.", + function ); + + return( -1 ); + } + if( uncompressed_data == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid uncompressed data.", + function ); + + return( -1 ); + } + if( uncompressed_data_size == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid uncompressed data size.", + function ); + + return( -1 ); + } + safe_uncompressed_data_size = *uncompressed_data_size; + + if( safe_uncompressed_data_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid uncompressed data size value exceeds maximum.", + function ); + + return( -1 ); + } + while( compressed_data_offset < compressed_data_size ) + { + if( uncompressed_data_offset >= safe_uncompressed_data_size ) + { + break; + } + if( compressed_data_offset >= compressed_data_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: compressed data size value too small.", + function ); + + return( -1 ); + } + oppcode = compressed_data[ compressed_data_offset++ ]; + + if( ( oppcode & 0x80 ) != 0 ) + { + size = ( oppcode & 0x7f ) + 1; + + if( ( (size_t) size > compressed_data_size ) + || ( compressed_data_offset > ( compressed_data_size - size ) ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: literal size value exceeds compressed data size.", + function ); + + return( -1 ); + } + if( ( (size_t) size > safe_uncompressed_data_size ) + || ( uncompressed_data_offset > ( safe_uncompressed_data_size - size ) ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: literal size value exceeds uncompressed data size.", + function ); + + return( -1 ); + } +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: literal:\n", + function ); + libcnotify_print_data( + &( compressed_data[ compressed_data_offset ] ), + size, + LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); + } +#endif + if( memory_copy( + &( uncompressed_data[ uncompressed_data_offset ] ), + &( compressed_data[ compressed_data_offset ] ), + (size_t) size ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_COPY_FAILED, + "%s: unable to copy literal to uncompressed data.", + function ); + + return( -1 ); + } + compressed_data_offset += (size_t) size; + uncompressed_data_offset += (size_t) size; + } + else + { + if( ( oppcode & 0x40 ) != 0 ) + { + if( ( compressed_data_size < 2 ) + || ( compressed_data_offset > ( compressed_data_size - 2 ) ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: compressed data size value too small.", + function ); + + return( -1 ); + } + size = ( oppcode & 0x3f ) + 4; + distance = compressed_data[ compressed_data_offset++ ]; + distance <<= 8; + distance |= compressed_data[ compressed_data_offset++ ]; + } + else + { + if( compressed_data_offset >= compressed_data_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: compressed data size value too small.", + function ); + + return( -1 ); + } + size = ( ( oppcode & 0x3f ) >> 2 ) + 3; + distance = oppcode & 0x03; + distance <<= 8; + distance |= compressed_data[ compressed_data_offset++ ]; + } + if( (size_t) distance >= uncompressed_data_offset ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid distance value out of bounds.", + function ); + + return( -1 ); + } + if( uncompressed_data_offset < 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid uncompressed data offset value out of bounds.", + function ); + + return( -1 ); + } + match_offset = uncompressed_data_offset - distance - 1; + + if( ( (size_t) size > safe_uncompressed_data_size ) + || ( uncompressed_data_offset > ( safe_uncompressed_data_size - size ) ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid match size value out of bounds.", + function ); + + return( -1 ); + } +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + debug_match_offset = match_offset; + debug_match_size = size; + + libcnotify_printf( + "%s: match offset\t\t\t\t\t\t: 0x%" PRIzx "\n", + function, + debug_match_offset ); + } +#endif + while( size > 0 ) + { + uncompressed_data[ uncompressed_data_offset++ ] = uncompressed_data[ match_offset++ ]; + + size--; + } +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: match:\n", + function ); + libcnotify_print_data( + &( uncompressed_data[ debug_match_offset ] ), + debug_match_size, + LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); + } +#endif + } + } + *uncompressed_data_size = uncompressed_data_offset; + + return( 1 ); +} + diff -Nru libfshfs-20201104/libfmos/libfmos_adc.h libfshfs-20240221/libfmos/libfmos_adc.h --- libfshfs-20201104/libfmos/libfmos_adc.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libfmos/libfmos_adc.h 2024-02-21 06:04:11.000000000 +0000 @@ -0,0 +1,48 @@ +/* + * ADC (un)compression functions + * + * Copyright (C) 2019-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _LIBFMOS_ADC_H ) +#define _LIBFMOS_ADC_H + +#include +#include + +#include "libfmos_extern.h" +#include "libfmos_libcerror.h" + +#if defined( __cplusplus ) +extern "C" { +#endif + +LIBFMOS_EXTERN \ +int libfmos_adc_decompress( + const uint8_t *compressed_data, + size_t compressed_data_size, + uint8_t *uncompressed_data, + size_t *uncompressed_data_size, + libcerror_error_t **error ); + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _LIBFMOS_ADC_H ) */ + diff -Nru libfshfs-20201104/libfmos/libfmos_definitions.h libfshfs-20240221/libfmos/libfmos_definitions.h --- libfshfs-20201104/libfmos/libfmos_definitions.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libfmos/libfmos_definitions.h 2024-02-21 06:04:11.000000000 +0000 @@ -0,0 +1,69 @@ +/* + * The internal definitions + * + * Copyright (C) 2019-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( LIBFMOS_INTERNAL_DEFINITIONS_H ) +#define LIBFMOS_INTERNAL_DEFINITIONS_H + +#include +#include + +/* Define HAVE_LOCAL_LIBFMOS for local use of libfmos + */ +#if !defined( HAVE_LOCAL_LIBFMOS ) +#include + +/* The definitions in are copied here + * for local use of libfmos + */ +#else +#include + +#define LIBFMOS_VERSION 20240118 + +/* The version string + */ +#define LIBFMOS_VERSION_STRING "20240118" + +#endif /* !defined( HAVE_LOCAL_LIBFMOS ) */ + +#define LIBFMOS_LZFSE_NUMBER_OF_LITERAL_STATES 1024 +#define LIBFMOS_LZFSE_NUMBER_OF_LITERAL_SYMBOLS 256 + +#define LIBFMOS_LZFSE_NUMBER_OF_L_VALUE_STATES 64 +#define LIBFMOS_LZFSE_NUMBER_OF_L_VALUE_SYMBOLS 20 + +#define LIBFMOS_LZFSE_NUMBER_OF_M_VALUE_STATES 64 +#define LIBFMOS_LZFSE_NUMBER_OF_M_VALUE_SYMBOLS 20 + +#define LIBFMOS_LZFSE_NUMBER_OF_D_VALUE_STATES 256 +#define LIBFMOS_LZFSE_NUMBER_OF_D_VALUE_SYMBOLS 64 + +#define LIBFMOS_LZFSE_ENDOFSTREAM_BLOCK_MARKER 0x24787662UL +#define LIBFMOS_LZFSE_UNCOMPRESSED_BLOCK_MARKER 0x2d787662UL +#define LIBFMOS_LZFSE_COMPRESSED_BLOCK_V1_MARKER 0x31787662UL +#define LIBFMOS_LZFSE_COMPRESSED_BLOCK_V2_MARKER 0x32787662UL +#define LIBFMOS_LZFSE_COMPRESSED_BLOCK_LZVN_MARKER 0x6e787662UL + +#define LIBFMOS_LZFSE_MATCHES_PER_BLOCK 10000 +#define LIBFMOS_LZFSE_LITERALS_PER_BLOCK ( 4 * LIBFMOS_LZFSE_MATCHES_PER_BLOCK ) + +#endif /* !defined( LIBFMOS_INTERNAL_DEFINITIONS_H ) */ + diff -Nru libfshfs-20201104/libfmos/libfmos_error.c libfshfs-20240221/libfmos/libfmos_error.c --- libfshfs-20201104/libfmos/libfmos_error.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libfmos/libfmos_error.c 2024-02-21 06:04:11.000000000 +0000 @@ -0,0 +1,111 @@ +/* + * Error functions + * + * Copyright (C) 2019-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include +#include + +#include "libfmos_error.h" +#include "libfmos_libcerror.h" + +#if !defined( HAVE_LOCAL_LIBFMOS ) + +/* Free an error and its elements + */ +void libfmos_error_free( + libfmos_error_t **error ) +{ + libcerror_error_free( + (libcerror_error_t **) error ); +} + +/* Prints a descriptive string of the error to the stream + * Returns the number of printed characters if successful or -1 on error + */ +int libfmos_error_fprint( + libfmos_error_t *error, + FILE *stream ) +{ + int print_count = 0; + + print_count = libcerror_error_fprint( + (libcerror_error_t *) error, + stream ); + + return( print_count ); +} + +/* Prints a descriptive string of the error to the string + * The end-of-string character is not included in the return value + * Returns the number of printed characters if successful or -1 on error + */ +int libfmos_error_sprint( + libfmos_error_t *error, + char *string, + size_t size ) +{ + int print_count = 0; + + print_count = libcerror_error_sprint( + (libcerror_error_t *) error, + string, + size ); + + return( print_count ); +} + +/* Prints a backtrace of the error to the stream + * Returns the number of printed characters if successful or -1 on error + */ +int libfmos_error_backtrace_fprint( + libfmos_error_t *error, + FILE *stream ) +{ + int print_count = 0; + + print_count = libcerror_error_backtrace_fprint( + (libcerror_error_t *) error, + stream ); + + return( print_count ); +} + +/* Prints a backtrace of the error to the string + * The end-of-string character is not included in the return value + * Returns the number of printed characters if successful or -1 on error + */ +int libfmos_error_backtrace_sprint( + libfmos_error_t *error, + char *string, + size_t size ) +{ + int print_count = 0; + + print_count = libcerror_error_backtrace_sprint( + (libcerror_error_t *) error, + string, + size ); + + return( print_count ); +} + +#endif /* !defined( HAVE_LOCAL_LIBFMOS ) */ + diff -Nru libfshfs-20201104/libfmos/libfmos_error.h libfshfs-20240221/libfmos/libfmos_error.h --- libfshfs-20201104/libfmos/libfmos_error.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libfmos/libfmos_error.h 2024-02-21 06:04:11.000000000 +0000 @@ -0,0 +1,74 @@ +/* + * Error functions + * + * Copyright (C) 2019-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _LIBFMOS_INTERNAL_ERROR_H ) +#define _LIBFMOS_INTERNAL_ERROR_H + +#include +#include +#include + +#if !defined( HAVE_LOCAL_LIBFMOS ) +#include +#endif + +#include "libfmos_extern.h" + +#if defined( __cplusplus ) +extern "C" { +#endif + +#if !defined( HAVE_LOCAL_LIBFMOS ) + +LIBFMOS_EXTERN \ +void libfmos_error_free( + libfmos_error_t **error ); + +LIBFMOS_EXTERN \ +int libfmos_error_fprint( + libfmos_error_t *error, + FILE *stream ); + +LIBFMOS_EXTERN \ +int libfmos_error_sprint( + libfmos_error_t *error, + char *string, + size_t size ); + +LIBFMOS_EXTERN \ +int libfmos_error_backtrace_fprint( + libfmos_error_t *error, + FILE *stream ); + +LIBFMOS_EXTERN \ +int libfmos_error_backtrace_sprint( + libfmos_error_t *error, + char *string, + size_t size ); + +#endif /* !defined( HAVE_LOCAL_LIBFMOS ) */ + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _LIBFMOS_INTERNAL_ERROR_H ) */ + diff -Nru libfshfs-20201104/libfmos/libfmos_extern.h libfshfs-20240221/libfmos/libfmos_extern.h --- libfshfs-20201104/libfmos/libfmos_extern.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libfmos/libfmos_extern.h 2024-02-21 06:04:11.000000000 +0000 @@ -0,0 +1,46 @@ +/* + * The internal extern definition + * + * Copyright (C) 2019-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _LIBFMOS_INTERNAL_EXTERN_H ) +#define _LIBFMOS_INTERNAL_EXTERN_H + +#include + +/* Define HAVE_LOCAL_LIBFMOS for local use of libfmos + */ +#if !defined( HAVE_LOCAL_LIBFMOS ) + +#include + +#if defined( __CYGWIN__ ) || defined( __MINGW32__ ) +#define LIBFMOS_EXTERN_VARIABLE extern +#else +#define LIBFMOS_EXTERN_VARIABLE LIBFMOS_EXTERN +#endif + +#else +#define LIBFMOS_EXTERN /* extern */ +#define LIBFMOS_EXTERN_VARIABLE extern + +#endif /* !defined( HAVE_LOCAL_LIBFMOS ) */ + +#endif /* !defined( _LIBFMOS_INTERNAL_EXTERN_H ) */ + diff -Nru libfshfs-20201104/libfmos/libfmos_libcerror.h libfshfs-20240221/libfmos/libfmos_libcerror.h --- libfshfs-20201104/libfmos/libfmos_libcerror.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libfmos/libfmos_libcerror.h 2024-02-21 06:04:11.000000000 +0000 @@ -0,0 +1,50 @@ +/* + * The libcerror header wrapper + * + * Copyright (C) 2019-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _LIBFMOS_LIBCERROR_H ) +#define _LIBFMOS_LIBCERROR_H + +#include + +/* Define HAVE_LOCAL_LIBCERROR for local use of libcerror + */ +#if defined( HAVE_LOCAL_LIBCERROR ) + +#include +#include +#include +#include + +#else + +/* If libtool DLL support is enabled set LIBCERROR_DLL_IMPORT + * before including libcerror.h + */ +#if defined( _WIN32 ) && defined( DLL_IMPORT ) +#define LIBCERROR_DLL_IMPORT +#endif + +#include + +#endif /* defined( HAVE_LOCAL_LIBCERROR ) */ + +#endif /* !defined( _LIBFMOS_LIBCERROR_H ) */ + diff -Nru libfshfs-20201104/libfmos/libfmos_libcnotify.h libfshfs-20240221/libfmos/libfmos_libcnotify.h --- libfshfs-20201104/libfmos/libfmos_libcnotify.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libfmos/libfmos_libcnotify.h 2024-02-21 06:04:11.000000000 +0000 @@ -0,0 +1,50 @@ +/* + * The libcnotify header wrapper + * + * Copyright (C) 2019-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _LIBFMOS_LIBCNOTIFY_H ) +#define _LIBFMOS_LIBCNOTIFY_H + +#include + +/* Define HAVE_LOCAL_LIBCNOTIFY for local use of libcnotify + */ +#if defined( HAVE_LOCAL_LIBCNOTIFY ) + +#include +#include +#include +#include + +#else + +/* If libtool DLL support is enabled set LIBCNOTIFY_DLL_IMPORT + * before including libcnotify.h + */ +#if defined( _WIN32 ) && defined( DLL_IMPORT ) +#define LIBCNOTIFY_DLL_IMPORT +#endif + +#include + +#endif /* defined( HAVE_LOCAL_LIBCNOTIFY ) */ + +#endif /* !defined( _LIBFMOS_LIBCNOTIFY_H ) */ + diff -Nru libfshfs-20201104/libfmos/libfmos_lzfse.c libfshfs-20240221/libfmos/libfmos_lzfse.c --- libfshfs-20201104/libfmos/libfmos_lzfse.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libfmos/libfmos_lzfse.c 2024-02-21 06:04:11.000000000 +0000 @@ -0,0 +1,2243 @@ +/* + * LZFSE (un)compression functions + * + * Copyright (C) 2019-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include +#include +#include + +#include "libfmos_definitions.h" +#include "libfmos_libcerror.h" +#include "libfmos_libcnotify.h" +#include "libfmos_lzfse.h" +#include "libfmos_lzfse_bit_stream.h" +#include "libfmos_lzfse_decoder.h" +#include "libfmos_lzvn.h" + +const uint8_t libfmos_lzfse_frequency_number_of_bits_table[ 32 ] = { + 2, 3, 2, 5, 2, 3, 2, 8, 2, 3, 2, 5, 2, 3, 2, 14, + 2, 3, 2, 5, 2, 3, 2, 8, 2, 3, 2, 5, 2, 3, 2, 14 }; + +const uint16_t libfmos_lzfse_frequency_value_table[ 32 ] = { + 0, 2, 1, 4, 0, 3, 1, 0xffff, 0, 2, 1, 5, 0, 3, 1, 0xffff, + 0, 2, 1, 6, 0, 3, 1, 0xffff, 0, 2, 1, 7, 0, 3, 1, 0xffff }; + +const uint8_t libfmos_lzfse_d_value_bits_table[ LIBFMOS_LZFSE_NUMBER_OF_D_VALUE_SYMBOLS ] = { + 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, + 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, + 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, + 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15 }; + +const int32_t libfmos_lzfse_d_value_base_table[ LIBFMOS_LZFSE_NUMBER_OF_D_VALUE_SYMBOLS ] = { + 0, 1, 2, 3, 4, 6, 8, 10, 12, 16, 20, 24, 28, 36, 44, 52, + 60, 76, 92, 108, 124, 156, 188, 220, 252, 316, 380, 444, 508, 636, 764, 892, + 1020, 1276, 1532, 1788, 2044, 2556, 3068, 3580, 4092, 5116, 6140, 7164, 8188, 10236, 12284, 14332, + 16380, 20476, 24572, 28668, 32764, 40956, 49148, 57340, 65532, 81916, 98300, 114684, 131068, 163836, 196604, 229372 }; + +const uint8_t libfmos_lzfse_l_value_bits_table[ LIBFMOS_LZFSE_NUMBER_OF_L_VALUE_SYMBOLS ] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 3, 5, 8 }; + +const int32_t libfmos_lzfse_l_value_base_table[ LIBFMOS_LZFSE_NUMBER_OF_L_VALUE_SYMBOLS ] = { + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 20, 28, 60 }; + +const uint8_t libfmos_lzfse_m_value_bits_table[ LIBFMOS_LZFSE_NUMBER_OF_M_VALUE_SYMBOLS ] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 3, 5, 8, 11 }; + +const int32_t libfmos_lzfse_m_value_base_table[ LIBFMOS_LZFSE_NUMBER_OF_M_VALUE_SYMBOLS ] = { + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 24, 56, 312 }; + +#if defined( _MSC_VER ) +#define libfmos_lzfse_count_leading_zeros( value ) \ + __lzcnt( (unsigned int) value ) + +#else +#define libfmos_lzfse_count_leading_zeros( value ) \ + __builtin_clz( (unsigned int) value ) +#endif + +/* Builds a decoder table + * Returns 1 on success or -1 on error + */ +int libfmos_lzfse_build_decoder_table( + int number_of_states, + uint16_t number_of_symbols, + const uint16_t *frequency_table, + libfmos_lzfse_decoder_entry_t *decoder_table, + libcerror_error_t **error ) +{ + libfmos_lzfse_decoder_entry_t *decoder_entry = NULL; + static char *function = "libfmos_lzfse_build_decoder_table"; + uint16_t symbol = 0; + int16_t delta = 0; + int base_decoder_weight = 0; + int decoder_weight = 0; + int decoder_table_index = 0; + int frequency = 0; + int number_of_bits = 0; + int number_of_leading_zeros = 0; + int sum_of_frequencies = 0; + + if( number_of_symbols > 256 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid number of symbols value out of bounds.", + function ); + + return( -1 ); + } + if( frequency_table == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid frequency table.", + function ); + + return( -1 ); + } + if( decoder_table == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid decoder table.", + function ); + + return( -1 ); + } + number_of_leading_zeros = (int) libfmos_lzfse_count_leading_zeros( number_of_states ); + + for( symbol = 0; + symbol < number_of_symbols; + symbol++ ) + { + frequency = frequency_table[ symbol ]; + + /* 0 occurrences of the symbol + */ + if( frequency == 0 ) + { + continue; + } + sum_of_frequencies += frequency; + + if( sum_of_frequencies > number_of_states ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid sum of frequencies value out of bounds.", + function ); + + return( -1 ); + } + number_of_bits = (int) libfmos_lzfse_count_leading_zeros( frequency ) - number_of_leading_zeros; + + base_decoder_weight = ( ( 2 * number_of_states ) >> number_of_bits ) - frequency; + + for( decoder_weight = 0; + decoder_weight < frequency; + decoder_weight++ ) + { + decoder_entry = &( decoder_table[ decoder_table_index++ ] ); + + decoder_entry->number_of_bits = (int8_t) number_of_bits; + decoder_entry->symbol = (uint8_t) symbol; + + if( decoder_weight < base_decoder_weight ) + { + delta = (int16_t) ( ( ( frequency + decoder_weight ) << number_of_bits ) - number_of_states ); + } + else + { + decoder_entry->number_of_bits -= 1; + + delta = (int16_t) ( ( decoder_weight - base_decoder_weight ) << ( number_of_bits - 1 ) ); + } + decoder_entry->delta = delta; + } + } + return( 1 ); +} + +/* Builds a value decoder table + * Returns 1 on success or -1 on error + */ +int libfmos_lzfse_build_value_decoder_table( + int number_of_states, + uint16_t number_of_symbols, + const uint16_t *frequency_table, + const uint8_t *value_bits_table, + const int32_t *value_base_table, + libfmos_lzfse_value_decoder_entry_t *value_decoder_table, + libcerror_error_t **error ) +{ + libfmos_lzfse_value_decoder_entry_t *value_decoder_entry = NULL; + static char *function = "libfmos_lzfse_build_value_decoder_table"; + int32_t value_base = 0; + uint16_t symbol = 0; + int16_t delta = 0; + uint8_t value_bits = 0; + int base_decoder_weight = 0; + int decoder_weight = 0; + int decoder_table_index = 0; + int frequency = 0; + int number_of_bits = 0; + int number_of_leading_zeros = 0; + int sum_of_frequencies = 0; + + if( number_of_symbols > 256 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid number of symbols value out of bounds.", + function ); + + return( -1 ); + } + if( frequency_table == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid frequency table.", + function ); + + return( -1 ); + } + if( value_bits_table == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid value bits table.", + function ); + + return( -1 ); + } + if( value_base_table == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid value base table.", + function ); + + return( -1 ); + } + if( value_decoder_table == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid value decoder table.", + function ); + + return( -1 ); + } + number_of_leading_zeros = (int) libfmos_lzfse_count_leading_zeros( number_of_states ); + + for( symbol = 0; + symbol < number_of_symbols; + symbol++ ) + { + frequency = frequency_table[ symbol ]; + + /* 0 occurrences of the symbol + */ + if( frequency == 0 ) + { + continue; + } + sum_of_frequencies += frequency; + + if( sum_of_frequencies > number_of_states ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid sum of frequencies value out of bounds.", + function ); + + return( -1 ); + } + number_of_bits = (int) libfmos_lzfse_count_leading_zeros( frequency ) - number_of_leading_zeros; + + base_decoder_weight = ( ( 2 * number_of_states ) >> number_of_bits ) - frequency; + + value_bits = value_bits_table[ symbol ]; + value_base = value_base_table[ symbol ]; + + for( decoder_weight = 0; + decoder_weight < frequency; + decoder_weight++ ) + { + value_decoder_entry = &( value_decoder_table[ decoder_table_index++ ] ); + + value_decoder_entry->value_bits = value_bits; + value_decoder_entry->value_base = value_base; + value_decoder_entry->value_bitmask = ( (uint32_t) 1UL << value_bits ) - 1; + value_decoder_entry->number_of_bits = (uint8_t) ( number_of_bits + value_bits ); + + if( decoder_weight < base_decoder_weight ) + { + delta = (int16_t) ( ( ( frequency + decoder_weight ) << number_of_bits ) - number_of_states ); + } + else + { + value_decoder_entry->number_of_bits -= 1; + + delta = (int16_t) ( ( decoder_weight - base_decoder_weight ) << ( number_of_bits - 1 ) ); + } + value_decoder_entry->delta = delta; + } + } + return( 1 ); +} + +/* Reads a LZFSE compressed block header with uncompressed tables (version 1) + * Returns 1 on success or -1 on error + */ +int libfmos_lzfse_read_block_v1_header( + libfmos_lzfse_decoder_t *decoder, + const uint8_t *compressed_data, + size_t compressed_data_size, + size_t *compressed_data_offset, + uint16_t *frequency_table, + libcerror_error_t **error ) +{ + static char *function = "libfmos_lzfse_read_block_v1_header"; + size_t safe_compressed_data_offset = 0; + uint32_t compressed_block_size = 0; + uint32_t literal_bits = 0; + uint32_t lmd_values_bits = 0; + uint16_t table_index = 0; + uint8_t literal_decoder_index = 0; + + if( decoder == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid decoder.", + function ); + + return( -1 ); + } + if( compressed_data == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid compressed data.", + function ); + + return( -1 ); + } + if( ( compressed_data_size < 762 ) + || ( compressed_data_size > (size_t) SSIZE_MAX ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid compressed data size value out of bounds.", + function ); + + return( -1 ); + } + if( compressed_data_offset == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid compressed data offset.", + function ); + + return( -1 ); + } + safe_compressed_data_offset = *compressed_data_offset; + + if( safe_compressed_data_offset > ( compressed_data_size - 762 ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid compressed data offset value out of bounds.", + function ); + + return( -1 ); + } + if( frequency_table == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid frequency table.", + function ); + + return( -1 ); + } +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: v1 block header data:\n", + function ); + libcnotify_print_data( + &( compressed_data[ safe_compressed_data_offset ] ), + 762, + 0 ); + } +#endif + byte_stream_copy_to_uint32_little_endian( + &( compressed_data[ safe_compressed_data_offset ] ), + compressed_block_size ); + + safe_compressed_data_offset += 4; + + byte_stream_copy_to_uint32_little_endian( + &( compressed_data[ safe_compressed_data_offset ] ), + decoder->number_of_literals ); + + safe_compressed_data_offset += 4; + + byte_stream_copy_to_uint32_little_endian( + &( compressed_data[ safe_compressed_data_offset ] ), + decoder->number_of_lmd_values ); + + safe_compressed_data_offset += 4; + + byte_stream_copy_to_uint32_little_endian( + &( compressed_data[ safe_compressed_data_offset ] ), + decoder->literals_data_size ); + + safe_compressed_data_offset += 4; + + byte_stream_copy_to_uint32_little_endian( + &( compressed_data[ safe_compressed_data_offset ] ), + decoder->lmd_values_data_size ); + + safe_compressed_data_offset += 4; + + byte_stream_copy_to_uint32_little_endian( + &( compressed_data[ safe_compressed_data_offset ] ), + literal_bits ); + + safe_compressed_data_offset += 4; + + for( literal_decoder_index = 0; + literal_decoder_index < 4; + literal_decoder_index++ ) + { + byte_stream_copy_to_uint16_little_endian( + &( compressed_data[ safe_compressed_data_offset ] ), + decoder->literal_states[ literal_decoder_index ] ); + + safe_compressed_data_offset += 2; + } + byte_stream_copy_to_uint32_little_endian( + &( compressed_data[ safe_compressed_data_offset ] ), + lmd_values_bits ); + + safe_compressed_data_offset += 4; + + byte_stream_copy_to_uint16_little_endian( + &( compressed_data[ safe_compressed_data_offset ] ), + decoder->l_value_state ); + + safe_compressed_data_offset += 2; + + byte_stream_copy_to_uint16_little_endian( + &( compressed_data[ safe_compressed_data_offset ] ), + decoder->m_value_state ); + + safe_compressed_data_offset += 2; + + byte_stream_copy_to_uint16_little_endian( + &( compressed_data[ safe_compressed_data_offset ] ), + decoder->d_value_state ); + + safe_compressed_data_offset += 2; + + for( table_index = 0; + table_index < 360; + table_index++ ) + { + byte_stream_copy_to_uint16_little_endian( + &( compressed_data[ safe_compressed_data_offset ] ), + frequency_table[ table_index ] ); + + safe_compressed_data_offset += 2; + } +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: compressed block size\t\t: %" PRIu32 "\n", + function, + compressed_block_size ); + + libcnotify_printf( + "%s: number of literals\t\t\t: %" PRIu32 "\n", + function, + decoder->number_of_literals ); + + libcnotify_printf( + "%s: number of L, M, D values\t\t: %" PRIu32 "\n", + function, + decoder->number_of_lmd_values ); + + libcnotify_printf( + "%s: literals data size\t\t\t: %" PRIu32 "\n", + function, + decoder->literals_data_size ); + + libcnotify_printf( + "%s: L, M, D values data size\t\t: %" PRIu32 "\n", + function, + decoder->lmd_values_data_size ); + + libcnotify_printf( + "%s: literal_bits\t\t\t: %" PRIi32 "\n", + function, + (int32_t) literal_bits ); + + for( literal_decoder_index = 0; + literal_decoder_index < 4; + literal_decoder_index++ ) + { + libcnotify_printf( + "%s: literal_state[ %" PRIu8 " ]\t\t\t: %" PRIu16 "\n", + function, + literal_decoder_index, + decoder->literal_states[ literal_decoder_index ] ); + } + libcnotify_printf( + "%s: lmd_values_bits\t\t\t: %" PRIi32 "\n", + function, + (int32_t) lmd_values_bits ); + + libcnotify_printf( + "%s: L value state\t\t\t: %" PRIu16 "\n", + function, + decoder->l_value_state ); + + libcnotify_printf( + "%s: M value state\t\t\t: %" PRIu16 "\n", + function, + decoder->m_value_state ); + + libcnotify_printf( + "%s: D value state\t\t\t: %" PRIu16 "\n", + function, + decoder->d_value_state ); + + for( table_index = 0; + table_index < 360; + table_index++ ) + { + if( frequency_table[ table_index ] != 0 ) + { + libcnotify_printf( + "%s: frequency table: %d value\t\t: %" PRIu16 "\n", + function, + table_index, + frequency_table[ table_index ] ); + } + } + libcnotify_printf( + "\n" ); + } +#endif /* defined( HAVE_DEBUG_OUTPUT ) */ + + decoder->literal_bits = (int32_t) literal_bits; + decoder->lmd_values_bits = (int32_t) lmd_values_bits; + + *compressed_data_offset = safe_compressed_data_offset; + + return( 1 ); +} + +/* Reads a LZFSE compressed block header with compressed tables (version 2) + * Returns 1 on success or -1 on error + */ +int libfmos_lzfse_read_block_v2_header( + libfmos_lzfse_decoder_t *decoder, + const uint8_t *compressed_data, + size_t compressed_data_size, + size_t *compressed_data_offset, + uint16_t *frequency_table, + libcerror_error_t **error ) +{ + static char *function = "libfmos_lzfse_read_block_v2_header"; + size_t safe_compressed_data_offset = 0; + uint64_t packed_fields1 = 0; + uint64_t packed_fields2 = 0; + uint64_t packed_fields3 = 0; + uint32_t header_size = 0; + +#if defined( HAVE_DEBUG_OUTPUT ) + uint16_t table_index = 0; + uint8_t literal_decoder_index = 0; +#endif + + if( decoder == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid decoder.", + function ); + + return( -1 ); + } + if( compressed_data == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid compressed data.", + function ); + + return( -1 ); + } + if( ( compressed_data_size < 24 ) + || ( compressed_data_size > (size_t) SSIZE_MAX ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid compressed data size value out of bounds.", + function ); + + return( -1 ); + } + if( compressed_data_offset == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid compressed data offset.", + function ); + + return( -1 ); + } + safe_compressed_data_offset = *compressed_data_offset; + + if( safe_compressed_data_offset > ( compressed_data_size - 24 ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid compressed data offset value out of bounds.", + function ); + + return( -1 ); + } + if( frequency_table == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid frequency table.", + function ); + + return( -1 ); + } +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: v2 block header data:\n", + function ); + libcnotify_print_data( + &( compressed_data[ safe_compressed_data_offset ] ), + 24, + 0 ); + } +#endif + byte_stream_copy_to_uint64_little_endian( + &( compressed_data[ safe_compressed_data_offset ] ), + packed_fields1 ); + + safe_compressed_data_offset += 8; + + byte_stream_copy_to_uint64_little_endian( + &( compressed_data[ safe_compressed_data_offset ] ), + packed_fields2 ); + + safe_compressed_data_offset += 8; + + byte_stream_copy_to_uint64_little_endian( + &( compressed_data[ safe_compressed_data_offset ] ), + packed_fields3 ); + + safe_compressed_data_offset += 8; + +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: packed fields 1\t\t\t: 0x%08" PRIx64 "\n", + function, + packed_fields1 ); + + libcnotify_printf( + "%s: packed fields 2\t\t\t: 0x%08" PRIx64 "\n", + function, + packed_fields2 ); + + libcnotify_printf( + "%s: packed fields 3\t\t\t: 0x%08" PRIx64 "\n", + function, + packed_fields3 ); + } +#endif /* defined( HAVE_DEBUG_OUTPUT ) */ + + decoder->number_of_literals = (uint32_t) ( packed_fields1 & 0x000fffffUL ); + decoder->literals_data_size = (uint32_t) ( ( packed_fields1 >> 20 ) & 0x000fffffUL ); + decoder->number_of_lmd_values = (uint32_t) ( ( packed_fields1 >> 40 ) & 0x000fffffUL ); + decoder->literal_bits = (int32_t) ( ( packed_fields1 >> 60 ) & 0x00000007UL ) - 7; + + decoder->literal_states[ 0 ] = (uint16_t) ( packed_fields2 & 0x000003ffUL ); + decoder->literal_states[ 1 ] = (uint16_t) ( ( packed_fields2 >> 10 ) & 0x000003ffUL ); + decoder->literal_states[ 2 ] = (uint16_t) ( ( packed_fields2 >> 20 ) & 0x000003ffUL ); + decoder->literal_states[ 3 ] = (uint16_t) ( ( packed_fields2 >> 30 ) & 0x000003ffUL ); + decoder->lmd_values_data_size = (uint32_t) ( ( packed_fields2 >> 40 ) & 0x000fffffUL ); + decoder->lmd_values_bits = (int32_t) ( ( packed_fields2 >> 60 ) & 0x00000007UL ) - 7; + + header_size = (uint32_t) ( packed_fields3 & 0xffffffffUL ); + decoder->l_value_state = (uint16_t) ( ( packed_fields3 >> 32 ) & 0x000003ffUL ); + decoder->m_value_state = (uint16_t) ( ( packed_fields3 >> 42 ) & 0x000003ffUL ); + decoder->d_value_state = (uint16_t) ( ( packed_fields3 >> 52 ) & 0x000003ffUL ); + + if( ( header_size < 32 ) + || ( header_size > 720 ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid header size value out of bounds.", + function ); + + return( -1 ); + } + if( header_size > 32 ) + { +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: compressed frequency table data:\n", + function ); + libcnotify_print_data( + &( compressed_data[ safe_compressed_data_offset ] ), + header_size - 32, + 0 ); + } +#endif + if( ( header_size > compressed_data_size ) + || ( safe_compressed_data_offset > ( compressed_data_size - header_size ) ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: compressed data size value too small.", + function ); + + return( -1 ); + } + if( libfmos_lzfse_read_compressed_frequency_table( + &( compressed_data[ safe_compressed_data_offset ] ), + header_size - 32, + frequency_table, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_READ_FAILED, + "%s: unable to read compressed frequency table.", + function ); + + return( -1 ); + } + safe_compressed_data_offset += (size_t) header_size - 32; + } +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: number of literals\t\t\t: %" PRIu32 "\n", + function, + decoder->number_of_literals ); + + libcnotify_printf( + "%s: number of L, M, D values\t\t: %" PRIu32 "\n", + function, + decoder->number_of_lmd_values ); + + libcnotify_printf( + "%s: literals data size\t\t\t: %" PRIu32 "\n", + function, + decoder->literals_data_size ); + + libcnotify_printf( + "%s: L, M, D values data size\t\t: %" PRIu32 "\n", + function, + decoder->lmd_values_data_size ); + + libcnotify_printf( + "%s: literal_bits\t\t\t: %" PRIi32 "\n", + function, + decoder->literal_bits ); + + for( literal_decoder_index = 0; + literal_decoder_index < 4; + literal_decoder_index++ ) + { + libcnotify_printf( + "%s: literal_states[ %" PRIu8 " ]\t\t\t: %" PRIu16 "\n", + function, + literal_decoder_index, + decoder->literal_states[ literal_decoder_index ] ); + } + libcnotify_printf( + "%s: lmd_bits\t\t\t\t: %" PRIi32 "\n", + function, + decoder->lmd_values_bits ); + + libcnotify_printf( + "%s: header size\t\t\t\t: %" PRIu32 "\n", + function, + header_size ); + + libcnotify_printf( + "%s: L value state\t\t\t: %" PRIu16 "\n", + function, + decoder->l_value_state ); + + libcnotify_printf( + "%s: M value state\t\t\t: %" PRIu16 "\n", + function, + decoder->m_value_state ); + + libcnotify_printf( + "%s: D value state\t\t\t: %" PRIu16 "\n", + function, + decoder->d_value_state ); + + for( table_index = 0; + table_index < 360; + table_index++ ) + { + if( frequency_table[ table_index ] != 0 ) + { + libcnotify_printf( + "%s: frequency table: %d value\t\t: %" PRIu16 "\n", + function, + table_index, + frequency_table[ table_index ] ); + } + } + libcnotify_printf( + "\n" ); + } +#endif /* defined( HAVE_DEBUG_OUTPUT ) */ + + *compressed_data_offset = safe_compressed_data_offset; + + return( 1 ); +} + +/* Reads a compressed frequency table bit stream + * Returns 1 on success or -1 on error + */ +int libfmos_lzfse_read_compressed_frequency_table( + const uint8_t *compressed_data, + size_t compressed_data_size, + uint16_t *frequency_table, + libcerror_error_t **error ) +{ + static char *function = "libfmos_lzfse_read_compressed_frequency_table"; + size_t compressed_data_offset = 0; + uint32_t value_32bit = 0; + uint16_t frequency_value = 0; + int16_t table_index = 0; + uint8_t frequency_value_size = 0; + uint8_t lookup_index = 0; + uint8_t number_of_bits = 0; + + if( compressed_data == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid compressed data.", + function ); + + return( -1 ); + } + if( ( compressed_data_size < 4 ) + || ( compressed_data_size > (size_t) SSIZE_MAX ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid compressed data size value out of bounds.", + function ); + + return( -1 ); + } + if( frequency_table == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid frequency table.", + function ); + + return( -1 ); + } + for( table_index = 0; + table_index < 360; + table_index++ ) + { + while( ( number_of_bits <= 24 ) + && ( compressed_data_offset < compressed_data_size ) ) + { + value_32bit |= (uint32_t) compressed_data[ compressed_data_offset++ ] << number_of_bits; + number_of_bits += 8; + } + lookup_index = (uint8_t) ( value_32bit & 0x0000001fUL ); + frequency_value_size = libfmos_lzfse_frequency_number_of_bits_table[ lookup_index ]; + + if( frequency_value_size == 8 ) + { + frequency_value = (uint16_t) ( ( value_32bit >> 4 ) & 0x0000000fUL ) + 8; + } + else if( frequency_value_size == 14 ) + { + frequency_value = (uint16_t) ( ( value_32bit >> 4 ) & 0x000003ffUL ) + 24; + } + else + { + frequency_value = libfmos_lzfse_frequency_value_table[ lookup_index ]; + } + frequency_table[ table_index ] = frequency_value; + + value_32bit >>= frequency_value_size; + number_of_bits -= frequency_value_size; + } + return( 1 ); +} + +/* Reads a LZFSE compressed block + * Returns 1 on success or -1 on error + */ +int libfmos_lzfse_read_block( + libfmos_lzfse_decoder_t *decoder, + const uint8_t *compressed_data, + size_t compressed_data_size, + size_t *compressed_data_offset, + uint8_t *uncompressed_data, + size_t uncompressed_data_size, + size_t *uncompressed_data_offset, + libcerror_error_t **error ) +{ + uint8_t literal_values[ LIBFMOS_LZFSE_LITERALS_PER_BLOCK + 64 ]; + + libfmos_lzfse_bit_stream_t *bit_stream = NULL; + static char *function = "libfmos_lzfse_read_block"; + size_t safe_compressed_data_offset = 0; + + if( decoder == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid decoder.", + function ); + + return( -1 ); + } + if( compressed_data == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid compressed data.", + function ); + + return( -1 ); + } + if( compressed_data_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid compressed data size value exceeds maximum.", + function ); + + return( -1 ); + } + if( compressed_data_offset == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid compressed offset.", + function ); + + return( -1 ); + } + safe_compressed_data_offset = *compressed_data_offset; + + if( ( decoder->literals_data_size > compressed_data_size ) + || ( safe_compressed_data_offset > ( compressed_data_size - decoder->literals_data_size ) ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid compressed data size value out of bounds.", + function ); + + return( -1 ); + } + if( libfmos_lzfse_bit_stream_initialize( + &bit_stream, + &( compressed_data[ safe_compressed_data_offset ] ), + decoder->literals_data_size, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to create literals bit stream.", + function ); + + goto on_error; + } + if( libfmos_lzfse_read_literal_values( + decoder, + bit_stream, + literal_values, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_READ_FAILED, + "%s: unable to read literal values.", + function ); + + goto on_error; + } + if( libfmos_lzfse_bit_stream_free( + &bit_stream, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free literals bit stream.", + function ); + + goto on_error; + } + safe_compressed_data_offset += decoder->literals_data_size; + + if( ( decoder->lmd_values_data_size > compressed_data_size ) + || ( safe_compressed_data_offset > ( compressed_data_size - decoder->lmd_values_data_size ) ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid compressed data size value out of bounds.", + function ); + + return( -1 ); + } + if( libfmos_lzfse_bit_stream_initialize( + &bit_stream, + &( compressed_data[ safe_compressed_data_offset ] ), + decoder->lmd_values_data_size, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to create L, M, D values bit stream.", + function ); + + goto on_error; + } + if( libfmos_lzfse_read_lmd_values( + decoder, + bit_stream, + literal_values, + uncompressed_data, + uncompressed_data_size, + uncompressed_data_offset, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_READ_FAILED, + "%s: unable to read L, M, D values.", + function ); + + goto on_error; + } + if( libfmos_lzfse_bit_stream_free( + &bit_stream, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free L, M, D values bit stream.", + function ); + + goto on_error; + } + safe_compressed_data_offset += decoder->lmd_values_data_size; + + *compressed_data_offset = safe_compressed_data_offset; + + return( 1 ); + +on_error: + if( bit_stream != NULL ) + { + libfmos_lzfse_bit_stream_free( + &bit_stream, + NULL ); + } + return( -1 ); +} + +/* Reads literal values + * Returns 1 on success or -1 on error + */ +int libfmos_lzfse_read_literal_values( + libfmos_lzfse_decoder_t *decoder, + libfmos_lzfse_bit_stream_t *bit_stream, + uint8_t *literal_values, + libcerror_error_t **error ) +{ + uint16_t literal_states[ 4 ]; + + libfmos_lzfse_decoder_entry_t *decoder_entry = NULL; + static char *function = "libfmos_lzfse_read_literal_values"; + uint32_t value_32bit = 0; + uint32_t literal_value_index = 0; + int32_t literal_state = 0; + uint8_t literal_decoder_index = 0; + + if( decoder == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid decoder.", + function ); + + return( -1 ); + } + if( decoder->number_of_literals > (uint32_t) ( LIBFMOS_LZFSE_LITERALS_PER_BLOCK + 64 ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid decoder - number of literals value out of bounds.", + function ); + + return( -1 ); + } + if( literal_values == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid literal values.", + function ); + + return( -1 ); + } + literal_states[ 0 ] = decoder->literal_states[ 0 ]; + literal_states[ 1 ] = decoder->literal_states[ 1 ]; + literal_states[ 2 ] = decoder->literal_states[ 2 ]; + literal_states[ 3 ] = decoder->literal_states[ 3 ]; + + if( ( decoder->literal_bits < (int32_t) -32 ) + || ( decoder->literal_bits > 0 ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid decoder - literal bits value out of bounds.", + function ); + + return( -1 ); + } + if( libfmos_lzfse_bit_stream_get_value( + bit_stream, + (uint8_t) ( -1 * decoder->literal_bits ), + &value_32bit, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve value from bit stream.", + function ); + + return( -1 ); + } + for( literal_value_index = 0; + literal_value_index < decoder->number_of_literals; + literal_value_index += 4 ) + { + for( literal_decoder_index = 0; + literal_decoder_index < 4; + literal_decoder_index++ ) + { + literal_state = literal_states[ literal_decoder_index ]; + + if( ( literal_state < 0 ) + || ( literal_state >= LIBFMOS_LZFSE_NUMBER_OF_LITERAL_STATES ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid literal state value out of bounds.", + function ); + + return( -1 ); + } + decoder_entry = &( decoder->literal_decoder_table[ literal_state ] ); + + if( libfmos_lzfse_bit_stream_get_value( + bit_stream, + decoder_entry->number_of_bits, + &value_32bit, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve value from bit stream.", + function ); + + return( -1 ); + } + literal_state = (int32_t) decoder_entry->delta + (int32_t) value_32bit; + + literal_values[ literal_value_index + literal_decoder_index ] = decoder_entry->symbol; + + literal_states[ literal_decoder_index ] = (uint16_t) literal_state; + +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: value\t\t\t\t: 0x%" PRIx32 " (%" PRIu8 ")\n", + function, + value_32bit, + decoder_entry->number_of_bits ); + + libcnotify_printf( + "%s: literal values[ %" PRIu32 " ]\t\t\t: 0x%02" PRIx8 "\n", + function, + literal_value_index + literal_decoder_index, + decoder_entry->symbol ); + + libcnotify_printf( + "%s: literal states[ %" PRIu8 " ]\t\t\t: %" PRIi32 "\n", + function, + literal_decoder_index, + literal_state ); + } +#endif /* defined( HAVE_DEBUG_OUTPUT ) */ + } + } +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "\n" ); + } +#endif + return( 1 ); +} + +/* Reads L, M, D values + * Returns 1 on success or -1 on error + */ +int libfmos_lzfse_read_lmd_values( + libfmos_lzfse_decoder_t *decoder, + libfmos_lzfse_bit_stream_t *bit_stream, + uint8_t *literal_values, + uint8_t *uncompressed_data, + size_t uncompressed_data_size, + size_t *uncompressed_data_offset, + libcerror_error_t **error ) +{ + libfmos_lzfse_value_decoder_entry_t *value_decoder_entry = NULL; + static char *function = "libfmos_lzfse_read_lmd_values"; + size_t safe_uncompressed_data_offset = 0; + size_t remaining_uncompressed_data_size = 0; + uint32_t lmd_value_index = 0; + uint32_t value_32bit = 0; + int32_t d_value = -1; + int32_t d_value_state = 0; + int32_t l_value = 0; + int32_t l_value_index = 0; + int32_t l_value_state = 0; + int32_t literal_value_index = 0; + int32_t m_value = 0; + int32_t m_value_index = 0; + int32_t m_value_state = 0; + int32_t safe_d_value = 0; + + if( decoder == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid decoder.", + function ); + + return( -1 ); + } + if( literal_values == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid literal values.", + function ); + + return( -1 ); + } + if( uncompressed_data == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid uncompressed data.", + function ); + + return( -1 ); + } + if( uncompressed_data_size > (size_t) INT32_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid uncompressed data size value exceeds maximum.", + function ); + + return( -1 ); + } + if( uncompressed_data_offset == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid uncompressed offset.", + function ); + + return( -1 ); + } + safe_uncompressed_data_offset = *uncompressed_data_offset; + + if( safe_uncompressed_data_offset > uncompressed_data_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid uncompressed data offset value out of bounds.", + function ); + + return( -1 ); + } + remaining_uncompressed_data_size = uncompressed_data_size - safe_uncompressed_data_offset; + + l_value_state = decoder->l_value_state; + m_value_state = decoder->m_value_state; + d_value_state = decoder->d_value_state; + + if( ( decoder->lmd_values_bits < (int32_t) -32 ) + || ( decoder->lmd_values_bits > 0 ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid decoder - L, M, D values bits value out of bounds.", + function ); + + return( -1 ); + } + if( libfmos_lzfse_bit_stream_get_value( + bit_stream, + (uint8_t) ( -1 * decoder->lmd_values_bits ), + &value_32bit, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve value from bit stream.", + function ); + + return( -1 ); + } + for( lmd_value_index = 0; + lmd_value_index < decoder->number_of_lmd_values; + lmd_value_index++ ) + { + if( ( l_value_state < 0 ) + || ( l_value_state >= LIBFMOS_LZFSE_NUMBER_OF_L_VALUE_STATES ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid L value state value out of bounds.", + function ); + + return( -1 ); + } + value_decoder_entry = &( decoder->l_value_decoder_table[ l_value_state ] ); + + if( libfmos_lzfse_bit_stream_get_value( + bit_stream, + value_decoder_entry->number_of_bits, + &value_32bit, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve value from bit stream.", + function ); + + return( -1 ); + } + l_value_state = (int32_t) value_decoder_entry->delta + (int32_t) ( value_32bit >> value_decoder_entry->value_bits ); + l_value = value_decoder_entry->value_base + (int32_t) ( value_32bit & value_decoder_entry->value_bitmask ); + +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: l_value\t\t\t\t\t: %" PRIi32 "\n", + function, + l_value ); + + libcnotify_printf( + "%s: l_value_state\t\t\t\t: %" PRIi32 "\n", + function, + l_value_state ); + } +#endif + if( ( m_value_state < 0 ) + || ( m_value_state >= LIBFMOS_LZFSE_NUMBER_OF_M_VALUE_STATES ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid M value state value out of bounds.", + function ); + + return( -1 ); + } + value_decoder_entry = &( decoder->m_value_decoder_table[ m_value_state ] ); + + if( libfmos_lzfse_bit_stream_get_value( + bit_stream, + value_decoder_entry->number_of_bits, + &value_32bit, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve value from bit stream.", + function ); + + return( -1 ); + } + m_value_state = (int32_t) value_decoder_entry->delta + (int32_t) ( value_32bit >> value_decoder_entry->value_bits ); + m_value = value_decoder_entry->value_base + (int32_t) ( value_32bit & value_decoder_entry->value_bitmask ); + +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: m_value\t\t\t\t\t: %" PRIi32 "\n", + function, + m_value ); + + libcnotify_printf( + "%s: m_value_state\t\t\t\t: %" PRIi32 "\n", + function, + m_value_state ); + } +#endif + if( ( d_value_state < 0 ) + || ( d_value_state >= LIBFMOS_LZFSE_NUMBER_OF_D_VALUE_STATES ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid D value state value out of bounds.", + function ); + + return( -1 ); + } + value_decoder_entry = &( decoder->d_value_decoder_table[ d_value_state ] ); + + if( libfmos_lzfse_bit_stream_get_value( + bit_stream, + value_decoder_entry->number_of_bits, + &value_32bit, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve value from bit stream.", + function ); + + return( -1 ); + } + d_value_state = (int32_t) value_decoder_entry->delta + (int32_t) ( value_32bit >> value_decoder_entry->value_bits ); + safe_d_value = value_decoder_entry->value_base + (int32_t) ( value_32bit & value_decoder_entry->value_bitmask ); + +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: d_value\t\t\t\t\t: %" PRIi32 "\n", + function, + safe_d_value ); + + libcnotify_printf( + "%s: d_value_state\t\t\t\t: %" PRIi32 "\n", + function, + d_value_state ); + } +#endif + if( safe_d_value != 0 ) + { + d_value = safe_d_value; + } + if( ( l_value < 0 ) + || ( l_value > (int32_t) remaining_uncompressed_data_size ) + || ( l_value >= ( LIBFMOS_LZFSE_LITERALS_PER_BLOCK + 64 ) ) + || ( literal_value_index > ( ( LIBFMOS_LZFSE_LITERALS_PER_BLOCK + 64 ) - l_value ) ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid L value out of bounds.", + function ); + + return( -1 ); + } + for( l_value_index = 0; + l_value_index < l_value; + l_value_index++ ) + { + uncompressed_data[ safe_uncompressed_data_offset++ ] = literal_values[ literal_value_index + l_value_index ]; + } + literal_value_index += l_value; + remaining_uncompressed_data_size -= l_value; + + if( ( m_value < 0 ) + || ( m_value > (int32_t) remaining_uncompressed_data_size ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid M value out of bounds.", + function ); + + return( -1 ); + } + if( ( d_value < 0 ) + || ( d_value > (int32_t) safe_uncompressed_data_offset ) + || ( ( safe_uncompressed_data_offset - d_value ) > uncompressed_data_size ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid D value out of bounds.", + function ); + + return( -1 ); + } + for( m_value_index = 0; + m_value_index < m_value; + m_value_index++ ) + { + uncompressed_data[ safe_uncompressed_data_offset ] = uncompressed_data[ safe_uncompressed_data_offset - d_value ]; + + safe_uncompressed_data_offset++; + } + remaining_uncompressed_data_size -= m_value; + } +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "\n" ); + } +#endif +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: block data:\n", + function ); + libcnotify_print_data( + &( uncompressed_data[ *uncompressed_data_offset ] ), + safe_uncompressed_data_offset - *uncompressed_data_offset, + 0 ); + } +#endif + *uncompressed_data_offset = safe_uncompressed_data_offset; + + return( 1 ); +} + +/* Decompresses LZFSE compressed data + * Returns 1 on success or -1 on error + */ +int libfmos_lzfse_decompress( + const uint8_t *compressed_data, + size_t compressed_data_size, + uint8_t *uncompressed_data, + size_t *uncompressed_data_size, + libcerror_error_t **error ) +{ + uint16_t frequency_table[ 360 ]; + + libfmos_lzfse_decoder_t *decoder = NULL; + static char *function = "libfmos_lzfse_decompress"; + size_t compressed_data_offset = 0; + size_t safe_uncompressed_block_size = 0; + size_t safe_uncompressed_data_size = 0; + size_t uncompressed_data_offset = 0; + uint32_t block_marker = 0; + uint32_t compressed_block_size = 0; + uint32_t uncompressed_block_size = 0; + + if( compressed_data == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid compressed data.", + function ); + + return( -1 ); + } + if( ( compressed_data_size < 4 ) + || ( compressed_data_size > (size_t) SSIZE_MAX ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid compressed data size value out of bounds.", + function ); + + return( -1 ); + } + if( uncompressed_data == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid uncompressed data.", + function ); + + return( -1 ); + } + if( uncompressed_data_size == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid uncompressed data size.", + function ); + + return( -1 ); + } + safe_uncompressed_data_size = *uncompressed_data_size; + + if( safe_uncompressed_data_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid uncompressed data size value exceeds maximum.", + function ); + + return( -1 ); + } + if( memory_set( + frequency_table, + 0, + sizeof( uint16_t ) * 360 ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_SET_FAILED, + "%s: unable to clear frequency table.", + function ); + + goto on_error; + } + while( compressed_data_offset < compressed_data_size ) + { + if( uncompressed_data_offset >= safe_uncompressed_data_size ) + { + break; + } + if( compressed_data_offset > ( compressed_data_size - 4 ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: compressed data size value too small.", + function ); + + goto on_error; + } + byte_stream_copy_to_uint32_little_endian( + &( compressed_data[ compressed_data_offset ] ), + block_marker ); + +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + if( ( block_marker != LIBFMOS_LZFSE_ENDOFSTREAM_BLOCK_MARKER ) + && ( block_marker != LIBFMOS_LZFSE_UNCOMPRESSED_BLOCK_MARKER ) + && ( block_marker != LIBFMOS_LZFSE_COMPRESSED_BLOCK_V1_MARKER ) + && ( block_marker != LIBFMOS_LZFSE_COMPRESSED_BLOCK_V2_MARKER ) + && ( block_marker != LIBFMOS_LZFSE_COMPRESSED_BLOCK_LZVN_MARKER ) ) + { + libcnotify_printf( + "%s: block marker\t\t\t\t\t: 0x%08" PRIx32 "\n", + function, + block_marker ); + } + else + { + libcnotify_printf( + "%s: block marker\t\t\t\t\t: %c%c%c%c (", + function, + compressed_data[ compressed_data_offset ], + compressed_data[ compressed_data_offset + 1 ], + compressed_data[ compressed_data_offset + 2 ], + compressed_data[ compressed_data_offset + 3 ] ); + + switch( block_marker ) + { + case LIBFMOS_LZFSE_ENDOFSTREAM_BLOCK_MARKER: + libcnotify_printf( + "end-of-stream" ); + break; + + case LIBFMOS_LZFSE_UNCOMPRESSED_BLOCK_MARKER: + libcnotify_printf( + "uncompressed" ); + break; + + case LIBFMOS_LZFSE_COMPRESSED_BLOCK_V1_MARKER: + libcnotify_printf( + "compressed version 1" ); + break; + + case LIBFMOS_LZFSE_COMPRESSED_BLOCK_V2_MARKER: + libcnotify_printf( + "compressed version 2" ); + break; + + case LIBFMOS_LZFSE_COMPRESSED_BLOCK_LZVN_MARKER: + libcnotify_printf( + "compressed LZVN" ); + break; + + default: + libcnotify_printf( + "UNKNOWN" ); + break; + } + libcnotify_printf( + ")\n" ); + } + } +#endif /* defined( HAVE_DEBUG_OUTPUT ) */ + + compressed_data_offset += 4; + + if( block_marker == LIBFMOS_LZFSE_ENDOFSTREAM_BLOCK_MARKER ) + { + break; + } + else if( ( block_marker != LIBFMOS_LZFSE_UNCOMPRESSED_BLOCK_MARKER ) + && ( block_marker != LIBFMOS_LZFSE_COMPRESSED_BLOCK_V1_MARKER ) + && ( block_marker != LIBFMOS_LZFSE_COMPRESSED_BLOCK_V2_MARKER ) + && ( block_marker != LIBFMOS_LZFSE_COMPRESSED_BLOCK_LZVN_MARKER ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, + "%s: unsupported block marker: 0x%08" PRIx32 ".", + function, + block_marker ); + + goto on_error; + } + if( compressed_data_offset > ( compressed_data_size - 4 ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: compressed data size value too small.", + function ); + + goto on_error; + } + byte_stream_copy_to_uint32_little_endian( + &( compressed_data[ compressed_data_offset ] ), + uncompressed_block_size ); + + compressed_data_offset += 4; + +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: uncompressed block size\t\t\t: %" PRIu32 "\n", + function, + uncompressed_block_size ); + } +#endif +/* TODO check if uncompressed data is sufficiently large and error if not */ + + switch( block_marker ) + { + case LIBFMOS_LZFSE_COMPRESSED_BLOCK_V1_MARKER: + if( libfmos_lzfse_decoder_initialize( + &decoder, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to create decoder.", + function ); + + goto on_error; + } + if( libfmos_lzfse_read_block_v1_header( + decoder, + compressed_data, + compressed_data_size, + &compressed_data_offset, + frequency_table, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_READ_FAILED, + "%s: unable to read block v1 header.", + function ); + + goto on_error; + } + break; + + case LIBFMOS_LZFSE_COMPRESSED_BLOCK_V2_MARKER: + if( libfmos_lzfse_decoder_initialize( + &decoder, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to create decoder.", + function ); + + goto on_error; + } + if( libfmos_lzfse_read_block_v2_header( + decoder, + compressed_data, + compressed_data_size, + &compressed_data_offset, + frequency_table, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_READ_FAILED, + "%s: unable to read block v2 header.", + function ); + + goto on_error; + } + break; + + case LIBFMOS_LZFSE_COMPRESSED_BLOCK_LZVN_MARKER: + if( compressed_data_offset > ( compressed_data_size - 4 ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: compressed data size value too small.", + function ); + + goto on_error; + } + byte_stream_copy_to_uint32_little_endian( + &( compressed_data[ compressed_data_offset ] ), + compressed_block_size ); + + compressed_data_offset += 4; + +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: compressed block size\t\t\t\t: %" PRIu32 "\n", + function, + compressed_block_size ); + + libcnotify_printf( + "\n" ); + } +#endif + break; + } + if( ( (size_t) uncompressed_block_size > safe_uncompressed_data_size ) + || ( uncompressed_data_offset > ( safe_uncompressed_data_size - uncompressed_block_size ) ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: uncompressed block size value exceeds uncompressed data size.", + function ); + + goto on_error; + } + switch( block_marker ) + { + case LIBFMOS_LZFSE_UNCOMPRESSED_BLOCK_MARKER: + if( ( (size_t) uncompressed_block_size > compressed_data_size ) + || ( compressed_data_offset > ( compressed_data_size - uncompressed_block_size ) ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: uncompressed block size value exceeds compressed data size.", + function ); + + goto on_error; + } +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: uncompressed:\n", + function ); + libcnotify_print_data( + &( compressed_data[ compressed_data_offset ] ), + uncompressed_block_size, + LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); + } +#endif + if( memory_copy( + &( uncompressed_data[ uncompressed_data_offset ] ), + &( compressed_data[ compressed_data_offset ] ), + (size_t) uncompressed_block_size ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_COPY_FAILED, + "%s: unable to copy literal to uncompressed data.", + function ); + + goto on_error; + } + compressed_data_offset += (size_t) uncompressed_block_size; + uncompressed_data_offset += (size_t) uncompressed_block_size; + + break; + + case LIBFMOS_LZFSE_COMPRESSED_BLOCK_V1_MARKER: + case LIBFMOS_LZFSE_COMPRESSED_BLOCK_V2_MARKER: + if( libfmos_lzfse_build_decoder_table( + LIBFMOS_LZFSE_NUMBER_OF_LITERAL_STATES, + LIBFMOS_LZFSE_NUMBER_OF_LITERAL_SYMBOLS, + &( frequency_table[ 104 ] ), + decoder->literal_decoder_table, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to build literal decoder table.", + function ); + + goto on_error; + } + if( libfmos_lzfse_build_value_decoder_table( + LIBFMOS_LZFSE_NUMBER_OF_L_VALUE_STATES, + LIBFMOS_LZFSE_NUMBER_OF_L_VALUE_SYMBOLS, + &( frequency_table[ 0 ] ), + libfmos_lzfse_l_value_bits_table, + libfmos_lzfse_l_value_base_table, + decoder->l_value_decoder_table, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to build L value decoder table.", + function ); + + goto on_error; + } + if( libfmos_lzfse_build_value_decoder_table( + LIBFMOS_LZFSE_NUMBER_OF_M_VALUE_STATES, + LIBFMOS_LZFSE_NUMBER_OF_M_VALUE_SYMBOLS, + &( frequency_table[ 20 ] ), + libfmos_lzfse_m_value_bits_table, + libfmos_lzfse_m_value_base_table, + decoder->m_value_decoder_table, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to build M value decoder table.", + function ); + + goto on_error; + } + if( libfmos_lzfse_build_value_decoder_table( + LIBFMOS_LZFSE_NUMBER_OF_D_VALUE_STATES, + LIBFMOS_LZFSE_NUMBER_OF_D_VALUE_SYMBOLS, + &( frequency_table[ 40 ] ), + libfmos_lzfse_d_value_bits_table, + libfmos_lzfse_d_value_base_table, + decoder->d_value_decoder_table, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to build D value decoder table.", + function ); + + goto on_error; + } + if( libfmos_lzfse_read_block( + decoder, + compressed_data, + compressed_data_size, + &compressed_data_offset, + uncompressed_data, + safe_uncompressed_data_size, + &uncompressed_data_offset, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_READ_FAILED, + "%s: unable to read block.", + function ); + + goto on_error; + } + if( libfmos_lzfse_decoder_free( + &decoder, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free decoder.", + function ); + + goto on_error; + } + break; + + case LIBFMOS_LZFSE_COMPRESSED_BLOCK_LZVN_MARKER: + if( ( (size_t) compressed_block_size > compressed_data_size ) + || ( compressed_data_offset > ( compressed_data_size - compressed_block_size ) ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: compressed block size value exceeds compressed data size.", + function ); + + goto on_error; + } + safe_uncompressed_block_size = (size_t) uncompressed_block_size; + + if( libfmos_lzvn_decompress( + &( compressed_data[ compressed_data_offset ] ), + compressed_block_size, + &( uncompressed_data[ uncompressed_data_offset ] ), + &safe_uncompressed_block_size, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_COMPRESSION, + LIBCERROR_COMPRESSION_ERROR_DECOMPRESS_FAILED, + "%s: unable to decompress LZVN compressed data.", + function ); + + goto on_error; + } + compressed_data_offset += (size_t) compressed_block_size; + uncompressed_data_offset += (size_t) uncompressed_block_size; + + break; + } + } + *uncompressed_data_size = uncompressed_data_offset; + + return( 1 ); + +on_error: + if( decoder != NULL ) + { + libfmos_lzfse_decoder_free( + &decoder, + NULL ); + } + return( -1 ); +} + diff -Nru libfshfs-20201104/libfmos/libfmos_lzfse.h libfshfs-20240221/libfmos/libfmos_lzfse.h --- libfshfs-20201104/libfmos/libfmos_lzfse.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libfmos/libfmos_lzfse.h 2024-02-21 06:04:11.000000000 +0000 @@ -0,0 +1,113 @@ +/* + * LZFSE (un)compression functions + * + * Copyright (C) 2019-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _LIBFMOS_LZFSE_H ) +#define _LIBFMOS_LZFSE_H + +#include +#include + +#include "libfmos_extern.h" +#include "libfmos_libcerror.h" +#include "libfmos_lzfse_bit_stream.h" +#include "libfmos_lzfse_decoder.h" + +#if defined( __cplusplus ) +extern "C" { +#endif + +int libfmos_lzfse_build_decoder_table( + int number_of_states, + uint16_t number_of_symbols, + const uint16_t *frequency_table, + libfmos_lzfse_decoder_entry_t *decoder_table, + libcerror_error_t **error ); + +int libfmos_lzfse_build_value_decoder_table( + int number_of_states, + uint16_t number_of_symbols, + const uint16_t *frequency_table, + const uint8_t *value_bits_table, + const int32_t *value_base_table, + libfmos_lzfse_value_decoder_entry_t *value_decoder_table, + libcerror_error_t **error ); + +int libfmos_lzfse_read_block_v1_header( + libfmos_lzfse_decoder_t *decoder, + const uint8_t *compressed_data, + size_t compressed_data_size, + size_t *compressed_data_offset, + uint16_t *frequency_table, + libcerror_error_t **error ); + +int libfmos_lzfse_read_block_v2_header( + libfmos_lzfse_decoder_t *decoder, + const uint8_t *compressed_data, + size_t compressed_data_size, + size_t *compressed_data_offset, + uint16_t *frequency_table, + libcerror_error_t **error ); + +int libfmos_lzfse_read_compressed_frequency_table( + const uint8_t *compressed_data, + size_t compressed_data_size, + uint16_t *frequency_table, + libcerror_error_t **error ); + +int libfmos_lzfse_read_block( + libfmos_lzfse_decoder_t *decoder, + const uint8_t *compressed_data, + size_t compressed_data_size, + size_t *compressed_data_offset, + uint8_t *uncompressed_data, + size_t uncompressed_data_size, + size_t *uncompressed_data_offset, + libcerror_error_t **error ); + +int libfmos_lzfse_read_literal_values( + libfmos_lzfse_decoder_t *decoder, + libfmos_lzfse_bit_stream_t *bit_stream, + uint8_t *literal_values, + libcerror_error_t **error ); + +int libfmos_lzfse_read_lmd_values( + libfmos_lzfse_decoder_t *decoder, + libfmos_lzfse_bit_stream_t *bit_stream, + uint8_t *literal_values, + uint8_t *uncompressed_data, + size_t uncompressed_data_size, + size_t *uncompressed_data_offset, + libcerror_error_t **error ); + +LIBFMOS_EXTERN \ +int libfmos_lzfse_decompress( + const uint8_t *compressed_data, + size_t compressed_data_size, + uint8_t *uncompressed_data, + size_t *uncompressed_data_size, + libcerror_error_t **error ); + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _LIBFMOS_LZFSE_H ) */ + diff -Nru libfshfs-20201104/libfmos/libfmos_lzfse_bit_stream.c libfshfs-20240221/libfmos/libfmos_lzfse_bit_stream.c --- libfshfs-20201104/libfmos/libfmos_lzfse_bit_stream.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libfmos/libfmos_lzfse_bit_stream.c 2024-02-21 06:04:11.000000000 +0000 @@ -0,0 +1,266 @@ +/* + * LZFSE bit-stream functions + * + * Copyright (C) 2019-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include +#include +#include + +#include "libfmos_libcerror.h" +#include "libfmos_libcnotify.h" +#include "libfmos_lzfse_bit_stream.h" + +/* Creates a bit stream + * Make sure the value bit_stream is referencing, is set to NULL + * Returns 1 if successful or -1 on error + */ +int libfmos_lzfse_bit_stream_initialize( + libfmos_lzfse_bit_stream_t **bit_stream, + const uint8_t *byte_stream, + size_t byte_stream_size, + libcerror_error_t **error ) +{ + static char *function = "libfmos_lzfse_bit_stream_initialize"; + + if( bit_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid bit stream.", + function ); + + return( -1 ); + } + if( *bit_stream != NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, + "%s: invalid bit stream value already set.", + function ); + + return( -1 ); + } + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + *bit_stream = memory_allocate_structure( + libfmos_lzfse_bit_stream_t ); + + if( *bit_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_INSUFFICIENT, + "%s: unable to create bit stream.", + function ); + + goto on_error; + } + if( memory_set( + *bit_stream, + 0, + sizeof( libfmos_lzfse_bit_stream_t ) ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_SET_FAILED, + "%s: unable to clear bit stream.", + function ); + + goto on_error; + } + ( *bit_stream )->byte_stream = byte_stream; + ( *bit_stream )->byte_stream_size = byte_stream_size; + ( *bit_stream )->byte_stream_offset = byte_stream_size; + + return( 1 ); + +on_error: + if( *bit_stream != NULL ) + { + memory_free( + *bit_stream ); + + *bit_stream = NULL; + } + return( -1 ); +} + +/* Frees a bit stream + * Returns 1 if successful or -1 on error + */ +int libfmos_lzfse_bit_stream_free( + libfmos_lzfse_bit_stream_t **bit_stream, + libcerror_error_t **error ) +{ + static char *function = "libfmos_lzfse_bit_stream_free"; + + if( bit_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid bit stream.", + function ); + + return( -1 ); + } + if( *bit_stream != NULL ) + { + memory_free( + *bit_stream ); + + *bit_stream = NULL; + } + return( 1 ); +} + +/* Retrieves a value from the bit stream + * Returns 1 on success or -1 on error + */ +int libfmos_lzfse_bit_stream_get_value( + libfmos_lzfse_bit_stream_t *bit_stream, + uint8_t number_of_bits, + uint32_t *value_32bit, + libcerror_error_t **error ) +{ + static char *function = "libfmos_lzfse_bit_stream_get_value"; + uint32_t read_value_32bit = 0; + uint32_t safe_value_32bit = 0; + uint8_t read_number_of_bits = 0; + uint8_t remaining_number_of_bits = 0; + + if( bit_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid bit stream.", + function ); + + return( -1 ); + } + if( number_of_bits > (uint8_t) 32 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid number of bits value exceeds maximum.", + function ); + + return( -1 ); + } + if( value_32bit == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid 32-bit value.", + function ); + + return( -1 ); + } + remaining_number_of_bits = number_of_bits; + + while( remaining_number_of_bits > 0 ) + { + while( ( remaining_number_of_bits > bit_stream->bit_buffer_size ) + && ( bit_stream->bit_buffer_size <= 24 ) ) + { + if( bit_stream->byte_stream_offset == 0 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid byte stream offset value out of bounds.", + function ); + + return( -1 ); + } + bit_stream->byte_stream_offset -= 1; + + bit_stream->bit_buffer <<= 8; + bit_stream->bit_buffer |= bit_stream->byte_stream[ bit_stream->byte_stream_offset ]; + bit_stream->bit_buffer_size += 8; + } + if( remaining_number_of_bits < bit_stream->bit_buffer_size ) + { + read_number_of_bits = remaining_number_of_bits; + } + else + { + read_number_of_bits = bit_stream->bit_buffer_size; + } + read_value_32bit = bit_stream->bit_buffer; + + if( remaining_number_of_bits < number_of_bits ) + { + safe_value_32bit <<= remaining_number_of_bits; + } + bit_stream->bit_buffer_size -= read_number_of_bits; + read_value_32bit >>= bit_stream->bit_buffer_size; + + if( bit_stream->bit_buffer_size > 0 ) + { + bit_stream->bit_buffer &= 0xffffffffUL >> ( 32 - bit_stream->bit_buffer_size ); + } + else + { + bit_stream->bit_buffer = 0; + } + safe_value_32bit |= read_value_32bit; + remaining_number_of_bits -= read_number_of_bits; + } + *value_32bit = safe_value_32bit; + + return( 1 ); +} + diff -Nru libfshfs-20201104/libfmos/libfmos_lzfse_bit_stream.h libfshfs-20240221/libfmos/libfmos_lzfse_bit_stream.h --- libfshfs-20201104/libfmos/libfmos_lzfse_bit_stream.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libfmos/libfmos_lzfse_bit_stream.h 2024-02-21 06:04:11.000000000 +0000 @@ -0,0 +1,81 @@ +/* + * LZFSE bit-stream functions + * + * Copyright (C) 2019-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _LIBFMOS_LZFSE_BIT_STREAM_H ) +#define _LIBFMOS_LZFSE_BIT_STREAM_H + +#include +#include + +#include "libfmos_extern.h" +#include "libfmos_libcerror.h" + +#if defined( __cplusplus ) +extern "C" { +#endif + +typedef struct libfmos_lzfse_bit_stream libfmos_lzfse_bit_stream_t; + +struct libfmos_lzfse_bit_stream +{ + /* The byte stream + */ + const uint8_t *byte_stream; + + /* The byte stream size + */ + size_t byte_stream_size; + + /* The byte stream offset + */ + size_t byte_stream_offset; + + /* The bit buffer + */ + uint32_t bit_buffer; + + /* The number of bits remaining in the bit buffer + */ + uint8_t bit_buffer_size; +}; + +int libfmos_lzfse_bit_stream_initialize( + libfmos_lzfse_bit_stream_t **bit_stream, + const uint8_t *byte_stream, + size_t byte_stream_size, + libcerror_error_t **error ); + +int libfmos_lzfse_bit_stream_free( + libfmos_lzfse_bit_stream_t **bit_stream, + libcerror_error_t **error ); + +int libfmos_lzfse_bit_stream_get_value( + libfmos_lzfse_bit_stream_t *bit_stream, + uint8_t number_of_bits, + uint32_t *value_32bit, + libcerror_error_t **error ); + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _LIBFMOS_LZFSE_BIT_STREAM_H ) */ + diff -Nru libfshfs-20201104/libfmos/libfmos_lzfse_decoder.c libfshfs-20240221/libfmos/libfmos_lzfse_decoder.c --- libfshfs-20201104/libfmos/libfmos_lzfse_decoder.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libfmos/libfmos_lzfse_decoder.c 2024-02-21 06:04:11.000000000 +0000 @@ -0,0 +1,134 @@ +/* + * LZFSE decoder functions + * + * Copyright (C) 2019-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include +#include +#include + +#include "libfmos_definitions.h" +#include "libfmos_libcerror.h" +#include "libfmos_libcnotify.h" +#include "libfmos_lzfse_decoder.h" + +/* Creates a decoder + * Make sure the value decoder is referencing, is set to NULL + * Returns 1 if successful or -1 on error + */ +int libfmos_lzfse_decoder_initialize( + libfmos_lzfse_decoder_t **decoder, + libcerror_error_t **error ) +{ + static char *function = "libfmos_lzfse_decoder_initialize"; + + if( decoder == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid decoder.", + function ); + + return( -1 ); + } + if( *decoder != NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, + "%s: invalid decoder value already set.", + function ); + + return( -1 ); + } + *decoder = memory_allocate_structure( + libfmos_lzfse_decoder_t ); + + if( *decoder == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_INSUFFICIENT, + "%s: unable to create decoder.", + function ); + + goto on_error; + } + if( memory_set( + *decoder, + 0, + sizeof( libfmos_lzfse_decoder_t ) ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_SET_FAILED, + "%s: unable to clear decoder.", + function ); + + goto on_error; + } + return( 1 ); + +on_error: + if( *decoder != NULL ) + { + memory_free( + *decoder ); + + *decoder = NULL; + } + return( -1 ); +} + +/* Frees a decoder + * Returns 1 if successful or -1 on error + */ +int libfmos_lzfse_decoder_free( + libfmos_lzfse_decoder_t **decoder, + libcerror_error_t **error ) +{ + static char *function = "libfmos_lzfse_decoder_free"; + + if( decoder == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid decoder.", + function ); + + return( -1 ); + } + if( *decoder != NULL ) + { + memory_free( + *decoder ); + + *decoder = NULL; + } + return( 1 ); +} + diff -Nru libfshfs-20201104/libfmos/libfmos_lzfse_decoder.h libfshfs-20240221/libfmos/libfmos_lzfse_decoder.h --- libfshfs-20201104/libfmos/libfmos_lzfse_decoder.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libfmos/libfmos_lzfse_decoder.h 2024-02-21 06:04:11.000000000 +0000 @@ -0,0 +1,153 @@ +/* + * LZFSE decoder functions + * + * Copyright (C) 2019-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _LIBFMOS_LZFSE_DECODER_H ) +#define _LIBFMOS_LZFSE_DECODER_H + +#include +#include + +#include "libfmos_definitions.h" +#include "libfmos_extern.h" +#include "libfmos_libcerror.h" +#include "libfmos_lzfse_bit_stream.h" + +#if defined( __cplusplus ) +extern "C" { +#endif + +typedef struct libfmos_lzfse_decoder_entry libfmos_lzfse_decoder_entry_t; + +struct libfmos_lzfse_decoder_entry +{ + /* The number of bits + */ + int8_t number_of_bits; + + /* The symbol + */ + uint8_t symbol; + + /* The delta to compute the next state + */ + int16_t delta; +}; + +typedef struct libfmos_lzfse_value_decoder_entry libfmos_lzfse_value_decoder_entry_t; + +struct libfmos_lzfse_value_decoder_entry +{ + /* The (total) number of bits + */ + uint8_t number_of_bits; + + /* The value bits + */ + uint8_t value_bits; + + /* The delta + */ + int16_t delta; + + /* The value base + */ + int32_t value_base; + + /* The value bitmask + */ + uint32_t value_bitmask; +}; + +typedef struct libfmos_lzfse_decoder libfmos_lzfse_decoder_t; + +struct libfmos_lzfse_decoder +{ + /* The number of literals + */ + uint32_t number_of_literals; + + /* The number of L, M, D values + */ + uint32_t number_of_lmd_values; + + /* The literals data size + */ + uint32_t literals_data_size; + + /* The L, M, D values data size + */ + uint32_t lmd_values_data_size; + + /* The literal states + */ + uint16_t literal_states[ 4 ]; + + /* The L value states + */ + uint16_t l_value_state; + + /* The M value states + */ + uint16_t m_value_state; + + /* The D value states + */ + uint16_t d_value_state; + + /* TODO + */ + int32_t literal_bits; + + /* TODO + */ + int32_t lmd_values_bits; + + /* The literal decoder table + */ + libfmos_lzfse_decoder_entry_t literal_decoder_table[ LIBFMOS_LZFSE_NUMBER_OF_LITERAL_STATES ]; + + /* The L value decoder table + */ + libfmos_lzfse_value_decoder_entry_t l_value_decoder_table[ LIBFMOS_LZFSE_NUMBER_OF_L_VALUE_STATES ]; + + /* The M value decoder table + */ + libfmos_lzfse_value_decoder_entry_t m_value_decoder_table[ LIBFMOS_LZFSE_NUMBER_OF_M_VALUE_STATES ]; + + /* The D value decoder table + */ + libfmos_lzfse_value_decoder_entry_t d_value_decoder_table[ LIBFMOS_LZFSE_NUMBER_OF_D_VALUE_STATES ]; +}; + +int libfmos_lzfse_decoder_initialize( + libfmos_lzfse_decoder_t **decoder, + libcerror_error_t **error ); + +int libfmos_lzfse_decoder_free( + libfmos_lzfse_decoder_t **decoder, + libcerror_error_t **error ); + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _LIBFMOS_LZFSE_DECODER_H ) */ + diff -Nru libfshfs-20201104/libfmos/libfmos_lzvn.c libfshfs-20240221/libfmos/libfmos_lzvn.c --- libfshfs-20201104/libfmos/libfmos_lzvn.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libfmos/libfmos_lzvn.c 2024-02-21 06:04:11.000000000 +0000 @@ -0,0 +1,732 @@ +/* + * LZVN (un)compression functions + * + * Copyright (C) 2019-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include +#include + +#include "libfmos_libcerror.h" +#include "libfmos_libcnotify.h" +#include "libfmos_lzvn.h" + +enum LIBFMOS_LZVN_OPPCODE_TYPES +{ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_LARGE, + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_PREVIOUS, + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, + LIBFMOS_LZVN_OPPCODE_TYPE_END_OF_STREAM, + LIBFMOS_LZVN_OPPCODE_TYPE_INVALID, + LIBFMOS_LZVN_OPPCODE_TYPE_LITERAL_LARGE, + LIBFMOS_LZVN_OPPCODE_TYPE_LITERAL_SMALL, + LIBFMOS_LZVN_OPPCODE_TYPE_MATCH_LARGE, + LIBFMOS_LZVN_OPPCODE_TYPE_MATCH_SMALL, + LIBFMOS_LZVN_OPPCODE_TYPE_NONE, +}; + +/* Lookup table to map an oppcode to its type + */ +uint8_t libfmos_lzvn_oppcode_types[ 256 ] = { + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x00 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x01 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x02 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x03 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x04 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x05 */ + LIBFMOS_LZVN_OPPCODE_TYPE_END_OF_STREAM, /* 0x06 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_LARGE, /* 0x07 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x08 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x09 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x0a */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x0b */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x0c */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x0d */ + LIBFMOS_LZVN_OPPCODE_TYPE_NONE, /* 0x0e */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_LARGE, /* 0x0f */ + + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x10 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x11 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x12 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x13 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x14 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x15 */ + LIBFMOS_LZVN_OPPCODE_TYPE_NONE, /* 0x16 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_LARGE, /* 0x17 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x18 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x19 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x1a */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x1b */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x1c */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x1d */ + LIBFMOS_LZVN_OPPCODE_TYPE_INVALID, /* 0x1e */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_LARGE, /* 0x1f */ + + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x20 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x21 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x22 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x23 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x24 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x25 */ + LIBFMOS_LZVN_OPPCODE_TYPE_INVALID, /* 0x26 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_LARGE, /* 0x27 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x28 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x29 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x2a */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x2b */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x2c */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x2d */ + LIBFMOS_LZVN_OPPCODE_TYPE_INVALID, /* 0x2e */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_LARGE, /* 0x2f */ + + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x30 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x31 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x32 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x33 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x34 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x35 */ + LIBFMOS_LZVN_OPPCODE_TYPE_INVALID, /* 0x36 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_LARGE, /* 0x37 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x38 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x39 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x3a */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x3b */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x3c */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x3d */ + LIBFMOS_LZVN_OPPCODE_TYPE_INVALID, /* 0x3e */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_LARGE, /* 0x3f */ + + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x40 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x41 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x42 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x43 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x44 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x45 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_PREVIOUS, /* 0x46 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_LARGE, /* 0x47 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x48 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x49 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x4a */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x4b */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x4c */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x4d */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_PREVIOUS, /* 0x4e */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_LARGE, /* 0x4f */ + + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x50 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x51 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x52 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x53 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x54 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x55 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_PREVIOUS, /* 0x56 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_LARGE, /* 0x57 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x58 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x59 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x5a */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x5b */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x5c */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x5d */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_PREVIOUS, /* 0x5e */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_LARGE, /* 0x5f */ + + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x60 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x61 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x62 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x63 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x64 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x65 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_PREVIOUS, /* 0x66 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_LARGE, /* 0x67 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x68 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x69 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x6a */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x6b */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x6c */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x6d */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_PREVIOUS, /* 0x6e */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_LARGE, /* 0x6f */ + + LIBFMOS_LZVN_OPPCODE_TYPE_INVALID, /* 0x70 */ + LIBFMOS_LZVN_OPPCODE_TYPE_INVALID, /* 0x71 */ + LIBFMOS_LZVN_OPPCODE_TYPE_INVALID, /* 0x72 */ + LIBFMOS_LZVN_OPPCODE_TYPE_INVALID, /* 0x73 */ + LIBFMOS_LZVN_OPPCODE_TYPE_INVALID, /* 0x74 */ + LIBFMOS_LZVN_OPPCODE_TYPE_INVALID, /* 0x75 */ + LIBFMOS_LZVN_OPPCODE_TYPE_INVALID, /* 0x76 */ + LIBFMOS_LZVN_OPPCODE_TYPE_INVALID, /* 0x77 */ + LIBFMOS_LZVN_OPPCODE_TYPE_INVALID, /* 0x78 */ + LIBFMOS_LZVN_OPPCODE_TYPE_INVALID, /* 0x79 */ + LIBFMOS_LZVN_OPPCODE_TYPE_INVALID, /* 0x7a */ + LIBFMOS_LZVN_OPPCODE_TYPE_INVALID, /* 0x7b */ + LIBFMOS_LZVN_OPPCODE_TYPE_INVALID, /* 0x7c */ + LIBFMOS_LZVN_OPPCODE_TYPE_INVALID, /* 0x7d */ + LIBFMOS_LZVN_OPPCODE_TYPE_INVALID, /* 0x7e */ + LIBFMOS_LZVN_OPPCODE_TYPE_INVALID, /* 0x7f */ + + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x80 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x81 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x82 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x83 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x84 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x85 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_PREVIOUS, /* 0x86 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_LARGE, /* 0x87 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x88 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x89 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x8a */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x8b */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x8c */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x8d */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_PREVIOUS, /* 0x8e */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_LARGE, /* 0x8f */ + + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x90 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x91 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x92 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x93 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x94 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x95 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_PREVIOUS, /* 0x96 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_LARGE, /* 0x97 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x98 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x99 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x9a */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x9b */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x9c */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x9d */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_PREVIOUS, /* 0x9e */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_LARGE, /* 0x9f */ + + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xa0 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xa1 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xa2 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xa3 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xa4 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xa5 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xa6 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xa7 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xa8 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xa9 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xaa */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xab */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xac */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xad */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xae */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xaf */ + + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xb0 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xb1 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xb2 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xb3 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xb4 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xb5 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xb6 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xb7 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xb8 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xb9 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xba */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xbb */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xbc */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xbd */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xbe */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xbf */ + + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0xc0 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0xc1 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0xc2 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0xc3 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0xc4 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0xc5 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_PREVIOUS, /* 0xc6 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_LARGE, /* 0xc7 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0xc8 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0xc9 */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0xca */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0xcb */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0xcc */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0xcd */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_PREVIOUS, /* 0xce */ + LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_LARGE, /* 0xcf */ + + LIBFMOS_LZVN_OPPCODE_TYPE_INVALID, /* 0xd0 */ + LIBFMOS_LZVN_OPPCODE_TYPE_INVALID, /* 0xd1 */ + LIBFMOS_LZVN_OPPCODE_TYPE_INVALID, /* 0xd2 */ + LIBFMOS_LZVN_OPPCODE_TYPE_INVALID, /* 0xd3 */ + LIBFMOS_LZVN_OPPCODE_TYPE_INVALID, /* 0xd4 */ + LIBFMOS_LZVN_OPPCODE_TYPE_INVALID, /* 0xd5 */ + LIBFMOS_LZVN_OPPCODE_TYPE_INVALID, /* 0xd6 */ + LIBFMOS_LZVN_OPPCODE_TYPE_INVALID, /* 0xd7 */ + LIBFMOS_LZVN_OPPCODE_TYPE_INVALID, /* 0xd8 */ + LIBFMOS_LZVN_OPPCODE_TYPE_INVALID, /* 0xd9 */ + LIBFMOS_LZVN_OPPCODE_TYPE_INVALID, /* 0xda */ + LIBFMOS_LZVN_OPPCODE_TYPE_INVALID, /* 0xdb */ + LIBFMOS_LZVN_OPPCODE_TYPE_INVALID, /* 0xdc */ + LIBFMOS_LZVN_OPPCODE_TYPE_INVALID, /* 0xdd */ + LIBFMOS_LZVN_OPPCODE_TYPE_INVALID, /* 0xde */ + LIBFMOS_LZVN_OPPCODE_TYPE_INVALID, /* 0xdf */ + + LIBFMOS_LZVN_OPPCODE_TYPE_LITERAL_LARGE, /* 0xe0 */ + LIBFMOS_LZVN_OPPCODE_TYPE_LITERAL_SMALL, /* 0xe1 */ + LIBFMOS_LZVN_OPPCODE_TYPE_LITERAL_SMALL, /* 0xe2 */ + LIBFMOS_LZVN_OPPCODE_TYPE_LITERAL_SMALL, /* 0xe3 */ + LIBFMOS_LZVN_OPPCODE_TYPE_LITERAL_SMALL, /* 0xe4 */ + LIBFMOS_LZVN_OPPCODE_TYPE_LITERAL_SMALL, /* 0xe5 */ + LIBFMOS_LZVN_OPPCODE_TYPE_LITERAL_SMALL, /* 0xe6 */ + LIBFMOS_LZVN_OPPCODE_TYPE_LITERAL_SMALL, /* 0xe7 */ + LIBFMOS_LZVN_OPPCODE_TYPE_LITERAL_SMALL, /* 0xe8 */ + LIBFMOS_LZVN_OPPCODE_TYPE_LITERAL_SMALL, /* 0xe9 */ + LIBFMOS_LZVN_OPPCODE_TYPE_LITERAL_SMALL, /* 0xea */ + LIBFMOS_LZVN_OPPCODE_TYPE_LITERAL_SMALL, /* 0xeb */ + LIBFMOS_LZVN_OPPCODE_TYPE_LITERAL_SMALL, /* 0xec */ + LIBFMOS_LZVN_OPPCODE_TYPE_LITERAL_SMALL, /* 0xed */ + LIBFMOS_LZVN_OPPCODE_TYPE_LITERAL_SMALL, /* 0xee */ + LIBFMOS_LZVN_OPPCODE_TYPE_LITERAL_SMALL, /* 0xef */ + + LIBFMOS_LZVN_OPPCODE_TYPE_MATCH_LARGE, /* 0xf0 */ + LIBFMOS_LZVN_OPPCODE_TYPE_MATCH_SMALL, /* 0xf1 */ + LIBFMOS_LZVN_OPPCODE_TYPE_MATCH_SMALL, /* 0xf2 */ + LIBFMOS_LZVN_OPPCODE_TYPE_MATCH_SMALL, /* 0xf3 */ + LIBFMOS_LZVN_OPPCODE_TYPE_MATCH_SMALL, /* 0xf4 */ + LIBFMOS_LZVN_OPPCODE_TYPE_MATCH_SMALL, /* 0xf5 */ + LIBFMOS_LZVN_OPPCODE_TYPE_MATCH_SMALL, /* 0xf6 */ + LIBFMOS_LZVN_OPPCODE_TYPE_MATCH_SMALL, /* 0xf7 */ + LIBFMOS_LZVN_OPPCODE_TYPE_MATCH_SMALL, /* 0xf8 */ + LIBFMOS_LZVN_OPPCODE_TYPE_MATCH_SMALL, /* 0xf9 */ + LIBFMOS_LZVN_OPPCODE_TYPE_MATCH_SMALL, /* 0xfa */ + LIBFMOS_LZVN_OPPCODE_TYPE_MATCH_SMALL, /* 0xfb */ + LIBFMOS_LZVN_OPPCODE_TYPE_MATCH_SMALL, /* 0xfc */ + LIBFMOS_LZVN_OPPCODE_TYPE_MATCH_SMALL, /* 0xfd */ + LIBFMOS_LZVN_OPPCODE_TYPE_MATCH_SMALL, /* 0xfe */ + LIBFMOS_LZVN_OPPCODE_TYPE_MATCH_SMALL, /* 0xff */ +}; + +/* Decompresses LZVN compressed data + * Returns 1 on success or -1 on error + */ +int libfmos_lzvn_decompress( + const uint8_t *compressed_data, + size_t compressed_data_size, + uint8_t *uncompressed_data, + size_t *uncompressed_data_size, + libcerror_error_t **error ) +{ + static char *function = "libfmos_lzvn_decompress"; + size_t compressed_data_offset = 0; + size_t match_offset = 0; + size_t safe_uncompressed_data_size = 0; + size_t uncompressed_data_offset = 0; + uint16_t distance = 0; + uint16_t literal_size = 0; + uint16_t match_size = 0; + uint8_t oppcode = 0; + uint8_t oppcode_type = 0; + uint8_t oppcode_value = 0; + +#if defined( HAVE_DEBUG_OUTPUT ) + size_t debug_match_offset = 0; + size_t oppcode_data_offset = 0; + size_t oppcode_data_size = 0; + uint16_t debug_match_size = 0; +#endif + + if( compressed_data == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid compressed data.", + function ); + + return( -1 ); + } + if( compressed_data_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid compressed data size value exceeds maximum.", + function ); + + return( -1 ); + } + if( uncompressed_data == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid uncompressed data.", + function ); + + return( -1 ); + } + if( uncompressed_data_size == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid uncompressed data size.", + function ); + + return( -1 ); + } + safe_uncompressed_data_size = *uncompressed_data_size; + + if( safe_uncompressed_data_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid uncompressed data size value exceeds maximum.", + function ); + + return( -1 ); + } + while( compressed_data_offset < compressed_data_size ) + { + if( uncompressed_data_offset >= safe_uncompressed_data_size ) + { + break; + } + if( compressed_data_offset >= compressed_data_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: compressed data size value too small.", + function ); + + return( -1 ); + } +#if defined( HAVE_DEBUG_OUTPUT ) + oppcode_data_offset = compressed_data_offset; + oppcode_data_size = 1; +#endif + oppcode = compressed_data[ compressed_data_offset++ ]; + + oppcode_type = libfmos_lzvn_oppcode_types[ oppcode ]; + + literal_size = 0; + match_size = 0; + + switch( oppcode_type ) + { + case LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_LARGE: +#if defined( HAVE_DEBUG_OUTPUT ) + oppcode_data_size += 2; +#endif + if( ( compressed_data_offset + 1 ) >= compressed_data_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: compressed data size value too small.", + function ); + + return( -1 ); + } + oppcode_value = compressed_data[ compressed_data_offset++ ]; + + literal_size = ( oppcode & 0xc0 ) >> 6; + match_size = ( ( oppcode & 0x38 ) >> 3 ) + 3; + distance = ( (uint16_t) compressed_data[ compressed_data_offset++ ] << 8 ) | oppcode_value; + + break; + + case LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM: +#if defined( HAVE_DEBUG_OUTPUT ) + oppcode_data_size += 2; +#endif + if( ( compressed_data_offset + 1 ) >= compressed_data_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: compressed data size value too small.", + function ); + + return( -1 ); + } + oppcode_value = compressed_data[ compressed_data_offset++ ]; + + literal_size = ( oppcode & 0x18 ) >> 3; + match_size = ( ( ( oppcode & 0x07 ) << 2 ) | ( oppcode_value & 0x03 ) ) + 3; + distance = ( (uint16_t) compressed_data[ compressed_data_offset++ ] << 6 ) | ( ( oppcode_value & 0xfc ) >> 2 ); + + break; + + case LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_PREVIOUS: + literal_size = ( oppcode & 0xc0 ) >> 6; + match_size = ( ( oppcode & 0x38 ) >> 3 ) + 3; + + break; + + case LIBFMOS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL: +#if defined( HAVE_DEBUG_OUTPUT ) + oppcode_data_size += 1; +#endif + if( compressed_data_offset >= compressed_data_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: compressed data size value too small.", + function ); + + return( -1 ); + } + literal_size = ( oppcode & 0xc0 ) >> 6; + match_size = ( ( oppcode & 0x38 ) >> 3 ) + 3; + distance = ( (uint16_t) ( oppcode & 0x07 ) << 8 ) | compressed_data[ compressed_data_offset++ ]; + + break; + + case LIBFMOS_LZVN_OPPCODE_TYPE_LITERAL_LARGE: +#if defined( HAVE_DEBUG_OUTPUT ) + oppcode_data_size += 1; +#endif + if( compressed_data_offset >= compressed_data_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: compressed data size value too small.", + function ); + + return( -1 ); + } + literal_size = (uint16_t) compressed_data[ compressed_data_offset++ ] + 16; + + break; + + case LIBFMOS_LZVN_OPPCODE_TYPE_LITERAL_SMALL: + literal_size = oppcode & 0x0f; + + break; + + case LIBFMOS_LZVN_OPPCODE_TYPE_MATCH_LARGE: +#if defined( HAVE_DEBUG_OUTPUT ) + oppcode_data_size += 1; +#endif + if( compressed_data_offset >= compressed_data_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: compressed data size value too small.", + function ); + + return( -1 ); + } + match_size = (uint16_t) compressed_data[ compressed_data_offset++ ] + 16; + + break; + + case LIBFMOS_LZVN_OPPCODE_TYPE_MATCH_SMALL: + match_size = oppcode & 0x0f; + + break; + + case LIBFMOS_LZVN_OPPCODE_TYPE_END_OF_STREAM: + case LIBFMOS_LZVN_OPPCODE_TYPE_NONE: + break; + + case LIBFMOS_LZVN_OPPCODE_TYPE_INVALID: + default: + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, + "%s: invalid oppcode: 0x%02" PRIx8 ".", + function, + oppcode ); + + return( -1 ); + } +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: oppcode data:\n", + function ); + libcnotify_print_data( + &( compressed_data[ oppcode_data_offset ] ), + oppcode_data_size, + LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); + + libcnotify_printf( + "%s: oppcode\t\t\t\t\t: 0x%02" PRIx8 "\n", + function, + oppcode ); + + libcnotify_printf( + "%s: literal size\t\t\t\t\t: %" PRIu16 "\n", + function, + literal_size ); + + libcnotify_printf( + "%s: match size\t\t\t\t\t: %" PRIu16 "\n", + function, + match_size ); + + libcnotify_printf( + "%s: distance\t\t\t\t\t: %" PRIu16 "\n", + function, + distance ); + + libcnotify_printf( + "\n" ); + } +#endif /* defined( HAVE_DEBUG_OUTPUT ) */ + + if( oppcode_type == LIBFMOS_LZVN_OPPCODE_TYPE_END_OF_STREAM ) + { + break; + } + if( literal_size > 0 ) + { + if( ( (size_t) literal_size > compressed_data_size ) + || ( compressed_data_offset > ( compressed_data_size - literal_size ) ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: literal size value exceeds compressed data size.", + function ); + + return( -1 ); + } + if( ( (size_t) literal_size > safe_uncompressed_data_size ) + || ( uncompressed_data_offset > ( safe_uncompressed_data_size - literal_size ) ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: literal size value exceeds uncompressed data size.", + function ); + + return( -1 ); + } +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: literal:\n", + function ); + libcnotify_print_data( + &( compressed_data[ compressed_data_offset ] ), + literal_size, + LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); + } +#endif + if( memory_copy( + &( uncompressed_data[ uncompressed_data_offset ] ), + &( compressed_data[ compressed_data_offset ] ), + (size_t) literal_size ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_COPY_FAILED, + "%s: unable to copy literal to uncompressed data.", + function ); + + return( -1 ); + } + compressed_data_offset += (size_t) literal_size; + uncompressed_data_offset += (size_t) literal_size; + } + if( match_size > 0 ) + { + if( (size_t) distance > uncompressed_data_offset ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: distance value exceeds uncompressed data offset.", + function ); + + return( -1 ); + } + match_offset = uncompressed_data_offset - distance; + + if( ( (size_t) match_size > safe_uncompressed_data_size ) + || ( uncompressed_data_offset > ( safe_uncompressed_data_size - match_size ) ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: match size value exceeds uncompressed data size.", + function ); + + return( -1 ); + } +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + debug_match_offset = match_offset; + debug_match_size = match_size; + + libcnotify_printf( + "%s: match offset\t\t\t\t\t: 0x%" PRIzx "\n", + function, + debug_match_offset ); + } +#endif + while( match_size > 0 ) + { + uncompressed_data[ uncompressed_data_offset++ ] = uncompressed_data[ match_offset++ ]; + + match_size--; + } +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: match:\n", + function ); + libcnotify_print_data( + &( uncompressed_data[ debug_match_offset ] ), + debug_match_size, + LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); + } +#endif + } + } + *uncompressed_data_size = uncompressed_data_offset; + + return( 1 ); +} + diff -Nru libfshfs-20201104/libfmos/libfmos_lzvn.h libfshfs-20240221/libfmos/libfmos_lzvn.h --- libfshfs-20201104/libfmos/libfmos_lzvn.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libfmos/libfmos_lzvn.h 2024-02-21 06:04:11.000000000 +0000 @@ -0,0 +1,48 @@ +/* + * LZVN (un)compression functions + * + * Copyright (C) 2019-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _LIBFMOS_LZVN_H ) +#define _LIBFMOS_LZVN_H + +#include +#include + +#include "libfmos_extern.h" +#include "libfmos_libcerror.h" + +#if defined( __cplusplus ) +extern "C" { +#endif + +LIBFMOS_EXTERN \ +int libfmos_lzvn_decompress( + const uint8_t *compressed_data, + size_t compressed_data_size, + uint8_t *uncompressed_data, + size_t *uncompressed_data_size, + libcerror_error_t **error ); + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _LIBFMOS_LZVN_H ) */ + diff -Nru libfshfs-20201104/libfmos/libfmos_notify.c libfshfs-20240221/libfmos/libfmos_notify.c --- libfshfs-20201104/libfmos/libfmos_notify.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libfmos/libfmos_notify.c 2024-02-21 06:04:11.000000000 +0000 @@ -0,0 +1,120 @@ +/* + * Notification functions + * + * Copyright (C) 2019-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include +#include + +#if defined( HAVE_STDLIB_H ) || defined( WINAPI ) +#include +#endif + +#include "libfmos_libcerror.h" +#include "libfmos_libcnotify.h" +#include "libfmos_notify.h" + +#if !defined( HAVE_LOCAL_LIBFMOS ) + +/* Sets the verbose notification + */ +void libfmos_notify_set_verbose( + int verbose ) +{ + libcnotify_verbose_set( + verbose ); +} + +/* Sets the notification stream + * Returns 1 if successful or -1 on error + */ +int libfmos_notify_set_stream( + FILE *stream, + libcerror_error_t **error ) +{ + static char *function = "libfmos_notify_set_stream"; + + if( libcnotify_stream_set( + stream, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to set stream.", + function ); + + return( -1 ); + } + return( 1 ); +} + +/* Opens the notification stream using a filename + * The stream is opened in append mode + * Returns 1 if successful or -1 on error + */ +int libfmos_notify_stream_open( + const char *filename, + libcerror_error_t **error ) +{ + static char *function = "libfmos_notify_stream_open"; + + if( libcnotify_stream_open( + filename, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_OPEN_FAILED, + "%s: unable to open stream.", + function ); + + return( -1 ); + } + return( 1 ); +} + +/* Closes the notification stream if opened using a filename + * Returns 0 if successful or -1 on error + */ +int libfmos_notify_stream_close( + libcerror_error_t **error ) +{ + static char *function = "libfmos_notify_stream_close"; + + if( libcnotify_stream_close( + error ) != 0 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_OPEN_FAILED, + "%s: unable to open stream.", + function ); + + return( -1 ); + } + return( 0 ); +} + +#endif /* !defined( HAVE_LOCAL_LIBFMOS ) */ + diff -Nru libfshfs-20201104/libfmos/libfmos_notify.h libfshfs-20240221/libfmos/libfmos_notify.h --- libfshfs-20201104/libfmos/libfmos_notify.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libfmos/libfmos_notify.h 2024-02-21 06:04:11.000000000 +0000 @@ -0,0 +1,63 @@ +/* + * Notification functions + * + * Copyright (C) 2019-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _LIBFMOS_NOTIFY_H ) +#define _LIBFMOS_NOTIFY_H + +#include +#include +#include + +#include "libfmos_extern.h" +#include "libfmos_libcerror.h" + +#if defined( __cplusplus ) +extern "C" { +#endif + +#if !defined( HAVE_LOCAL_LIBFMOS ) + +LIBFMOS_EXTERN \ +void libfmos_notify_set_verbose( + int verbose ); + +LIBFMOS_EXTERN \ +int libfmos_notify_set_stream( + FILE *stream, + libcerror_error_t **error ); + +LIBFMOS_EXTERN \ +int libfmos_notify_stream_open( + const char *filename, + libcerror_error_t **error ); + +LIBFMOS_EXTERN \ +int libfmos_notify_stream_close( + libcerror_error_t **error ); + +#endif /* !defined( HAVE_LOCAL_LIBFMOS ) */ + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _LIBFMOS_NOTIFY_H ) */ + diff -Nru libfshfs-20201104/libfmos/libfmos_support.c libfshfs-20240221/libfmos/libfmos_support.c --- libfshfs-20201104/libfmos/libfmos_support.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libfmos/libfmos_support.c 2024-02-21 06:04:11.000000000 +0000 @@ -0,0 +1,41 @@ +/* + * Support functions + * + * Copyright (C) 2019-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include + +#include + +#include "libfmos_definitions.h" +#include "libfmos_support.h" + +#if !defined( HAVE_LOCAL_LIBFMOS ) + +/* Returns the library version as a string + */ +const char *libfmos_get_version( + void ) +{ + return( (const char *) LIBFMOS_VERSION_STRING ); +} + +#endif + diff -Nru libfshfs-20201104/libfmos/libfmos_support.h libfshfs-20240221/libfmos/libfmos_support.h --- libfshfs-20201104/libfmos/libfmos_support.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libfmos/libfmos_support.h 2024-02-21 06:04:11.000000000 +0000 @@ -0,0 +1,47 @@ +/* + * Support functions + * + * Copyright (C) 2019-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _LIBFMOS_SUPPORT_H ) +#define _LIBFMOS_SUPPORT_H + +#include +#include + +#include "libfmos_extern.h" + +#if defined( __cplusplus ) +extern "C" { +#endif + +#if !defined( HAVE_LOCAL_LIBFMOS ) + +LIBFMOS_EXTERN \ +const char *libfmos_get_version( + void ); + +#endif + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _LIBFMOS_SUPPORT_H ) */ + diff -Nru libfshfs-20201104/libfmos/libfmos_types.h libfshfs-20240221/libfmos/libfmos_types.h --- libfshfs-20201104/libfmos/libfmos_types.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libfmos/libfmos_types.h 2024-02-21 06:04:11.000000000 +0000 @@ -0,0 +1,49 @@ +/* + * The internal type definitions + * + * Copyright (C) 2019-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _LIBFMOS_INTERNAL_TYPES_H ) +#define _LIBFMOS_INTERNAL_TYPES_H + +#include +#include + +/* Define HAVE_LOCAL_LIBFMOS for local use of libfmos + * The definitions in are copied here + * for local use of libfmos + */ +#if defined( HAVE_LOCAL_LIBFMOS ) + +/* The following type definitions hide internal data structures + */ +#if defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) + +/* TODO */ + +#else + +/* TODO */ + +#endif /* defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) */ + +#endif /* defined( HAVE_LOCAL_LIBFMOS ) */ + +#endif /* !defined( _LIBFMOS_INTERNAL_TYPES_H ) */ + diff -Nru libfshfs-20201104/libfmos/libfmos_unused.h libfshfs-20240221/libfmos/libfmos_unused.h --- libfshfs-20201104/libfmos/libfmos_unused.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libfmos/libfmos_unused.h 2024-02-21 06:04:11.000000000 +0000 @@ -0,0 +1,44 @@ +/* + * Definitions to silence compiler warnings about unused function attributes/parameters. + * + * Copyright (C) 2019-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _LIBFMOS_UNUSED_H ) +#define _LIBFMOS_UNUSED_H + +#include + +#if !defined( LIBFMOS_ATTRIBUTE_UNUSED ) +#if defined( __GNUC__ ) && __GNUC__ >= 3 +#define LIBFMOS_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) +#else +#define LIBFMOS_ATTRIBUTE_UNUSED +#endif +#endif + +#if defined( _MSC_VER ) +#define LIBFMOS_UNREFERENCED_PARAMETER( parameter ) \ + UNREFERENCED_PARAMETER( parameter ); +#else +#define LIBFMOS_UNREFERENCED_PARAMETER( parameter ) \ + /* parameter */ +#endif + +#endif /* !defined( _LIBFMOS_UNUSED_H ) */ + diff -Nru libfshfs-20201104/libfshfs/Makefile.am libfshfs-20240221/libfshfs/Makefile.am --- libfshfs-20201104/libfshfs/Makefile.am 2020-10-31 12:24:11.000000000 +0000 +++ libfshfs-20240221/libfshfs/Makefile.am 2023-12-03 09:06:53.000000000 +0000 @@ -15,6 +15,7 @@ @LIBFDATA_CPPFLAGS@ \ @LIBFDATETIME_CPPFLAGS@ \ @LIBFGUID_CPPFLAGS@ \ + @LIBFMOS_CPPFLAGS@ \ @ZLIB_CPPFLAGS@ \ @PTHREAD_CPPFLAGS@ \ @LIBFSHFS_DLL_EXPORT@ @@ -27,15 +28,19 @@ fshfs_catalog_file.h \ fshfs_compressed_data.h \ fshfs_extents_file.h \ - fshfs_fork.h \ - fshfs_volume.h \ + fshfs_fork_descriptor.h \ + fshfs_master_directory_block.h \ + fshfs_volume_header.h \ libfshfs.c \ + libfshfs_allocation_block_stream.c libfshfs_allocation_block_stream.h \ libfshfs_attribute_record.c libfshfs_attribute_record.h \ libfshfs_attributes_btree_file.c libfshfs_attributes_btree_file.h \ libfshfs_attributes_btree_key.c libfshfs_attributes_btree_key.h \ + libfshfs_bit_stream.c libfshfs_bit_stream.h \ libfshfs_btree_file.c libfshfs_btree_file.h \ libfshfs_btree_header.c libfshfs_btree_header.h \ libfshfs_btree_node.c libfshfs_btree_node.h \ + libfshfs_btree_node_cache.c libfshfs_btree_node_cache.h \ libfshfs_btree_node_descriptor.c libfshfs_btree_node_descriptor.h \ libfshfs_btree_node_record.c libfshfs_btree_node_record.h \ libfshfs_btree_node_vector.c libfshfs_btree_node_vector.h \ @@ -57,11 +62,13 @@ libfshfs_extent.c libfshfs_extent.h \ libfshfs_extents_btree_file.c libfshfs_extents_btree_file.h \ libfshfs_extents_btree_key.c libfshfs_extents_btree_key.h \ + libfshfs_extents_record.c libfshfs_extents_record.h \ libfshfs_extern.h \ libfshfs_file_entry.c libfshfs_file_entry.h \ libfshfs_file_record.c libfshfs_file_record.h \ libfshfs_file_system.c libfshfs_file_system.h \ libfshfs_fork_descriptor.c libfshfs_fork_descriptor.h \ + libfshfs_huffman_tree.c libfshfs_huffman_tree.h \ libfshfs_io_handle.c libfshfs_io_handle.h \ libfshfs_libbfio.h \ libfshfs_libcdata.h \ @@ -73,10 +80,12 @@ libfshfs_libfdata.h \ libfshfs_libfdatetime.h \ libfshfs_libfguid.h \ + libfshfs_libfmos.h \ libfshfs_libuna.h \ - libfshfs_lzvn.c libfshfs_lzvn.h \ + libfshfs_master_directory_block.c libfshfs_master_directory_block.h \ libfshfs_name.c libfshfs_name.h \ libfshfs_notify.c libfshfs_notify.h \ + libfshfs_profiler.c libfshfs_profiler.h \ libfshfs_support.c libfshfs_support.h \ libfshfs_thread_record.c libfshfs_thread_record.h \ libfshfs_types.h \ @@ -99,6 +108,7 @@ @LIBFDATA_LIBADD@ \ @LIBFDATETIME_LIBADD@ \ @LIBFGUID_LIBADD@ \ + @LIBFMOS_LIBADD@ \ @ZLIB_LIBADD@ \ @PTHREAD_LIBADD@ @@ -113,11 +123,13 @@ Makefile.in distclean: clean - /bin/rm -f libfshfs_definitions.h - /bin/rm -f libfshfs.rc - /bin/rm -f Makefile + -rm -f libfshfs_definitions.h + -rm -f libfshfs.rc + -rm -f Makefile -splint: +sources-local: $(BUILT_SOURCES) + +splint-local: @echo "Running splint on libfshfs ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfshfs_la_SOURCES) diff -Nru libfshfs-20201104/libfshfs/Makefile.in libfshfs-20240221/libfshfs/Makefile.in --- libfshfs-20201104/libfshfs/Makefile.in 2020-11-04 11:56:31.000000000 +0000 +++ libfshfs-20240221/libfshfs/Makefile.in 2024-02-21 06:04:26.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -91,25 +91,26 @@ subdir = libfshfs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcdata.m4 \ - $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \ - $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \ - $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcrypto.m4 \ - $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcthreads.m4 \ - $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ - $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ - $(top_srcdir)/m4/libhmac.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/libuna.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \ - $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \ - $(top_srcdir)/m4/zlib.m4 $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libbfio.m4 \ + $(top_srcdir)/m4/libcdata.m4 $(top_srcdir)/m4/libcerror.m4 \ + $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ + $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ + $(top_srcdir)/m4/libcrypto.m4 $(top_srcdir)/m4/libcsplit.m4 \ + $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \ + $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ + $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmos.m4 \ + $(top_srcdir)/m4/libfuse.m4 $(top_srcdir)/m4/libhmac.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/pthread.m4 \ + $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ + $(top_srcdir)/m4/types.m4 $(top_srcdir)/m4/zlib.m4 \ + $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) @@ -147,10 +148,12 @@ am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) libfshfs_la_DEPENDENCIES = -am_libfshfs_la_OBJECTS = libfshfs.lo libfshfs_attribute_record.lo \ - libfshfs_attributes_btree_file.lo \ - libfshfs_attributes_btree_key.lo libfshfs_btree_file.lo \ - libfshfs_btree_header.lo libfshfs_btree_node.lo \ +am_libfshfs_la_OBJECTS = libfshfs.lo \ + libfshfs_allocation_block_stream.lo \ + libfshfs_attribute_record.lo libfshfs_attributes_btree_file.lo \ + libfshfs_attributes_btree_key.lo libfshfs_bit_stream.lo \ + libfshfs_btree_file.lo libfshfs_btree_header.lo \ + libfshfs_btree_node.lo libfshfs_btree_node_cache.lo \ libfshfs_btree_node_descriptor.lo \ libfshfs_btree_node_record.lo libfshfs_btree_node_vector.lo \ libfshfs_block_data_handle.lo libfshfs_buffer_data_handle.lo \ @@ -161,12 +164,14 @@ libfshfs_directory_entry.lo libfshfs_directory_record.lo \ libfshfs_error.lo libfshfs_extended_attribute.lo \ libfshfs_extent.lo libfshfs_extents_btree_file.lo \ - libfshfs_extents_btree_key.lo libfshfs_file_entry.lo \ - libfshfs_file_record.lo libfshfs_file_system.lo \ - libfshfs_fork_descriptor.lo libfshfs_io_handle.lo \ - libfshfs_lzvn.lo libfshfs_name.lo libfshfs_notify.lo \ - libfshfs_support.lo libfshfs_thread_record.lo \ - libfshfs_volume.lo libfshfs_volume_header.lo + libfshfs_extents_btree_key.lo libfshfs_extents_record.lo \ + libfshfs_file_entry.lo libfshfs_file_record.lo \ + libfshfs_file_system.lo libfshfs_fork_descriptor.lo \ + libfshfs_huffman_tree.lo libfshfs_io_handle.lo \ + libfshfs_master_directory_block.lo libfshfs_name.lo \ + libfshfs_notify.lo libfshfs_profiler.lo libfshfs_support.lo \ + libfshfs_thread_record.lo libfshfs_volume.lo \ + libfshfs_volume_header.lo libfshfs_la_OBJECTS = $(am_libfshfs_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) @@ -191,13 +196,16 @@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/libfshfs.Plo \ + ./$(DEPDIR)/libfshfs_allocation_block_stream.Plo \ ./$(DEPDIR)/libfshfs_attribute_record.Plo \ ./$(DEPDIR)/libfshfs_attributes_btree_file.Plo \ ./$(DEPDIR)/libfshfs_attributes_btree_key.Plo \ + ./$(DEPDIR)/libfshfs_bit_stream.Plo \ ./$(DEPDIR)/libfshfs_block_data_handle.Plo \ ./$(DEPDIR)/libfshfs_btree_file.Plo \ ./$(DEPDIR)/libfshfs_btree_header.Plo \ ./$(DEPDIR)/libfshfs_btree_node.Plo \ + ./$(DEPDIR)/libfshfs_btree_node_cache.Plo \ ./$(DEPDIR)/libfshfs_btree_node_descriptor.Plo \ ./$(DEPDIR)/libfshfs_btree_node_record.Plo \ ./$(DEPDIR)/libfshfs_btree_node_vector.Plo \ @@ -217,13 +225,16 @@ ./$(DEPDIR)/libfshfs_extent.Plo \ ./$(DEPDIR)/libfshfs_extents_btree_file.Plo \ ./$(DEPDIR)/libfshfs_extents_btree_key.Plo \ + ./$(DEPDIR)/libfshfs_extents_record.Plo \ ./$(DEPDIR)/libfshfs_file_entry.Plo \ ./$(DEPDIR)/libfshfs_file_record.Plo \ ./$(DEPDIR)/libfshfs_file_system.Plo \ ./$(DEPDIR)/libfshfs_fork_descriptor.Plo \ + ./$(DEPDIR)/libfshfs_huffman_tree.Plo \ ./$(DEPDIR)/libfshfs_io_handle.Plo \ - ./$(DEPDIR)/libfshfs_lzvn.Plo ./$(DEPDIR)/libfshfs_name.Plo \ - ./$(DEPDIR)/libfshfs_notify.Plo \ + ./$(DEPDIR)/libfshfs_master_directory_block.Plo \ + ./$(DEPDIR)/libfshfs_name.Plo ./$(DEPDIR)/libfshfs_notify.Plo \ + ./$(DEPDIR)/libfshfs_profiler.Plo \ ./$(DEPDIR)/libfshfs_support.Plo \ ./$(DEPDIR)/libfshfs_thread_record.Plo \ ./$(DEPDIR)/libfshfs_volume.Plo \ @@ -254,6 +265,7 @@ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -271,8 +283,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/libfshfs.rc.in \ $(srcdir)/libfshfs_definitions.h.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -290,6 +300,8 @@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ @@ -305,8 +317,10 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -326,6 +340,8 @@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ +HAVE_LIBFMOS = @HAVE_LIBFMOS@ +HAVE_LIBFUSE = @HAVE_LIBFUSE@ HAVE_LIBHMAC = @HAVE_LIBHMAC@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ @@ -341,6 +357,7 @@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ +HAVE_LOCAL_LIBFMOS = @HAVE_LOCAL_LIBFMOS@ HAVE_LOCAL_LIBHMAC = @HAVE_LOCAL_LIBHMAC@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ @@ -394,8 +411,12 @@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ +LIBFMOS_CPPFLAGS = @LIBFMOS_CPPFLAGS@ +LIBFMOS_LIBADD = @LIBFMOS_LIBADD@ LIBFSHFS_DLL_EXPORT = @LIBFSHFS_DLL_EXPORT@ LIBFSHFS_DLL_IMPORT = @LIBFSHFS_DLL_IMPORT@ +LIBFUSE_CPPFLAGS = @LIBFUSE_CPPFLAGS@ +LIBFUSE_LIBADD = @LIBFUSE_LIBADD@ LIBHMAC_CPPFLAGS = @LIBHMAC_CPPFLAGS@ LIBHMAC_LIBADD = @LIBHMAC_LIBADD@ LIBICONV = @LIBICONV@ @@ -417,8 +438,8 @@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ @@ -441,26 +462,6 @@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ -PYTHON2 = @PYTHON2@ -PYTHON2_CONFIG = @PYTHON2_CONFIG@ -PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ -PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ -PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ -PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ -PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ -PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ -PYTHON2_PREFIX = @PYTHON2_PREFIX@ -PYTHON2_VERSION = @PYTHON2_VERSION@ -PYTHON3 = @PYTHON3@ -PYTHON3_CONFIG = @PYTHON3_CONFIG@ -PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ -PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ -PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ -PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ -PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ -PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ -PYTHON3_PREFIX = @PYTHON3_PREFIX@ -PYTHON3_VERSION = @PYTHON3_VERSION@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ @@ -538,6 +539,12 @@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ +ax_libfmos_pc_libs_private = @ax_libfmos_pc_libs_private@ +ax_libfmos_spec_build_requires = @ax_libfmos_spec_build_requires@ +ax_libfmos_spec_requires = @ax_libfmos_spec_requires@ +ax_libfuse_pc_libs_private = @ax_libfuse_pc_libs_private@ +ax_libfuse_spec_build_requires = @ax_libfuse_spec_build_requires@ +ax_libfuse_spec_requires = @ax_libfuse_spec_requires@ ax_libhmac_pc_libs_private = @ax_libhmac_pc_libs_private@ ax_libhmac_spec_build_requires = @ax_libhmac_spec_build_requires@ ax_libhmac_spec_requires = @ax_libhmac_spec_requires@ @@ -562,6 +569,8 @@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +fuse_CFLAGS = @fuse_CFLAGS@ +fuse_LIBS = @fuse_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -599,6 +608,8 @@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ +libfmos_CFLAGS = @libfmos_CFLAGS@ +libfmos_LIBS = @libfmos_LIBS@ libfshfs_spec_requires = @libfshfs_spec_requires@ libfshfs_spec_tools_build_requires = @libfshfs_spec_tools_build_requires@ libhmac_CFLAGS = @libhmac_CFLAGS@ @@ -617,11 +628,8 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ -pyexecdir2 = @pyexecdir2@ -pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ -pythondir2 = @pythondir2@ -pythondir3 = @pythondir3@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -649,6 +657,7 @@ @LIBFDATA_CPPFLAGS@ \ @LIBFDATETIME_CPPFLAGS@ \ @LIBFGUID_CPPFLAGS@ \ + @LIBFMOS_CPPFLAGS@ \ @ZLIB_CPPFLAGS@ \ @PTHREAD_CPPFLAGS@ \ @LIBFSHFS_DLL_EXPORT@ @@ -660,15 +669,19 @@ fshfs_catalog_file.h \ fshfs_compressed_data.h \ fshfs_extents_file.h \ - fshfs_fork.h \ - fshfs_volume.h \ + fshfs_fork_descriptor.h \ + fshfs_master_directory_block.h \ + fshfs_volume_header.h \ libfshfs.c \ + libfshfs_allocation_block_stream.c libfshfs_allocation_block_stream.h \ libfshfs_attribute_record.c libfshfs_attribute_record.h \ libfshfs_attributes_btree_file.c libfshfs_attributes_btree_file.h \ libfshfs_attributes_btree_key.c libfshfs_attributes_btree_key.h \ + libfshfs_bit_stream.c libfshfs_bit_stream.h \ libfshfs_btree_file.c libfshfs_btree_file.h \ libfshfs_btree_header.c libfshfs_btree_header.h \ libfshfs_btree_node.c libfshfs_btree_node.h \ + libfshfs_btree_node_cache.c libfshfs_btree_node_cache.h \ libfshfs_btree_node_descriptor.c libfshfs_btree_node_descriptor.h \ libfshfs_btree_node_record.c libfshfs_btree_node_record.h \ libfshfs_btree_node_vector.c libfshfs_btree_node_vector.h \ @@ -690,11 +703,13 @@ libfshfs_extent.c libfshfs_extent.h \ libfshfs_extents_btree_file.c libfshfs_extents_btree_file.h \ libfshfs_extents_btree_key.c libfshfs_extents_btree_key.h \ + libfshfs_extents_record.c libfshfs_extents_record.h \ libfshfs_extern.h \ libfshfs_file_entry.c libfshfs_file_entry.h \ libfshfs_file_record.c libfshfs_file_record.h \ libfshfs_file_system.c libfshfs_file_system.h \ libfshfs_fork_descriptor.c libfshfs_fork_descriptor.h \ + libfshfs_huffman_tree.c libfshfs_huffman_tree.h \ libfshfs_io_handle.c libfshfs_io_handle.h \ libfshfs_libbfio.h \ libfshfs_libcdata.h \ @@ -706,10 +721,12 @@ libfshfs_libfdata.h \ libfshfs_libfdatetime.h \ libfshfs_libfguid.h \ + libfshfs_libfmos.h \ libfshfs_libuna.h \ - libfshfs_lzvn.c libfshfs_lzvn.h \ + libfshfs_master_directory_block.c libfshfs_master_directory_block.h \ libfshfs_name.c libfshfs_name.h \ libfshfs_notify.c libfshfs_notify.h \ + libfshfs_profiler.c libfshfs_profiler.h \ libfshfs_support.c libfshfs_support.h \ libfshfs_thread_record.c libfshfs_thread_record.h \ libfshfs_types.h \ @@ -732,6 +749,7 @@ @LIBFDATA_LIBADD@ \ @LIBFDATETIME_LIBADD@ \ @LIBFGUID_LIBADD@ \ + @LIBFMOS_LIBADD@ \ @ZLIB_LIBADD@ \ @PTHREAD_LIBADD@ @@ -827,13 +845,16 @@ -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfshfs.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfshfs_allocation_block_stream.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfshfs_attribute_record.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfshfs_attributes_btree_file.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfshfs_attributes_btree_key.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfshfs_bit_stream.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfshfs_block_data_handle.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfshfs_btree_file.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfshfs_btree_header.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfshfs_btree_node.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfshfs_btree_node_cache.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfshfs_btree_node_descriptor.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfshfs_btree_node_record.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfshfs_btree_node_vector.Plo@am__quote@ # am--include-marker @@ -853,14 +874,17 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfshfs_extent.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfshfs_extents_btree_file.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfshfs_extents_btree_key.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfshfs_extents_record.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfshfs_file_entry.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfshfs_file_record.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfshfs_file_system.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfshfs_fork_descriptor.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfshfs_huffman_tree.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfshfs_io_handle.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfshfs_lzvn.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfshfs_master_directory_block.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfshfs_name.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfshfs_notify.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfshfs_profiler.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfshfs_support.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfshfs_thread_record.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfshfs_volume.Plo@am__quote@ # am--include-marker @@ -898,6 +922,8 @@ clean-libtool: -rm -rf .libs _libs +sources-local: +splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique @@ -950,7 +976,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am @@ -1072,13 +1097,16 @@ maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/libfshfs.Plo + -rm -f ./$(DEPDIR)/libfshfs_allocation_block_stream.Plo -rm -f ./$(DEPDIR)/libfshfs_attribute_record.Plo -rm -f ./$(DEPDIR)/libfshfs_attributes_btree_file.Plo -rm -f ./$(DEPDIR)/libfshfs_attributes_btree_key.Plo + -rm -f ./$(DEPDIR)/libfshfs_bit_stream.Plo -rm -f ./$(DEPDIR)/libfshfs_block_data_handle.Plo -rm -f ./$(DEPDIR)/libfshfs_btree_file.Plo -rm -f ./$(DEPDIR)/libfshfs_btree_header.Plo -rm -f ./$(DEPDIR)/libfshfs_btree_node.Plo + -rm -f ./$(DEPDIR)/libfshfs_btree_node_cache.Plo -rm -f ./$(DEPDIR)/libfshfs_btree_node_descriptor.Plo -rm -f ./$(DEPDIR)/libfshfs_btree_node_record.Plo -rm -f ./$(DEPDIR)/libfshfs_btree_node_vector.Plo @@ -1098,14 +1126,17 @@ -rm -f ./$(DEPDIR)/libfshfs_extent.Plo -rm -f ./$(DEPDIR)/libfshfs_extents_btree_file.Plo -rm -f ./$(DEPDIR)/libfshfs_extents_btree_key.Plo + -rm -f ./$(DEPDIR)/libfshfs_extents_record.Plo -rm -f ./$(DEPDIR)/libfshfs_file_entry.Plo -rm -f ./$(DEPDIR)/libfshfs_file_record.Plo -rm -f ./$(DEPDIR)/libfshfs_file_system.Plo -rm -f ./$(DEPDIR)/libfshfs_fork_descriptor.Plo + -rm -f ./$(DEPDIR)/libfshfs_huffman_tree.Plo -rm -f ./$(DEPDIR)/libfshfs_io_handle.Plo - -rm -f ./$(DEPDIR)/libfshfs_lzvn.Plo + -rm -f ./$(DEPDIR)/libfshfs_master_directory_block.Plo -rm -f ./$(DEPDIR)/libfshfs_name.Plo -rm -f ./$(DEPDIR)/libfshfs_notify.Plo + -rm -f ./$(DEPDIR)/libfshfs_profiler.Plo -rm -f ./$(DEPDIR)/libfshfs_support.Plo -rm -f ./$(DEPDIR)/libfshfs_thread_record.Plo -rm -f ./$(DEPDIR)/libfshfs_volume.Plo @@ -1126,6 +1157,14 @@ ps-am: +sources: sources-am + +sources-am: sources-local + +splint: splint-am + +splint-am: splint-local + uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip @@ -1142,17 +1181,20 @@ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES + sources-am sources-local splint-am splint-local tags tags-am \ + uninstall uninstall-am uninstall-libLTLIBRARIES .PRECIOUS: Makefile distclean: clean - /bin/rm -f libfshfs_definitions.h - /bin/rm -f libfshfs.rc - /bin/rm -f Makefile + -rm -f libfshfs_definitions.h + -rm -f libfshfs.rc + -rm -f Makefile + +sources-local: $(BUILT_SOURCES) -splint: +splint-local: @echo "Running splint on libfshfs ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfshfs_la_SOURCES) diff -Nru libfshfs-20201104/libfshfs/fshfs_attributes_file.h libfshfs-20240221/libfshfs/fshfs_attributes_file.h --- libfshfs-20201104/libfshfs/fshfs_attributes_file.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/fshfs_attributes_file.h 2024-02-21 05:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * The HFS+ attributes B-tree file definitions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfshfs/fshfs_btree.h libfshfs-20240221/libfshfs/fshfs_btree.h --- libfshfs-20201104/libfshfs/fshfs_btree.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/fshfs_btree.h 2024-02-21 05:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * The HFS B-tree definitions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfshfs/fshfs_catalog_file.h libfshfs-20240221/libfshfs/fshfs_catalog_file.h --- libfshfs-20201104/libfshfs/fshfs_catalog_file.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/fshfs_catalog_file.h 2024-02-21 05:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * The HFS catalog B-tree file definitions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -48,6 +48,11 @@ */ uint8_t parent_identifier[ 4 ]; + /* The number of characters of the name string + * Consists of 1 byte + */ + uint8_t name_size; + /* The name string * Variable of size */ @@ -58,14 +63,9 @@ struct fshfs_catalog_directory_record_hfs { /* The record type - * Consists of 1 byte - */ - uint8_t record_type; - - /* Unknown (reserved) - * Consists of 1 byte + * Consists of 2 bytes */ - uint8_t unknown1; + uint8_t record_type[ 2 ]; /* The flags * Consists of 2 bytes @@ -121,14 +121,9 @@ struct fshfs_catalog_file_record_hfs { /* The record type - * Consists of 1 byte + * Consists of 2 bytes */ - uint8_t record_type; - - /* Unknown (reserved) - * Consists of 1 byte - */ - uint8_t unknown1; + uint8_t record_type[ 2 ]; /* The flags * Consists of 1 byte @@ -150,9 +145,35 @@ */ uint8_t identifier[ 4 ]; -/* TODO refactor */ - uint8_t data_fork[ 10 ]; - uint8_t resource_fork[ 10 ]; + /* The data fork block number + * Consists of 2 bytes + */ + uint8_t data_fork_block_number[ 2 ]; + + /* The data fork size + * Consists of 4 bytes + */ + uint8_t data_fork_size[ 4 ]; + + /* The data fork allocated size + * Consists of 4 bytes + */ + uint8_t data_fork_allocated_size[ 4 ]; + + /* The resource fork block number + * Consists of 2 bytes + */ + uint8_t resource_fork_block_number[ 2 ]; + + /* The resource fork size + * Consists of 4 bytes + */ + uint8_t resource_fork_size[ 4 ]; + + /* The resource fork allocated size + * Consists of 4 bytes + */ + uint8_t resource_fork_allocated_size[ 4 ]; /* The creation time * Consists of 4 bytes @@ -182,15 +203,20 @@ */ uint8_t clump_size[ 2 ]; - /* The data fork descriptor - * Consists of 16 bytes + /* The data fork extents record + * Consists of 12 bytes */ - uint8_t data_fork_descriptor[ 16 ]; + uint8_t data_fork_extents_record[ 12 ]; - /* The resource fork descriptor - * Consists of 16 bytes + /* The resource fork extents record + * Consists of 12 bytes */ - uint8_t resource_fork_descriptor[ 16 ]; + uint8_t resource_fork_extents_record[ 12 ]; + + /* Unknown (reserved) + * Consists of 4 bytes + */ + uint8_t unknown1[ 4 ]; }; typedef struct fshfs_catalog_thread_record_hfs fshfs_catalog_thread_record_hfs_t; @@ -217,6 +243,11 @@ */ uint8_t parent_identifier[ 4 ]; + /* The number of characters of the name string + * Consists of 1 byte + */ + uint8_t name_size; + /* The name string * Variable of size */ diff -Nru libfshfs-20201104/libfshfs/fshfs_compressed_data.h libfshfs-20240221/libfshfs/fshfs_compressed_data.h --- libfshfs-20201104/libfshfs/fshfs_compressed_data.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/fshfs_compressed_data.h 2024-02-21 05:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * The HFS+ compressed data definitions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfshfs/fshfs_extents_file.h libfshfs-20240221/libfshfs/fshfs_extents_file.h --- libfshfs-20201104/libfshfs/fshfs_extents_file.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/fshfs_extents_file.h 2024-02-21 05:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * The HFS extents (overflow) B-tree file definitions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfshfs/fshfs_fork.h libfshfs-20240221/libfshfs/fshfs_fork.h --- libfshfs-20201104/libfshfs/fshfs_fork.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/fshfs_fork.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,62 +0,0 @@ -/* - * The HFS fork definitions - * - * Copyright (C) 2009-2020, Joachim Metz - * - * Refer to AUTHORS for acknowledgements. - * - * This program 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 3 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - */ - -#if !defined( _FSHFS_FORK_H ) -#define _FSHFS_FORK_H - -#include -#include - -#if defined( __cplusplus ) -extern "C" { -#endif - -typedef struct fshfs_fork_descriptor fshfs_fork_descriptor_t; - -struct fshfs_fork_descriptor -{ - /* The logical size - * Consists of 8 bytes - */ - uint8_t logical_size[ 8 ]; - - /* The clump size - * Consists of 4 bytes - */ - uint8_t clump_size[ 4 ]; - - /* The number of blocks - * Consists of 4 bytes - */ - uint8_t number_of_blocks[ 4 ]; - - /* The first 8 extents - * Consists of 8 x ( 4 + 4 ) = 64 bytes - */ - uint8_t extents[ 64 ]; -}; - -#if defined( __cplusplus ) -} -#endif - -#endif /* !defined( _FSHFS_FORK_H ) */ - diff -Nru libfshfs-20201104/libfshfs/fshfs_fork_descriptor.h libfshfs-20240221/libfshfs/fshfs_fork_descriptor.h --- libfshfs-20201104/libfshfs/fshfs_fork_descriptor.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libfshfs/fshfs_fork_descriptor.h 2024-02-21 05:48:49.000000000 +0000 @@ -0,0 +1,62 @@ +/* + * The HFS+/HFSX fork descriptor definition + * + * Copyright (C) 2009-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _FSHFS_FORK_DESCRIPTOR_H ) +#define _FSHFS_FORK_DESCRIPTOR_H + +#include +#include + +#if defined( __cplusplus ) +extern "C" { +#endif + +typedef struct fshfs_fork_descriptor fshfs_fork_descriptor_t; + +struct fshfs_fork_descriptor +{ + /* The logical size + * Consists of 8 bytes + */ + uint8_t logical_size[ 8 ]; + + /* The clump size + * Consists of 4 bytes + */ + uint8_t clump_size[ 4 ]; + + /* The number of blocks + * Consists of 4 bytes + */ + uint8_t number_of_blocks[ 4 ]; + + /* The first 8 extents + * Consists of 8 x ( 4 + 4 ) = 64 bytes + */ + uint8_t extents[ 64 ]; +}; + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _FSHFS_FORK_DESCRIPTOR_H ) */ + diff -Nru libfshfs-20201104/libfshfs/fshfs_master_directory_block.h libfshfs-20240221/libfshfs/fshfs_master_directory_block.h --- libfshfs-20201104/libfshfs/fshfs_master_directory_block.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libfshfs/fshfs_master_directory_block.h 2024-02-21 05:48:49.000000000 +0000 @@ -0,0 +1,192 @@ +/* + * The (classic) HFS master directory block (MDB) definition + * + * Copyright (C) 2009-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _FSHFS_MASTER_DIRECTORY_BLOCK_H ) +#define _FSHFS_MASTER_DIRECTORY_BLOCK_H + +#include +#include + +#if defined( __cplusplus ) +extern "C" { +#endif + +typedef struct fshfs_master_directory_block fshfs_master_directory_block_t; + +struct fshfs_master_directory_block +{ + /* The signature + * Consists of 2 bytes + */ + uint8_t signature[ 2 ]; + + /* The creation time + * Consists of 4 bytes + */ + uint8_t creation_time[ 4 ]; + + /* The modification time + * Consists of 4 bytes + */ + uint8_t modification_time[ 4 ]; + + /* The (volume) attribute flags + * Consists of 2 bytes + */ + uint8_t attribute_flags[ 2 ]; + + /* The number of files in root (directory) + * Consists of 2 bytes + */ + uint8_t number_of_files_in_root[ 2 ]; + + /* The (volume) bitmap block number + * Consists of 2 bytes + */ + uint8_t bitmap_block_number[ 2 ]; + + /* Unknown + * Consists of 2 bytes + */ + uint8_t unknown1[ 2 ]; + + /* The number of blocks + * Consists of 2 bytes + */ + uint8_t number_of_blocks[ 2 ]; + + /* The allocation block size + * Consists of 4 bytes + */ + uint8_t allocation_block_size[ 4 ]; + + /* The default clump size + * Consists of 4 bytes + */ + uint8_t default_clump_size[ 4 ]; + + /* The extents start block number + * Consists of 2 bytes + */ + uint8_t extents_start_block_number[ 2 ]; + + /* The next available catalog node identifier (CNID) + * Consists of 4 bytes + */ + uint8_t next_available_catalog_node_identifier[ 4 ]; + + /* The number of unused blocks + * Consists of 2 bytes + */ + uint8_t number_of_unused_blocks[ 2 ]; + + /* The (volume) label sizes + * Consists of 1 byte + */ + uint8_t volume_label_size; + + /* The (volume) label + * Consists of 27 bytes + */ + uint8_t volume_label[ 27 ]; + + /* The backup time + * Consists of 4 bytes + */ + uint8_t backup_time[ 4 ]; + + /* The backup sequence number + * Consists of 2 bytes + */ + uint8_t backup_sequence_number[ 2 ]; + + /* The volume write count + * Consists of 4 bytes + */ + uint8_t volume_write_count[ 4 ]; + + /* The extents overflow (file) clump size + * Consists of 4 bytes + */ + uint8_t extents_overflow_clump_size[ 4 ]; + + /* The catalog (file) clump size + * Consists of 4 bytes + */ + uint8_t catalog_clump_size[ 4 ]; + + /* The number of (sub) directories in root (directory) + * Consists of 2 bytes + */ + uint8_t number_of_directories_in_root[ 2 ]; + + /* The number of files + * Consists of 4 bytes + */ + uint8_t number_of_files[ 4 ]; + + /* The number of directories + * Consists of 4 bytes + */ + uint8_t number_of_directories[ 4 ]; + + /* The finder information + * Consists of 32 bytes + */ + uint8_t finder_information[ 32 ]; + + /* The embedded volume signature + * Consists of 2 bytes + */ + uint8_t embedded_volume_signature[ 2 ]; + + /* The embedded volume extent descriptor + * Consists of 4 bytes + */ + uint8_t embedded_volume_extent[ 4 ]; + + /* The extents (overflow) file size + * Consists of 4 bytes + */ + uint8_t extents_file_size[ 4 ]; + + /* The extents (overflow) file extents record + * Consists of 12 bytes + */ + uint8_t extents_file_extents_record[ 12 ]; + + /* The catalog file size + * Consists of 4 bytes + */ + uint8_t catalog_file_size[ 4 ]; + + /* The catalog file extents record + * Consists of 12 bytes + */ + uint8_t catalog_file_extents_record[ 12 ]; +}; + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _FSHFS_MASTER_DIRECTORY_BLOCK_H ) */ + diff -Nru libfshfs-20201104/libfshfs/fshfs_volume.h libfshfs-20240221/libfshfs/fshfs_volume.h --- libfshfs-20201104/libfshfs/fshfs_volume.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/fshfs_volume.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,172 +0,0 @@ -/* - * The HFS volume header definition - * - * Copyright (C) 2009-2020, Joachim Metz - * - * Refer to AUTHORS for acknowledgements. - * - * This program 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 3 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - */ - -#if !defined( _FSHFS_VOLUME_H ) -#define _FSHFS_VOLUME_H - -#include -#include - -#if defined( __cplusplus ) -extern "C" { -#endif - -typedef struct fshfs_volume_header fshfs_volume_header_t; - -struct fshfs_volume_header -{ - /* The signature - * Consists of 2 bytes - */ - uint8_t signature[ 2 ]; - - /* The version - * Consists of 2 bytes - */ - uint8_t version[ 2 ]; - - /* The attribute flags - * Consists of 4 bytes - */ - uint8_t attribute_flags[ 4 ]; - - /* The last mounted verion - * Consists of 4 bytes - */ - uint8_t last_mounted_version[ 4 ]; - - /* The journal information block number - * Consists of 4 bytes - */ - uint8_t journal_information_block_number[ 4 ]; - - /* The creation time - * Consists of 4 bytes - */ - uint8_t creation_time[ 4 ]; - - /* The modification time - * Consists of 4 bytes - */ - uint8_t modification_time[ 4 ]; - - /* The backup time - * Consists of 4 bytes - */ - uint8_t backup_time[ 4 ]; - - /* The checked time - * Consists of 4 bytes - */ - uint8_t checked_time[ 4 ]; - - /* The number of special files - * Consists of 4 bytes - */ - uint8_t number_of_special_files[ 4 ]; - - /* The number of directories - * Consists of 4 bytes - */ - uint8_t number_of_directories[ 4 ]; - - /* The allocation block size - * Consists of 4 bytes - */ - uint8_t allocation_block_size[ 4 ]; - - /* The number of blocks - * Consists of 4 bytes - */ - uint8_t number_of_blocks[ 4 ]; - - /* The number of unused blocks - * Consists of 4 bytes - */ - uint8_t number_of_unused_blocks[ 4 ]; - - /* The next available block number - * Consists of 4 bytes - */ - uint8_t next_available_block_number[ 4 ]; - - /* The resource clump size - * Consists of 4 bytes - */ - uint8_t resource_clump_size[ 4 ]; - - /* The data clump size - * Consists of 4 bytes - */ - uint8_t data_clump_size[ 4 ]; - - /* The next available catalog node identifier (CNID) - * Consists of 4 bytes - */ - uint8_t next_available_catalog_node_identifier[ 4 ]; - - /* The volume write count - * Consists of 4 bytes - */ - uint8_t volume_write_count[ 4 ]; - - /* The encodings bitmap - * Consists of 8 bytes - */ - uint8_t encodings_bitmap[ 8 ]; - - /* The finder infomation - * Consists of 32 bytes - */ - uint8_t finder_information[ 32 ]; - - /* The allocation file fork descriptor - * Consists of 80 bytes - */ - uint8_t allocation_file_fork_descriptor[ 80 ]; - - /* The extents file fork descriptor - * Consists of 80 bytes - */ - uint8_t extents_file_fork_descriptor[ 80 ]; - - /* The catalog file fork descriptor - * Consists of 80 bytes - */ - uint8_t catalog_file_fork_descriptor[ 80 ]; - - /* The attributes file fork descriptor - * Consists of 80 bytes - */ - uint8_t attributes_file_fork_descriptor[ 80 ]; - - /* The startup file fork descriptor - * Consists of 80 bytes - */ - uint8_t startup_file_fork_descriptor[ 80 ]; -}; - -#if defined( __cplusplus ) -} -#endif - -#endif /* !defined( _FSHFS_VOLUME_H ) */ - diff -Nru libfshfs-20201104/libfshfs/fshfs_volume_header.h libfshfs-20240221/libfshfs/fshfs_volume_header.h --- libfshfs-20201104/libfshfs/fshfs_volume_header.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libfshfs/fshfs_volume_header.h 2024-02-21 05:48:49.000000000 +0000 @@ -0,0 +1,172 @@ +/* + * The HFS+/HFSX volume header definition + * + * Copyright (C) 2009-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _FSHFS_VOLUME_HEADER_H ) +#define _FSHFS_VOLUME_HEADER_H + +#include +#include + +#if defined( __cplusplus ) +extern "C" { +#endif + +typedef struct fshfs_volume_header fshfs_volume_header_t; + +struct fshfs_volume_header +{ + /* The signature + * Consists of 2 bytes + */ + uint8_t signature[ 2 ]; + + /* The version + * Consists of 2 bytes + */ + uint8_t version[ 2 ]; + + /* The (volume) attribute flags + * Consists of 4 bytes + */ + uint8_t attribute_flags[ 4 ]; + + /* The last mounted verion + * Consists of 4 bytes + */ + uint8_t last_mounted_version[ 4 ]; + + /* The journal information block number + * Consists of 4 bytes + */ + uint8_t journal_information_block_number[ 4 ]; + + /* The creation time + * Consists of 4 bytes + */ + uint8_t creation_time[ 4 ]; + + /* The modification time + * Consists of 4 bytes + */ + uint8_t modification_time[ 4 ]; + + /* The backup time + * Consists of 4 bytes + */ + uint8_t backup_time[ 4 ]; + + /* The checked time + * Consists of 4 bytes + */ + uint8_t checked_time[ 4 ]; + + /* The number of files + * Consists of 4 bytes + */ + uint8_t number_of_files[ 4 ]; + + /* The number of directories + * Consists of 4 bytes + */ + uint8_t number_of_directories[ 4 ]; + + /* The allocation block size + * Consists of 4 bytes + */ + uint8_t allocation_block_size[ 4 ]; + + /* The number of blocks + * Consists of 4 bytes + */ + uint8_t number_of_blocks[ 4 ]; + + /* The number of unused blocks + * Consists of 4 bytes + */ + uint8_t number_of_unused_blocks[ 4 ]; + + /* The next available block number + * Consists of 4 bytes + */ + uint8_t next_available_block_number[ 4 ]; + + /* The resource fork clump size + * Consists of 4 bytes + */ + uint8_t resource_fork_clump_size[ 4 ]; + + /* The data fork clump size + * Consists of 4 bytes + */ + uint8_t data_fork_clump_size[ 4 ]; + + /* The next available catalog node identifier (CNID) + * Consists of 4 bytes + */ + uint8_t next_available_catalog_node_identifier[ 4 ]; + + /* The volume write count + * Consists of 4 bytes + */ + uint8_t volume_write_count[ 4 ]; + + /* The encodings bitmap + * Consists of 8 bytes + */ + uint8_t encodings_bitmap[ 8 ]; + + /* The finder information + * Consists of 32 bytes + */ + uint8_t finder_information[ 32 ]; + + /* The allocation file fork descriptor + * Consists of 80 bytes + */ + uint8_t allocation_file_fork_descriptor[ 80 ]; + + /* The extents file fork descriptor + * Consists of 80 bytes + */ + uint8_t extents_file_fork_descriptor[ 80 ]; + + /* The catalog file fork descriptor + * Consists of 80 bytes + */ + uint8_t catalog_file_fork_descriptor[ 80 ]; + + /* The attributes file fork descriptor + * Consists of 80 bytes + */ + uint8_t attributes_file_fork_descriptor[ 80 ]; + + /* The startup file fork descriptor + * Consists of 80 bytes + */ + uint8_t startup_file_fork_descriptor[ 80 ]; +}; + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _FSHFS_VOLUME_HEADER_H ) */ + diff -Nru libfshfs-20201104/libfshfs/libfshfs.c libfshfs-20240221/libfshfs/libfshfs.c --- libfshfs-20201104/libfshfs/libfshfs.c 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs.c 2024-02-21 05:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * Library to access the Hierarchical File System (HFS) format * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfshfs/libfshfs.rc libfshfs-20240221/libfshfs/libfshfs.rc --- libfshfs-20201104/libfshfs/libfshfs.rc 2020-11-04 11:56:45.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs.rc 2024-02-21 06:04:37.000000000 +0000 @@ -22,12 +22,12 @@ BLOCK "040904E4" BEGIN VALUE "FileDescription", "Library to access the Hierarchical File System (HFS) format\0" - VALUE "FileVersion", "20201104" "\0" + VALUE "FileVersion", "20240221" "\0" VALUE "InternalName", "libfshfs.dll\0" - VALUE "LegalCopyright", "(C) 2009-2020, Joachim Metz \0" + VALUE "LegalCopyright", "(C) 2009-2024, Joachim Metz \0" VALUE "OriginalFilename", "libfshfs.dll\0" VALUE "ProductName", "libfshfs\0" - VALUE "ProductVersion", "20201104" "\0" + VALUE "ProductVersion", "20240221" "\0" VALUE "Comments", "For more information visit https://github.com/libyal/libfshfs/\0" END END diff -Nru libfshfs-20201104/libfshfs/libfshfs.rc.in libfshfs-20240221/libfshfs/libfshfs.rc.in --- libfshfs-20201104/libfshfs/libfshfs.rc.in 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs.rc.in 2024-02-21 05:48:50.000000000 +0000 @@ -24,7 +24,7 @@ VALUE "FileDescription", "Library to access the Hierarchical File System (HFS) format\0" VALUE "FileVersion", "@VERSION@" "\0" VALUE "InternalName", "libfshfs.dll\0" - VALUE "LegalCopyright", "(C) 2009-2020, Joachim Metz \0" + VALUE "LegalCopyright", "(C) 2009-2024, Joachim Metz \0" VALUE "OriginalFilename", "libfshfs.dll\0" VALUE "ProductName", "libfshfs\0" VALUE "ProductVersion", "@VERSION@" "\0" diff -Nru libfshfs-20201104/libfshfs/libfshfs_allocation_block_stream.c libfshfs-20240221/libfshfs/libfshfs_allocation_block_stream.c --- libfshfs-20201104/libfshfs/libfshfs_allocation_block_stream.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_allocation_block_stream.c 2024-02-21 05:48:49.000000000 +0000 @@ -0,0 +1,629 @@ +/* + * Allocation block stream functions + * + * Copyright (C) 2009-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include + +#include "libfshfs_allocation_block_stream.h" +#include "libfshfs_block_data_handle.h" +#include "libfshfs_buffer_data_handle.h" +#include "libfshfs_compressed_data_handle.h" +#include "libfshfs_compressed_data_header.h" +#include "libfshfs_extent.h" +#include "libfshfs_io_handle.h" +#include "libfshfs_libcdata.h" +#include "libfshfs_libfdata.h" + +/* Creates an allocation block stream from a buffer of data + * Make sure the value allocation_block_stream is referencing, is set to NULL + * Returns 1 if successful or -1 on error + */ +int libfshfs_allocation_block_stream_initialize_from_data( + libfdata_stream_t **allocation_block_stream, + const uint8_t *data, + size_t data_size, + libcerror_error_t **error ) +{ + libfdata_stream_t *safe_allocation_block_stream = NULL; + libfshfs_buffer_data_handle_t *data_handle = NULL; + static char *function = "libfshfs_allocation_block_stream_initialize_from_data"; + int segment_index = 0; + + if( allocation_block_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid allocation block stream.", + function ); + + return( -1 ); + } + if( libfshfs_buffer_data_handle_initialize( + &data_handle, + data, + data_size, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to create buffer data handle.", + function ); + + goto on_error; + } + if( libfdata_stream_initialize( + &safe_allocation_block_stream, + (intptr_t *) data_handle, + (int (*)(intptr_t **, libcerror_error_t **)) &libfshfs_buffer_data_handle_free, + NULL, + NULL, + (ssize_t (*)(intptr_t *, intptr_t *, int, int, uint8_t *, size_t, uint32_t, uint8_t, libcerror_error_t **)) &libfshfs_buffer_data_handle_read_segment_data, + NULL, + (off64_t (*)(intptr_t *, intptr_t *, int, int, off64_t, libcerror_error_t **)) &libfshfs_buffer_data_handle_seek_segment_offset, + LIBFDATA_DATA_HANDLE_FLAG_MANAGED, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to create allocation block stream.", + function ); + + goto on_error; + } + data_handle = NULL; + + if( libfdata_stream_append_segment( + safe_allocation_block_stream, + &segment_index, + 0, + 0, + (size64_t) data_size, + 0, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, + "%s: unable to append allocation block stream segment.", + function ); + + goto on_error; + } + *allocation_block_stream = safe_allocation_block_stream; + + return( 1 ); + +on_error: + if( safe_allocation_block_stream != NULL ) + { + libfdata_stream_free( + &safe_allocation_block_stream, + NULL ); + } + if( data_handle != NULL ) + { + libfshfs_buffer_data_handle_free( + &data_handle, + NULL ); + } + return( -1 ); +} + +/* Creates an allocation block stream from a fork descriptor + * Make sure the value allocation_block is referencing, is set to NULL + * Returns 1 if successful or -1 on error + */ +int libfshfs_allocation_block_stream_initialize_from_fork_descriptor( + libfdata_stream_t **allocation_block_stream, + libfshfs_io_handle_t *io_handle, + libfshfs_fork_descriptor_t *fork_descriptor, + libcerror_error_t **error ) +{ + libfdata_stream_t *safe_allocation_block_stream = NULL; + static char *function = "libfshfs_allocation_block_stream_initialize_from_fork_descriptor"; + size64_t segment_size = 0; + off64_t segment_offset = 0; + int extent_index = 0; + int result = 0; + int segment_index = 0; + + if( allocation_block_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid allocation block stream.", + function ); + + return( -1 ); + } + if( io_handle == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid IO handle.", + function ); + + return( -1 ); + } + if( io_handle->block_size == 0 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid IO handle - block size value out of bounds.", + function ); + + return( -1 ); + } + if( fork_descriptor == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid fork descriptor.", + function ); + + return( -1 ); + } + result = libfshfs_fork_descriptor_has_extents_overflow( + fork_descriptor, + error ); + + if( result == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to determine if fork descriptor has extents overflow.", + function ); + + goto on_error; + } + else if( result != 0 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, + "%s: unsupported fork descriptor has extents overflow.", + function ); + + goto on_error; + } + if( libfdata_stream_initialize( + &safe_allocation_block_stream, + NULL, + NULL, + NULL, + NULL, + (ssize_t (*)(intptr_t *, intptr_t *, int, int, uint8_t *, size_t, uint32_t, uint8_t, libcerror_error_t **)) &libfshfs_block_data_handle_read_segment_data, + NULL, + (off64_t (*)(intptr_t *, intptr_t *, int, int, off64_t, libcerror_error_t **)) &libfshfs_block_data_handle_seek_segment_offset, + 0, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to create allocation block stream.", + function ); + + goto on_error; + } + for( extent_index = 0; + extent_index < 8; + extent_index++ ) + { + segment_offset = fork_descriptor->extents[ extent_index ][ 0 ]; + segment_size = fork_descriptor->extents[ extent_index ][ 1 ]; + + if( ( segment_offset == 0 ) + || ( segment_size == 0 ) ) + { + break; + } + if( segment_offset > ( (off64_t) INT64_MAX / io_handle->block_size ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid segment offset value out of bounds.", + function ); + + goto on_error; + } + if( segment_size > ( (size64_t) UINT64_MAX / io_handle->block_size ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid segment size value out of bounds.", + function ); + + goto on_error; + } + segment_offset *= io_handle->block_size; + segment_size *= io_handle->block_size; + + if( libfdata_stream_append_segment( + safe_allocation_block_stream, + &segment_index, + 0, + segment_offset, + segment_size, + 0, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, + "%s: unable to append extent: %d allocation block stream segment.", + function, + extent_index ); + + goto on_error; + } + } + if( libfdata_stream_set_mapped_size( + safe_allocation_block_stream, + (size64_t) fork_descriptor->size, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to set mapped size of allocation block stream.", + function ); + + goto on_error; + } + *allocation_block_stream = safe_allocation_block_stream; + + return( 1 ); + +on_error: + if( safe_allocation_block_stream != NULL ) + { + libfdata_stream_free( + &safe_allocation_block_stream, + NULL ); + } + return( -1 ); +} + +/* Creates an allocation block stream from extents + * Make sure the value allocation_block_stream is referencing, is set to NULL + * Returns 1 if successful or -1 on error + */ +int libfshfs_allocation_block_stream_initialize_from_extents( + libfdata_stream_t **allocation_block_stream, + libfshfs_io_handle_t *io_handle, + libcdata_array_t *extents, + size64_t data_size, + libcerror_error_t **error ) +{ + libfdata_stream_t *safe_allocation_block_stream = NULL; + libfshfs_extent_t *extent = NULL; + static char *function = "libfshfs_allocation_block_stream_initialize_from_extents"; + size64_t segment_size = 0; + off64_t segment_offset = 0; + int extent_index = 0; + int number_of_extents = 0; + int segment_index = 0; + + if( allocation_block_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid allocation block stream.", + function ); + + return( -1 ); + } + if( io_handle == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid IO handle.", + function ); + + return( -1 ); + } + if( io_handle->block_size == 0 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid IO handle - block size value out of bounds.", + function ); + + return( -1 ); + } + if( libcdata_array_get_number_of_entries( + extents, + &number_of_extents, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve number of extents.", + function ); + + goto on_error; + } + if( libfdata_stream_initialize( + &safe_allocation_block_stream, + NULL, + NULL, + NULL, + NULL, + (ssize_t (*)(intptr_t *, intptr_t *, int, int, uint8_t *, size_t, uint32_t, uint8_t, libcerror_error_t **)) &libfshfs_block_data_handle_read_segment_data, + NULL, + (off64_t (*)(intptr_t *, intptr_t *, int, int, off64_t, libcerror_error_t **)) &libfshfs_block_data_handle_seek_segment_offset, + 0, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to create allocation block stream.", + function ); + + goto on_error; + } + for( extent_index = 0; + extent_index < number_of_extents; + extent_index++ ) + { + if( libcdata_array_get_entry_by_index( + extents, + extent_index, + (intptr_t **) &extent, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve extent: %d.", + function, + extent_index ); + + goto on_error; + } + if( extent == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, + "%s: missing extent: %d.", + function, + extent_index ); + + goto on_error; + } + if( ( extent->block_number == 0 ) + || ( extent->block_number > ( (uint64_t) INT64_MAX / io_handle->block_size ) ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid extent - invalid block number value out of bounds.", + function ); + + goto on_error; + } + if( ( extent->number_of_blocks == 0 ) + || ( extent->number_of_blocks > ( (uint64_t) UINT64_MAX / io_handle->block_size ) ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid extent - invalid number of blocks value out of bounds.", + function ); + + goto on_error; + } + segment_offset = (off64_t) extent->block_number * io_handle->block_size; + segment_size = (size64_t) extent->number_of_blocks * io_handle->block_size; + + if( libfdata_stream_append_segment( + safe_allocation_block_stream, + &segment_index, + 0, + segment_offset, + segment_size, + 0, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, + "%s: unable to append extent: %d allocation block stream segment.", + function, + extent_index ); + + goto on_error; + } + } + if( libfdata_stream_set_mapped_size( + safe_allocation_block_stream, + data_size, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to set mapped size of allocation block stream.", + function ); + + goto on_error; + } + *allocation_block_stream = safe_allocation_block_stream; + + return( 1 ); + +on_error: + if( safe_allocation_block_stream != NULL ) + { + libfdata_stream_free( + &safe_allocation_block_stream, + NULL ); + } + return( -1 ); +} + +/* Creates an allocation block stream from a compressed stream + * Make sure the value allocation_block_stream is referencing, is set to NULL + * Returns 1 if successful or -1 on error + */ +int libfshfs_allocation_block_stream_initialize_from_compressed_stream( + libfdata_stream_t **allocation_block_stream, + libfdata_stream_t *compressed_allocation_block_stream, + size64_t uncompressed_data_size, + int compression_method, + libcerror_error_t **error ) +{ + libfdata_stream_t *safe_allocation_block_stream = NULL; + libfshfs_compressed_data_handle_t *data_handle = NULL; + static char *function = "libfshfs_allocation_block_stream_initialize_from_compressed_stream"; + int segment_index = 0; + + if( allocation_block_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid allocation block stream.", + function ); + + return( -1 ); + } + if( libfshfs_compressed_data_handle_initialize( + &data_handle, + compressed_allocation_block_stream, + uncompressed_data_size, + compression_method, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to create compressed data handle.", + function ); + + goto on_error; + } + if( libfdata_stream_initialize( + &safe_allocation_block_stream, + (intptr_t *) data_handle, + (int (*)(intptr_t **, libcerror_error_t **)) &libfshfs_compressed_data_handle_free, + NULL, + NULL, + (ssize_t (*)(intptr_t *, intptr_t *, int, int, uint8_t *, size_t, uint32_t, uint8_t, libcerror_error_t **)) &libfshfs_compressed_data_handle_read_segment_data, + NULL, + (off64_t (*)(intptr_t *, intptr_t *, int, int, off64_t, libcerror_error_t **)) &libfshfs_compressed_data_handle_seek_segment_offset, + LIBFDATA_DATA_HANDLE_FLAG_MANAGED, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to create allocation block stream.", + function ); + + goto on_error; + } + data_handle = NULL; + + if( libfdata_stream_append_segment( + safe_allocation_block_stream, + &segment_index, + 0, + 0, + uncompressed_data_size, + LIBFDATA_RANGE_FLAG_IS_COMPRESSED, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, + "%s: unable to append data as allocation block stream segment.", + function ); + + goto on_error; + } + *allocation_block_stream = safe_allocation_block_stream; + + return( 1 ); + +on_error: + if( safe_allocation_block_stream != NULL ) + { + libfdata_stream_free( + &safe_allocation_block_stream, + NULL ); + } + if( data_handle != NULL ) + { + libfshfs_compressed_data_handle_free( + &data_handle, + NULL ); + } + return( -1 ); +} + diff -Nru libfshfs-20201104/libfshfs/libfshfs_allocation_block_stream.h libfshfs-20240221/libfshfs/libfshfs_allocation_block_stream.h --- libfshfs-20201104/libfshfs/libfshfs_allocation_block_stream.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_allocation_block_stream.h 2024-02-21 05:48:49.000000000 +0000 @@ -0,0 +1,69 @@ +/* + * Allocation block stream functions + * + * Copyright (C) 2009-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _LIBFSHFS_ALLOCATION_BLOCK_STREAM_H ) +#define _LIBFSHFS_ALLOCATION_BLOCK_STREAM_H + +#include +#include + +#include "libfshfs_fork_descriptor.h" +#include "libfshfs_io_handle.h" +#include "libfshfs_libcdata.h" +#include "libfshfs_libcerror.h" +#include "libfshfs_libfdata.h" + +#if defined( __cplusplus ) +extern "C" { +#endif + +int libfshfs_allocation_block_stream_initialize_from_data( + libfdata_stream_t **allocation_block_stream, + const uint8_t *data, + size_t data_size, + libcerror_error_t **error ); + +int libfshfs_allocation_block_stream_initialize_from_fork_descriptor( + libfdata_stream_t **allocation_block_stream, + libfshfs_io_handle_t *io_handle, + libfshfs_fork_descriptor_t *fork_descriptor, + libcerror_error_t **error ); + +int libfshfs_allocation_block_stream_initialize_from_extents( + libfdata_stream_t **allocation_block_stream, + libfshfs_io_handle_t *io_handle, + libcdata_array_t *extents, + size64_t data_size, + libcerror_error_t **error ); + +int libfshfs_allocation_block_stream_initialize_from_compressed_stream( + libfdata_stream_t **allocation_block_stream, + libfdata_stream_t *compressed_allocation_block_stream, + size64_t uncompressed_data_size, + int compression_method, + libcerror_error_t **error ); + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _LIBFSHFS_ALLOCATION_BLOCK_STREAM_H ) */ + diff -Nru libfshfs-20201104/libfshfs/libfshfs_attribute_record.c libfshfs-20240221/libfshfs/libfshfs_attribute_record.c --- libfshfs-20201104/libfshfs/libfshfs_attribute_record.c 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_attribute_record.c 2024-02-21 05:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * Attribute B-tree file attribute record functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -456,6 +456,18 @@ attribute_record->extents[ extent_index ][ 1 ] = extent_number_of_blocks; extent_index++; + + if( extent_index >= 8 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid extent index value out of bounds.", + function ); + + goto on_error; + } } } return( 1 ); @@ -831,3 +843,40 @@ return( result ); } +/* Retrieves the fork descriptor + * Returns 1 if successful or -1 on error + */ +int libfshfs_attribute_record_get_fork_descriptor( + libfshfs_attribute_record_t *attribute_record, + libfshfs_fork_descriptor_t **fork_descriptor, + libcerror_error_t **error ) +{ + static char *function = "libfshfs_attribute_record_get_fork_descriptor"; + + if( attribute_record == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file record.", + function ); + + return( -1 ); + } + if( fork_descriptor == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid fork descriptor.", + function ); + + return( -1 ); + } + *fork_descriptor = attribute_record->fork_descriptor; + + return( 1 ); +} + diff -Nru libfshfs-20201104/libfshfs/libfshfs_attribute_record.h libfshfs-20240221/libfshfs/libfshfs_attribute_record.h --- libfshfs-20201104/libfshfs/libfshfs_attribute_record.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_attribute_record.h 2024-02-21 05:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * Attribute B-tree file attribute record functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -119,6 +119,11 @@ size_t utf16_string_length, libcerror_error_t **error ); +int libfshfs_attribute_record_get_fork_descriptor( + libfshfs_attribute_record_t *attribute_record, + libfshfs_fork_descriptor_t **fork_descriptor, + libcerror_error_t **error ); + #if defined( __cplusplus ) } #endif diff -Nru libfshfs-20201104/libfshfs/libfshfs_attributes_btree_file.c libfshfs-20240221/libfshfs/libfshfs_attributes_btree_file.c --- libfshfs-20201104/libfshfs/libfshfs_attributes_btree_file.c 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_attributes_btree_file.c 2024-02-21 05:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * The attributes B-tree file functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -26,6 +26,8 @@ #include "libfshfs_attribute_record.h" #include "libfshfs_attributes_btree_file.h" #include "libfshfs_attributes_btree_key.h" +#include "libfshfs_btree_file.h" +#include "libfshfs_btree_node_cache.h" #include "libfshfs_definitions.h" #include "libfshfs_file_record.h" #include "libfshfs_libbfio.h" @@ -478,6 +480,7 @@ int libfshfs_attributes_btree_file_get_attributes_from_branch_node( libfshfs_btree_file_t *btree_file, libbfio_handle_t *file_io_handle, + libfshfs_btree_node_cache_t *node_cache, libfshfs_btree_node_t *node, uint32_t identifier, libcdata_array_t *attributes, @@ -487,7 +490,7 @@ libfshfs_attributes_btree_key_t *last_node_key = NULL; libfshfs_attributes_btree_key_t *node_key = NULL; libfshfs_btree_node_t *sub_node = NULL; - static char *function = "libfshfs_attributes_btree_file_get_attributes_from_node"; + static char *function = "libfshfs_attributes_btree_file_get_attributes_from_branch_node"; uint32_t sub_node_number = 0; uint16_t record_index = 0; uint8_t node_type = 0; @@ -649,9 +652,10 @@ if( libfshfs_btree_file_get_node_by_number( btree_file, file_io_handle, + node_cache, + recursion_depth, sub_node_number, &sub_node, - recursion_depth, error ) == -1 ) { libcerror_error_set( @@ -684,6 +688,7 @@ result = libfshfs_attributes_btree_file_get_attributes_from_branch_node( btree_file, file_io_handle, + node_cache, sub_node, identifier, attributes, @@ -735,6 +740,7 @@ int libfshfs_attributes_btree_file_get_attributes( libfshfs_btree_file_t *btree_file, libbfio_handle_t *file_io_handle, + libfshfs_btree_node_cache_t *node_cache, uint32_t identifier, libcdata_array_t *attributes, libcerror_error_t **error ) @@ -747,8 +753,8 @@ if( libfshfs_btree_file_get_root_node( btree_file, file_io_handle, + node_cache, &root_node, - 0, error ) == -1 ) { libcerror_error_set( @@ -779,6 +785,7 @@ result = libfshfs_attributes_btree_file_get_attributes_from_branch_node( btree_file, file_io_handle, + node_cache, root_node, identifier, attributes, diff -Nru libfshfs-20201104/libfshfs/libfshfs_attributes_btree_file.h libfshfs-20240221/libfshfs/libfshfs_attributes_btree_file.h --- libfshfs-20201104/libfshfs/libfshfs_attributes_btree_file.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_attributes_btree_file.h 2024-02-21 05:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * The attributes B-tree file functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -28,6 +28,7 @@ #include "libfshfs_attribute_record.h" #include "libfshfs_attributes_btree_key.h" #include "libfshfs_btree_file.h" +#include "libfshfs_btree_node_cache.h" #include "libfshfs_libbfio.h" #include "libfshfs_libcdata.h" #include "libfshfs_libcerror.h" @@ -63,6 +64,7 @@ int libfshfs_attributes_btree_file_get_attributes_from_branch_node( libfshfs_btree_file_t *btree_file, libbfio_handle_t *file_io_handle, + libfshfs_btree_node_cache_t *node_cache, libfshfs_btree_node_t *node, uint32_t identifier, libcdata_array_t *attributes, @@ -72,6 +74,7 @@ int libfshfs_attributes_btree_file_get_attributes( libfshfs_btree_file_t *btree_file, libbfio_handle_t *file_io_handle, + libfshfs_btree_node_cache_t *node_cache, uint32_t identifier, libcdata_array_t *attributes, libcerror_error_t **error ); diff -Nru libfshfs-20201104/libfshfs/libfshfs_attributes_btree_key.c libfshfs-20240221/libfshfs/libfshfs_attributes_btree_key.c --- libfshfs-20201104/libfshfs/libfshfs_attributes_btree_key.c 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_attributes_btree_key.c 2024-02-21 05:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * The attributes B-tree key functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfshfs/libfshfs_attributes_btree_key.h libfshfs-20240221/libfshfs/libfshfs_attributes_btree_key.h --- libfshfs-20201104/libfshfs/libfshfs_attributes_btree_key.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_attributes_btree_key.h 2024-02-21 05:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * The attributes B-tree key functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfshfs/libfshfs_bit_stream.c libfshfs-20240221/libfshfs/libfshfs_bit_stream.c --- libfshfs-20201104/libfshfs/libfshfs_bit_stream.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_bit_stream.c 2024-02-21 05:48:49.000000000 +0000 @@ -0,0 +1,313 @@ +/* + * Bit-stream functions + * + * Copyright (C) 2009-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include +#include + +#include "libfshfs_bit_stream.h" +#include "libfshfs_libcerror.h" + +/* TODO use memory alignment in bit stream */ + +/* Creates a bit stream + * Make sure the value bit_stream is referencing, is set to NULL + * Returns 1 if successful or -1 on error + */ +int libfshfs_bit_stream_initialize( + libfshfs_bit_stream_t **bit_stream, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t byte_stream_offset, + uint8_t storage_type, + libcerror_error_t **error ) +{ + static char *function = "libfshfs_bit_stream_initialize"; + + if( bit_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid bit stream.", + function ); + + return( -1 ); + } + if( *bit_stream != NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, + "%s: invalid bit stream value already set.", + function ); + + return( -1 ); + } + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_offset > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream offset value exceeds maximum.", + function ); + + return( -1 ); + } + if( ( storage_type != LIBFSHFS_BIT_STREAM_STORAGE_TYPE_BYTE_BACK_TO_FRONT ) + && ( storage_type != LIBFSHFS_BIT_STREAM_STORAGE_TYPE_BYTE_FRONT_TO_BACK ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, + "%s: unsupported storage type.", + function ); + + return( -1 ); + } + *bit_stream = memory_allocate_structure( + libfshfs_bit_stream_t ); + + if( *bit_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_INSUFFICIENT, + "%s: unable to create bit stream.", + function ); + + goto on_error; + } + if( memory_set( + *bit_stream, + 0, + sizeof( libfshfs_bit_stream_t ) ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_SET_FAILED, + "%s: unable to clear bit stream.", + function ); + + goto on_error; + } + ( *bit_stream )->byte_stream = byte_stream; + ( *bit_stream )->byte_stream_size = byte_stream_size; + ( *bit_stream )->byte_stream_offset = byte_stream_offset; + ( *bit_stream )->storage_type = storage_type; + + return( 1 ); + +on_error: + if( *bit_stream != NULL ) + { + memory_free( + *bit_stream ); + + *bit_stream = NULL; + } + return( -1 ); +} + +/* Frees a bit stream + * Returns 1 if successful or -1 on error + */ +int libfshfs_bit_stream_free( + libfshfs_bit_stream_t **bit_stream, + libcerror_error_t **error ) +{ + static char *function = "libfshfs_bit_stream_free"; + + if( bit_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid bit stream.", + function ); + + return( -1 ); + } + if( *bit_stream != NULL ) + { + memory_free( + *bit_stream ); + + *bit_stream = NULL; + } + return( 1 ); +} + +/* Retrieves a value from the bit stream + * Returns 1 on success or -1 on error + */ +int libfshfs_bit_stream_get_value( + libfshfs_bit_stream_t *bit_stream, + uint8_t number_of_bits, + uint32_t *value_32bit, + libcerror_error_t **error ) +{ + static char *function = "libfshfs_bit_stream_get_value"; + uint32_t read_value_32bit = 0; + uint32_t safe_value_32bit = 0; + uint8_t read_number_of_bits = 0; + uint8_t remaining_number_of_bits = 0; + + if( bit_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid bit stream.", + function ); + + return( -1 ); + } + if( number_of_bits > (uint8_t) 32 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid number of bits value exceeds maximum.", + function ); + + return( -1 ); + } + if( value_32bit == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid 32-bit value.", + function ); + + return( -1 ); + } + remaining_number_of_bits = number_of_bits; + + while( remaining_number_of_bits > 0 ) + { + while( ( remaining_number_of_bits > bit_stream->bit_buffer_size ) + && ( bit_stream->bit_buffer_size <= 24 ) ) + { + if( bit_stream->byte_stream_offset >= bit_stream->byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid byte stream offset value out of bounds.", + function ); + + return( -1 ); + } + if( bit_stream->storage_type == LIBFSHFS_BIT_STREAM_STORAGE_TYPE_BYTE_BACK_TO_FRONT ) + { + bit_stream->bit_buffer |= (uint32_t) bit_stream->byte_stream[ bit_stream->byte_stream_offset ] << bit_stream->bit_buffer_size; + } + else if( bit_stream->storage_type == LIBFSHFS_BIT_STREAM_STORAGE_TYPE_BYTE_FRONT_TO_BACK ) + { + bit_stream->bit_buffer <<= 8; + bit_stream->bit_buffer |= bit_stream->byte_stream[ bit_stream->byte_stream_offset ]; + } + bit_stream->bit_buffer_size += 8; + bit_stream->byte_stream_offset += 1; + } + if( remaining_number_of_bits < bit_stream->bit_buffer_size ) + { + read_number_of_bits = remaining_number_of_bits; + } + else + { + read_number_of_bits = bit_stream->bit_buffer_size; + } + read_value_32bit = bit_stream->bit_buffer; + + if( remaining_number_of_bits < number_of_bits ) + { + safe_value_32bit <<= remaining_number_of_bits; + } + if( bit_stream->storage_type == LIBFSHFS_BIT_STREAM_STORAGE_TYPE_BYTE_BACK_TO_FRONT ) + { + if( read_number_of_bits < 32 ) + { + /* On VS 2008 32-bit "~( 0xfffffffUL << 32 )" does not behave as expected + */ + read_value_32bit &= ~( 0xffffffffUL << read_number_of_bits ); + + bit_stream->bit_buffer >>= read_number_of_bits; + } + bit_stream->bit_buffer_size -= read_number_of_bits; + } + else if( bit_stream->storage_type == LIBFSHFS_BIT_STREAM_STORAGE_TYPE_BYTE_FRONT_TO_BACK ) + { + bit_stream->bit_buffer_size -= read_number_of_bits; + read_value_32bit >>= bit_stream->bit_buffer_size; + + if( bit_stream->bit_buffer_size > 0 ) + { + bit_stream->bit_buffer &= 0xffffffffUL >> ( 32 - bit_stream->bit_buffer_size ); + } + } + if( bit_stream->bit_buffer_size == 0 ) + { + bit_stream->bit_buffer = 0; + } + safe_value_32bit |= read_value_32bit; + remaining_number_of_bits -= read_number_of_bits; + } + *value_32bit = safe_value_32bit; + + return( 1 ); +} + diff -Nru libfshfs-20201104/libfshfs/libfshfs_bit_stream.h libfshfs-20240221/libfshfs/libfshfs_bit_stream.h --- libfshfs-20201104/libfshfs/libfshfs_bit_stream.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_bit_stream.h 2024-02-21 05:48:49.000000000 +0000 @@ -0,0 +1,95 @@ +/* + * Bit-stream functions + * + * Copyright (C) 2009-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _LIBFSHFS_BIT_STREAM_H ) +#define _LIBFSHFS_BIT_STREAM_H + +#include +#include + +#include "libfshfs_libcerror.h" + +#if defined( __cplusplus ) +extern "C" { +#endif + +/* The storage type + */ +enum LIBFSHFS_BIT_STREAM_STORAGE_TYPES +{ + LIBFSHFS_BIT_STREAM_STORAGE_TYPE_UNKNOWN = 0x00, + LIBFSHFS_BIT_STREAM_STORAGE_TYPE_BYTE_FRONT_TO_BACK = 0x01, + LIBFSHFS_BIT_STREAM_STORAGE_TYPE_BYTE_BACK_TO_FRONT = 0x02 +}; + +typedef struct libfshfs_bit_stream libfshfs_bit_stream_t; + +struct libfshfs_bit_stream +{ + /* The byte stream + */ + const uint8_t *byte_stream; + + /* The byte stream size + */ + size_t byte_stream_size; + + /* The byte stream offset + */ + size_t byte_stream_offset; + + /* The storage type + */ + uint8_t storage_type; + + /* The bit buffer + */ + uint32_t bit_buffer; + + /* The number of bits remaining in the bit buffer + */ + uint8_t bit_buffer_size; +}; + +int libfshfs_bit_stream_initialize( + libfshfs_bit_stream_t **bit_stream, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t byte_stream_offset, + uint8_t storage_type, + libcerror_error_t **error ); + +int libfshfs_bit_stream_free( + libfshfs_bit_stream_t **bit_stream, + libcerror_error_t **error ); + +int libfshfs_bit_stream_get_value( + libfshfs_bit_stream_t *bit_stream, + uint8_t number_of_bits, + uint32_t *value_32bit, + libcerror_error_t **error ); + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _LIBFSHFS_BIT_STREAM_H ) */ + diff -Nru libfshfs-20201104/libfshfs/libfshfs_block_data_handle.c libfshfs-20240221/libfshfs/libfshfs_block_data_handle.c --- libfshfs-20201104/libfshfs/libfshfs_block_data_handle.c 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_block_data_handle.c 2024-02-21 05:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * Block data handle functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfshfs/libfshfs_block_data_handle.h libfshfs-20240221/libfshfs/libfshfs_block_data_handle.h --- libfshfs-20201104/libfshfs/libfshfs_block_data_handle.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_block_data_handle.h 2024-02-21 05:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * Block data handle functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfshfs/libfshfs_btree_file.c libfshfs-20240221/libfshfs/libfshfs_btree_file.c --- libfshfs-20201104/libfshfs/libfshfs_btree_file.c 2020-11-04 05:18:02.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_btree_file.c 2024-02-21 05:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * B-tree file functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -27,6 +27,7 @@ #include "libfshfs_btree_file.h" #include "libfshfs_btree_header.h" #include "libfshfs_btree_node.h" +#include "libfshfs_btree_node_cache.h" #include "libfshfs_btree_node_descriptor.h" #include "libfshfs_btree_node_vector.h" #include "libfshfs_debug.h" @@ -202,33 +203,17 @@ result = -1; } - if( ( *btree_file )->nodes_vector != NULL ) + if( ( *btree_file )->node_vector != NULL ) { if( libfshfs_btree_node_vector_free( - &( ( *btree_file )->nodes_vector ), + &( ( *btree_file )->node_vector ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, - "%s: unable to free B-tree nodes vector.", - function ); - - result = -1; - } - } - if( ( *btree_file )->nodes_cache != NULL ) - { - if( libfcache_cache_free( - &( ( *btree_file )->nodes_cache ), - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, - "%s: unable to free B-tree nodes cache.", + "%s: unable to free B-tree node vector.", function ); result = -1; @@ -270,24 +255,13 @@ return( -1 ); } - if( btree_file->nodes_vector != NULL ) + if( btree_file->node_vector != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, - "%s: invalid B-tree file - nodes vector already set.", - function ); - - return( -1 ); - } - if( btree_file->nodes_cache != NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, - "%s: invalid B-tree file - nodes cache already set.", + "%s: invalid B-tree file - node vector already set.", function ); return( -1 ); @@ -350,29 +324,15 @@ libcnotify_printf( "%s: reading B-tree header node at offset: %" PRIi64 " (0x%08" PRIx64 ")\n", function, + file_offset, file_offset ); } #endif - if( libbfio_handle_seek_offset( - file_io_handle, - file_offset, - SEEK_SET, - error ) == -1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_IO, - LIBCERROR_IO_ERROR_SEEK_FAILED, - "%s: unable to seek B-tree header node offset: %" PRIi64 ".", - function, - file_offset ); - - goto on_error; - } - read_count = libbfio_handle_read_buffer( + read_count = libbfio_handle_read_buffer_at_offset( file_io_handle, header_node_data, 512, + file_offset, error ); if( read_count != (ssize_t) 512 ) @@ -381,8 +341,10 @@ error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, - "%s: unable to read B-tree header node data.", - function ); + "%s: unable to read B-tree header node data at offset: %" PRIi64 " (0x%08" PRIx64 ").", + function, + file_offset, + file_offset ); goto on_error; } @@ -453,10 +415,10 @@ goto on_error; } - /* Read the root node using the nodes vector + /* Read the root node using the node vector */ if( libfshfs_btree_node_vector_initialize( - &( btree_file->nodes_vector ), + &( btree_file->node_vector ), io_handle, btree_file->size, btree_file->header->node_size, @@ -467,21 +429,7 @@ error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, - "%s: unable to create B-tree nodes vector.", - function ); - - goto on_error; - } - if( libfcache_cache_initialize( - &( btree_file->nodes_cache ), - LIBFSHFS_MAXIMUM_CACHE_ENTRIES_BTREE_FILE_BLOCKS, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, - "%s: unable to create B-tree nodes cache.", + "%s: unable to create B-tree node vector.", function ); goto on_error; @@ -489,16 +437,10 @@ return( 1 ); on_error: - if( btree_file->nodes_cache != NULL ) - { - libfcache_cache_free( - &( btree_file->nodes_cache ), - NULL ); - } - if( btree_file->nodes_vector != NULL ) + if( btree_file->node_vector != NULL ) { libfshfs_btree_node_vector_free( - &( btree_file->nodes_vector ), + &( btree_file->node_vector ), NULL ); } if( header_node_descriptor != NULL ) @@ -516,9 +458,10 @@ int libfshfs_btree_file_get_node_by_number( libfshfs_btree_file_t *btree_file, libbfio_handle_t *file_io_handle, + libfshfs_btree_node_cache_t *node_cache, + int depth, uint32_t node_number, libfshfs_btree_node_t **node, - int recursion_depth, libcerror_error_t **error ) { static char *function = "libfshfs_btree_file_get_node_by_number"; @@ -534,22 +477,35 @@ return( -1 ); } + if( ( depth <= 0 ) + || ( depth >= 9 ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid depth value out of bounds.", + function ); + + return( -1 ); + } if( libfshfs_btree_node_vector_get_node_by_number( - btree_file->nodes_vector, + btree_file->node_vector, file_io_handle, - btree_file->nodes_cache, + node_cache, + depth, node_number, node, - recursion_depth, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve B-tree node: %" PRIu32 ".", + "%s: unable to retrieve B-tree node: %" PRIu32 " at depth: %d.", function, - node_number ); + node_number, + depth ); return( -1 ); } @@ -562,8 +518,8 @@ int libfshfs_btree_file_get_root_node( libfshfs_btree_file_t *btree_file, libbfio_handle_t *file_io_handle, + libfshfs_btree_node_cache_t *node_cache, libfshfs_btree_node_t **root_node, - int recursion_depth, libcerror_error_t **error ) { static char *function = "libfshfs_btree_file_get_root_node"; @@ -580,19 +536,19 @@ return( -1 ); } if( libfshfs_btree_node_vector_get_node_by_number( - btree_file->nodes_vector, + btree_file->node_vector, file_io_handle, - btree_file->nodes_cache, + node_cache, + 0, btree_file->header->root_node_number, root_node, - recursion_depth, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve B-tree root node: %" PRIu32 ".", + "%s: unable to retrieve B-tree root node: %" PRIu32 " at depth: 0.", function, btree_file->header->root_node_number ); diff -Nru libfshfs-20201104/libfshfs/libfshfs_btree_file.h libfshfs-20240221/libfshfs/libfshfs_btree_file.h --- libfshfs-20201104/libfshfs/libfshfs_btree_file.h 2020-11-04 05:12:19.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_btree_file.h 2024-02-21 05:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * B-tree file functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -27,12 +27,12 @@ #include "libfshfs_btree_header.h" #include "libfshfs_btree_node.h" +#include "libfshfs_btree_node_cache.h" #include "libfshfs_btree_node_vector.h" #include "libfshfs_io_handle.h" #include "libfshfs_libbfio.h" #include "libfshfs_libcdata.h" #include "libfshfs_libcerror.h" -#include "libfshfs_libfcache.h" #include "libfshfs_libfdata.h" #if defined( __cplusplus ) @@ -55,13 +55,9 @@ */ libfshfs_btree_header_t *header; - /* The nodes vector + /* The node vector */ - libfshfs_btree_node_vector_t *nodes_vector; - - /* The nodes cache - */ - libfcache_cache_t *nodes_cache; + libfshfs_btree_node_vector_t *node_vector; }; int libfshfs_btree_file_initialize( @@ -81,16 +77,17 @@ int libfshfs_btree_file_get_node_by_number( libfshfs_btree_file_t *btree_file, libbfio_handle_t *file_io_handle, + libfshfs_btree_node_cache_t *node_cache, + int depth, uint32_t node_number, libfshfs_btree_node_t **node, - int recursion_depth, libcerror_error_t **error ); int libfshfs_btree_file_get_root_node( libfshfs_btree_file_t *btree_file, libbfio_handle_t *file_io_handle, + libfshfs_btree_node_cache_t *node_cache, libfshfs_btree_node_t **root_node, - int recursion_depth, libcerror_error_t **error ); #if defined( __cplusplus ) diff -Nru libfshfs-20201104/libfshfs/libfshfs_btree_header.c libfshfs-20240221/libfshfs/libfshfs_btree_header.c --- libfshfs-20201104/libfshfs/libfshfs_btree_header.c 2020-11-04 05:34:22.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_btree_header.c 2024-02-21 05:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * B-tree header functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfshfs/libfshfs_btree_header.h libfshfs-20240221/libfshfs/libfshfs_btree_header.h --- libfshfs-20201104/libfshfs/libfshfs_btree_header.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_btree_header.h 2024-02-21 05:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * B-tree header functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfshfs/libfshfs_btree_node.c libfshfs-20240221/libfshfs/libfshfs_btree_node.c --- libfshfs-20201104/libfshfs/libfshfs_btree_node.c 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_btree_node.c 2024-02-21 05:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * B-tree node functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -149,7 +149,7 @@ error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, - "%s: unable to create node records array.", + "%s: unable to create records array.", function ); goto on_error; @@ -223,7 +223,7 @@ error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, - "%s: unable to free the node records array.", + "%s: unable to free the records array.", function ); result = -1; @@ -250,12 +250,17 @@ size_t data_size, libcerror_error_t **error ) { + uint16_t *record_offsets = NULL; + uint16_t *sorted_record_offsets = NULL; libfshfs_btree_node_record_t *node_record = NULL; static char *function = "libfshfs_btree_node_read_data"; size_t records_data_offset = 0; size_t records_data_size = 0; uint16_t record_offset = 0; + uint16_t sorted_record_offset = 0; + int entry_index = 0; int record_index = 0; + int sorted_record_index = 0; #if defined( HAVE_DEBUG_OUTPUT ) uint16_t value_16bit = 0; @@ -347,17 +352,16 @@ LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); } #endif - if( libcdata_array_resize( - node->records_array, - node->descriptor->number_of_records, - (int (*)(intptr_t **, libcerror_error_t **)) &libfshfs_btree_node_record_free, - error ) != 1 ) + record_offsets = (uint16_t *) memory_allocate( + sizeof( uint16_t ) * node->descriptor->number_of_records ); + + if( record_offsets == NULL ) { libcerror_error_set( error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, - "%s: unable to resize node records array.", + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_INSUFFICIENT, + "%s: unable to create record offsets.", function ); goto on_error; @@ -369,19 +373,6 @@ record_index < (int) node->descriptor->number_of_records; record_index++ ) { - if( libfshfs_btree_node_record_initialize( - &node_record, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, - "%s: unable to create B-tree node record.", - function ); - - goto on_error; - } byte_stream_copy_to_uint16_big_endian( &( data[ records_data_offset ] ), record_offset ); @@ -392,12 +383,67 @@ if( libcnotify_verbose != 0 ) { libcnotify_printf( - "%s: record: % 2d offset\t\t\t: 0x%04" PRIx16 "\n", + "%s: record: % 2d offset\t\t\t: %" PRIu16 " (0x%04" PRIx16 ")\n", function, record_index, + record_offset, record_offset ); } #endif + record_offsets[ record_index ] = record_offset; + } +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + byte_stream_copy_to_uint16_big_endian( + &( data[ records_data_offset ] ), + value_16bit ); + libcnotify_printf( + "%s: free space offset\t\t\t: 0x%04" PRIx16 "\n", + function, + value_16bit ); + + libcnotify_printf( + "\n" ); + } +#endif /* defined( HAVE_DEBUG_OUTPUT ) */ + + records_data_offset -= 2; + + sorted_record_offsets = (uint16_t *) memory_allocate( + sizeof( uint16_t ) * node->descriptor->number_of_records ); + + if( sorted_record_offsets == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_INSUFFICIENT, + "%s: unable to create sorted record offsets.", + function ); + + goto on_error; + } + if( memory_set( + sorted_record_offsets, + 0, + sizeof( uint16_t ) * node->descriptor->number_of_records ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_SET_FAILED, + "%s: unable to clear sorted record offsets.", + function ); + + goto on_error; + } + for( record_index = 0; + record_index < (int) node->descriptor->number_of_records; + record_index++ ) + { + record_offset = record_offsets[ record_index ]; + if( ( record_offset < sizeof( fshfs_btree_node_descriptor_t ) ) || ( record_offset > data_size ) ) { @@ -411,13 +457,69 @@ goto on_error; } + sorted_record_offsets[ record_index ] = record_offset; + + for( sorted_record_index = record_index - 1; + sorted_record_index >= 0; + sorted_record_index-- ) + { + sorted_record_offset = sorted_record_offsets[ sorted_record_index ]; + + if( record_offset == sorted_record_offset ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid record: %d offset: %" PRIu32 " (0x%08" PRIu32 ") value already exists.", + function, + record_index, + record_offset, + record_offset ); + + goto on_error; + } + else if( record_offset > sorted_record_offset ) + { + break; + } + sorted_record_offsets[ sorted_record_index ] = record_offset; + sorted_record_offsets[ sorted_record_index + 1 ] = sorted_record_offset; + } + if( libfshfs_btree_node_record_initialize( + &node_record, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to create B-tree node record.", + function ); + + goto on_error; + } + /* Note that record->data_size here is an approximation + */ node_record->offset = record_offset; node_record->data = &( data[ record_offset ] ); node_record->data_size = data_size - record_offset; - if( libcdata_array_set_entry_by_index( +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: record: % 2d offset: %" PRIu16 " (0x%04" PRIx16 ") size: %" PRIu16 "\n", + function, + record_index, + node_record->offset, + node_record->offset, + node_record->data_size ); + } +#endif + if( libcdata_array_append_entry( node->records_array, - record_index, + &entry_index, (intptr_t *) node_record, error ) != 1 ) { @@ -425,7 +527,7 @@ error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to set node record: %d.", + "%s: unable to append node record: %d.", function, record_index ); @@ -436,18 +538,15 @@ #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { - byte_stream_copy_to_uint16_big_endian( - &( data[ records_data_offset ] ), - value_16bit ); - libcnotify_printf( - "%s: free space offset\t\t\t: 0x%04" PRIx16 "\n", - function, - value_16bit ); - libcnotify_printf( "\n" ); } -#endif /* defined( HAVE_DEBUG_OUTPUT ) */ +#endif + memory_free( + sorted_record_offsets ); + + memory_free( + record_offsets ); return( 1 ); @@ -458,6 +557,16 @@ &node_record, NULL ); } + if( sorted_record_offsets != NULL ) + { + memory_free( + sorted_record_offsets ); + } + if( record_offsets != NULL ) + { + memory_free( + record_offsets ); + } libcdata_array_empty( node->records_array, (int (*)(intptr_t **, libcerror_error_t **)) &libfshfs_btree_node_record_free, @@ -499,27 +608,11 @@ file_offset ); } #endif - if( libbfio_handle_seek_offset( - file_io_handle, - file_offset, - SEEK_SET, - error ) == -1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_IO, - LIBCERROR_IO_ERROR_SEEK_FAILED, - "%s: unable to seek B-tree node offset: %" PRIi64 " (0x%08" PRIx64 ").", - function, - file_offset, - file_offset ); - - return( -1 ); - } - read_count = libbfio_handle_read_buffer( + read_count = libbfio_handle_read_buffer_at_offset( file_io_handle, node->data, node->data_size, + file_offset, error ); if( read_count != (ssize_t) node->data_size ) @@ -528,8 +621,10 @@ error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, - "%s: unable to read B-tree node data.", - function ); + "%s: unable to read B-tree node data at offset: %" PRIi64 " (0x%08" PRIx64 ").", + function, + file_offset, + file_offset ); return( -1 ); } diff -Nru libfshfs-20201104/libfshfs/libfshfs_btree_node.h libfshfs-20240221/libfshfs/libfshfs_btree_node.h --- libfshfs-20201104/libfshfs/libfshfs_btree_node.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_btree_node.h 2024-02-21 05:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * B-tree node functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfshfs/libfshfs_btree_node_cache.c libfshfs-20240221/libfshfs/libfshfs_btree_node_cache.c --- libfshfs-20201104/libfshfs/libfshfs_btree_node_cache.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_btree_node_cache.c 2024-02-21 05:48:49.000000000 +0000 @@ -0,0 +1,182 @@ +/* + * B-tree node cache functions + * + * Copyright (C) 2009-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include +#include + +#include "libfshfs_btree_node_cache.h" +#include "libfshfs_definitions.h" +#include "libfshfs_libcerror.h" +#include "libfshfs_libfcache.h" + +/* Creates a B-tree node cache + * Make sure the value btree_node_cache is referencing, is set to NULL + * Returns 1 if successful or -1 on error + */ +int libfshfs_btree_node_cache_initialize( + libfshfs_btree_node_cache_t **btree_node_cache, + libcerror_error_t **error ) +{ + static char *function = "libfshfs_btree_node_cache_initialize"; + int cache_size = 1; + int depth = 0; + + if( btree_node_cache == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid B-tree node cache.", + function ); + + return( -1 ); + } + if( *btree_node_cache != NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, + "%s: invalid B-tree node cache value already set.", + function ); + + return( -1 ); + } + *btree_node_cache = memory_allocate_structure( + libfshfs_btree_node_cache_t ); + + if( *btree_node_cache == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_INSUFFICIENT, + "%s: unable to create B-tree node cache.", + function ); + + goto on_error; + } + if( memory_set( + *btree_node_cache, + 0, + sizeof( libfshfs_btree_node_cache_t ) ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_SET_FAILED, + "%s: unable to clear B-tree node cache.", + function ); + + memory_free( + *btree_node_cache ); + + *btree_node_cache = NULL; + + return( -1 ); + } + for( depth = 0; + depth < 9; + depth++ ) + { + if( libfcache_cache_initialize( + &( ( *btree_node_cache )->caches[ depth ] ), + cache_size, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to create cache: %d.", + function, + depth ); + + goto on_error; + } + cache_size = LIBFSHFS_MAXIMUM_CACHE_ENTRIES_BTREE_FILE_NODES * ( depth + 1 ); + } + return( 1 ); + +on_error: + if( *btree_node_cache != NULL ) + { + memory_free( + *btree_node_cache ); + + *btree_node_cache = NULL; + } + return( -1 ); +} + +/* Frees a B-tree node cache + * Returns 1 if successful or -1 on error + */ +int libfshfs_btree_node_cache_free( + libfshfs_btree_node_cache_t **btree_node_cache, + libcerror_error_t **error ) +{ + static char *function = "libfshfs_btree_node_cache_free"; + int depth = 0; + int result = 1; + + if( btree_node_cache == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid B-tree node cache.", + function ); + + return( -1 ); + } + if( *btree_node_cache != NULL ) + { + for( depth = 0; + depth < 9; + depth++ ) + { + if( libfcache_cache_free( + &( ( *btree_node_cache )->caches[ depth ] ), + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free cache: %d.", + function, + depth ); + + result = -1; + } + } + memory_free( + *btree_node_cache ); + + *btree_node_cache = NULL; + } + return( result ); +} + diff -Nru libfshfs-20201104/libfshfs/libfshfs_btree_node_cache.h libfshfs-20240221/libfshfs/libfshfs_btree_node_cache.h --- libfshfs-20201104/libfshfs/libfshfs_btree_node_cache.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_btree_node_cache.h 2024-02-21 05:48:49.000000000 +0000 @@ -0,0 +1,57 @@ +/* + * B-tree node cache functions + * + * Copyright (C) 2009-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _LIBFSHFS_BTREE_NODE_CACHE_H ) +#define _LIBFSHFS_BTREE_NODE_CACHE_H + +#include +#include + +#include "libfshfs_libcerror.h" +#include "libfshfs_libfcache.h" + +#if defined( __cplusplus ) +extern "C" { +#endif + +typedef struct libfshfs_btree_node_cache libfshfs_btree_node_cache_t; + +struct libfshfs_btree_node_cache +{ + /* One MRU cache for each level of the B-tree + */ + libfcache_cache_t *caches[ 9 ]; +}; + +int libfshfs_btree_node_cache_initialize( + libfshfs_btree_node_cache_t **btree_node_cache, + libcerror_error_t **error ); + +int libfshfs_btree_node_cache_free( + libfshfs_btree_node_cache_t **btree_node_cache, + libcerror_error_t **error ); + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _LIBFSHFS_BTREE_NODE_CACHE_H ) */ + diff -Nru libfshfs-20201104/libfshfs/libfshfs_btree_node_descriptor.c libfshfs-20240221/libfshfs/libfshfs_btree_node_descriptor.c --- libfshfs-20201104/libfshfs/libfshfs_btree_node_descriptor.c 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_btree_node_descriptor.c 2024-02-21 05:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * B-tree node descriptor functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -252,7 +252,19 @@ "\n", function ); } -#endif +#endif /* defined( HAVE_DEBUG_OUTPUT ) */ + + if( btree_node_descriptor->level > 8 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid node level value out of bounds.", + function ); + + return( -1 ); + } return( 1 ); } diff -Nru libfshfs-20201104/libfshfs/libfshfs_btree_node_descriptor.h libfshfs-20240221/libfshfs/libfshfs_btree_node_descriptor.h --- libfshfs-20201104/libfshfs/libfshfs_btree_node_descriptor.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_btree_node_descriptor.h 2024-02-21 05:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * B-tree node descriptor functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfshfs/libfshfs_btree_node_record.c libfshfs-20240221/libfshfs/libfshfs_btree_node_record.c --- libfshfs-20201104/libfshfs/libfshfs_btree_node_record.c 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_btree_node_record.c 2024-02-21 05:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * B-tree node record functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfshfs/libfshfs_btree_node_record.h libfshfs-20240221/libfshfs/libfshfs_btree_node_record.h --- libfshfs-20201104/libfshfs/libfshfs_btree_node_record.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_btree_node_record.h 2024-02-21 05:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * B-tree node record functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfshfs/libfshfs_btree_node_vector.c libfshfs-20240221/libfshfs/libfshfs_btree_node_vector.c --- libfshfs-20201104/libfshfs/libfshfs_btree_node_vector.c 2020-11-04 05:27:24.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_btree_node_vector.c 2024-02-21 05:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * The B-tree file node vector functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -24,6 +24,7 @@ #include #include "libfshfs_btree_node.h" +#include "libfshfs_btree_node_cache.h" #include "libfshfs_btree_node_vector.h" #include "libfshfs_definitions.h" #include "libfshfs_extent.h" @@ -32,6 +33,7 @@ #include "libfshfs_libcerror.h" #include "libfshfs_libcnotify.h" #include "libfshfs_libfcache.h" +#include "libfshfs_profiler.h" #include "libfshfs_unused.h" /* Creates a B-tree node vector @@ -135,7 +137,7 @@ "%s: invalid total number of blocks value out of bounds.", function ); - return( -1 ); + goto on_error; } total_number_of_nodes = size / node_size; @@ -152,7 +154,20 @@ "%s: invalid number of nodes value out of bounds.", function ); - return( -1 ); + goto on_error; + } + if( libfcache_date_time_get_timestamp( + &( ( *node_vector )->cache_timestamp ), + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve cache timestamp.", + function ); + + goto on_error; } ( *node_vector )->number_of_nodes = (uint32_t) total_number_of_nodes; ( *node_vector )->io_handle = io_handle; @@ -211,10 +226,10 @@ int libfshfs_btree_node_vector_get_node_by_number( libfshfs_btree_node_vector_t *node_vector, libbfio_handle_t *file_io_handle, - libfcache_cache_t *cache, + libfshfs_btree_node_cache_t *node_cache, + int depth, uint32_t node_number, libfshfs_btree_node_t **node, - int recursion_depth, libcerror_error_t **error ) { libfcache_cache_value_t *cache_value = NULL; @@ -222,17 +237,15 @@ libfshfs_extent_t *extent = NULL; static char *function = "libfshfs_btree_node_vector_get_node_by_number"; size64_t extent_size = 0; - off64_t cache_value_offset = 0; off64_t file_offset = 0; off64_t node_offset = 0; - int64_t cache_value_timestamp = 0; - int cache_value_file_index = 0; int extent_index = 0; int number_of_extents = 0; int result = 0; -#if defined( HAVE_DEBUG_OUTPUT ) - const char *hit_or_miss = NULL; +#if defined( HAVE_PROFILER ) + int64_t profiler_start_timestamp = 0; + const char *cache_hit_or_miss = NULL; #endif if( node_vector == NULL ) @@ -290,79 +303,75 @@ return( -1 ); } - if( libfcache_cache_get_value_by_index( - (libfcache_cache_t *) cache, - recursion_depth, - &cache_value, - error ) != 1 ) + if( node_cache == NULL ) { libcerror_error_set( error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve value: %d from cache.", - function, - recursion_depth ); + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid B-tree node cache.", + function ); - goto on_error; + return( -1 ); } - if( cache_value != NULL ) +#if defined( HAVE_PROFILER ) + if( node_vector->io_handle->profiler != NULL ) { - if( libfcache_cache_value_get_identifier( - cache_value, - &cache_value_file_index, - &cache_value_offset, - &cache_value_timestamp, + if( libfshfs_profiler_start_timing( + node_vector->io_handle->profiler, + &profiler_start_timestamp, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve cache value identifier.", + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to start timing.", function ); goto on_error; } - if( (off64_t) node_number == cache_value_offset ) - { - if( libfcache_cache_value_get_value( - cache_value, - (intptr_t **) node, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve cache value.", - function ); + } +#endif /* defined( HAVE_PROFILER ) */ - goto on_error; - } - result = 1; - } +/* TODO move this into node_cache */ + result = libfcache_cache_get_value_by_identifier( + node_cache->caches[ depth ], + 0, + (off64_t) node_number, + node_vector->cache_timestamp, + &cache_value, + error ); + + if( result == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve value from cache.", + function ); + + goto on_error; } -#if defined( HAVE_DEBUG_OUTPUT ) - if( libcnotify_verbose != 0 ) + else if( result != 0 ) { - if( result == 0 ) - { - hit_or_miss = "miss"; - } - else + if( libfcache_cache_value_get_value( + cache_value, + (intptr_t **) node, + error ) != 1 ) { - hit_or_miss = "hit"; + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve cache value.", + function ); + + goto on_error; } - libcnotify_printf( - "%s: cache: 0x%08" PRIjx " %s\n", - function, - (intptr_t) cache, - hit_or_miss ); } -#endif /* defined( HAVE_DEBUG_OUTPUT ) */ - - if( result == 0 ) + else { if( libfshfs_btree_node_initialize( &safe_node, @@ -487,12 +496,11 @@ goto on_error; } - if( libfcache_cache_set_value_by_index( - cache, - recursion_depth, + if( libfcache_cache_set_value_by_identifier( + node_cache->caches[ depth ], 0, (off64_t) node_number, - 0, + node_vector->cache_timestamp, (intptr_t *) safe_node, (int (*)(intptr_t **, libcerror_error_t **)) &libfshfs_btree_node_free, LIBFCACHE_CACHE_VALUE_FLAG_MANAGED, @@ -502,14 +510,48 @@ error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to set value: %d in cache.", - function, - recursion_depth ); + "%s: unable to set value in cache.", + function ); goto on_error; } - *node = safe_node; + *node = safe_node; + safe_node = NULL; } +#if defined( HAVE_PROFILER ) + if( node_vector->io_handle->profiler != NULL ) + { + node_offset = (off64_t) node_number * node_vector->node_size; + + if( result == 0 ) + { + cache_hit_or_miss = "miss"; + } + else + { + cache_hit_or_miss = "hit"; + } + if( libfshfs_profiler_stop_timing( + node_vector->io_handle->profiler, + profiler_start_timestamp, + function, + node_offset, + node_vector->node_size, + cache_hit_or_miss, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to stop timing.", + function ); + + goto on_error; + } + } +#endif /* defined( HAVE_PROFILER ) */ + return( 1 ); on_error: diff -Nru libfshfs-20201104/libfshfs/libfshfs_btree_node_vector.h libfshfs-20240221/libfshfs/libfshfs_btree_node_vector.h --- libfshfs-20201104/libfshfs/libfshfs_btree_node_vector.h 2020-11-04 05:17:32.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_btree_node_vector.h 2024-02-21 05:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * The B-tree file node vector functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -26,11 +26,11 @@ #include #include "libfshfs_btree_node.h" +#include "libfshfs_btree_node_cache.h" #include "libfshfs_io_handle.h" #include "libfshfs_libbfio.h" #include "libfshfs_libcdata.h" #include "libfshfs_libcerror.h" -#include "libfshfs_libfcache.h" #if defined( __cplusplus ) extern "C" { @@ -55,6 +55,10 @@ /* Extents */ libcdata_array_t *extents; + + /* Cache timestamp + */ + int64_t cache_timestamp; }; int libfshfs_btree_node_vector_initialize( @@ -72,10 +76,10 @@ int libfshfs_btree_node_vector_get_node_by_number( libfshfs_btree_node_vector_t *node_vector, libbfio_handle_t *file_io_handle, - libfcache_cache_t *cache, + libfshfs_btree_node_cache_t *node_cache, + int depth, uint32_t node_number, libfshfs_btree_node_t **node, - int recursion_depth, libcerror_error_t **error ); #if defined( __cplusplus ) diff -Nru libfshfs-20201104/libfshfs/libfshfs_buffer_data_handle.c libfshfs-20240221/libfshfs/libfshfs_buffer_data_handle.c --- libfshfs-20201104/libfshfs/libfshfs_buffer_data_handle.c 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_buffer_data_handle.c 2024-02-21 05:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * The buffer data handle functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfshfs/libfshfs_buffer_data_handle.h libfshfs-20240221/libfshfs/libfshfs_buffer_data_handle.h --- libfshfs-20201104/libfshfs/libfshfs_buffer_data_handle.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_buffer_data_handle.h 2024-02-21 05:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * The buffer data handle functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfshfs/libfshfs_catalog_btree_file.c libfshfs-20240221/libfshfs/libfshfs_catalog_btree_file.c --- libfshfs-20201104/libfshfs/libfshfs_catalog_btree_file.c 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_catalog_btree_file.c 2024-02-21 05:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * The catalog B-tree file functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -23,7 +23,9 @@ #include #include +#include "libfshfs_btree_file.h" #include "libfshfs_btree_node.h" +#include "libfshfs_btree_node_cache.h" #include "libfshfs_btree_node_record.h" #include "libfshfs_catalog_btree_file.h" #include "libfshfs_catalog_btree_key.h" @@ -31,11 +33,13 @@ #include "libfshfs_directory_entry.h" #include "libfshfs_directory_record.h" #include "libfshfs_file_record.h" +#include "libfshfs_io_handle.h" #include "libfshfs_libbfio.h" #include "libfshfs_libcdata.h" #include "libfshfs_libcerror.h" #include "libfshfs_libcnotify.h" #include "libfshfs_libuna.h" +#include "libfshfs_name.h" #include "libfshfs_thread_record.h" #include "fshfs_catalog_file.h" @@ -45,13 +49,16 @@ */ int libfshfs_catalog_btree_file_get_key_from_node_by_index( libfshfs_btree_node_t *node, + libfshfs_io_handle_t *io_handle, uint16_t record_index, + int is_leaf_node, libfshfs_catalog_btree_key_t **node_key, libcerror_error_t **error ) { libfshfs_btree_node_record_t *node_record = NULL; libfshfs_catalog_btree_key_t *safe_node_key = NULL; static char *function = "libfshfs_catalog_btree_file_get_key_from_node_by_index"; + size_t data_offset = 0; if( node_key == NULL ) { @@ -64,6 +71,17 @@ return( -1 ); } + if( io_handle == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid IO handle.", + function ); + + return( -1 ); + } if( libfshfs_btree_node_get_record_by_index( node, record_index, @@ -109,6 +127,7 @@ } if( libfshfs_catalog_btree_key_read_data( safe_node_key, + io_handle, node_record->data, node_record->data_size, error ) != 1 ) @@ -124,6 +143,35 @@ } node_record->key_value = (intptr_t *) safe_node_key; node_record->key_value_free_function = (int (*)(intptr_t **, libcerror_error_t **)) &libfshfs_catalog_btree_key_free; + + data_offset = (size_t) node_record->offset + safe_node_key->data_size; + + if( ( is_leaf_node != 0 ) + && ( io_handle->file_system_type == LIBFSHFS_FILE_SYSTEM_TYPE_HFS ) + && ( ( data_offset % 2 ) != 0 ) + && ( ( data_offset + 1 ) < node_record->data_size ) ) + { + /* The HFS catalog index key of a leaf node can contain alignment padding data + * that is not included in the key data size. + */ +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: alignment padding data:\n", + function ); + libcnotify_print_data( + &( ( node_record->data )[ node_record->data_size ] ), + 1, + 0 ); + } +#endif + data_offset += 1; + } + data_offset -= node_record->offset; + + safe_node_key->record_data = &( ( node_record->data )[ data_offset ] ); + safe_node_key->record_data_size = node_record->data_size - data_offset; } *node_key = (libfshfs_catalog_btree_key_t *) node_record->key_value; @@ -333,6 +381,7 @@ */ int libfshfs_catalog_btree_file_get_thread_record_from_leaf_node( libfshfs_btree_file_t *btree_file, + libfshfs_io_handle_t *io_handle, libfshfs_btree_node_t *node, uint32_t identifier, libfshfs_thread_record_t **thread_record, @@ -420,7 +469,9 @@ { if( libfshfs_catalog_btree_file_get_key_from_node_by_index( node, + io_handle, record_index, + 1, &node_key, error ) == -1 ) { @@ -489,7 +540,9 @@ */ int libfshfs_catalog_btree_file_get_thread_record_from_branch_node( libfshfs_btree_file_t *btree_file, + libfshfs_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, + libfshfs_btree_node_cache_t *node_cache, libfshfs_btree_node_t *node, uint32_t identifier, libfshfs_thread_record_t **thread_record, @@ -501,6 +554,7 @@ libfshfs_catalog_btree_key_t *node_key = NULL; static char *function = "libfshfs_catalog_btree_file_get_thread_record_from_branch_node"; uint32_t sub_node_number = 0; + uint16_t last_record_index = 0; uint16_t record_index = 0; uint8_t node_type = 0; int is_branch_node = 0; @@ -590,6 +644,8 @@ } if( libfshfs_catalog_btree_file_get_key_from_node_by_index( node, + io_handle, + 0, 0, &last_node_key, error ) == -1 ) @@ -613,7 +669,9 @@ { if( libfshfs_catalog_btree_file_get_key_from_node_by_index( node, + io_handle, record_index, + 0, &node_key, error ) == -1 ) { @@ -627,18 +685,18 @@ goto on_error; } - } - if( node_key == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, - "%s: missing catalog B-tree key: %" PRIu16 ".", - function, - record_index ); + if( node_key == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, + "%s: missing catalog B-tree key: %" PRIu16 ".", + function, + record_index ); - goto on_error; + goto on_error; + } } if( ( record_index == node->descriptor->number_of_records ) || ( node_key->parent_identifier >= identifier ) ) @@ -661,8 +719,9 @@ if( libcnotify_verbose != 0 ) { libcnotify_printf( - "%s: B-tree sub node number\t: %" PRIu32 "\n", + "%s: B-tree record: %d sub node number: %" PRIu32 "\n", function, + last_record_index, sub_node_number ); libcnotify_printf( @@ -672,9 +731,10 @@ if( libfshfs_btree_file_get_node_by_number( btree_file, file_io_handle, + node_cache, + recursion_depth, sub_node_number, &sub_node, - recursion_depth, error ) == -1 ) { libcerror_error_set( @@ -702,21 +762,24 @@ goto on_error; } - if( node_type == 0x00 ) + if( node_type == LIBFSHFS_BTREE_NODE_TYPE_INDEX_NODE ) { result = libfshfs_catalog_btree_file_get_thread_record_from_branch_node( btree_file, + io_handle, file_io_handle, + node_cache, sub_node, identifier, thread_record, recursion_depth + 1, error ); } - else if( node_type == 0xff ) + else if( node_type == LIBFSHFS_BTREE_NODE_TYPE_LEAF_NODE ) { result = libfshfs_catalog_btree_file_get_thread_record_from_leaf_node( btree_file, + io_handle, sub_node, identifier, thread_record, @@ -741,6 +804,8 @@ } } last_node_key = node_key; + + last_record_index++; } return( result ); @@ -759,7 +824,9 @@ */ int libfshfs_catalog_btree_file_get_thread_record( libfshfs_btree_file_t *btree_file, + libfshfs_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, + libfshfs_btree_node_cache_t *node_cache, uint32_t identifier, libfshfs_thread_record_t **thread_record, libcerror_error_t **error ) @@ -772,8 +839,8 @@ if( libfshfs_btree_file_get_root_node( btree_file, file_io_handle, + node_cache, &root_node, - 0, error ) == -1 ) { libcerror_error_set( @@ -799,21 +866,24 @@ return( -1 ); } - if( node_type == 0x00 ) + if( node_type == LIBFSHFS_BTREE_NODE_TYPE_INDEX_NODE ) { result = libfshfs_catalog_btree_file_get_thread_record_from_branch_node( btree_file, + io_handle, file_io_handle, + node_cache, root_node, identifier, thread_record, 1, error ); } - else if( node_type == 0xff ) + else if( node_type == LIBFSHFS_BTREE_NODE_TYPE_LEAF_NODE ) { result = libfshfs_catalog_btree_file_get_thread_record_from_leaf_node( btree_file, + io_handle, root_node, identifier, thread_record, @@ -1001,6 +1071,7 @@ safe_directory_entry, node_key->name_data, node_key->name_size, + node_key->codepage, error ) != 1 ) { libcerror_error_set( @@ -1065,8 +1136,10 @@ */ int libfshfs_catalog_btree_file_get_directory_entry_from_leaf_node_by_thread_record( libfshfs_btree_file_t *btree_file, + libfshfs_io_handle_t *io_handle, libfshfs_btree_node_t *node, libfshfs_thread_record_t *thread_record, + uint8_t use_case_folding, libfshfs_directory_entry_t **directory_entry, libcerror_error_t **error ) { @@ -1165,7 +1238,9 @@ { if( libfshfs_catalog_btree_file_get_key_from_node_by_index( node, + io_handle, record_index, + 1, &node_key, error ) == -1 ) { @@ -1209,6 +1284,8 @@ node_key->record_data, record_type ); + compare_result = LIBUNA_COMPARE_LESS; + switch( record_type ) { case LIBFSHFS_RECORD_TYPE_HFSPLUS_DIRECTORY_RECORD: @@ -1219,6 +1296,7 @@ node_key, thread_record->name, thread_record->name_size, + use_case_folding, error ); if( compare_result == -1 ) @@ -1235,10 +1313,9 @@ break; default: - compare_result = LIBUNA_COMPARE_LESS; break; } - if( compare_result != 0 ) + if( compare_result == LIBUNA_COMPARE_EQUAL ) { result = libfshfs_catalog_btree_file_get_directory_entry_from_key( node_key, @@ -1281,9 +1358,12 @@ */ int libfshfs_catalog_btree_file_get_directory_entry_from_branch_node_by_thread_record( libfshfs_btree_file_t *btree_file, + libfshfs_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, + libfshfs_btree_node_cache_t *node_cache, libfshfs_btree_node_t *node, libfshfs_thread_record_t *thread_record, + uint8_t use_case_folding, libfshfs_directory_entry_t **directory_entry, int recursion_depth, libcerror_error_t **error ) @@ -1293,8 +1373,10 @@ libfshfs_catalog_btree_key_t *node_key = NULL; static char *function = "libfshfs_catalog_btree_file_get_directory_entry_from_branch_node_by_thread_record"; uint32_t sub_node_number = 0; + uint16_t last_record_index = 0; uint16_t record_index = 0; uint8_t node_type = 0; + int compare_result = 0; int is_branch_node = 0; int result = 0; @@ -1391,8 +1473,22 @@ goto on_error; } +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: B-tree node depth: %d\n", + function, + recursion_depth ); + + libcnotify_printf( + "\n" ); + } +#endif if( libfshfs_catalog_btree_file_get_key_from_node_by_index( node, + io_handle, + 0, 0, &last_node_key, error ) == -1 ) @@ -1412,11 +1508,25 @@ record_index <= node->descriptor->number_of_records; record_index++ ) { +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: B-tree record: %d\n", + function, + record_index ); + + libcnotify_printf( + "\n" ); + } +#endif if( record_index < node->descriptor->number_of_records ) { if( libfshfs_catalog_btree_file_get_key_from_node_by_index( node, + io_handle, record_index, + 0, &node_key, error ) == -1 ) { @@ -1430,21 +1540,51 @@ goto on_error; } + if( node_key == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, + "%s: missing catalog B-tree key: %" PRIu16 ".", + function, + record_index ); + + goto on_error; + } } - if( node_key == NULL ) + compare_result = LIBUNA_COMPARE_LESS; + + if( ( record_index == node->descriptor->number_of_records ) + || ( node_key->parent_identifier > thread_record->parent_identifier ) ) { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, - "%s: missing catalog B-tree key: %" PRIu16 ".", - function, - record_index ); + compare_result = LIBUNA_COMPARE_GREATER; + } + else if( node_key->parent_identifier == thread_record->parent_identifier ) + { + if( node_key->name_data != NULL ) + { + compare_result = libfshfs_catalog_btree_key_compare_name( + node_key, + thread_record->name, + thread_record->name_size, + use_case_folding, + error ); - goto on_error; + if( compare_result == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GENERIC, + "%s: unable to compare thread record name with catalog B-tree key name.", + function ); + + goto on_error; + } + } } - if( ( record_index == node->descriptor->number_of_records ) - || ( node_key->parent_identifier >= thread_record->parent_identifier ) ) + if( compare_result == LIBUNA_COMPARE_GREATER ) { if( libfshfs_catalog_btree_file_get_sub_node_number_from_key( last_node_key, @@ -1464,8 +1604,9 @@ if( libcnotify_verbose != 0 ) { libcnotify_printf( - "%s: B-tree sub node number\t: %" PRIu32 "\n", + "%s: B-tree record: %d sub node number: %" PRIu32 "\n", function, + last_record_index, sub_node_number ); libcnotify_printf( @@ -1475,9 +1616,10 @@ if( libfshfs_btree_file_get_node_by_number( btree_file, file_io_handle, + node_cache, + recursion_depth, sub_node_number, &sub_node, - recursion_depth, error ) == -1 ) { libcerror_error_set( @@ -1505,23 +1647,28 @@ goto on_error; } - if( node_type == 0x00 ) + if( node_type == LIBFSHFS_BTREE_NODE_TYPE_INDEX_NODE ) { result = libfshfs_catalog_btree_file_get_directory_entry_from_branch_node_by_thread_record( btree_file, + io_handle, file_io_handle, + node_cache, sub_node, thread_record, + use_case_folding, directory_entry, recursion_depth + 1, error ); } - else if( node_type == 0xff ) + else if( node_type == LIBFSHFS_BTREE_NODE_TYPE_LEAF_NODE ) { result = libfshfs_catalog_btree_file_get_directory_entry_from_leaf_node_by_thread_record( btree_file, + io_handle, sub_node, thread_record, + use_case_folding, directory_entry, error ); } @@ -1544,6 +1691,8 @@ } } last_node_key = node_key; + + last_record_index++; } return( result ); @@ -1562,8 +1711,11 @@ */ int libfshfs_catalog_btree_file_get_directory_entry_by_identifier( libfshfs_btree_file_t *btree_file, + libfshfs_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, + libfshfs_btree_node_cache_t *node_cache, uint32_t identifier, + uint8_t use_case_folding, libfshfs_directory_entry_t **directory_entry, libcerror_error_t **error ) { @@ -1575,7 +1727,9 @@ result = libfshfs_catalog_btree_file_get_thread_record( btree_file, + io_handle, file_io_handle, + node_cache, identifier, &thread_record, error ); @@ -1597,8 +1751,8 @@ if( libfshfs_btree_file_get_root_node( btree_file, file_io_handle, + node_cache, &root_node, - 0, error ) == -1 ) { libcerror_error_set( @@ -1624,23 +1778,28 @@ goto on_error; } - if( node_type == 0x00 ) + if( node_type == LIBFSHFS_BTREE_NODE_TYPE_INDEX_NODE ) { result = libfshfs_catalog_btree_file_get_directory_entry_from_branch_node_by_thread_record( btree_file, + io_handle, file_io_handle, + node_cache, root_node, thread_record, + use_case_folding, directory_entry, 1, error ); } - else if( node_type == 0xff ) + else if( node_type == LIBFSHFS_BTREE_NODE_TYPE_LEAF_NODE ) { result = libfshfs_catalog_btree_file_get_directory_entry_from_leaf_node_by_thread_record( btree_file, + io_handle, root_node, thread_record, + use_case_folding, directory_entry, error ); } @@ -1687,8 +1846,10 @@ */ int libfshfs_catalog_btree_file_get_directory_entry_from_leaf_node_by_utf8_name( libfshfs_btree_file_t *btree_file, + libfshfs_io_handle_t *io_handle, libfshfs_btree_node_t *node, uint32_t parent_identifier, + uint32_t name_hash, const uint8_t *utf8_string, size_t utf8_string_length, uint8_t use_case_folding, @@ -1779,7 +1940,9 @@ { if( libfshfs_catalog_btree_file_get_key_from_node_by_index( node, + io_handle, record_index, + 1, &node_key, error ) == -1 ) { @@ -1823,38 +1986,63 @@ node_key->record_data, record_type ); + compare_result = LIBUNA_COMPARE_LESS; + switch( record_type ) { case LIBFSHFS_RECORD_TYPE_HFSPLUS_DIRECTORY_RECORD: case LIBFSHFS_RECORD_TYPE_HFSPLUS_FILE_RECORD: case LIBFSHFS_RECORD_TYPE_HFS_DIRECTORY_RECORD: case LIBFSHFS_RECORD_TYPE_HFS_FILE_RECORD: - compare_result = libfshfs_catalog_btree_key_compare_name_with_utf8_string( - node_key, - utf8_string, - utf8_string_length, - use_case_folding, - error ); - - if( compare_result == -1 ) + if( ( node_key->name_hash == 0 ) + || ( node_key->name_hash == name_hash ) ) { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GENERIC, - "%s: unable to compare UTF-8 string with catalog B-tree key name.", - function ); + compare_result = libfshfs_catalog_btree_key_compare_name_with_utf8_string( + node_key, + utf8_string, + utf8_string_length, + use_case_folding, + error ); + + if( compare_result == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GENERIC, + "%s: unable to compare UTF-8 string with catalog B-tree key name.", + function ); - goto on_error; + goto on_error; + } } break; default: - compare_result = LIBUNA_COMPARE_LESS; break; } if( compare_result == LIBUNA_COMPARE_EQUAL ) { + if( node_key->name_hash == 0 ) + { + if( libfshfs_name_calculate_hash( + node_key->name_data, + (size_t) node_key->name_size, + node_key->codepage, + use_case_folding, + &( node_key->name_hash ), + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GENERIC, + "%s: unable to calculate name hash.", + function ); + + goto on_error; + } + } result = libfshfs_catalog_btree_file_get_directory_entry_from_key( node_key, directory_entry, @@ -1896,9 +2084,12 @@ */ int libfshfs_catalog_btree_file_get_directory_entry_from_branch_node_by_utf8_name( libfshfs_btree_file_t *btree_file, + libfshfs_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, + libfshfs_btree_node_cache_t *node_cache, libfshfs_btree_node_t *node, uint32_t parent_identifier, + uint32_t name_hash, const uint8_t *utf8_string, size_t utf8_string_length, uint8_t use_case_folding, @@ -1911,8 +2102,10 @@ libfshfs_catalog_btree_key_t *node_key = NULL; static char *function = "libfshfs_catalog_btree_file_get_directory_entry_from_branch_node_by_utf8_name"; uint32_t sub_node_number = 0; + uint16_t last_record_index = 0; uint16_t record_index = 0; uint8_t node_type = 0; + int compare_result = 0; int is_branch_node = 0; int result = 0; @@ -2000,6 +2193,8 @@ } if( libfshfs_catalog_btree_file_get_key_from_node_by_index( node, + io_handle, + 0, 0, &last_node_key, error ) == -1 ) @@ -2019,11 +2214,25 @@ record_index <= node->descriptor->number_of_records; record_index++ ) { +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: B-tree record: %d\n", + function, + record_index ); + + libcnotify_printf( + "\n" ); + } +#endif if( record_index < node->descriptor->number_of_records ) { if( libfshfs_catalog_btree_file_get_key_from_node_by_index( node, + io_handle, record_index, + 0, &node_key, error ) == -1 ) { @@ -2037,21 +2246,51 @@ goto on_error; } + if( node_key == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, + "%s: missing catalog B-tree key: %" PRIu16 ".", + function, + record_index ); + + goto on_error; + } } - if( node_key == NULL ) + compare_result = LIBUNA_COMPARE_LESS; + + if( ( record_index == node->descriptor->number_of_records ) + || ( node_key->parent_identifier > parent_identifier ) ) { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, - "%s: missing catalog B-tree key: %" PRIu16 ".", - function, - record_index ); + compare_result = LIBUNA_COMPARE_GREATER; + } + else if( node_key->parent_identifier == parent_identifier ) + { + if( node_key->name_data != NULL ) + { + compare_result = libfshfs_catalog_btree_key_compare_name_with_utf8_string( + node_key, + utf8_string, + utf8_string_length, + use_case_folding, + error ); - goto on_error; + if( compare_result == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GENERIC, + "%s: unable to compare UTF-8 string with catalog B-tree key name.", + function ); + + goto on_error; + } + } } - if( ( record_index == node->descriptor->number_of_records ) - || ( node_key->parent_identifier >= parent_identifier ) ) + if( compare_result == LIBUNA_COMPARE_GREATER ) { if( libfshfs_catalog_btree_file_get_sub_node_number_from_key( last_node_key, @@ -2071,8 +2310,9 @@ if( libcnotify_verbose != 0 ) { libcnotify_printf( - "%s: B-tree sub node number\t: %" PRIu32 "\n", + "%s: B-tree record: %d sub node number: %" PRIu32 "\n", function, + last_record_index, sub_node_number ); libcnotify_printf( @@ -2082,9 +2322,10 @@ if( libfshfs_btree_file_get_node_by_number( btree_file, file_io_handle, + node_cache, + recursion_depth, sub_node_number, &sub_node, - recursion_depth, error ) == -1 ) { libcerror_error_set( @@ -2112,13 +2353,16 @@ goto on_error; } - if( node_type == 0x00 ) + if( node_type == LIBFSHFS_BTREE_NODE_TYPE_INDEX_NODE ) { result = libfshfs_catalog_btree_file_get_directory_entry_from_branch_node_by_utf8_name( btree_file, + io_handle, file_io_handle, + node_cache, sub_node, parent_identifier, + name_hash, utf8_string, utf8_string_length, use_case_folding, @@ -2126,12 +2370,14 @@ recursion_depth + 1, error ); } - else if( node_type == 0xff ) + else if( node_type == LIBFSHFS_BTREE_NODE_TYPE_LEAF_NODE ) { result = libfshfs_catalog_btree_file_get_directory_entry_from_leaf_node_by_utf8_name( btree_file, + io_handle, sub_node, parent_identifier, + name_hash, utf8_string, utf8_string_length, use_case_folding, @@ -2157,6 +2403,8 @@ } } last_node_key = node_key; + + last_record_index++; } return( result ); @@ -2175,8 +2423,11 @@ */ int libfshfs_catalog_btree_file_get_directory_entry_by_utf8_name( libfshfs_btree_file_t *btree_file, + libfshfs_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, + libfshfs_btree_node_cache_t *node_cache, uint32_t parent_identifier, + uint32_t name_hash, const uint8_t *utf8_string, size_t utf8_string_length, uint8_t use_case_folding, @@ -2191,8 +2442,8 @@ if( libfshfs_btree_file_get_root_node( btree_file, file_io_handle, + node_cache, &root_node, - 0, error ) == -1 ) { libcerror_error_set( @@ -2218,13 +2469,16 @@ return( -1 ); } - if( node_type == 0x00 ) + if( node_type == LIBFSHFS_BTREE_NODE_TYPE_INDEX_NODE ) { result = libfshfs_catalog_btree_file_get_directory_entry_from_branch_node_by_utf8_name( btree_file, + io_handle, file_io_handle, + node_cache, root_node, parent_identifier, + name_hash, utf8_string, utf8_string_length, use_case_folding, @@ -2232,12 +2486,14 @@ 1, error ); } - else if( node_type == 0xff ) + else if( node_type == LIBFSHFS_BTREE_NODE_TYPE_LEAF_NODE ) { result = libfshfs_catalog_btree_file_get_directory_entry_from_leaf_node_by_utf8_name( btree_file, + io_handle, root_node, parent_identifier, + name_hash, utf8_string, utf8_string_length, use_case_folding, @@ -2263,7 +2519,9 @@ */ int libfshfs_catalog_btree_file_get_directory_entry_by_utf8_path( libfshfs_btree_file_t *btree_file, + libfshfs_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, + libfshfs_btree_node_cache_t *node_cache, const uint8_t *utf8_string, size_t utf8_string_length, uint8_t use_case_folding, @@ -2278,6 +2536,7 @@ size_t utf8_string_index = 0; size_t utf8_string_segment_length = 0; uint32_t lookup_identifier = 0; + uint32_t segment_name_hash = 0; uint8_t node_type = 0; int result = 0; @@ -2328,8 +2587,8 @@ if( libfshfs_btree_file_get_root_node( btree_file, file_io_handle, + node_cache, &root_node, - 0, error ) == -1 ) { libcerror_error_set( @@ -2369,11 +2628,13 @@ if( ( utf8_string_length == 0 ) || ( utf8_string_length == 1 ) ) { -/* TODO optimize this */ result = libfshfs_catalog_btree_file_get_directory_entry_by_identifier( btree_file, + io_handle, file_io_handle, + node_cache, LIBFSHFS_ROOT_DIRECTORY_IDENTIFIER, + use_case_folding, &safe_directory_entry, error ); @@ -2444,13 +2705,32 @@ goto on_error; } } - if( node_type == 0x00 ) + if( libfshfs_name_calculate_hash_utf8_string( + utf8_string_segment, + utf8_string_segment_length, + use_case_folding, + &segment_name_hash, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GENERIC, + "%s: unable to calculate name hash.", + function ); + + goto on_error; + } + if( node_type == LIBFSHFS_BTREE_NODE_TYPE_INDEX_NODE ) { result = libfshfs_catalog_btree_file_get_directory_entry_from_branch_node_by_utf8_name( btree_file, + io_handle, file_io_handle, + node_cache, root_node, lookup_identifier, + segment_name_hash, utf8_string_segment, utf8_string_segment_length, use_case_folding, @@ -2458,12 +2738,14 @@ 1, error ); } - else if( node_type == 0xff ) + else if( node_type == LIBFSHFS_BTREE_NODE_TYPE_LEAF_NODE ) { result = libfshfs_catalog_btree_file_get_directory_entry_from_leaf_node_by_utf8_name( btree_file, + io_handle, root_node, lookup_identifier, + segment_name_hash, utf8_string_segment, utf8_string_segment_length, use_case_folding, @@ -2522,8 +2804,10 @@ */ int libfshfs_catalog_btree_file_get_directory_entry_from_leaf_node_by_utf16_name( libfshfs_btree_file_t *btree_file, + libfshfs_io_handle_t *io_handle, libfshfs_btree_node_t *node, uint32_t parent_identifier, + uint32_t name_hash, const uint16_t *utf16_string, size_t utf16_string_length, uint8_t use_case_folding, @@ -2614,7 +2898,9 @@ { if( libfshfs_catalog_btree_file_get_key_from_node_by_index( node, + io_handle, record_index, + 1, &node_key, error ) == -1 ) { @@ -2658,38 +2944,63 @@ node_key->record_data, record_type ); + compare_result = LIBUNA_COMPARE_LESS; + switch( record_type ) { case LIBFSHFS_RECORD_TYPE_HFSPLUS_DIRECTORY_RECORD: case LIBFSHFS_RECORD_TYPE_HFSPLUS_FILE_RECORD: case LIBFSHFS_RECORD_TYPE_HFS_DIRECTORY_RECORD: case LIBFSHFS_RECORD_TYPE_HFS_FILE_RECORD: - compare_result = libfshfs_catalog_btree_key_compare_name_with_utf16_string( - node_key, - utf16_string, - utf16_string_length, - use_case_folding, - error ); - - if( compare_result == -1 ) + if( ( node_key->name_hash == 0 ) + || ( node_key->name_hash == name_hash ) ) { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GENERIC, - "%s: unable to compare UTF-16 string with catalog B-tree key name.", - function ); + compare_result = libfshfs_catalog_btree_key_compare_name_with_utf16_string( + node_key, + utf16_string, + utf16_string_length, + use_case_folding, + error ); + + if( compare_result == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GENERIC, + "%s: unable to compare UTF-16 string with catalog B-tree key name.", + function ); - goto on_error; + goto on_error; + } } break; default: - compare_result = LIBUNA_COMPARE_LESS; break; } if( compare_result == LIBUNA_COMPARE_EQUAL ) { + if( node_key->name_hash == 0 ) + { + if( libfshfs_name_calculate_hash( + node_key->name_data, + (size_t) node_key->name_size, + node_key->codepage, + use_case_folding, + &( node_key->name_hash ), + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GENERIC, + "%s: unable to calculate name hash.", + function ); + + goto on_error; + } + } result = libfshfs_catalog_btree_file_get_directory_entry_from_key( node_key, directory_entry, @@ -2731,9 +3042,12 @@ */ int libfshfs_catalog_btree_file_get_directory_entry_from_branch_node_by_utf16_name( libfshfs_btree_file_t *btree_file, + libfshfs_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, + libfshfs_btree_node_cache_t *node_cache, libfshfs_btree_node_t *node, uint32_t parent_identifier, + uint32_t name_hash, const uint16_t *utf16_string, size_t utf16_string_length, uint8_t use_case_folding, @@ -2746,8 +3060,10 @@ libfshfs_catalog_btree_key_t *node_key = NULL; static char *function = "libfshfs_catalog_btree_file_get_directory_entry_from_branch_node_by_utf16_name"; uint32_t sub_node_number = 0; + uint16_t last_record_index = 0; uint16_t record_index = 0; uint8_t node_type = 0; + int compare_result = 0; int is_branch_node = 0; int result = 0; @@ -2835,6 +3151,8 @@ } if( libfshfs_catalog_btree_file_get_key_from_node_by_index( node, + io_handle, + 0, 0, &last_node_key, error ) == -1 ) @@ -2854,11 +3172,25 @@ record_index <= node->descriptor->number_of_records; record_index++ ) { +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: B-tree record: %d\n", + function, + record_index ); + + libcnotify_printf( + "\n" ); + } +#endif if( record_index < node->descriptor->number_of_records ) { if( libfshfs_catalog_btree_file_get_key_from_node_by_index( node, + io_handle, record_index, + 0, &node_key, error ) == -1 ) { @@ -2872,21 +3204,51 @@ goto on_error; } + if( node_key == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, + "%s: missing catalog B-tree key: %" PRIu16 ".", + function, + record_index ); + + goto on_error; + } } - if( node_key == NULL ) + compare_result = LIBUNA_COMPARE_LESS; + + if( ( record_index == node->descriptor->number_of_records ) + || ( node_key->parent_identifier > parent_identifier ) ) { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, - "%s: missing catalog B-tree key: %" PRIu16 ".", - function, - record_index ); + compare_result = LIBUNA_COMPARE_GREATER; + } + else if( node_key->parent_identifier == parent_identifier ) + { + if( node_key->name_data != NULL ) + { + compare_result = libfshfs_catalog_btree_key_compare_name_with_utf16_string( + node_key, + utf16_string, + utf16_string_length, + use_case_folding, + error ); - goto on_error; + if( compare_result == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GENERIC, + "%s: unable to compare UTF-16 string with catalog B-tree key name.", + function ); + + goto on_error; + } + } } - if( ( record_index == node->descriptor->number_of_records ) - || ( node_key->parent_identifier >= parent_identifier ) ) + if( compare_result == LIBUNA_COMPARE_GREATER ) { if( libfshfs_catalog_btree_file_get_sub_node_number_from_key( last_node_key, @@ -2906,8 +3268,9 @@ if( libcnotify_verbose != 0 ) { libcnotify_printf( - "%s: B-tree sub node number\t: %" PRIu32 "\n", + "%s: B-tree record: %d sub node number: %" PRIu32 "\n", function, + last_record_index, sub_node_number ); libcnotify_printf( @@ -2917,9 +3280,10 @@ if( libfshfs_btree_file_get_node_by_number( btree_file, file_io_handle, + node_cache, + recursion_depth, sub_node_number, &sub_node, - recursion_depth, error ) == -1 ) { libcerror_error_set( @@ -2947,13 +3311,16 @@ goto on_error; } - if( node_type == 0x00 ) + if( node_type == LIBFSHFS_BTREE_NODE_TYPE_INDEX_NODE ) { result = libfshfs_catalog_btree_file_get_directory_entry_from_branch_node_by_utf16_name( btree_file, + io_handle, file_io_handle, + node_cache, sub_node, parent_identifier, + name_hash, utf16_string, utf16_string_length, use_case_folding, @@ -2961,12 +3328,14 @@ recursion_depth + 1, error ); } - else if( node_type == 0xff ) + else if( node_type == LIBFSHFS_BTREE_NODE_TYPE_LEAF_NODE ) { result = libfshfs_catalog_btree_file_get_directory_entry_from_leaf_node_by_utf16_name( btree_file, + io_handle, sub_node, parent_identifier, + name_hash, utf16_string, utf16_string_length, use_case_folding, @@ -2992,6 +3361,8 @@ } } last_node_key = node_key; + + last_record_index++; } return( result ); @@ -3010,8 +3381,11 @@ */ int libfshfs_catalog_btree_file_get_directory_entry_by_utf16_name( libfshfs_btree_file_t *btree_file, + libfshfs_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, + libfshfs_btree_node_cache_t *node_cache, uint32_t parent_identifier, + uint32_t name_hash, const uint16_t *utf16_string, size_t utf16_string_length, uint8_t use_case_folding, @@ -3026,8 +3400,8 @@ if( libfshfs_btree_file_get_root_node( btree_file, file_io_handle, + node_cache, &root_node, - 0, error ) == -1 ) { libcerror_error_set( @@ -3053,13 +3427,16 @@ return( -1 ); } - if( node_type == 0x00 ) + if( node_type == LIBFSHFS_BTREE_NODE_TYPE_INDEX_NODE ) { result = libfshfs_catalog_btree_file_get_directory_entry_from_branch_node_by_utf16_name( btree_file, + io_handle, file_io_handle, + node_cache, root_node, parent_identifier, + name_hash, utf16_string, utf16_string_length, use_case_folding, @@ -3067,12 +3444,14 @@ 1, error ); } - else if( node_type == 0xff ) + else if( node_type == LIBFSHFS_BTREE_NODE_TYPE_LEAF_NODE ) { result = libfshfs_catalog_btree_file_get_directory_entry_from_leaf_node_by_utf16_name( btree_file, + io_handle, root_node, parent_identifier, + name_hash, utf16_string, utf16_string_length, use_case_folding, @@ -3098,7 +3477,9 @@ */ int libfshfs_catalog_btree_file_get_directory_entry_by_utf16_path( libfshfs_btree_file_t *btree_file, + libfshfs_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, + libfshfs_btree_node_cache_t *node_cache, const uint16_t *utf16_string, size_t utf16_string_length, uint8_t use_case_folding, @@ -3113,6 +3494,7 @@ size_t utf16_string_index = 0; size_t utf16_string_segment_length = 0; uint32_t lookup_identifier = 0; + uint32_t segment_name_hash = 0; uint8_t node_type = 0; int result = 0; @@ -3163,8 +3545,8 @@ if( libfshfs_btree_file_get_root_node( btree_file, file_io_handle, + node_cache, &root_node, - 0, error ) == -1 ) { libcerror_error_set( @@ -3204,11 +3586,13 @@ if( ( utf16_string_length == 0 ) || ( utf16_string_length == 1 ) ) { -/* TODO optimize this */ result = libfshfs_catalog_btree_file_get_directory_entry_by_identifier( btree_file, + io_handle, file_io_handle, + node_cache, LIBFSHFS_ROOT_DIRECTORY_IDENTIFIER, + use_case_folding, &safe_directory_entry, error ); @@ -3279,13 +3663,32 @@ goto on_error; } } - if( node_type == 0x00 ) + if( libfshfs_name_calculate_hash_utf16_string( + utf16_string_segment, + utf16_string_segment_length, + use_case_folding, + &segment_name_hash, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GENERIC, + "%s: unable to calculate name hash.", + function ); + + goto on_error; + } + if( node_type == LIBFSHFS_BTREE_NODE_TYPE_INDEX_NODE ) { result = libfshfs_catalog_btree_file_get_directory_entry_from_branch_node_by_utf16_name( btree_file, + io_handle, file_io_handle, + node_cache, root_node, lookup_identifier, + segment_name_hash, utf16_string_segment, utf16_string_segment_length, use_case_folding, @@ -3293,12 +3696,14 @@ 1, error ); } - else if( node_type == 0xff ) + else if( node_type == LIBFSHFS_BTREE_NODE_TYPE_LEAF_NODE ) { result = libfshfs_catalog_btree_file_get_directory_entry_from_leaf_node_by_utf16_name( btree_file, + io_handle, root_node, lookup_identifier, + segment_name_hash, utf16_string_segment, utf16_string_segment_length, use_case_folding, @@ -3357,6 +3762,7 @@ */ int libfshfs_catalog_btree_file_get_directory_entries_from_leaf_node( libfshfs_btree_file_t *btree_file, + libfshfs_io_handle_t *io_handle, libfshfs_btree_node_t *node, uint32_t parent_identifier, libcdata_array_t *directory_entries, @@ -3435,7 +3841,9 @@ { if( libfshfs_catalog_btree_file_get_key_from_node_by_index( node, + io_handle, record_index, + 1, &node_key, error ) == -1 ) { @@ -3526,7 +3934,9 @@ */ int libfshfs_catalog_btree_file_get_directory_entries_from_branch_node( libfshfs_btree_file_t *btree_file, + libfshfs_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, + libfshfs_btree_node_cache_t *node_cache, libfshfs_btree_node_t *node, uint32_t parent_identifier, libcdata_array_t *directory_entries, @@ -3538,6 +3948,7 @@ libfshfs_catalog_btree_key_t *node_key = NULL; static char *function = "libfshfs_catalog_btree_file_get_directory_entries_from_branch_node"; uint32_t sub_node_number = 0; + uint16_t last_record_index = 0; uint16_t record_index = 0; uint8_t node_type = 0; int is_branch_node = 0; @@ -3616,6 +4027,8 @@ } if( libfshfs_catalog_btree_file_get_key_from_node_by_index( node, + io_handle, + 0, 0, &last_node_key, error ) == -1 ) @@ -3639,7 +4052,9 @@ { if( libfshfs_catalog_btree_file_get_key_from_node_by_index( node, + io_handle, record_index, + 0, &node_key, error ) == -1 ) { @@ -3653,18 +4068,18 @@ goto on_error; } - } - if( node_key == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, - "%s: missing catalog B-tree key: %" PRIu16 ".", - function, - record_index ); + if( node_key == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, + "%s: missing catalog B-tree key: %" PRIu16 ".", + function, + record_index ); - goto on_error; + goto on_error; + } } if( ( record_index == node->descriptor->number_of_records ) || ( node_key->parent_identifier >= parent_identifier ) ) @@ -3687,8 +4102,9 @@ if( libcnotify_verbose != 0 ) { libcnotify_printf( - "%s: B-tree sub node number\t: %" PRIu32 "\n", + "%s: B-tree record: %d sub node number: %" PRIu32 "\n", function, + last_record_index, sub_node_number ); libcnotify_printf( @@ -3698,9 +4114,10 @@ if( libfshfs_btree_file_get_node_by_number( btree_file, file_io_handle, + node_cache, + recursion_depth, sub_node_number, &sub_node, - recursion_depth, error ) == -1 ) { libcerror_error_set( @@ -3728,21 +4145,24 @@ goto on_error; } - if( node_type == 0x00 ) + if( node_type == LIBFSHFS_BTREE_NODE_TYPE_INDEX_NODE ) { result = libfshfs_catalog_btree_file_get_directory_entries_from_branch_node( btree_file, + io_handle, file_io_handle, + node_cache, sub_node, parent_identifier, directory_entries, recursion_depth + 1, error ); } - else if( node_type == 0xff ) + else if( node_type == LIBFSHFS_BTREE_NODE_TYPE_LEAF_NODE ) { result = libfshfs_catalog_btree_file_get_directory_entries_from_leaf_node( btree_file, + io_handle, sub_node, parent_identifier, directory_entries, @@ -3766,6 +4186,8 @@ } } last_node_key = node_key; + + last_record_index++; } return( 1 ); @@ -3783,7 +4205,9 @@ */ int libfshfs_catalog_btree_file_get_directory_entries( libfshfs_btree_file_t *btree_file, + libfshfs_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, + libfshfs_btree_node_cache_t *node_cache, uint32_t parent_identifier, libcdata_array_t *directory_entries, libcerror_error_t **error ) @@ -3796,8 +4220,8 @@ if( libfshfs_btree_file_get_root_node( btree_file, file_io_handle, + node_cache, &root_node, - 0, error ) == -1 ) { libcerror_error_set( @@ -3823,21 +4247,24 @@ goto on_error; } - if( node_type == 0x00 ) + if( node_type == LIBFSHFS_BTREE_NODE_TYPE_INDEX_NODE ) { result = libfshfs_catalog_btree_file_get_directory_entries_from_branch_node( btree_file, + io_handle, file_io_handle, + node_cache, root_node, parent_identifier, directory_entries, 1, error ); } - else if( node_type == 0xff ) + else if( node_type == LIBFSHFS_BTREE_NODE_TYPE_LEAF_NODE ) { result = libfshfs_catalog_btree_file_get_directory_entries_from_leaf_node( btree_file, + io_handle, root_node, parent_identifier, directory_entries, diff -Nru libfshfs-20201104/libfshfs/libfshfs_catalog_btree_file.h libfshfs-20240221/libfshfs/libfshfs_catalog_btree_file.h --- libfshfs-20201104/libfshfs/libfshfs_catalog_btree_file.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_catalog_btree_file.h 2024-02-21 05:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * The catalog B-tree file functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -26,8 +26,10 @@ #include #include "libfshfs_btree_file.h" +#include "libfshfs_btree_node_cache.h" #include "libfshfs_catalog_btree_key.h" #include "libfshfs_directory_entry.h" +#include "libfshfs_io_handle.h" #include "libfshfs_libbfio.h" #include "libfshfs_libcdata.h" #include "libfshfs_libcerror.h" @@ -39,7 +41,9 @@ int libfshfs_catalog_btree_file_get_key_from_node_by_index( libfshfs_btree_node_t *node, + libfshfs_io_handle_t *io_handle, uint16_t record_index, + int is_leaf_node, libfshfs_catalog_btree_key_t **node_key, libcerror_error_t **error ); @@ -55,6 +59,7 @@ int libfshfs_catalog_btree_file_get_thread_record_from_leaf_node( libfshfs_btree_file_t *btree_file, + libfshfs_io_handle_t *io_handle, libfshfs_btree_node_t *node, uint32_t identifier, libfshfs_thread_record_t **thread_record, @@ -62,7 +67,9 @@ int libfshfs_catalog_btree_file_get_thread_record_from_branch_node( libfshfs_btree_file_t *btree_file, + libfshfs_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, + libfshfs_btree_node_cache_t *node_cache, libfshfs_btree_node_t *node, uint32_t identifier, libfshfs_thread_record_t **thread_record, @@ -71,7 +78,9 @@ int libfshfs_catalog_btree_file_get_thread_record( libfshfs_btree_file_t *btree_file, + libfshfs_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, + libfshfs_btree_node_cache_t *node_cache, uint32_t identifier, libfshfs_thread_record_t **thread_record, libcerror_error_t **error ); @@ -83,31 +92,41 @@ int libfshfs_catalog_btree_file_get_directory_entry_from_leaf_node_by_thread_record( libfshfs_btree_file_t *btree_file, + libfshfs_io_handle_t *io_handle, libfshfs_btree_node_t *node, libfshfs_thread_record_t *thread_record, + uint8_t use_case_folding, libfshfs_directory_entry_t **directory_entry, libcerror_error_t **error ); int libfshfs_catalog_btree_file_get_directory_entry_from_branch_node_by_thread_record( libfshfs_btree_file_t *btree_file, + libfshfs_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, + libfshfs_btree_node_cache_t *node_cache, libfshfs_btree_node_t *node, libfshfs_thread_record_t *thread_record, + uint8_t use_case_folding, libfshfs_directory_entry_t **directory_entry, int recursion_depth, libcerror_error_t **error ); int libfshfs_catalog_btree_file_get_directory_entry_by_identifier( libfshfs_btree_file_t *btree_file, + libfshfs_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, + libfshfs_btree_node_cache_t *node_cache, uint32_t identifier, + uint8_t use_case_folding, libfshfs_directory_entry_t **directory_entry, libcerror_error_t **error ); int libfshfs_catalog_btree_file_get_directory_entry_from_leaf_node_by_utf8_name( libfshfs_btree_file_t *btree_file, + libfshfs_io_handle_t *io_handle, libfshfs_btree_node_t *node, uint32_t parent_identifier, + uint32_t name_hash, const uint8_t *utf8_string, size_t utf8_string_length, uint8_t use_case_folding, @@ -116,9 +135,12 @@ int libfshfs_catalog_btree_file_get_directory_entry_from_branch_node_by_utf8_name( libfshfs_btree_file_t *btree_file, + libfshfs_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, + libfshfs_btree_node_cache_t *node_cache, libfshfs_btree_node_t *node, uint32_t parent_identifier, + uint32_t name_hash, const uint8_t *utf8_string, size_t utf8_string_length, uint8_t use_case_folding, @@ -128,8 +150,11 @@ int libfshfs_catalog_btree_file_get_directory_entry_by_utf8_name( libfshfs_btree_file_t *btree_file, + libfshfs_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, + libfshfs_btree_node_cache_t *node_cache, uint32_t parent_identifier, + uint32_t name_hash, const uint8_t *utf8_string, size_t utf8_string_length, uint8_t use_case_folding, @@ -138,7 +163,9 @@ int libfshfs_catalog_btree_file_get_directory_entry_by_utf8_path( libfshfs_btree_file_t *btree_file, + libfshfs_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, + libfshfs_btree_node_cache_t *node_cache, const uint8_t *utf8_string, size_t utf8_string_length, uint8_t use_case_folding, @@ -147,8 +174,10 @@ int libfshfs_catalog_btree_file_get_directory_entry_from_leaf_node_by_utf16_name( libfshfs_btree_file_t *btree_file, + libfshfs_io_handle_t *io_handle, libfshfs_btree_node_t *node, uint32_t parent_identifier, + uint32_t name_hash, const uint16_t *utf16_string, size_t utf16_string_length, uint8_t use_case_folding, @@ -157,9 +186,12 @@ int libfshfs_catalog_btree_file_get_directory_entry_from_branch_node_by_utf16_name( libfshfs_btree_file_t *btree_file, + libfshfs_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, + libfshfs_btree_node_cache_t *node_cache, libfshfs_btree_node_t *node, uint32_t parent_identifier, + uint32_t name_hash, const uint16_t *utf16_string, size_t utf16_string_length, uint8_t use_case_folding, @@ -169,8 +201,11 @@ int libfshfs_catalog_btree_file_get_directory_entry_by_utf16_name( libfshfs_btree_file_t *btree_file, + libfshfs_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, + libfshfs_btree_node_cache_t *node_cache, uint32_t parent_identifier, + uint32_t name_hash, const uint16_t *utf16_string, size_t utf16_string_length, uint8_t use_case_folding, @@ -179,7 +214,9 @@ int libfshfs_catalog_btree_file_get_directory_entry_by_utf16_path( libfshfs_btree_file_t *btree_file, + libfshfs_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, + libfshfs_btree_node_cache_t *node_cache, const uint16_t *utf16_string, size_t utf16_string_length, uint8_t use_case_folding, @@ -188,6 +225,7 @@ int libfshfs_catalog_btree_file_get_directory_entries_from_leaf_node( libfshfs_btree_file_t *btree_file, + libfshfs_io_handle_t *io_handle, libfshfs_btree_node_t *node, uint32_t parent_identifier, libcdata_array_t *directory_entries, @@ -195,7 +233,9 @@ int libfshfs_catalog_btree_file_get_directory_entries_from_branch_node( libfshfs_btree_file_t *btree_file, + libfshfs_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, + libfshfs_btree_node_cache_t *node_cache, libfshfs_btree_node_t *node, uint32_t parent_identifier, libcdata_array_t *directory_entries, @@ -204,7 +244,9 @@ int libfshfs_catalog_btree_file_get_directory_entries( libfshfs_btree_file_t *btree_file, + libfshfs_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, + libfshfs_btree_node_cache_t *node_cache, uint32_t parent_identifier, libcdata_array_t *directory_entries, libcerror_error_t **error ); diff -Nru libfshfs-20201104/libfshfs/libfshfs_catalog_btree_key.c libfshfs-20240221/libfshfs/libfshfs_catalog_btree_key.c --- libfshfs-20201104/libfshfs/libfshfs_catalog_btree_key.c 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_catalog_btree_key.c 2024-02-21 05:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * The catalog B-tree key functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -26,6 +26,8 @@ #include "libfshfs_catalog_btree_key.h" #include "libfshfs_debug.h" +#include "libfshfs_definitions.h" +#include "libfshfs_io_handle.h" #include "libfshfs_libcerror.h" #include "libfshfs_libcnotify.h" #include "libfshfs_libuna.h" @@ -143,11 +145,13 @@ */ int libfshfs_catalog_btree_key_read_data( libfshfs_catalog_btree_key_t *catalog_btree_key, + libfshfs_io_handle_t *io_handle, const uint8_t *data, size_t data_size, libcerror_error_t **error ) { static char *function = "libfshfs_catalog_btree_key_read_data"; + size_t data_offset = 0; uint16_t additional_size = 0; uint16_t key_data_size = 0; @@ -162,6 +166,17 @@ return( -1 ); } + if( io_handle == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid IO handle.", + function ); + + return( -1 ); + } if( data == NULL ) { libcerror_error_set( @@ -185,21 +200,24 @@ return( -1 ); } + if( io_handle->file_system_type == LIBFSHFS_FILE_SYSTEM_TYPE_HFS ) + { + additional_size = 1; + + key_data_size = (int8_t) ( (fshfs_catalog_index_key_hfs_t *) data )->data_size; + + data_offset = 1; + } + else { additional_size = 2; byte_stream_copy_to_uint16_big_endian( ( (fshfs_catalog_index_key_hfsplus_t *) data )->data_size, key_data_size ); - } -/* TODO add legacy HFS name size support - else - { - additional_size = 1; - key_data_size = (int8_t) ( (fshfs_catalog_index_key_hfs_t *) data )->data_size; + data_offset = 2; } -*/ if( (size_t) key_data_size > ( data_size - additional_size ) ) { libcerror_error_set( @@ -232,11 +250,8 @@ key_data_size ); } #endif - /* The key data size can be 0 if the node is no longer used - */ - catalog_btree_key->data_size = key_data_size + additional_size; - - if( additional_size == 1 ) + if( ( additional_size == 1 ) + && ( key_data_size >= 2 ) ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) @@ -247,9 +262,9 @@ ( (fshfs_catalog_index_key_hfs_t *) data )->unknown1 ); } #endif - key_data_size -= 1; + data_offset += 1; } - if( key_data_size >= 4 ) + if( key_data_size >= 6 ) { byte_stream_copy_to_uint32_big_endian( ( (fshfs_catalog_index_key_hfsplus_t *) data )->parent_identifier, @@ -264,16 +279,36 @@ catalog_btree_key->parent_identifier ); } #endif + data_offset += 4; } -/* TODO add legacy HFS name size support */ + if( ( additional_size == 1 ) + && ( key_data_size >= 7 ) ) + { + catalog_btree_key->name_size = ( (fshfs_catalog_index_key_hfs_t *) data )->name_size; + +/* TODO add support for Mac OS codepages */ + catalog_btree_key->codepage = LIBUNA_CODEPAGE_ASCII; - if( ( additional_size == 2 ) - && ( key_data_size >= 6 ) ) +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: name number of characters\t\t: %" PRIu8 "\n", + function, + catalog_btree_key->name_size ); + } +#endif + data_offset += 1; + } + else if( ( additional_size == 2 ) + && ( key_data_size >= 8 ) ) { byte_stream_copy_to_uint16_big_endian( ( (fshfs_catalog_index_key_hfsplus_t *) data )->name_size, catalog_btree_key->name_size ); + catalog_btree_key->codepage = LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN; + #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { @@ -297,7 +332,11 @@ } catalog_btree_key->name_size *= 2; - if( (size_t) catalog_btree_key->name_size > ( data_size - 8 ) ) + data_offset += 2; + } + if( catalog_btree_key->name_size > 0 ) + { + if( (size_t) catalog_btree_key->name_size > ( data_size - data_offset ) ) { libcerror_error_set( error, @@ -308,19 +347,35 @@ return( -1 ); } - } - if( catalog_btree_key->name_size > 0 ) - { + catalog_btree_key->name_data = &( data[ data_offset ] ); + if( additional_size == 1 ) { - catalog_btree_key->name_data = &( data[ sizeof( fshfs_catalog_index_key_hfs_t ) ] ); +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + if( libfshfs_debug_print_string_value( + function, + "name\t\t\t\t", + catalog_btree_key->name_data, + (size_t) catalog_btree_key->name_size, + catalog_btree_key->codepage, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, + "%s: unable to print ASCII name value.", + function ); -/* TODO print ASCII string */ + return( -1 ); + } + } +#endif /* defined( HAVE_DEBUG_OUTPUT ) */ } else { - catalog_btree_key->name_data = &( data[ sizeof( fshfs_catalog_index_key_hfsplus_t ) ] ); - #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { @@ -342,32 +397,53 @@ return( -1 ); } } -#endif +#endif /* defined( HAVE_DEBUG_OUTPUT ) */ } + data_offset += catalog_btree_key->name_size; } + /* The key data size can be 0 if the node is no longer used + */ + catalog_btree_key->data_size = additional_size + key_data_size; + #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { - libcnotify_printf( - "\n" ); + /* The HFS catalog index key of an index node can contain trailing data + * that is included in the key data size. + */ + if( data_offset < catalog_btree_key->data_size ) + { + libcnotify_printf( + "%s: trailing data:\n", + function ); + libcnotify_print_data( + &( data[ data_offset ] ), + (size_t) catalog_btree_key->data_size - data_offset, + 0 ); + } + else + { + libcnotify_printf( + "\n" ); + } } -#endif - catalog_btree_key->record_data = &( data[ catalog_btree_key->data_size ] ); - catalog_btree_key->record_data_size = data_size - catalog_btree_key->data_size; +#endif /* defined( HAVE_DEBUG_OUTPUT ) */ return( 1 ); } /* Compares a name with the catalog B-tree key name - * Returns 1 if equal, 0 if not or -1 on error + * Returns LIBUNA_COMPARE_LESS, LIBUNA_COMPARE_EQUAL, LIBUNA_COMPARE_GREATER if successful or -1 on error */ int libfshfs_catalog_btree_key_compare_name( libfshfs_catalog_btree_key_t *catalog_btree_key, const uint8_t *name, size_t name_size, + uint8_t use_case_folding, libcerror_error_t **error ) { static char *function = "libfshfs_catalog_btree_key_compare_name"; + int result = 0; if( catalog_btree_key == NULL ) { @@ -380,26 +456,27 @@ return( -1 ); } - if( name == NULL ) + result = libfshfs_name_compare( + catalog_btree_key->name_data, + catalog_btree_key->name_size, + name, + name_size, + catalog_btree_key->codepage, + use_case_folding, + error ); + + if( result == -1 ) { libcerror_error_set( error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid name.", + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GENERIC, + "%s: unable to compare name.", function ); return( -1 ); } - if( ( name_size == catalog_btree_key->name_size ) - && ( memory_compare( - catalog_btree_key->name_data, - name, - name_size ) == 0 ) ) - { - return( 1 ); - } - return( 0 ); + return( result ); } /* Compares an UTF-8 string with the catalog B-tree key name @@ -429,6 +506,7 @@ result = libfshfs_name_compare_with_utf8_string( catalog_btree_key->name_data, catalog_btree_key->name_size, + catalog_btree_key->codepage, utf8_string, utf8_string_length, use_case_folding, @@ -475,6 +553,7 @@ result = libfshfs_name_compare_with_utf16_string( catalog_btree_key->name_data, catalog_btree_key->name_size, + catalog_btree_key->codepage, utf16_string, utf16_string_length, use_case_folding, diff -Nru libfshfs-20201104/libfshfs/libfshfs_catalog_btree_key.h libfshfs-20240221/libfshfs/libfshfs_catalog_btree_key.h --- libfshfs-20201104/libfshfs/libfshfs_catalog_btree_key.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_catalog_btree_key.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The catalog B-tree key functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -25,6 +25,7 @@ #include #include +#include "libfshfs_io_handle.h" #include "libfshfs_libcerror.h" #if defined( __cplusplus ) @@ -51,6 +52,14 @@ */ uint16_t name_size; + /* Name hash + */ + uint32_t name_hash; + + /* Codepage of the name + */ + int codepage; + /* Record data */ const uint8_t *record_data; @@ -70,6 +79,7 @@ int libfshfs_catalog_btree_key_read_data( libfshfs_catalog_btree_key_t *catalog_btree_key, + libfshfs_io_handle_t *io_handle, const uint8_t *data, size_t data_size, libcerror_error_t **error ); @@ -78,6 +88,7 @@ libfshfs_catalog_btree_key_t *catalog_btree_key, const uint8_t *name, size_t name_size, + uint8_t use_case_folding, libcerror_error_t **error ); int libfshfs_catalog_btree_key_compare_name_with_utf8_string( diff -Nru libfshfs-20201104/libfshfs/libfshfs_compressed_data_handle.c libfshfs-20240221/libfshfs/libfshfs_compressed_data_handle.c --- libfshfs-20201104/libfshfs/libfshfs_compressed_data_handle.c 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_compressed_data_handle.c 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The compressed data handle functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfshfs/libfshfs_compressed_data_handle.h libfshfs-20240221/libfshfs/libfshfs_compressed_data_handle.h --- libfshfs-20201104/libfshfs/libfshfs_compressed_data_handle.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_compressed_data_handle.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The compressed data handle functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfshfs/libfshfs_compressed_data_header.c libfshfs-20240221/libfshfs/libfshfs_compressed_data_header.c --- libfshfs-20201104/libfshfs/libfshfs_compressed_data_header.c 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_compressed_data_header.c 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The compressed data header functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfshfs/libfshfs_compressed_data_header.h libfshfs-20240221/libfshfs/libfshfs_compressed_data_header.h --- libfshfs-20201104/libfshfs/libfshfs_compressed_data_header.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_compressed_data_header.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The compressed data header functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfshfs/libfshfs_compression.c libfshfs-20240221/libfshfs/libfshfs_compression.c --- libfshfs-20201104/libfshfs/libfshfs_compression.c 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_compression.c 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Compression functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -36,7 +36,7 @@ #include "libfshfs_deflate.h" #include "libfshfs_libcerror.h" #include "libfshfs_libcnotify.h" -#include "libfshfs_lzvn.h" +#include "libfshfs_libfmos.h" /* Decompresses data using the compression method * Returns 1 on success, 0 on failure or -1 on error @@ -274,6 +274,30 @@ #endif /* ( defined( HAVE_ZLIB ) && defined( HAVE_ZLIB_UNCOMPRESS ) ) || defined( ZLIB_DLL ) */ } } +#ifdef TODO +/* TODO need sample data */ + else if( compression_method == LIBFSHFS_COMPRESSION_METHOD_LZFSE ) + { + result = libfmos_lzfse_decompress( + compressed_data, + compressed_data_size, + uncompressed_data, + uncompressed_data_size, + error ); + + if( result != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ENCRYPTION, + LIBCERROR_ENCRYPTION_ERROR_GENERIC, + "%s: unable to decompress LZFSE compressed data.", + function ); + + return( -1 ); + } + } +#endif /* TODO */ else if( compression_method == LIBFSHFS_COMPRESSION_METHOD_LZVN ) { if( ( compressed_data_size >= 1 ) @@ -332,7 +356,7 @@ } else { - result = libfshfs_lzvn_decompress( + result = libfmos_lzvn_decompress( compressed_data, compressed_data_size, uncompressed_data, diff -Nru libfshfs-20201104/libfshfs/libfshfs_compression.h libfshfs-20240221/libfshfs/libfshfs_compression.h --- libfshfs-20201104/libfshfs/libfshfs_compression.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_compression.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Compression functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfshfs/libfshfs_data_stream.c libfshfs-20240221/libfshfs/libfshfs_data_stream.c --- libfshfs-20201104/libfshfs/libfshfs_data_stream.c 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_data_stream.c 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Data stream functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -20,32 +20,39 @@ */ #include +#include #include -#include "libfshfs_block_data_handle.h" -#include "libfshfs_buffer_data_handle.h" -#include "libfshfs_compressed_data_handle.h" -#include "libfshfs_compressed_data_header.h" +#include "libfshfs_allocation_block_stream.h" #include "libfshfs_data_stream.h" +#include "libfshfs_definitions.h" #include "libfshfs_extent.h" +#include "libfshfs_file_system.h" +#include "libfshfs_fork_descriptor.h" #include "libfshfs_io_handle.h" +#include "libfshfs_libbfio.h" #include "libfshfs_libcdata.h" +#include "libfshfs_libcerror.h" +#include "libfshfs_libcthreads.h" #include "libfshfs_libfdata.h" +#include "libfshfs_types.h" -/* Creates a data stream from a buffer of data +/* Creates a data stream * Make sure the value data_stream is referencing, is set to NULL * Returns 1 if successful or -1 on error */ -int libfshfs_data_stream_initialize_from_data( - libfdata_stream_t **data_stream, - const uint8_t *data, - size_t data_size, +int libfshfs_data_stream_initialize( + libfshfs_data_stream_t **data_stream, + libfshfs_io_handle_t *io_handle, + libbfio_handle_t *file_io_handle, + libfshfs_file_system_t *file_system, + uint32_t identifier, + libfshfs_fork_descriptor_t *fork_descriptor, + uint8_t fork_type, libcerror_error_t **error ) { - libfdata_stream_t *safe_data_stream = NULL; - libfshfs_buffer_data_handle_t *data_handle = NULL; - static char *function = "libfshfs_data_stream_initialize_from_data"; - int segment_index = 0; + libfshfs_internal_data_stream_t *internal_data_stream = NULL; + static char *function = "libfshfs_data_stream_initialize"; if( data_stream == NULL ) { @@ -58,31 +65,83 @@ return( -1 ); } - if( libfshfs_buffer_data_handle_initialize( - &data_handle, - data, - data_size, - error ) != 1 ) + if( *data_stream != NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, + "%s: invalid data stream value already set.", + function ); + + return( -1 ); + } + if( ( fork_type != LIBFSHFS_FORK_TYPE_DATA ) + && ( fork_type != LIBFSHFS_FORK_TYPE_RESOURCE ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, + "%s: unsupported fork type.", + function ); + + return( -1 ); + } + internal_data_stream = memory_allocate_structure( + libfshfs_internal_data_stream_t ); + + if( internal_data_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, - "%s: unable to create buffer data handle.", + "%s: unable to create data stream.", function ); goto on_error; } - if( libfdata_stream_initialize( - &safe_data_stream, - (intptr_t *) data_handle, - (int (*)(intptr_t **, libcerror_error_t **)) &libfshfs_buffer_data_handle_free, - NULL, - NULL, - (ssize_t (*)(intptr_t *, intptr_t *, int, int, uint8_t *, size_t, uint32_t, uint8_t, libcerror_error_t **)) &libfshfs_buffer_data_handle_read_segment_data, - NULL, - (off64_t (*)(intptr_t *, intptr_t *, int, int, off64_t, libcerror_error_t **)) &libfshfs_buffer_data_handle_seek_segment_offset, - LIBFDATA_DATA_HANDLE_FLAG_MANAGED, + if( memory_set( + internal_data_stream, + 0, + sizeof( libfshfs_internal_data_stream_t ) ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_SET_FAILED, + "%s: unable to clear data stream.", + function ); + + memory_free( + internal_data_stream ); + + return( -1 ); + } + if( libfshfs_file_system_get_extents( + file_system, + file_io_handle, + identifier, + fork_type, + fork_descriptor, + &( internal_data_stream->extents_array ), + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve extents of data stream.", + function ); + + goto on_error; + } + if( libfshfs_allocation_block_stream_initialize_from_extents( + &( internal_data_stream->allocation_block_stream ), + io_handle, + internal_data_stream->extents_array, + (size64_t) fork_descriptor->size, error ) != 1 ) { libcerror_error_set( @@ -94,63 +153,60 @@ goto on_error; } - data_handle = NULL; - - if( libfdata_stream_append_segment( - safe_data_stream, - &segment_index, - 0, - 0, - (size64_t) data_size, - 0, +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_initialize( + &( internal_data_stream->read_write_lock ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, - "%s: unable to append data stream segment.", + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to initialize read/write lock.", function ); goto on_error; } - *data_stream = safe_data_stream; +#endif + internal_data_stream->io_handle = io_handle; + internal_data_stream->file_io_handle = file_io_handle; + + *data_stream = (libfshfs_data_stream_t *) internal_data_stream; return( 1 ); on_error: - if( safe_data_stream != NULL ) + if( internal_data_stream != NULL ) { - libfdata_stream_free( - &safe_data_stream, - NULL ); - } - if( data_handle != NULL ) - { - libfshfs_buffer_data_handle_free( - &data_handle, - NULL ); + if( internal_data_stream->allocation_block_stream != NULL ) + { + libfdata_stream_free( + &( internal_data_stream->allocation_block_stream ), + NULL ); + } + if( internal_data_stream->extents_array != NULL ) + { + libcdata_array_free( + &( internal_data_stream->extents_array ), + (int (*)(intptr_t **, libcerror_error_t **)) &libfshfs_extent_free, + NULL ); + } + memory_free( + internal_data_stream ); } return( -1 ); } -/* Creates a data stream from a fork descriptor - * Make sure the value data_stream is referencing, is set to NULL +/* Frees a data stream * Returns 1 if successful or -1 on error */ -int libfshfs_data_stream_initialize_from_fork_descriptor( - libfdata_stream_t **data_stream, - libfshfs_io_handle_t *io_handle, - libfshfs_fork_descriptor_t *fork_descriptor, +int libfshfs_data_stream_free( + libfshfs_data_stream_t **data_stream, libcerror_error_t **error ) { - libfdata_stream_t *safe_data_stream = NULL; - static char *function = "libfshfs_data_stream_initialize_from_fork_descriptor"; - size64_t segment_size = 0; - off64_t segment_offset = 0; - int extent_index = 0; - int result = 0; - int segment_index = 0; + libfshfs_internal_data_stream_t *internal_data_stream = NULL; + static char *function = "libfshfs_data_stream_free"; + int result = 1; if( data_stream == NULL ) { @@ -163,168 +219,305 @@ return( -1 ); } - if( io_handle == NULL ) + if( *data_stream != NULL ) + { + internal_data_stream = (libfshfs_internal_data_stream_t *) *data_stream; + *data_stream = NULL; + +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_free( + &( internal_data_stream->read_write_lock ), + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free read/write lock.", + function ); + + result = -1; + } +#endif + /* The file_io_handle reference is freed elsewhere + */ + if( libfdata_stream_free( + &( internal_data_stream->allocation_block_stream ), + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free allocation block stream.", + function ); + + result = -1; + } + if( libcdata_array_free( + &( internal_data_stream->extents_array ), + (int (*)(intptr_t **, libcerror_error_t **)) &libfshfs_extent_free, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free extents array.", + function ); + + result = -1; + } + memory_free( + internal_data_stream ); + } + return( result ); +} + +/* Reads data at the current offset + * Returns the number of bytes read or -1 on error + */ +ssize_t libfshfs_data_stream_read_buffer( + libfshfs_data_stream_t *data_stream, + void *buffer, + size_t buffer_size, + libcerror_error_t **error ) +{ + libfshfs_internal_data_stream_t *internal_data_stream = NULL; + static char *function = "libfshfs_data_stream_read_buffer"; + ssize_t read_count = 0; + + if( data_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid IO handle.", + "%s: invalid data stream.", function ); return( -1 ); } - if( io_handle->block_size == 0 ) + internal_data_stream = (libfshfs_internal_data_stream_t *) data_stream; + +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_grab_for_write( + internal_data_stream->read_write_lock, + error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, - "%s: invalid IO handle - block size value out of bounds.", + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } - if( fork_descriptor == NULL ) +#endif + read_count = libfdata_stream_read_buffer( + internal_data_stream->allocation_block_stream, + (intptr_t *) internal_data_stream->file_io_handle, + buffer, + buffer_size, + 0, + error ); + + if( read_count < 0 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_READ_FAILED, + "%s: unable to read from allocation block stream.", + function ); + + read_count = -1; + } +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_release_for_write( + internal_data_stream->read_write_lock, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to release read/write lock for writing.", + function ); + + return( -1 ); + } +#endif + return( read_count ); +} + +/* Reads data at a specific offset + * Returns the number of bytes read or -1 on error + */ +ssize_t libfshfs_data_stream_read_buffer_at_offset( + libfshfs_data_stream_t *data_stream, + void *buffer, + size_t buffer_size, + off64_t offset, + libcerror_error_t **error ) +{ + libfshfs_internal_data_stream_t *internal_data_stream = NULL; + static char *function = "libfshfs_data_stream_read_buffer_at_offset"; + ssize_t read_count = 0; + + if( data_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid fork descriptor.", + "%s: invalid data stream.", function ); return( -1 ); } - result = libfshfs_fork_descriptor_has_extents_overflow( - fork_descriptor, - error ); + internal_data_stream = (libfshfs_internal_data_stream_t *) data_stream; - if( result == -1 ) +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_grab_for_write( + internal_data_stream->read_write_lock, + error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to determine if fork descriptor has extents overflow.", + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to grab read/write lock for writing.", function ); - goto on_error; + return( -1 ); } - else if( result != 0 ) +#endif + read_count = libfdata_stream_read_buffer_at_offset( + internal_data_stream->allocation_block_stream, + (intptr_t *) internal_data_stream->file_io_handle, + buffer, + buffer_size, + offset, + 0, + error ); + + if( read_count < 0 ) { libcerror_error_set( error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, - "%s: unsupported fork descriptor has extents overflow.", + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_READ_FAILED, + "%s: unable to read from allocation block stream.", function ); - goto on_error; + read_count = -1; } - if( libfdata_stream_initialize( - &safe_data_stream, - NULL, - NULL, - NULL, - NULL, - (ssize_t (*)(intptr_t *, intptr_t *, int, int, uint8_t *, size_t, uint32_t, uint8_t, libcerror_error_t **)) &libfshfs_block_data_handle_read_segment_data, - NULL, - (off64_t (*)(intptr_t *, intptr_t *, int, int, off64_t, libcerror_error_t **)) &libfshfs_block_data_handle_seek_segment_offset, - 0, +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_release_for_write( + internal_data_stream->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, - "%s: unable to create data stream.", + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to release read/write lock for writing.", function ); - goto on_error; + return( -1 ); } - for( extent_index = 0; - extent_index < 8; - extent_index++ ) - { - segment_offset = fork_descriptor->extents[ extent_index ][ 0 ]; - segment_size = fork_descriptor->extents[ extent_index ][ 1 ]; +#endif + return( read_count ); +} - if( ( segment_offset == 0 ) - || ( segment_size == 0 ) ) - { - break; - } - segment_offset *= io_handle->block_size; - segment_size *= io_handle->block_size; +/* Seeks a certain offset + * Returns the offset if seek is successful or -1 on error + */ +off64_t libfshfs_data_stream_seek_offset( + libfshfs_data_stream_t *data_stream, + off64_t offset, + int whence, + libcerror_error_t **error ) +{ + libfshfs_internal_data_stream_t *internal_data_stream = NULL; + static char *function = "libfshfs_data_stream_seek_offset"; - if( libfdata_stream_append_segment( - safe_data_stream, - &segment_index, - 0, - segment_offset, - segment_size, - 0, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, - "%s: unable to append extent: %d data stream segment.", - function, - extent_index ); + if( data_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid data stream.", + function ); - goto on_error; - } + return( -1 ); } - if( libfdata_stream_set_mapped_size( - safe_data_stream, - (size64_t) fork_descriptor->size, + internal_data_stream = (libfshfs_internal_data_stream_t *) data_stream; + +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_grab_for_write( + internal_data_stream->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to set mapped size of data stream.", + "%s: unable to grab read/write lock for writing.", function ); - goto on_error; + return( -1 ); } - *data_stream = safe_data_stream; +#endif + offset = libfdata_stream_seek_offset( + internal_data_stream->allocation_block_stream, + offset, + whence, + error ); - return( 1 ); + if( offset == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_SEEK_FAILED, + "%s: unable to seek offset in allocation block stream.", + function ); -on_error: - if( safe_data_stream != NULL ) + offset = -1; + } +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_release_for_write( + internal_data_stream->read_write_lock, + error ) != 1 ) { - libfdata_stream_free( - &safe_data_stream, - NULL ); + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to release read/write lock for writing.", + function ); + + return( -1 ); } - return( -1 ); +#endif + return( offset ); } -/* Creates a data stream from extents - * Make sure the value data_stream is referencing, is set to NULL - * Returns 1 if successful or -1 on error +/* Retrieves the current offset + * Returns the offset if successful or -1 on error */ -int libfshfs_data_stream_initialize_from_extents( - libfdata_stream_t **data_stream, - libfshfs_io_handle_t *io_handle, - libcdata_array_t *extents, - size64_t data_size, +int libfshfs_data_stream_get_offset( + libfshfs_data_stream_t *data_stream, + off64_t *offset, libcerror_error_t **error ) { - libfdata_stream_t *safe_data_stream = NULL; - libfshfs_extent_t *extent = NULL; - static char *function = "libfshfs_data_stream_initialize_from_extents"; - size64_t segment_size = 0; - off64_t segment_offset = 0; - int extent_index = 0; - int number_of_extents = 0; - int segment_index = 0; + libfshfs_internal_data_stream_t *internal_data_stream = NULL; + static char *function = "libfshfs_data_stream_get_offset"; + int result = 1; if( data_stream == NULL ) { @@ -337,185 +530,214 @@ return( -1 ); } - if( io_handle == NULL ) + internal_data_stream = (libfshfs_internal_data_stream_t *) data_stream; + +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_grab_for_read( + internal_data_stream->read_write_lock, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to grab read/write lock for reading.", + function ); + + return( -1 ); + } +#endif + if( libfdata_stream_get_offset( + internal_data_stream->allocation_block_stream, + offset, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve offset from allocation block stream.", + function ); + + result = -1; + } +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_release_for_read( + internal_data_stream->read_write_lock, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to release read/write lock for reading.", + function ); + + return( -1 ); + } +#endif + return( result ); +} + +/* Retrieves the size + * Returns 1 if successful or -1 on error + */ +int libfshfs_data_stream_get_size( + libfshfs_data_stream_t *data_stream, + size64_t *size, + libcerror_error_t **error ) +{ + libfshfs_internal_data_stream_t *internal_data_stream = NULL; + static char *function = "libfshfs_data_stream_get_size"; + int result = 1; + + if( data_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid IO handle.", + "%s: invalid data stream.", function ); return( -1 ); } - if( io_handle->block_size == 0 ) + internal_data_stream = (libfshfs_internal_data_stream_t *) data_stream; + +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_grab_for_read( + internal_data_stream->read_write_lock, + error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, - "%s: invalid IO handle - block size value out of bounds.", + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } - if( libcdata_array_get_number_of_entries( - extents, - &number_of_extents, +#endif + if( libfdata_stream_get_size( + internal_data_stream->allocation_block_stream, + size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve number of extents.", + "%s: unable to retrieve size from allocation block stream.", function ); - goto on_error; + result = -1; } - if( libfdata_stream_initialize( - &safe_data_stream, - NULL, - NULL, - NULL, - NULL, - (ssize_t (*)(intptr_t *, intptr_t *, int, int, uint8_t *, size_t, uint32_t, uint8_t, libcerror_error_t **)) &libfshfs_block_data_handle_read_segment_data, - NULL, - (off64_t (*)(intptr_t *, intptr_t *, int, int, off64_t, libcerror_error_t **)) &libfshfs_block_data_handle_seek_segment_offset, - 0, +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_release_for_read( + internal_data_stream->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, - "%s: unable to create data stream.", + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to release read/write lock for reading.", function ); - goto on_error; + return( -1 ); } - for( extent_index = 0; - extent_index < number_of_extents; - extent_index++ ) - { - if( libcdata_array_get_entry_by_index( - extents, - extent_index, - (intptr_t **) &extent, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve extent: %d.", - function, - extent_index ); - - goto on_error; - } - if( extent == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, - "%s: missing extent: %d.", - function, - extent_index ); - - goto on_error; - } - if( extent->block_number == 0 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, - "%s: invalid extent: %d - missing block number.", - function, - extent_index ); - - goto on_error; - } - if( extent->number_of_blocks == 0 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, - "%s: invalid extent: %d - missing number of blocks.", - function, - extent_index ); +#endif + return( result ); +} - goto on_error; - } - segment_offset = (off64_t) extent->block_number * io_handle->block_size; - segment_size = (size64_t) extent->number_of_blocks * io_handle->block_size; +/* Retrieves the number of extents (decoded data runs) + * Returns 1 if successful or -1 on error + */ +int libfshfs_data_stream_get_number_of_extents( + libfshfs_data_stream_t *data_stream, + int *number_of_extents, + libcerror_error_t **error ) +{ + libfshfs_internal_data_stream_t *internal_data_stream = NULL; + static char *function = "libfshfs_data_stream_get_number_of_extents"; + int result = 1; - if( libfdata_stream_append_segment( - safe_data_stream, - &segment_index, - 0, - segment_offset, - segment_size, - 0, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, - "%s: unable to append extent: %d data stream segment.", - function, - extent_index ); + if( data_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid data stream.", + function ); - goto on_error; - } + return( -1 ); } - if( libfdata_stream_set_mapped_size( - safe_data_stream, - data_size, + internal_data_stream = (libfshfs_internal_data_stream_t *) data_stream; + +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_grab_for_read( + internal_data_stream->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to set mapped size of data stream.", + "%s: unable to grab read/write lock for reading.", function ); - goto on_error; + return( -1 ); } - *data_stream = safe_data_stream; - - return( 1 ); +#endif + if( libcdata_array_get_number_of_entries( + internal_data_stream->extents_array, + number_of_extents, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve number of extents.", + function ); -on_error: - if( safe_data_stream != NULL ) + result = -1; + } +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_release_for_read( + internal_data_stream->read_write_lock, + error ) != 1 ) { - libfdata_stream_free( - &safe_data_stream, - NULL ); + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to release read/write lock for reading.", + function ); + + return( -1 ); } - return( -1 ); +#endif + return( result ); } -/* Creates a data stream from a compressed data stream - * Make sure the value data_stream is referencing, is set to NULL +/* Retrieves a specific extent (decoded data run) * Returns 1 if successful or -1 on error */ -int libfshfs_data_stream_initialize_from_compressed_data_stream( - libfdata_stream_t **data_stream, - libfdata_stream_t *compressed_data_stream, - size64_t uncompressed_data_size, - int compression_method, +int libfshfs_data_stream_get_extent_by_index( + libfshfs_data_stream_t *data_stream, + int extent_index, + off64_t *extent_offset, + size64_t *extent_size, + uint32_t *extent_flags, libcerror_error_t **error ) { - libfdata_stream_t *safe_data_stream = NULL; - libfshfs_compressed_data_handle_t *data_handle = NULL; - static char *function = "libfshfs_data_stream_initialize_from_compressed_data_stream"; - int segment_index = 0; + libfshfs_extent_t *data_extent = NULL; + libfshfs_internal_data_stream_t *internal_data_stream = NULL; + static char *function = "libfshfs_data_stream_get_extent_by_index"; + int result = 1; if( data_stream == NULL ) { @@ -528,80 +750,75 @@ return( -1 ); } - if( libfshfs_compressed_data_handle_initialize( - &data_handle, - compressed_data_stream, - uncompressed_data_size, - compression_method, + internal_data_stream = (libfshfs_internal_data_stream_t *) data_stream; + +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_grab_for_read( + internal_data_stream->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, - "%s: unable to create compressed data handle.", + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to grab read/write lock for reading.", function ); - goto on_error; + return( -1 ); } - if( libfdata_stream_initialize( - &safe_data_stream, - (intptr_t *) data_handle, - (int (*)(intptr_t **, libcerror_error_t **)) &libfshfs_compressed_data_handle_free, - NULL, - NULL, - (ssize_t (*)(intptr_t *, intptr_t *, int, int, uint8_t *, size_t, uint32_t, uint8_t, libcerror_error_t **)) &libfshfs_compressed_data_handle_read_segment_data, - NULL, - (off64_t (*)(intptr_t *, intptr_t *, int, int, off64_t, libcerror_error_t **)) &libfshfs_compressed_data_handle_seek_segment_offset, - LIBFDATA_DATA_HANDLE_FLAG_MANAGED, +#endif + if( libcdata_array_get_entry_by_index( + internal_data_stream->extents_array, + extent_index, + (intptr_t **) &data_extent, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, - "%s: unable to create data stream.", - function ); + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve extent: %d.", + function, + extent_index ); + + result = -1; + } + if( result == 1 ) + { + if( libfshfs_extent_get_values( + data_extent, + internal_data_stream->io_handle, + extent_offset, + extent_size, + extent_flags, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve extent: %d values.", + function, + extent_index ); - goto on_error; + result = -1; + } } - data_handle = NULL; - - if( libfdata_stream_append_segment( - safe_data_stream, - &segment_index, - 0, - 0, - uncompressed_data_size, - LIBFDATA_RANGE_FLAG_IS_COMPRESSED, +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_release_for_read( + internal_data_stream->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, - "%s: unable to append data as data stream segment.", + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to release read/write lock for reading.", function ); - goto on_error; - } - *data_stream = safe_data_stream; - - return( 1 ); - -on_error: - if( safe_data_stream != NULL ) - { - libfdata_stream_free( - &safe_data_stream, - NULL ); - } - if( data_handle != NULL ) - { - libfshfs_compressed_data_handle_free( - &data_handle, - NULL ); + return( -1 ); } - return( -1 ); +#endif + return( result ); } diff -Nru libfshfs-20201104/libfshfs/libfshfs_data_stream.h libfshfs-20240221/libfshfs/libfshfs_data_stream.h --- libfshfs-20201104/libfshfs/libfshfs_data_stream.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_data_stream.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Data stream functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -25,40 +25,110 @@ #include #include +#include "libfshfs_extern.h" +#include "libfshfs_file_system.h" #include "libfshfs_fork_descriptor.h" #include "libfshfs_io_handle.h" +#include "libfshfs_libbfio.h" #include "libfshfs_libcdata.h" #include "libfshfs_libcerror.h" +#include "libfshfs_libcthreads.h" #include "libfshfs_libfdata.h" +#include "libfshfs_types.h" #if defined( __cplusplus ) extern "C" { #endif -int libfshfs_data_stream_initialize_from_data( - libfdata_stream_t **data_stream, - const uint8_t *data, - size_t data_size, - libcerror_error_t **error ); +typedef struct libfshfs_internal_data_stream libfshfs_internal_data_stream_t; + +struct libfshfs_internal_data_stream +{ + /* The IO handle + */ + libfshfs_io_handle_t *io_handle; + + /* The file IO handle + */ + libbfio_handle_t *file_io_handle; + + /* The data extents array + */ + libcdata_array_t *extents_array; + + /* The allocation block stream + */ + libfdata_stream_t *allocation_block_stream; + +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + /* The read/write lock + */ + libcthreads_read_write_lock_t *read_write_lock; +#endif +}; -int libfshfs_data_stream_initialize_from_fork_descriptor( - libfdata_stream_t **data_stream, +int libfshfs_data_stream_initialize( + libfshfs_data_stream_t **data_stream, libfshfs_io_handle_t *io_handle, + libbfio_handle_t *file_io_handle, + libfshfs_file_system_t *file_system, + uint32_t identifier, libfshfs_fork_descriptor_t *fork_descriptor, + uint8_t fork_type, libcerror_error_t **error ); -int libfshfs_data_stream_initialize_from_extents( - libfdata_stream_t **data_stream, - libfshfs_io_handle_t *io_handle, - libcdata_array_t *extents, - size64_t data_size, +LIBFSHFS_EXTERN \ +int libfshfs_data_stream_free( + libfshfs_data_stream_t **data_stream, + libcerror_error_t **error ); + +LIBFSHFS_EXTERN \ +ssize_t libfshfs_data_stream_read_buffer( + libfshfs_data_stream_t *data_stream, + void *buffer, + size_t buffer_size, + libcerror_error_t **error ); + +LIBFSHFS_EXTERN \ +ssize_t libfshfs_data_stream_read_buffer_at_offset( + libfshfs_data_stream_t *data_stream, + void *buffer, + size_t buffer_size, + off64_t offset, + libcerror_error_t **error ); + +LIBFSHFS_EXTERN \ +off64_t libfshfs_data_stream_seek_offset( + libfshfs_data_stream_t *data_stream, + off64_t offset, + int whence, + libcerror_error_t **error ); + +LIBFSHFS_EXTERN \ +int libfshfs_data_stream_get_offset( + libfshfs_data_stream_t *data_stream, + off64_t *offset, + libcerror_error_t **error ); + +LIBFSHFS_EXTERN \ +int libfshfs_data_stream_get_size( + libfshfs_data_stream_t *data_stream, + size64_t *size, + libcerror_error_t **error ); + +LIBFSHFS_EXTERN \ +int libfshfs_data_stream_get_number_of_extents( + libfshfs_data_stream_t *data_stream, + int *number_of_extents, libcerror_error_t **error ); -int libfshfs_data_stream_initialize_from_compressed_data_stream( - libfdata_stream_t **data_stream, - libfdata_stream_t *compressed_data_stream, - size64_t uncompressed_data_size, - int compression_method, +LIBFSHFS_EXTERN \ +int libfshfs_data_stream_get_extent_by_index( + libfshfs_data_stream_t *data_stream, + int extent_index, + off64_t *extent_offset, + size64_t *extent_size, + uint32_t *extent_flags, libcerror_error_t **error ); #if defined( __cplusplus ) diff -Nru libfshfs-20201104/libfshfs/libfshfs_debug.c libfshfs-20240221/libfshfs/libfshfs_debug.c --- libfshfs-20201104/libfshfs/libfshfs_debug.c 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_debug.c 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Debug functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -86,7 +86,7 @@ if( ( catalog_file_record_flags & 0x0010UL ) != 0 ) { libcnotify_printf( - "\tHas sub-folder count (kHFSHasFolderCountMask)\n" ); + "\tHas number of sub-folders (kHFSHasFolderCountMask)\n" ); } if( ( catalog_file_record_flags & 0x0020UL ) != 0 ) { @@ -101,7 +101,7 @@ if( ( catalog_file_record_flags & 0x0080UL ) != 0 ) { libcnotify_printf( - "\t(kHFSHasDateAddedMask)\n" ); + "\tHas added date and time (kHFSHasDateAddedMask)\n" ); } if( ( catalog_file_record_flags & 0x0100UL ) != 0 ) { @@ -130,45 +130,49 @@ void libfshfs_debug_print_volume_attribute_flags( uint32_t volume_attribute_flags ) { - if( ( volume_attribute_flags & 0x00000040UL ) != 0 ) + if( ( volume_attribute_flags & 0x00000080UL ) != 0 ) { libcnotify_printf( "\tVolume hardware lock (kHFSVolumeHardwareLockBit)\n" ); } - if( ( volume_attribute_flags & 0x00000080UL ) != 0 ) + if( ( volume_attribute_flags & 0x00000100UL ) != 0 ) { libcnotify_printf( "\tVolume unmounted (kHFSVolumeUnmountedBit)\n" ); } - if( ( volume_attribute_flags & 0x00000100UL ) != 0 ) + if( ( volume_attribute_flags & 0x00000200UL ) != 0 ) { libcnotify_printf( "\tVolume spared blocks (kHFSVolumeSparedBlocksBit)\n" ); } - if( ( volume_attribute_flags & 0x00000200UL ) != 0 ) + if( ( volume_attribute_flags & 0x00000400UL ) != 0 ) { libcnotify_printf( "\tVolume no cache required (kHFSVolumeNoCacheRequiredBit)\n" ); } - if( ( volume_attribute_flags & 0x00000400UL ) != 0 ) + if( ( volume_attribute_flags & 0x00000800UL ) != 0 ) { libcnotify_printf( "\tBoot volume inconsistent (kHFSBootVolumeInconsistentBit)\n" ); } - if( ( volume_attribute_flags & 0x00000800UL ) != 0 ) + if( ( volume_attribute_flags & 0x00001000UL ) != 0 ) { libcnotify_printf( "\tCatalog node identifiers reused (kHFSCatalogNodeIDsReusedBit)\n" ); } - if( ( volume_attribute_flags & 0x00001000UL ) != 0 ) + if( ( volume_attribute_flags & 0x00002000UL ) != 0 ) { libcnotify_printf( "\tVolume journaled (kHFSVolumeJournaledBit)\n" ); } - if( ( volume_attribute_flags & 0x00004000UL ) != 0 ) { libcnotify_printf( + "\t(kHFSVolumeInconsistentBit)\n" ); + } + if( ( volume_attribute_flags & 0x00008000UL ) != 0 ) + { + libcnotify_printf( "\tVolume software lock (kHFSVolumeSoftwareLockBit)\n" ); } @@ -396,6 +400,7 @@ size_t byte_stream_size, int byte_order, uint32_t string_format_flags, + int8_t is_local_time, libcerror_error_t **error ) { char date_time_string[ 32 ]; @@ -448,13 +453,22 @@ goto on_error; } -/* TODO handle local time */ - libcnotify_printf( - "%s: %s: %s UTC\n", - function_name, - value_name, - date_time_string ); - + if( is_local_time == 0 ) + { + libcnotify_printf( + "%s: %s: %s UTC\n", + function_name, + value_name, + date_time_string ); + } + else + { + libcnotify_printf( + "%s: %s: %s (local time)\n", + function_name, + value_name, + date_time_string ); + } if( libfdatetime_hfs_time_free( &hfs_time, error ) != 1 ) @@ -575,19 +589,19 @@ return( -1 ); } -/* Prints an UTF-16 string value +/* Prints a string value * Returns 1 if successful or -1 on error */ -int libfshfs_debug_print_utf16_string_value( +int libfshfs_debug_print_string_value( const char *function_name, const char *value_name, const uint8_t *byte_stream, size_t byte_stream_size, - int byte_order, + int ascii_codepage, libcerror_error_t **error ) { system_character_t *string = NULL; - static char *function = "libfshfs_debug_print_utf16_string_value"; + static char *function = "libfshfs_debug_print_string_value"; size_t string_size = 0; int result = 0; @@ -602,17 +616,17 @@ return( 1 ); } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) - result = libuna_utf16_string_size_from_utf16_stream( + result = libuna_utf16_string_size_from_byte_stream( byte_stream, byte_stream_size, - byte_order, + ascii_codepage, &string_size, error ); #else - result = libuna_utf8_string_size_from_utf16_stream( + result = libuna_utf8_string_size_from_byte_stream( byte_stream, byte_stream_size, - byte_order, + ascii_codepage, &string_size, error ); #endif @@ -654,20 +668,20 @@ goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) - result = libuna_utf16_string_copy_from_utf16_stream( + result = libuna_utf16_string_copy_from_byte_stream( (libuna_utf16_character_t *) string, string_size, byte_stream, byte_stream_size, - byte_order, + ascii_codepage, error ); #else - result = libuna_utf8_string_copy_from_utf16_stream( + result = libuna_utf8_string_copy_from_byte_stream( (libuna_utf8_character_t *) string, string_size, byte_stream, byte_stream_size, - byte_order, + ascii_codepage, error ); #endif if( result != 1 ) @@ -701,10 +715,10 @@ return( -1 ); } -/* Prints an UTF-16 name value +/* Prints an UTF-16 string value * Returns 1 if successful or -1 on error */ -int libfshfs_debug_print_utf16_name_value( +int libfshfs_debug_print_utf16_string_value( const char *function_name, const char *value_name, const uint8_t *byte_stream, @@ -713,8 +727,7 @@ libcerror_error_t **error ) { system_character_t *string = NULL; - static char *function = "libfshfs_debug_print_utf16_name_value"; - size_t byte_stream_index = 0; + static char *function = "libfshfs_debug_print_utf16_string_value"; size_t string_size = 0; int result = 0; @@ -728,36 +741,17 @@ return( 1 ); } - libcnotify_printf( - "%s: %s: ", - function_name, - value_name ); - - /* Handle leading 0-byte values - */ - for( byte_stream_index = 0; - byte_stream_index < byte_stream_size; - byte_stream_index += 2 ) - { - if( ( byte_stream[ byte_stream_index ] != 0 ) - || ( byte_stream[ byte_stream_index + 1 ] != 0 ) ) - { - break; - } - libcnotify_printf( - "\\x00" ); - } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_size_from_utf16_stream( - &( byte_stream[ byte_stream_index ] ), - byte_stream_size - byte_stream_index, + byte_stream, + byte_stream_size, byte_order, &string_size, error ); #else result = libuna_utf8_string_size_from_utf16_stream( - &( byte_stream[ byte_stream_index ] ), - byte_stream_size - byte_stream_index, + byte_stream, + byte_stream_size, byte_order, &string_size, error ); @@ -773,8 +767,7 @@ goto on_error; } - if( ( string_size > (size_t) SSIZE_MAX ) - || ( ( sizeof( system_character_t ) * string_size ) > (size_t) SSIZE_MAX ) ) + if( string_size > (size_t) ( SSIZE_MAX / sizeof( system_character_t ) ) ) { libcerror_error_set( error, @@ -803,16 +796,16 @@ result = libuna_utf16_string_copy_from_utf16_stream( (libuna_utf16_character_t *) string, string_size, - &( byte_stream[ byte_stream_index ] ), - byte_stream_size - byte_stream_index, + byte_stream, + byte_stream_size, byte_order, error ); #else result = libuna_utf8_string_copy_from_utf16_stream( (libuna_utf8_character_t *) string, string_size, - &( byte_stream[ byte_stream_index ] ), - byte_stream_size - byte_stream_index, + byte_stream, + byte_stream_size, byte_order, error ); #endif @@ -828,7 +821,9 @@ goto on_error; } libcnotify_printf( - "%s\n", + "%s: %s: %" PRIs_SYSTEM "\n", + function_name, + value_name, string ); memory_free( @@ -836,6 +831,154 @@ return( 1 ); +on_error: + if( string != NULL ) + { + memory_free( + string ); + } + return( -1 ); +} + +/* Prints an UTF-16 name value + * Returns 1 if successful or -1 on error + */ +int libfshfs_debug_print_utf16_name_value( + const char *function_name, + const char *value_name, + const uint8_t *byte_stream, + size_t byte_stream_size, + int byte_order, + libcerror_error_t **error ) +{ + system_character_t *string = NULL; + static char *function = "libfshfs_debug_print_utf16_name_value"; + size_t byte_stream_index = 0; + size_t string_size = 0; + int result = 0; + + if( ( byte_stream == NULL ) + || ( byte_stream_size == 0 ) ) + { + libcnotify_printf( + "%s: %s: \n", + function_name, + value_name ); + + return( 1 ); + } + libcnotify_printf( + "%s: %s: ", + function_name, + value_name ); + + /* Handle leading 0-byte values + */ + for( byte_stream_index = 0; + byte_stream_index < byte_stream_size; + byte_stream_index += 2 ) + { + if( ( byte_stream[ byte_stream_index ] != 0 ) + || ( byte_stream[ byte_stream_index + 1 ] != 0 ) ) + { + break; + } + libcnotify_printf( + "\\u2400" ); + } + if( byte_stream_index < byte_stream_size ) + { +#if defined( HAVE_WIDE_SYSTEM_CHARACTER ) + result = libuna_utf16_string_size_from_utf16_stream( + &( byte_stream[ byte_stream_index ] ), + byte_stream_size - byte_stream_index, + byte_order, + &string_size, + error ); +#else + result = libuna_utf8_string_size_from_utf16_stream( + &( byte_stream[ byte_stream_index ] ), + byte_stream_size - byte_stream_index, + byte_order, + &string_size, + error ); +#endif + if( result != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to determine size of string.", + function ); + + goto on_error; + } + if( string_size > (size_t) ( SSIZE_MAX / sizeof( system_character_t ) ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid string size value exceeds maximum.", + function ); + + goto on_error; + } + string = system_string_allocate( + string_size ); + + if( string == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_INSUFFICIENT, + "%s: unable to create string.", + function ); + + goto on_error; + } +#if defined( HAVE_WIDE_SYSTEM_CHARACTER ) + result = libuna_utf16_string_copy_from_utf16_stream( + (libuna_utf16_character_t *) string, + string_size, + &( byte_stream[ byte_stream_index ] ), + byte_stream_size - byte_stream_index, + byte_order, + error ); +#else + result = libuna_utf8_string_copy_from_utf16_stream( + (libuna_utf8_character_t *) string, + string_size, + &( byte_stream[ byte_stream_index ] ), + byte_stream_size - byte_stream_index, + byte_order, + error ); +#endif + if( result != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to set string.", + function ); + + goto on_error; + } + libcnotify_printf( + "%" PRIs_SYSTEM "", + string ); + + memory_free( + string ); + } + libcnotify_printf( + "\n" ); + + return( 1 ); + on_error: if( string != NULL ) { diff -Nru libfshfs-20201104/libfshfs/libfshfs_debug.h libfshfs-20240221/libfshfs/libfshfs_debug.h --- libfshfs-20201104/libfshfs/libfshfs_debug.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_debug.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Debug functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -62,6 +62,7 @@ size_t byte_stream_size, int byte_order, uint32_t string_format_flags, + int8_t is_local_time, libcerror_error_t **error ); int libfshfs_debug_print_posix_time_value( @@ -74,6 +75,14 @@ uint32_t string_format_flags, libcerror_error_t **error ); +int libfshfs_debug_print_string_value( + const char *function_name, + const char *value_name, + const uint8_t *byte_stream, + size_t byte_stream_size, + int ascii_codepage, + libcerror_error_t **error ); + int libfshfs_debug_print_utf16_string_value( const char *function_name, const char *value_name, diff -Nru libfshfs-20201104/libfshfs/libfshfs_definitions.h libfshfs-20240221/libfshfs/libfshfs_definitions.h --- libfshfs-20201104/libfshfs/libfshfs_definitions.h 2020-11-04 11:56:45.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_definitions.h 2024-02-21 06:04:37.000000000 +0000 @@ -1,7 +1,7 @@ /* * The internal definitions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -37,11 +37,11 @@ * for local use of libfshfs */ #else -#define LIBFSHFS_VERSION 20201104 +#define LIBFSHFS_VERSION 20240221 /* The version string */ -#define LIBFSHFS_VERSION_STRING "20201104" +#define LIBFSHFS_VERSION_STRING "20240221" /* The file access * bit 1 set to 1 for read access @@ -71,10 +71,10 @@ */ enum LIBFSHFS_FILE_SYSTEM_TYPES { - LIBFSHFS_EXTENT_FILE_SYSTEM_TYPE_UNDEFINED, - LIBFSHFS_EXTENT_FILE_SYSTEM_TYPE_HFS, - LIBFSHFS_EXTENT_FILE_SYSTEM_TYPE_HFS_PLUS, - LIBFSHFS_EXTENT_FILE_SYSTEM_TYPE_HFSX + LIBFSHFS_FILE_SYSTEM_TYPE_UNDEFINED, + LIBFSHFS_FILE_SYSTEM_TYPE_HFS, + LIBFSHFS_FILE_SYSTEM_TYPE_HFS_PLUS, + LIBFSHFS_FILE_SYSTEM_TYPE_HFSX }; /* The file types @@ -126,19 +126,29 @@ LIBFSHFS_FORK_TYPE_RESOURCE = 0xff }; +/* The attribute record types + */ +enum LIBFSHFS_ATTRIBUTE_RECORD_TYPES +{ + LIBFSHFS_ATTRIBUTE_RECORD_TYPE_INLINE_DATA = 0x00000010UL, + LIBFSHFS_ATTRIBUTE_RECORD_TYPE_FORK_DATA = 0x00000020UL, + LIBFSHFS_ATTRIBUTE_RECORD_TYPE_EXTENTS = 0x00000030UL +}; + /* The compression methods */ enum LIBFSHFS_COMPRESSION_METHODS { LIBFSHFS_COMPRESSION_METHOD_NONE = 0, LIBFSHFS_COMPRESSION_METHOD_DEFLATE = 1, - LIBFSHFS_COMPRESSION_METHOD_LZVN = 2, + LIBFSHFS_COMPRESSION_METHOD_LZFSE = 2, + LIBFSHFS_COMPRESSION_METHOD_LZVN = 3, LIBFSHFS_COMPRESSION_METHOD_UNKNOWN5 = 5 }; #define LIBFSHFS_ROOT_DIRECTORY_IDENTIFIER 2 -#define LIBFSHFS_EXTENTSG_FILE_IDENTIFIER 3 +#define LIBFSHFS_EXTENTS_FILE_IDENTIFIER 3 #define LIBFSHFS_CATALOG_FILE_IDENTIFIER 4 #define LIBFSHFS_ATTRIBUTES_FILE_IDENTIFIER 8 @@ -146,7 +156,7 @@ /* The maximum number of cache entries definitions */ -#define LIBFSHFS_MAXIMUM_CACHE_ENTRIES_BTREE_FILE_BLOCKS LIBFSHFS_MAXIMUM_BTREE_NODE_RECURSION_DEPTH + 1 +#define LIBFSHFS_MAXIMUM_CACHE_ENTRIES_BTREE_FILE_NODES 64 #endif /* !defined( _LIBFSHFS_INTERNAL_DEFINITIONS_H ) */ diff -Nru libfshfs-20201104/libfshfs/libfshfs_definitions.h.in libfshfs-20240221/libfshfs/libfshfs_definitions.h.in --- libfshfs-20201104/libfshfs/libfshfs_definitions.h.in 2020-11-04 04:28:03.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_definitions.h.in 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The internal definitions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -71,10 +71,10 @@ */ enum LIBFSHFS_FILE_SYSTEM_TYPES { - LIBFSHFS_EXTENT_FILE_SYSTEM_TYPE_UNDEFINED, - LIBFSHFS_EXTENT_FILE_SYSTEM_TYPE_HFS, - LIBFSHFS_EXTENT_FILE_SYSTEM_TYPE_HFS_PLUS, - LIBFSHFS_EXTENT_FILE_SYSTEM_TYPE_HFSX + LIBFSHFS_FILE_SYSTEM_TYPE_UNDEFINED, + LIBFSHFS_FILE_SYSTEM_TYPE_HFS, + LIBFSHFS_FILE_SYSTEM_TYPE_HFS_PLUS, + LIBFSHFS_FILE_SYSTEM_TYPE_HFSX }; /* The file types @@ -126,19 +126,29 @@ LIBFSHFS_FORK_TYPE_RESOURCE = 0xff }; +/* The attribute record types + */ +enum LIBFSHFS_ATTRIBUTE_RECORD_TYPES +{ + LIBFSHFS_ATTRIBUTE_RECORD_TYPE_INLINE_DATA = 0x00000010UL, + LIBFSHFS_ATTRIBUTE_RECORD_TYPE_FORK_DATA = 0x00000020UL, + LIBFSHFS_ATTRIBUTE_RECORD_TYPE_EXTENTS = 0x00000030UL +}; + /* The compression methods */ enum LIBFSHFS_COMPRESSION_METHODS { LIBFSHFS_COMPRESSION_METHOD_NONE = 0, LIBFSHFS_COMPRESSION_METHOD_DEFLATE = 1, - LIBFSHFS_COMPRESSION_METHOD_LZVN = 2, + LIBFSHFS_COMPRESSION_METHOD_LZFSE = 2, + LIBFSHFS_COMPRESSION_METHOD_LZVN = 3, LIBFSHFS_COMPRESSION_METHOD_UNKNOWN5 = 5 }; #define LIBFSHFS_ROOT_DIRECTORY_IDENTIFIER 2 -#define LIBFSHFS_EXTENTSG_FILE_IDENTIFIER 3 +#define LIBFSHFS_EXTENTS_FILE_IDENTIFIER 3 #define LIBFSHFS_CATALOG_FILE_IDENTIFIER 4 #define LIBFSHFS_ATTRIBUTES_FILE_IDENTIFIER 8 @@ -146,7 +156,7 @@ /* The maximum number of cache entries definitions */ -#define LIBFSHFS_MAXIMUM_CACHE_ENTRIES_BTREE_FILE_BLOCKS LIBFSHFS_MAXIMUM_BTREE_NODE_RECURSION_DEPTH + 1 +#define LIBFSHFS_MAXIMUM_CACHE_ENTRIES_BTREE_FILE_NODES 64 #endif /* !defined( _LIBFSHFS_INTERNAL_DEFINITIONS_H ) */ diff -Nru libfshfs-20201104/libfshfs/libfshfs_deflate.c libfshfs-20240221/libfshfs/libfshfs_deflate.c --- libfshfs-20201104/libfshfs/libfshfs_deflate.c 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_deflate.c 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Deflate (zlib) (un)compression functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -24,455 +24,56 @@ #include #include +#include "libfshfs_bit_stream.h" #include "libfshfs_deflate.h" +#include "libfshfs_huffman_tree.h" #include "libfshfs_libcerror.h" +#include "libfshfs_libcnotify.h" -libfshfs_deflate_huffman_table_t libfshfs_deflate_fixed_huffman_distances_table; -libfshfs_deflate_huffman_table_t libfshfs_deflate_fixed_huffman_literals_table; +const uint8_t libfshfs_deflate_code_sizes_sequence[ 19 ] = { + 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, + 14, 1, 15 }; + +const uint16_t libfshfs_deflate_literal_codes_base[ 29 ] = { + 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, + 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258 }; + +const uint16_t libfshfs_deflate_literal_codes_number_of_extra_bits[ 29 ] = { + 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, + 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0 }; + +const uint16_t libfshfs_deflate_distance_codes_base[ 30 ] = { + 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, + 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, + 12289, 16385, 24577 }; + +const uint16_t libfshfs_deflate_distance_codes_number_of_extra_bits[ 30 ] = { + 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, + 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13 }; -int libfshfs_deflate_fixed_huffman_tables_initialized = 0; - -/* Retrieves a value from the bit stream +/* Initializes the dynamic Huffman trees * Returns 1 on success or -1 on error */ -int libfshfs_deflate_bit_stream_get_value( - libfshfs_deflate_bit_stream_t *bit_stream, - uint8_t number_of_bits, - uint32_t *value_32bit, +int libfshfs_deflate_build_dynamic_huffman_trees( + libfshfs_bit_stream_t *bit_stream, + libfshfs_huffman_tree_t *literals_tree, + libfshfs_huffman_tree_t *distances_tree, libcerror_error_t **error ) { - static char *function = "libfshfs_deflate_bit_stream_get_value"; - uint32_t safe_value_32bit = 0; - - if( bit_stream == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid bit stream.", - function ); + uint8_t code_size_array[ 316 ]; - return( -1 ); - } - if( number_of_bits > (uint8_t) 32 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, - "%s: invalid number of bits value exceeds maximum.", - function ); + libfshfs_huffman_tree_t *codes_tree = NULL; + static char *function = "libfshfs_deflate_build_dynamic_huffman_trees"; + uint32_t code_size = 0; + uint32_t code_size_index = 0; + uint32_t code_size_sequence = 0; + uint32_t number_of_code_sizes = 0; + uint32_t number_of_distance_codes = 0; + uint32_t number_of_literal_codes = 0; + uint32_t times_to_repeat = 0; + uint16_t symbol = 0; - return( -1 ); - } - if( value_32bit == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid 32-bit value.", - function ); - - return( -1 ); - } - if( number_of_bits == 0 ) - { - *value_32bit = 0; - - return( 1 ); - } - while( bit_stream->bit_buffer_size < number_of_bits ) - { - if( bit_stream->byte_stream_offset >= bit_stream->byte_stream_size ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, - "%s: invalid byte stream value to small.", - function ); - - return( -1 ); - } - safe_value_32bit = bit_stream->byte_stream[ bit_stream->byte_stream_offset++ ]; - safe_value_32bit <<= bit_stream->bit_buffer_size; - - bit_stream->bit_buffer |= safe_value_32bit; - bit_stream->bit_buffer_size += 8; - } - safe_value_32bit = bit_stream->bit_buffer; - - if( number_of_bits < 32 ) - { - /* On VS 2008 32-bit "~( 0xfffffffUL << 32 )" does not behave as expected - */ - safe_value_32bit &= ~( 0xffffffffUL << number_of_bits ); - - bit_stream->bit_buffer >>= number_of_bits; - bit_stream->bit_buffer_size -= number_of_bits; - } - else - { - bit_stream->bit_buffer = 0; - bit_stream->bit_buffer_size = 0; - } - *value_32bit = safe_value_32bit; - - return( 1 ); -} - -/* Constructs the Huffman table - * Returns 1 on success, 0 if the table is empty or -1 on error - */ -int libfshfs_deflate_huffman_table_construct( - libfshfs_deflate_huffman_table_t *table, - const uint16_t *code_sizes_array, - int number_of_code_sizes, - libcerror_error_t **error ) -{ - int code_offsets_array[ 16 ]; - - static char *function = "libfshfs_deflate_huffman_table_construct"; - uint16_t code_size = 0; - uint8_t bit_index = 0; - int code_offset = 0; - int left_value = 0; - int symbol = 0; - - if( table == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid table.", - function ); - - return( -1 ); - } - if( code_sizes_array == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid code sizes array.", - function ); - - return( -1 ); - } - if( number_of_code_sizes < 0 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, - "%s: invalid number of code sizes value out of bounds.", - function ); - - return( -1 ); - } -/* TODO hardcoded for now */ - table->maximum_number_of_bits = 15; - - if( table->maximum_number_of_bits > 15 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, - "%s: invalid table - number of bits values out of bounds.", - function ); - - return( -1 ); - } - table->number_of_codes = (int) table->maximum_number_of_bits + 1; - - if( memory_set( - &( table->codes_array ), - 0, - 288 * sizeof( int ) ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_SET_FAILED, - "%s: unable to clear code counts array.", - function ); - - return( -1 ); - } - if( memory_set( - &( table->code_counts_array ), - 0, - 16 * sizeof( int ) ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_SET_FAILED, - "%s: unable to clear code counts array.", - function ); - - return( -1 ); - } - for( symbol = 0; - symbol < number_of_code_sizes; - symbol++ ) - { - code_size = code_sizes_array[ symbol ]; - - if( code_size > table->number_of_codes ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, - "%s: invalid symbol: %d code size: %" PRIu16 " value out of bounds.", - function, - symbol, - code_size ); - - return( -1 ); - } - table->code_counts_array[ code_size ] += 1; - } - /* The table has no codes - */ - if( table->code_counts_array[ 0 ] == number_of_code_sizes ) - { - return( 0 ); - } - /* Check if the set of code sizes is incomplete or over-subscribed - */ - left_value = 1; - - for( bit_index = 1; - bit_index <= table->maximum_number_of_bits; - bit_index++ ) - { - left_value <<= 1; - left_value -= table->code_counts_array[ bit_index ]; - - if( left_value < 0 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, - "%s: code sizes are over-subscribed.", - function ); - - return( -1 ); - } - } - /* Calculate the offsets for sorting the symbol table - */ - code_offsets_array[ 0 ] = 0; - code_offsets_array[ 1 ] = 0; - - for( bit_index = 1; - bit_index < table->maximum_number_of_bits; - bit_index++ ) - { - code_offsets_array[ bit_index + 1 ] = code_offsets_array[ bit_index ] - + table->code_counts_array[ bit_index ]; - } - for( symbol = 0; - symbol < number_of_code_sizes; - symbol++ ) - { - code_size = code_sizes_array[ symbol ]; - - if( code_size == 0 ) - { - continue; - } - code_offset = code_offsets_array[ code_size ]; - - if( ( code_offset < 0 ) - || ( code_offset > number_of_code_sizes ) ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, - "%s: invalid symbol: %d code offset: %d value out of bounds.", - function, - symbol, - code_offset ); - - return( -1 ); - } - code_offsets_array[ code_size ] += 1; - table->codes_array[ code_offset ] = symbol; - } -/* TODO only used by dynamic Huffman - if( left_value > 0 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, - "%s: code sizes are incomplete.", - function ); - - return( -1 ); - } -*/ - return( 1 ); -} - -/* Retrieves a Huffman encoded value from the bit stream - * Returns 1 on success or -1 on error - */ -int libfshfs_deflate_bit_stream_get_huffman_encoded_value( - libfshfs_deflate_bit_stream_t *bit_stream, - libfshfs_deflate_huffman_table_t *table, - uint32_t *value_32bit, - libcerror_error_t **error ) -{ - static char *function = "libfshfs_deflate_bit_stream_get_huffman_encoded_value"; - uint32_t bit_buffer = 0; - uint32_t safe_value_32bit = 0; - uint8_t bit_index = 0; - uint8_t number_of_bits = 0; - int code_size_count = 0; - int first_huffman_code = 0; - int first_index = 0; - int huffman_code = 0; - int result = 0; - - if( bit_stream == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid bit stream.", - function ); - - return( -1 ); - } - if( table == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid table.", - function ); - - return( -1 ); - } - if( value_32bit == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid 32-bit value.", - function ); - - return( -1 ); - } - /* Try to fill the bit buffer with the maximum number of bits - */ - while( bit_stream->bit_buffer_size < table->maximum_number_of_bits ) - { - if( bit_stream->byte_stream_offset >= bit_stream->byte_stream_size ) - { - break; - } - safe_value_32bit = bit_stream->byte_stream[ bit_stream->byte_stream_offset++ ]; - safe_value_32bit <<= bit_stream->bit_buffer_size; - - bit_stream->bit_buffer |= safe_value_32bit; - bit_stream->bit_buffer_size += 8; - } - if( table->maximum_number_of_bits < bit_stream->bit_buffer_size ) - { - number_of_bits = table->maximum_number_of_bits; - } - else - { - number_of_bits = bit_stream->bit_buffer_size; - } - bit_buffer = bit_stream->bit_buffer; - - for( bit_index = 1; - bit_index <= number_of_bits; - bit_index++ ) - { - huffman_code <<= 1; - huffman_code |= (int) bit_buffer & 0x00000001UL; - bit_buffer >>= 1; - - code_size_count = table->code_counts_array[ bit_index ]; - - if( ( huffman_code - code_size_count ) < first_huffman_code ) - { - safe_value_32bit = table->codes_array[ first_index + ( huffman_code - first_huffman_code ) ]; - - result = 1; - - break; - } - first_huffman_code += code_size_count; - first_huffman_code <<= 1; - first_index += code_size_count; - } - if( result != 0 ) - { - bit_stream->bit_buffer >>= bit_index; - bit_stream->bit_buffer_size -= bit_index; - } - if( result != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, - "%s: invalid huffman encoded value.", - function ); - - return( -1 ); - } - *value_32bit = safe_value_32bit; - - return( 1 ); -} - -/* Initializes the dynamic Huffman tables - * Returns 1 on success or -1 on error - */ -int libfshfs_deflate_initialize_dynamic_huffman_tables( - libfshfs_deflate_bit_stream_t *bit_stream, - libfshfs_deflate_huffman_table_t *literals_table, - libfshfs_deflate_huffman_table_t *distances_table, - libcerror_error_t **error ) -{ - uint16_t code_size_array[ 316 ]; - - uint8_t code_sizes_sequence[ 19 ] = { - 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, - 14, 1, 15 }; - - libfshfs_deflate_huffman_table_t codes_table; - - static char *function = "libfshfs_deflate_initialize_dynamic_huffman_tables"; - uint32_t code_size = 0; - uint32_t code_size_index = 0; - uint32_t code_size_sequence = 0; - uint32_t number_of_code_sizes = 0; - uint32_t number_of_distance_codes = 0; - uint32_t number_of_literal_codes = 0; - uint32_t symbol = 0; - uint32_t times_to_repeat = 0; - - if( libfshfs_deflate_bit_stream_get_value( + if( libfshfs_bit_stream_get_value( bit_stream, 14, &number_of_code_sizes, @@ -485,7 +86,7 @@ "%s: unable to retrieve value from bit stream.", function ); - return( -1 ); + goto on_error; } number_of_literal_codes = number_of_code_sizes & 0x0000001fUL; number_of_code_sizes >>= 5; @@ -503,7 +104,7 @@ "%s: invalid number of literal codes value out of bounds.", function ); - return( -1 ); + goto on_error; } number_of_distance_codes += 1; @@ -516,7 +117,7 @@ "%s: invalid number of distance codes value out of bounds.", function ); - return( -1 ); + goto on_error; } number_of_code_sizes += 4; @@ -524,7 +125,7 @@ code_size_index < number_of_code_sizes; code_size_index++ ) { - if( libfshfs_deflate_bit_stream_get_value( + if( libfshfs_bit_stream_get_value( bit_stream, 3, &code_size, @@ -537,20 +138,35 @@ "%s: unable to retrieve value from bit stream.", function ); - return( -1 ); + goto on_error; } - code_size_sequence = code_sizes_sequence[ code_size_index ]; + code_size_sequence = libfshfs_deflate_code_sizes_sequence[ code_size_index ]; - code_size_array[ code_size_sequence ] = (uint16_t) code_size; + code_size_array[ code_size_sequence ] = (uint8_t) code_size; } while( code_size_index < 19 ) { - code_size_sequence = code_sizes_sequence[ code_size_index++ ]; + code_size_sequence = libfshfs_deflate_code_sizes_sequence[ code_size_index++ ]; code_size_array[ code_size_sequence ] = 0; } - if( libfshfs_deflate_huffman_table_construct( - &codes_table, + if( libfshfs_huffman_tree_initialize( + &codes_tree, + 19, + 15, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to build codes tree.", + function ); + + goto on_error; + } + if( libfshfs_huffman_tree_build( + codes_tree, code_size_array, 19, error ) != 1 ) @@ -559,10 +175,10 @@ error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, - "%s: unable to construct codes table.", + "%s: unable to build codes tree.", function ); - return( -1 ); + goto on_error; } number_of_code_sizes = number_of_literal_codes + number_of_distance_codes; @@ -570,9 +186,9 @@ while( code_size_index < number_of_code_sizes ) { - if( libfshfs_deflate_bit_stream_get_huffman_encoded_value( + if( libfshfs_huffman_tree_get_symbol_from_bit_stream( + codes_tree, bit_stream, - &codes_table, &symbol, error ) != 1 ) { @@ -583,11 +199,11 @@ "%s: unable to retrieve literal value from bit stream.", function ); - return( -1 ); + goto on_error; } if( symbol < 16 ) { - code_size_array[ code_size_index++ ] = (uint16_t) symbol; + code_size_array[ code_size_index++ ] = (uint8_t) symbol; continue; } @@ -604,11 +220,11 @@ "%s: invalid code size index value out of bounds.", function ); - return( -1 ); + goto on_error; } code_size = (uint32_t) code_size_array[ code_size_index - 1 ]; - if( libfshfs_deflate_bit_stream_get_value( + if( libfshfs_bit_stream_get_value( bit_stream, 2, ×_to_repeat, @@ -621,13 +237,13 @@ "%s: unable to retrieve value from bit stream.", function ); - return( -1 ); + goto on_error; } times_to_repeat += 3; } else if( symbol == 17 ) { - if( libfshfs_deflate_bit_stream_get_value( + if( libfshfs_bit_stream_get_value( bit_stream, 3, ×_to_repeat, @@ -640,13 +256,13 @@ "%s: unable to retrieve value from bit stream.", function ); - return( -1 ); + goto on_error; } times_to_repeat += 3; } else if( symbol == 18 ) { - if( libfshfs_deflate_bit_stream_get_value( + if( libfshfs_bit_stream_get_value( bit_stream, 7, ×_to_repeat, @@ -659,7 +275,7 @@ "%s: unable to retrieve value from bit stream.", function ); - return( -1 ); + goto on_error; } times_to_repeat += 11; } @@ -672,7 +288,7 @@ "%s: invalid code value value out of bounds.", function ); - return( -1 ); + goto on_error; } if( ( code_size_index + times_to_repeat ) > number_of_code_sizes ) { @@ -683,11 +299,11 @@ "%s: invalid times to repeat value out of bounds.", function ); - return( -1 ); + goto on_error; } while( times_to_repeat > 0 ) { - code_size_array[ code_size_index++ ] = (uint16_t) code_size; + code_size_array[ code_size_index++ ] = (uint8_t) code_size; times_to_repeat--; } @@ -701,10 +317,23 @@ "%s: end-of-block code value missing in literal codes array.", function ); - return( -1 ); + goto on_error; } - if( libfshfs_deflate_huffman_table_construct( - literals_table, + if( libfshfs_huffman_tree_free( + &codes_tree, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free codes tree.", + function ); + + goto on_error; + } + if( libfshfs_huffman_tree_build( + literals_tree, code_size_array, number_of_literal_codes, error ) != 1 ) @@ -713,13 +342,13 @@ error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, - "%s: unable to construct literals table.", + "%s: unable to build literals tree.", function ); - return( -1 ); + goto on_error; } - if( libfshfs_deflate_huffman_table_construct( - distances_table, + if( libfshfs_huffman_tree_build( + distances_tree, &( code_size_array[ number_of_literal_codes ] ), number_of_distance_codes, error ) != 1 ) @@ -728,25 +357,34 @@ error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, - "%s: unable to construct distances table.", + "%s: unable to build distances tree.", function ); - return( -1 ); + goto on_error; } return( 1 ); + +on_error: + if( codes_tree != NULL ) + { + libfshfs_huffman_tree_free( + &codes_tree, + NULL ); + } + return( -1 ); } -/* Initializes the fixed Huffman tables +/* Initializes the fixed Huffman trees * Returns 1 on success or -1 on error */ -int libfshfs_deflate_initialize_fixed_huffman_tables( - libfshfs_deflate_huffman_table_t *literals_table, - libfshfs_deflate_huffman_table_t *distances_table, +int libfshfs_deflate_build_fixed_huffman_trees( + libfshfs_huffman_tree_t *literals_tree, + libfshfs_huffman_tree_t *distances_tree, libcerror_error_t **error ) { - uint16_t code_size_array[ 318 ]; + uint8_t code_size_array[ 318 ]; - static char *function = "libfshfs_deflate_initialize_fixed_huffman_tables"; + static char *function = "libfshfs_deflate_build_fixed_huffman_trees"; uint16_t symbol = 0; for( symbol = 0; @@ -774,8 +412,8 @@ code_size_array[ symbol ] = 5; } } - if( libfshfs_deflate_huffman_table_construct( - literals_table, + if( libfshfs_huffman_tree_build( + literals_tree, code_size_array, 288, error ) != 1 ) @@ -784,13 +422,13 @@ error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, - "%s: unable to construct literals table.", + "%s: unable to build literals tree.", function ); return( -1 ); } - if( libfshfs_deflate_huffman_table_construct( - distances_table, + if( libfshfs_huffman_tree_build( + distances_tree, &( code_size_array[ 288 ] ), 30, error ) != 1 ) @@ -799,7 +437,7 @@ error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, - "%s: unable to construct distances table.", + "%s: unable to build distances tree.", function ); return( -1 ); @@ -811,38 +449,21 @@ * Returns 1 on success or -1 on error */ int libfshfs_deflate_decode_huffman( - libfshfs_deflate_bit_stream_t *bit_stream, - libfshfs_deflate_huffman_table_t *literals_table, - libfshfs_deflate_huffman_table_t *distances_table, + libfshfs_bit_stream_t *bit_stream, + libfshfs_huffman_tree_t *literals_tree, + libfshfs_huffman_tree_t *distances_tree, uint8_t *uncompressed_data, size_t uncompressed_data_size, size_t *uncompressed_data_offset, libcerror_error_t **error ) { - uint16_t literal_codes_base[ 29 ] = { - 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, - 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258 }; - - uint16_t literal_codes_number_of_extra_bits[ 29 ] = { - 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, - 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0 }; - - uint16_t distance_codes_base[ 30 ] = { - 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, - 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, - 12289, 16385, 24577 }; - - uint16_t distance_codes_number_of_extra_bits[ 30 ] = { - 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, - 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13 }; - static char *function = "libfshfs_deflate_decode_huffman"; size_t data_offset = 0; - uint32_t code_value = 0; uint32_t extra_bits = 0; uint16_t compression_offset = 0; uint16_t compression_size = 0; uint16_t number_of_extra_bits = 0; + uint16_t symbol = 0; if( uncompressed_data == NULL ) { @@ -881,10 +502,10 @@ do { - if( libfshfs_deflate_bit_stream_get_huffman_encoded_value( + if( libfshfs_huffman_tree_get_symbol_from_bit_stream( + literals_tree, bit_stream, - literals_table, - &code_value, + &symbol, error ) != 1 ) { libcerror_error_set( @@ -896,7 +517,7 @@ return( -1 ); } - if( code_value < 256 ) + if( symbol < 256 ) { if( data_offset >= uncompressed_data_size ) { @@ -909,16 +530,16 @@ return( -1 ); } - uncompressed_data[ data_offset++ ] = (uint8_t) code_value; + uncompressed_data[ data_offset++ ] = (uint8_t) symbol; } - else if( ( code_value > 256 ) - && ( code_value < 286 ) ) + else if( ( symbol > 256 ) + && ( symbol < 286 ) ) { - code_value -= 257; + symbol -= 257; - number_of_extra_bits = literal_codes_number_of_extra_bits[ code_value ]; + number_of_extra_bits = libfshfs_deflate_literal_codes_number_of_extra_bits[ symbol ]; - if( libfshfs_deflate_bit_stream_get_value( + if( libfshfs_bit_stream_get_value( bit_stream, (uint8_t) number_of_extra_bits, &extra_bits, @@ -933,12 +554,12 @@ return( -1 ); } - compression_size = literal_codes_base[ code_value ] + (uint16_t) extra_bits; + compression_size = libfshfs_deflate_literal_codes_base[ symbol ] + (uint16_t) extra_bits; - if( libfshfs_deflate_bit_stream_get_huffman_encoded_value( + if( libfshfs_huffman_tree_get_symbol_from_bit_stream( + distances_tree, bit_stream, - distances_table, - &code_value, + &symbol, error ) != 1 ) { libcerror_error_set( @@ -950,9 +571,9 @@ return( -1 ); } - number_of_extra_bits = distance_codes_number_of_extra_bits[ code_value ]; + number_of_extra_bits = libfshfs_deflate_distance_codes_number_of_extra_bits[ symbol ]; - if( libfshfs_deflate_bit_stream_get_value( + if( libfshfs_bit_stream_get_value( bit_stream, (uint8_t) number_of_extra_bits, &extra_bits, @@ -967,7 +588,7 @@ return( -1 ); } - compression_offset = distance_codes_base[ code_value ] + (uint16_t) extra_bits; + compression_offset = libfshfs_deflate_distance_codes_base[ symbol ] + (uint16_t) extra_bits; if( compression_offset > data_offset ) { @@ -999,7 +620,7 @@ compression_size--; } } - else if( code_value != 256 ) + else if( symbol != 256 ) { libcerror_error_set( error, @@ -1007,12 +628,12 @@ LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: invalid code value: %" PRIu16 ".", function, - code_value ); + symbol ); return( -1 ); } } - while( code_value != 256 ); + while( symbol != 256 ); *uncompressed_data_offset = data_offset; @@ -1025,13 +646,13 @@ */ int libfshfs_deflate_calculate_adler32( uint32_t *checksum_value, - const uint8_t *buffer, - size_t size, + const uint8_t *data, + size_t data_size, uint32_t initial_value, libcerror_error_t **error ) { static char *function = "libfshfs_deflate_calculate_adler32"; - size_t buffer_offset = 0; + size_t data_offset = 0; uint32_t lower_word = 0; uint32_t upper_word = 0; uint32_t value_32bit = 0; @@ -1048,24 +669,24 @@ return( -1 ); } - if( buffer == NULL ) + if( data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid buffer.", + "%s: invalid data.", function ); return( -1 ); } - if( size > (size_t) SSIZE_MAX ) + if( data_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, - "%s: invalid size value exceeds maximum.", + "%s: invalid data size value exceeds maximum.", function ); return( -1 ); @@ -1073,7 +694,7 @@ lower_word = initial_value & 0xffff; upper_word = ( initial_value >> 16 ) & 0xffff; - while( size >= 0x15b0 ) + while( data_size >= 0x15b0 ) { /* The modulo calculation is needed per 5552 (0x15b0) bytes * 5552 / 16 = 347 @@ -1082,52 +703,52 @@ block_index < 347; block_index++ ) { - lower_word += buffer[ buffer_offset++ ]; + lower_word += data[ data_offset++ ]; upper_word += lower_word; - lower_word += buffer[ buffer_offset++ ]; + lower_word += data[ data_offset++ ]; upper_word += lower_word; - lower_word += buffer[ buffer_offset++ ]; + lower_word += data[ data_offset++ ]; upper_word += lower_word; - lower_word += buffer[ buffer_offset++ ]; + lower_word += data[ data_offset++ ]; upper_word += lower_word; - lower_word += buffer[ buffer_offset++ ]; + lower_word += data[ data_offset++ ]; upper_word += lower_word; - lower_word += buffer[ buffer_offset++ ]; + lower_word += data[ data_offset++ ]; upper_word += lower_word; - lower_word += buffer[ buffer_offset++ ]; + lower_word += data[ data_offset++ ]; upper_word += lower_word; - lower_word += buffer[ buffer_offset++ ]; + lower_word += data[ data_offset++ ]; upper_word += lower_word; - lower_word += buffer[ buffer_offset++ ]; + lower_word += data[ data_offset++ ]; upper_word += lower_word; - lower_word += buffer[ buffer_offset++ ]; + lower_word += data[ data_offset++ ]; upper_word += lower_word; - lower_word += buffer[ buffer_offset++ ]; + lower_word += data[ data_offset++ ]; upper_word += lower_word; - lower_word += buffer[ buffer_offset++ ]; + lower_word += data[ data_offset++ ]; upper_word += lower_word; - lower_word += buffer[ buffer_offset++ ]; + lower_word += data[ data_offset++ ]; upper_word += lower_word; - lower_word += buffer[ buffer_offset++ ]; + lower_word += data[ data_offset++ ]; upper_word += lower_word; - lower_word += buffer[ buffer_offset++ ]; + lower_word += data[ data_offset++ ]; upper_word += lower_word; - lower_word += buffer[ buffer_offset++ ]; + lower_word += data[ data_offset++ ]; upper_word += lower_word; } /* Optimized equivalent of: @@ -1164,68 +785,68 @@ { upper_word -= 65521; } - size -= 0x15b0; + data_size -= 0x15b0; } - if( size > 0 ) + if( data_size > 0 ) { - while( size > 16 ) + while( data_size > 16 ) { - lower_word += buffer[ buffer_offset++ ]; + lower_word += data[ data_offset++ ]; upper_word += lower_word; - lower_word += buffer[ buffer_offset++ ]; + lower_word += data[ data_offset++ ]; upper_word += lower_word; - lower_word += buffer[ buffer_offset++ ]; + lower_word += data[ data_offset++ ]; upper_word += lower_word; - lower_word += buffer[ buffer_offset++ ]; + lower_word += data[ data_offset++ ]; upper_word += lower_word; - lower_word += buffer[ buffer_offset++ ]; + lower_word += data[ data_offset++ ]; upper_word += lower_word; - lower_word += buffer[ buffer_offset++ ]; + lower_word += data[ data_offset++ ]; upper_word += lower_word; - lower_word += buffer[ buffer_offset++ ]; + lower_word += data[ data_offset++ ]; upper_word += lower_word; - lower_word += buffer[ buffer_offset++ ]; + lower_word += data[ data_offset++ ]; upper_word += lower_word; - lower_word += buffer[ buffer_offset++ ]; + lower_word += data[ data_offset++ ]; upper_word += lower_word; - lower_word += buffer[ buffer_offset++ ]; + lower_word += data[ data_offset++ ]; upper_word += lower_word; - lower_word += buffer[ buffer_offset++ ]; + lower_word += data[ data_offset++ ]; upper_word += lower_word; - lower_word += buffer[ buffer_offset++ ]; + lower_word += data[ data_offset++ ]; upper_word += lower_word; - lower_word += buffer[ buffer_offset++ ]; + lower_word += data[ data_offset++ ]; upper_word += lower_word; - lower_word += buffer[ buffer_offset++ ]; + lower_word += data[ data_offset++ ]; upper_word += lower_word; - lower_word += buffer[ buffer_offset++ ]; + lower_word += data[ data_offset++ ]; upper_word += lower_word; - lower_word += buffer[ buffer_offset++ ]; + lower_word += data[ data_offset++ ]; upper_word += lower_word; - size -= 16; + data_size -= 16; } - while( size > 0 ) + while( data_size > 0 ) { - lower_word += buffer[ buffer_offset++ ]; + lower_word += data[ data_offset++ ]; upper_word += lower_word; - size--; + data_size--; } /* Optimized equivalent of: * lower_word %= 0xfff1 @@ -1392,123 +1013,173 @@ return( 1 ); } -/* Reads a block of compressed data +/* Reads the header of a block of compressed data * Returns 1 on success or -1 on error */ -int libfshfs_deflate_read_block( - libfshfs_deflate_bit_stream_t *bit_stream, - uint8_t *uncompressed_data, - size_t uncompressed_data_size, - size_t *uncompressed_data_offset, +int libfshfs_deflate_read_block_header( + libfshfs_bit_stream_t *bit_stream, + uint8_t *block_type, uint8_t *last_block_flag, libcerror_error_t **error ) { - libfshfs_deflate_huffman_table_t dynamic_huffman_distances_table; - libfshfs_deflate_huffman_table_t dynamic_huffman_literals_table; - - static char *function = "libfshfs_deflate_read_block"; - size_t safe_uncompressed_data_offset = 0; - uint32_t block_size = 0; - uint32_t block_size_copy = 0; - uint32_t value_32bit = 0; - uint8_t block_type = 0; - uint8_t skip_bits = 0; + static char *function = "libfshfs_deflate_read_block_header"; + uint32_t value_32bit = 0; - if( bit_stream == NULL ) + if( block_type == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid bit stream.", + "%s: invalid block type.", function ); return( -1 ); } - if( uncompressed_data == NULL ) + if( last_block_flag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid uncompressed data.", + "%s: invalid last block flag.", function ); return( -1 ); } - if( uncompressed_data_size > (size_t) SSIZE_MAX ) + if( libfshfs_bit_stream_get_value( + bit_stream, + 3, + &value_32bit, + error ) != 1 ) { libcerror_error_set( error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, - "%s: invalid uncompressed data size value exceeds maximum.", + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve value from bit stream.", function ); return( -1 ); } - if( uncompressed_data_offset == NULL ) + *last_block_flag = (uint8_t) ( value_32bit & 0x00000001UL ); + value_32bit >>= 1; + *block_type = (uint8_t) value_32bit; + +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: block header last block flag\t\t\t: %" PRIu8 "\n", + function, + *last_block_flag ); + + libcnotify_printf( + "%s: block header block type\t\t\t: %" PRIu8 " (", + function, + *block_type ); + + switch( *block_type ) + { + case LIBFSHFS_DEFLATE_BLOCK_TYPE_UNCOMPRESSED: + libcnotify_printf( + "Uncompressed" ); + break; + + case LIBFSHFS_DEFLATE_BLOCK_TYPE_HUFFMAN_FIXED: + libcnotify_printf( + "Fixed Huffman" ); + break; + + case LIBFSHFS_DEFLATE_BLOCK_TYPE_HUFFMAN_DYNAMIC: + libcnotify_printf( + "Dynamic Huffman" ); + break; + + case LIBFSHFS_DEFLATE_BLOCK_TYPE_RESERVED: + default: + libcnotify_printf( + "Reserved" ); + break; + } + libcnotify_printf( + ")\n" ); + + libcnotify_printf( + "\n" ); + } +#endif /* defined( HAVE_DEBUG_OUTPUT ) */ + + return( 1 ); +} + +/* Reads a block of compressed data + * Returns 1 on success or -1 on error + */ +int libfshfs_deflate_read_block( + libfshfs_bit_stream_t *bit_stream, + uint8_t block_type, + libfshfs_huffman_tree_t *fixed_huffman_literals_tree, + libfshfs_huffman_tree_t *fixed_huffman_distances_tree, + uint8_t *uncompressed_data, + size_t uncompressed_data_size, + size_t *uncompressed_data_offset, + libcerror_error_t **error ) +{ + libfshfs_huffman_tree_t *dynamic_huffman_distances_tree = NULL; + libfshfs_huffman_tree_t *dynamic_huffman_literals_tree = NULL; + static char *function = "libfshfs_deflate_read_block"; + size_t safe_uncompressed_data_offset = 0; + uint32_t block_size = 0; + uint32_t block_size_copy = 0; + uint32_t value_32bit = 0; + uint8_t skip_bits = 0; + + if( bit_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid uncompressed data.", + "%s: invalid bit stream.", function ); return( -1 ); } - if( last_block_flag == NULL ) + if( uncompressed_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid last block flag.", + "%s: invalid uncompressed data.", function ); return( -1 ); } - safe_uncompressed_data_offset = *uncompressed_data_offset; - - if( libfshfs_deflate_fixed_huffman_tables_initialized == 0 ) + if( uncompressed_data_size > (size_t) SSIZE_MAX ) { - if( libfshfs_deflate_initialize_fixed_huffman_tables( - &libfshfs_deflate_fixed_huffman_literals_table, - &libfshfs_deflate_fixed_huffman_distances_table, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, - "%s: unable to construct fixed Huffman tables.", - function ); + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid uncompressed data size value exceeds maximum.", + function ); - return( -1 ); - } - libfshfs_deflate_fixed_huffman_tables_initialized = 1; + return( -1 ); } -/* TODO find optimized solution to read bit stream from bytes */ - - if( libfshfs_deflate_bit_stream_get_value( - bit_stream, - 3, - &value_32bit, - error ) != 1 ) + if( uncompressed_data_offset == NULL ) { libcerror_error_set( error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve value from bit stream.", + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid uncompressed data.", function ); return( -1 ); } - *last_block_flag = (uint8_t) ( value_32bit & 0x00000001UL ); - value_32bit >>= 1; - block_type = (uint8_t) value_32bit; + safe_uncompressed_data_offset = *uncompressed_data_offset; switch( block_type ) { @@ -1519,7 +1190,7 @@ if( skip_bits > 0 ) { - if( libfshfs_deflate_bit_stream_get_value( + if( libfshfs_bit_stream_get_value( bit_stream, skip_bits, &value_32bit, @@ -1532,10 +1203,10 @@ "%s: unable to retrieve value from bit stream.", function ); - return( -1 ); + goto on_error; } } - if( libfshfs_deflate_bit_stream_get_value( + if( libfshfs_bit_stream_get_value( bit_stream, 32, &block_size, @@ -1548,7 +1219,7 @@ "%s: unable to retrieve value from bit stream.", function ); - return( -1 ); + goto on_error; } block_size_copy = ( block_size >> 16 ) ^ 0x0000ffffUL; block_size &= 0x0000ffffUL; @@ -1564,7 +1235,7 @@ block_size, block_size_copy ); - return( -1 ); + goto on_error; } if( block_size == 0 ) { @@ -1579,7 +1250,7 @@ "%s: invalid compressed data value too small.", function ); - return( -1 ); + goto on_error; } if( (size_t) block_size > ( uncompressed_data_size - safe_uncompressed_data_offset ) ) { @@ -1590,7 +1261,7 @@ "%s: invalid uncompressed data value too small.", function ); - return( -1 ); + goto on_error; } if( memory_copy( &( uncompressed_data[ safe_uncompressed_data_offset ] ), @@ -1604,12 +1275,12 @@ "%s: unable to initialize lz buffer.", function ); - return( -1 ); + goto on_error; } bit_stream->byte_stream_offset += block_size; safe_uncompressed_data_offset += block_size; - /* Flush the bit-stream buffer + /* Flush the bit stream buffer */ bit_stream->bit_buffer = 0; bit_stream->bit_buffer_size = 0; @@ -1619,8 +1290,8 @@ case LIBFSHFS_DEFLATE_BLOCK_TYPE_HUFFMAN_FIXED: if( libfshfs_deflate_decode_huffman( bit_stream, - &libfshfs_deflate_fixed_huffman_literals_table, - &libfshfs_deflate_fixed_huffman_distances_table, + fixed_huffman_literals_tree, + fixed_huffman_distances_tree, uncompressed_data, uncompressed_data_size, &safe_uncompressed_data_offset, @@ -1633,30 +1304,60 @@ "%s: unable to decode fixed Huffman encoded bit stream.", function ); - return( -1 ); + goto on_error; } break; case LIBFSHFS_DEFLATE_BLOCK_TYPE_HUFFMAN_DYNAMIC: - if( libfshfs_deflate_initialize_dynamic_huffman_tables( + if( libfshfs_huffman_tree_initialize( + &dynamic_huffman_literals_tree, + 288, + 15, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to build dynamic literals Huffman tree.", + function ); + + goto on_error; + } + if( libfshfs_huffman_tree_initialize( + &dynamic_huffman_distances_tree, + 30, + 15, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to build dynamic distances Huffman tree.", + function ); + + goto on_error; + } + if( libfshfs_deflate_build_dynamic_huffman_trees( bit_stream, - &dynamic_huffman_literals_table, - &dynamic_huffman_distances_table, + dynamic_huffman_literals_tree, + dynamic_huffman_distances_tree, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, - "%s: unable to construct dynamic Huffman tables.", + "%s: unable to build dynamic Huffman trees.", function ); - return( -1 ); + goto on_error; } if( libfshfs_deflate_decode_huffman( bit_stream, - &dynamic_huffman_literals_table, - &dynamic_huffman_distances_table, + dynamic_huffman_literals_tree, + dynamic_huffman_distances_tree, uncompressed_data, uncompressed_data_size, &safe_uncompressed_data_offset, @@ -1669,7 +1370,33 @@ "%s: unable to decode dynamic Huffman encoded bit stream.", function ); - return( -1 ); + goto on_error; + } + if( libfshfs_huffman_tree_free( + &dynamic_huffman_distances_tree, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free dynamic distances Huffman tree.", + function ); + + goto on_error; + } + if( libfshfs_huffman_tree_free( + &dynamic_huffman_literals_tree, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free dynamic literals Huffman tree.", + function ); + + goto on_error; } break; @@ -1682,11 +1409,26 @@ "%s: unsupported block type.", function ); - return( -1 ); + goto on_error; } *uncompressed_data_offset = safe_uncompressed_data_offset; return( 1 ); + +on_error: + if( dynamic_huffman_distances_tree != NULL ) + { + libfshfs_huffman_tree_free( + &dynamic_huffman_distances_tree, + NULL ); + } + if( dynamic_huffman_literals_tree != NULL ) + { + libfshfs_huffman_tree_free( + &dynamic_huffman_literals_tree, + NULL ); + } + return( -1 ); } /* Decompresses data using deflate compression @@ -1699,12 +1441,15 @@ size_t *uncompressed_data_size, libcerror_error_t **error ) { - libfshfs_deflate_bit_stream_t bit_stream; - - static char *function = "libfshfs_deflate_decompress"; - size_t compressed_data_offset = 0; - size_t uncompressed_data_offset = 0; - uint8_t last_block_flag = 0; + libfshfs_bit_stream_t *bit_stream = NULL; + libfshfs_huffman_tree_t *fixed_huffman_distances_tree = NULL; + libfshfs_huffman_tree_t *fixed_huffman_literals_tree = NULL; + static char *function = "libfshfs_deflate_decompress"; + size_t compressed_data_offset = 0; + size_t safe_uncompressed_data_size = 0; + size_t uncompressed_data_offset = 0; + uint8_t block_type = 0; + uint8_t last_block_flag = 0; if( compressed_data == NULL ) { @@ -1750,7 +1495,9 @@ return( -1 ); } - if( *uncompressed_data_size > (size_t) SSIZE_MAX ) + safe_uncompressed_data_size = *uncompressed_data_size; + + if( safe_uncompressed_data_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, @@ -1772,20 +1519,99 @@ return( -1 ); } - bit_stream.byte_stream = compressed_data; - bit_stream.byte_stream_size = compressed_data_size; - bit_stream.byte_stream_offset = compressed_data_offset; - bit_stream.bit_buffer = 0; - bit_stream.bit_buffer_size = 0; + if( libfshfs_bit_stream_initialize( + &bit_stream, + compressed_data, + compressed_data_size, + compressed_data_offset, + LIBFSHFS_BIT_STREAM_STORAGE_TYPE_BYTE_BACK_TO_FRONT, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to create bit stream.", + function ); - while( bit_stream.byte_stream_offset < bit_stream.byte_stream_size ) + goto on_error; + } + while( bit_stream->byte_stream_offset < bit_stream->byte_stream_size ) { + if( libfshfs_deflate_read_block_header( + bit_stream, + &block_type, + &last_block_flag, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_READ_FAILED, + "%s: unable to read compressed data block header.", + function ); + + goto on_error; + } + if( block_type == LIBFSHFS_DEFLATE_BLOCK_TYPE_HUFFMAN_FIXED ) + { + if( ( fixed_huffman_literals_tree == NULL ) + && ( fixed_huffman_distances_tree == NULL ) ) + { + if( libfshfs_huffman_tree_initialize( + &fixed_huffman_literals_tree, + 288, + 15, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to build fixed literals Huffman tree.", + function ); + + goto on_error; + } + if( libfshfs_huffman_tree_initialize( + &fixed_huffman_distances_tree, + 30, + 15, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to build fixed distances Huffman tree.", + function ); + + goto on_error; + } + if( libfshfs_deflate_build_fixed_huffman_trees( + fixed_huffman_literals_tree, + fixed_huffman_distances_tree, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to build fixed Huffman trees.", + function ); + + goto on_error; + } + } + } if( libfshfs_deflate_read_block( - &bit_stream, + bit_stream, + block_type, + fixed_huffman_literals_tree, + fixed_huffman_distances_tree, uncompressed_data, - *uncompressed_data_size, + safe_uncompressed_data_size, &uncompressed_data_offset, - &last_block_flag, error ) != 1 ) { libcerror_error_set( @@ -1795,16 +1621,82 @@ "%s: unable to read block of compressed data.", function ); - return( -1 ); + goto on_error; } if( last_block_flag != 0 ) { break; } } + if( fixed_huffman_distances_tree != NULL ) + { + if( libfshfs_huffman_tree_free( + &fixed_huffman_distances_tree, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free fixed distances Huffman tree.", + function ); + + goto on_error; + } + } + if( fixed_huffman_literals_tree != NULL ) + { + if( libfshfs_huffman_tree_free( + &fixed_huffman_literals_tree, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free fixed literals Huffman tree.", + function ); + + goto on_error; + } + } + if( libfshfs_bit_stream_free( + &bit_stream, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free bit stream.", + function ); + + goto on_error; + } *uncompressed_data_size = uncompressed_data_offset; return( 1 ); + +on_error: + if( fixed_huffman_distances_tree != NULL ) + { + libfshfs_huffman_tree_free( + &fixed_huffman_distances_tree, + NULL ); + } + if( fixed_huffman_literals_tree != NULL ) + { + libfshfs_huffman_tree_free( + &fixed_huffman_literals_tree, + NULL ); + } + if( bit_stream != NULL ) + { + libfshfs_bit_stream_free( + &bit_stream, + NULL ); + } + return( -1 ); } /* Decompresses data using zlib compression @@ -1817,14 +1709,17 @@ size_t *uncompressed_data_size, libcerror_error_t **error ) { - libfshfs_deflate_bit_stream_t bit_stream; - - static char *function = "libfshfs_deflate_decompress_zlib"; - size_t compressed_data_offset = 0; - size_t uncompressed_data_offset = 0; - uint32_t calculated_checksum = 0; - uint32_t stored_checksum = 0; - uint8_t last_block_flag = 0; + libfshfs_bit_stream_t *bit_stream = NULL; + libfshfs_huffman_tree_t *fixed_huffman_distances_tree = NULL; + libfshfs_huffman_tree_t *fixed_huffman_literals_tree = NULL; + static char *function = "libfshfs_deflate_decompress_zlib"; + size_t compressed_data_offset = 0; + size_t safe_uncompressed_data_size = 0; + size_t uncompressed_data_offset = 0; + uint32_t calculated_checksum = 0; + uint32_t stored_checksum = 0; + uint8_t block_type = 0; + uint8_t last_block_flag = 0; if( compressed_data == NULL ) { @@ -1870,7 +1765,9 @@ return( -1 ); } - if( *uncompressed_data_size > (size_t) SSIZE_MAX ) + safe_uncompressed_data_size = *uncompressed_data_size; + + if( safe_uncompressed_data_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, @@ -1894,7 +1791,7 @@ "%s: unable to read data header.", function ); - return( -1 ); + goto on_error; } if( compressed_data_offset >= compressed_data_size ) { @@ -1905,22 +1802,101 @@ "%s: invalid compressed data value too small.", function ); - return( -1 ); + goto on_error; } - bit_stream.byte_stream = compressed_data; - bit_stream.byte_stream_size = compressed_data_size; - bit_stream.byte_stream_offset = compressed_data_offset; - bit_stream.bit_buffer = 0; - bit_stream.bit_buffer_size = 0; + if( libfshfs_bit_stream_initialize( + &bit_stream, + compressed_data, + compressed_data_size, + compressed_data_offset, + LIBFSHFS_BIT_STREAM_STORAGE_TYPE_BYTE_BACK_TO_FRONT, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to create bit stream.", + function ); - while( bit_stream.byte_stream_offset < bit_stream.byte_stream_size ) + goto on_error; + } + while( bit_stream->byte_stream_offset < bit_stream->byte_stream_size ) { + if( libfshfs_deflate_read_block_header( + bit_stream, + &block_type, + &last_block_flag, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_READ_FAILED, + "%s: unable to read compressed data block header.", + function ); + + goto on_error; + } + if( block_type == LIBFSHFS_DEFLATE_BLOCK_TYPE_HUFFMAN_FIXED ) + { + if( ( fixed_huffman_literals_tree == NULL ) + && ( fixed_huffman_distances_tree == NULL ) ) + { + if( libfshfs_huffman_tree_initialize( + &fixed_huffman_literals_tree, + 288, + 15, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to build fixed literals Huffman tree.", + function ); + + goto on_error; + } + if( libfshfs_huffman_tree_initialize( + &fixed_huffman_distances_tree, + 30, + 15, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to build fixed distances Huffman tree.", + function ); + + goto on_error; + } + if( libfshfs_deflate_build_fixed_huffman_trees( + fixed_huffman_literals_tree, + fixed_huffman_distances_tree, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to build fixed Huffman trees.", + function ); + + goto on_error; + } + } + } if( libfshfs_deflate_read_block( - &bit_stream, + bit_stream, + block_type, + fixed_huffman_literals_tree, + fixed_huffman_distances_tree, uncompressed_data, - *uncompressed_data_size, + safe_uncompressed_data_size, &uncompressed_data_offset, - &last_block_flag, error ) != 1 ) { libcerror_error_set( @@ -1930,22 +1906,22 @@ "%s: unable to read block of compressed data.", function ); - return( -1 ); + goto on_error; } if( last_block_flag != 0 ) { break; } } - if( ( bit_stream.byte_stream_size - bit_stream.byte_stream_offset ) >= 4 ) + if( ( bit_stream->byte_stream_size - bit_stream->byte_stream_offset ) >= 4 ) { - while( bit_stream.bit_buffer_size >= 8 ) + while( bit_stream->bit_buffer_size >= 8 ) { - bit_stream.byte_stream_offset -= 1; - bit_stream.bit_buffer_size -= 8; + bit_stream->byte_stream_offset -= 1; + bit_stream->bit_buffer_size -= 8; } byte_stream_copy_to_uint32_big_endian( - &( bit_stream.byte_stream[ bit_stream.byte_stream_offset ] ), + &( bit_stream->byte_stream[ bit_stream->byte_stream_offset ] ), stored_checksum ); if( libfshfs_deflate_calculate_adler32( @@ -1962,7 +1938,7 @@ "%s: unable to calculate checksum.", function ); - return( -1 ); + goto on_error; } if( stored_checksum != calculated_checksum ) { @@ -1975,11 +1951,77 @@ stored_checksum, calculated_checksum ); - return( -1 ); + goto on_error; + } + } + if( fixed_huffman_distances_tree != NULL ) + { + if( libfshfs_huffman_tree_free( + &fixed_huffman_distances_tree, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free fixed distances Huffman tree.", + function ); + + goto on_error; + } + } + if( fixed_huffman_literals_tree != NULL ) + { + if( libfshfs_huffman_tree_free( + &fixed_huffman_literals_tree, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free fixed literals Huffman tree.", + function ); + + goto on_error; } } + if( libfshfs_bit_stream_free( + &bit_stream, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free bit stream.", + function ); + + goto on_error; + } *uncompressed_data_size = uncompressed_data_offset; return( 1 ); + +on_error: + if( fixed_huffman_distances_tree != NULL ) + { + libfshfs_huffman_tree_free( + &fixed_huffman_distances_tree, + NULL ); + } + if( fixed_huffman_literals_tree != NULL ) + { + libfshfs_huffman_tree_free( + &fixed_huffman_literals_tree, + NULL ); + } + if( bit_stream != NULL ) + { + libfshfs_bit_stream_free( + &bit_stream, + NULL ); + } + return( -1 ); } diff -Nru libfshfs-20201104/libfshfs/libfshfs_deflate.h libfshfs-20240221/libfshfs/libfshfs_deflate.h --- libfshfs-20201104/libfshfs/libfshfs_deflate.h 2020-11-04 04:22:54.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_deflate.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Deflate (zlib) (un)compression functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -25,6 +25,8 @@ #include #include +#include "libfshfs_bit_stream.h" +#include "libfshfs_huffman_tree.h" #include "libfshfs_libcerror.h" #if defined( __cplusplus ) @@ -41,86 +43,21 @@ LIBFSHFS_DEFLATE_BLOCK_TYPE_RESERVED = 0x03 }; -typedef struct libfshfs_deflate_bit_stream libfshfs_deflate_bit_stream_t; - -struct libfshfs_deflate_bit_stream -{ - /* The byte stream - */ - const uint8_t *byte_stream; - - /* The byte stream size - */ - size_t byte_stream_size; - - /* The byte stream offset - */ - size_t byte_stream_offset; - - /* The bit buffer - */ - uint32_t bit_buffer; - - /* The number of bits remaining in the bit buffer - */ - uint8_t bit_buffer_size; -}; - -typedef struct libfshfs_deflate_huffman_table libfshfs_deflate_huffman_table_t; - -struct libfshfs_deflate_huffman_table -{ - /* The maximum number of bits representable by the Huffman table - */ - uint8_t maximum_number_of_bits; - -/* TODO create initialize function that sets the size of codes array? */ - /* The codes array - */ - int codes_array[ 288 ]; - - /* The code counts array - */ - int code_counts_array[ 16 ]; - - /* The number of codes - */ - int number_of_codes; -}; - -int libfshfs_deflate_bit_stream_get_value( - libfshfs_deflate_bit_stream_t *bit_stream, - uint8_t number_of_bits, - uint32_t *value_32bit, - libcerror_error_t **error ); - -int libfshfs_deflate_huffman_table_construct( - libfshfs_deflate_huffman_table_t *table, - const uint16_t *code_sizes_array, - int number_of_code_sizes, - libcerror_error_t **error ); - -int libfshfs_deflate_bit_stream_get_huffman_encoded_value( - libfshfs_deflate_bit_stream_t *bit_stream, - libfshfs_deflate_huffman_table_t *table, - uint32_t *value_32bit, - libcerror_error_t **error ); - -int libfshfs_deflate_initialize_dynamic_huffman_tables( - libfshfs_deflate_bit_stream_t *bit_stream, - libfshfs_deflate_huffman_table_t *literals_table, - libfshfs_deflate_huffman_table_t *distances_table, +int libfshfs_deflate_build_dynamic_huffman_trees( + libfshfs_bit_stream_t *bit_stream, + libfshfs_huffman_tree_t *literals_tree, + libfshfs_huffman_tree_t *distances_tree, libcerror_error_t **error ); -int libfshfs_deflate_initialize_fixed_huffman_tables( - libfshfs_deflate_huffman_table_t *literals_table, - libfshfs_deflate_huffman_table_t *distances_table, +int libfshfs_deflate_build_fixed_huffman_trees( + libfshfs_huffman_tree_t *literals_tree, + libfshfs_huffman_tree_t *distances_tree, libcerror_error_t **error ); int libfshfs_deflate_decode_huffman( - libfshfs_deflate_bit_stream_t *bit_stream, - libfshfs_deflate_huffman_table_t *literals_table, - libfshfs_deflate_huffman_table_t *distances_table, + libfshfs_bit_stream_t *bit_stream, + libfshfs_huffman_tree_t *literals_tree, + libfshfs_huffman_tree_t *distances_tree, uint8_t *uncompressed_data, size_t uncompressed_data_size, size_t *uncompressed_data_offset, @@ -128,8 +65,8 @@ int libfshfs_deflate_calculate_adler32( uint32_t *checksum_value, - const uint8_t *buffer, - size_t size, + const uint8_t *data, + size_t data_size, uint32_t initial_value, libcerror_error_t **error ); @@ -139,12 +76,20 @@ size_t *compressed_data_offset, libcerror_error_t **error ); +int libfshfs_deflate_read_block_header( + libfshfs_bit_stream_t *bit_stream, + uint8_t *block_type, + uint8_t *last_block_flag, + libcerror_error_t **error ); + int libfshfs_deflate_read_block( - libfshfs_deflate_bit_stream_t *bit_stream, + libfshfs_bit_stream_t *bit_stream, + uint8_t block_type, + libfshfs_huffman_tree_t *fixed_huffman_literals_tree, + libfshfs_huffman_tree_t *fixed_huffman_distances_tree, uint8_t *uncompressed_data, size_t uncompressed_data_size, size_t *uncompressed_data_offset, - uint8_t *last_block_flag, libcerror_error_t **error ); int libfshfs_deflate_decompress( diff -Nru libfshfs-20201104/libfshfs/libfshfs_directory_entry.c libfshfs-20240221/libfshfs/libfshfs_directory_entry.c --- libfshfs-20201104/libfshfs/libfshfs_directory_entry.c 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_directory_entry.c 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Directory entry functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -29,6 +29,7 @@ #include "libfshfs_file_record.h" #include "libfshfs_fork_descriptor.h" #include "libfshfs_libcerror.h" +#include "libfshfs_libuna.h" #include "libfshfs_name.h" /* Creates a directory entry @@ -343,6 +344,7 @@ libfshfs_directory_entry_t *directory_entry, const uint8_t *name, size_t name_size, + int codepage, libcerror_error_t **error ) { static char *function = "libfshfs_directory_entry_set_name"; @@ -391,6 +393,18 @@ return( -1 ); } + if( ( codepage != LIBUNA_CODEPAGE_ASCII ) + && ( codepage != LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, + "%s: unsupported codepage.", + function ); + + return( -1 ); + } if( name_size > 0 ) { directory_entry->name = (uint8_t *) memory_allocate( @@ -423,6 +437,7 @@ } } directory_entry->name_size = name_size; + directory_entry->codepage = codepage; return( 1 ); @@ -503,15 +518,15 @@ return( 1 ); } -/* Retrieves the identifier +/* Retrieves the flags * Returns 1 if successful or -1 on error */ -int libfshfs_directory_entry_get_identifier( +int libfshfs_directory_entry_get_flags( libfshfs_directory_entry_t *directory_entry, - uint32_t *identifier, + uint16_t *flags, libcerror_error_t **error ) { - static char *function = "libfshfs_directory_entry_get_identifier"; + static char *function = "libfshfs_directory_entry_get_flags"; int result = 0; if( directory_entry == NULL ) @@ -542,17 +557,17 @@ if( ( directory_entry->record_type == LIBFSHFS_RECORD_TYPE_HFSPLUS_DIRECTORY_RECORD ) || ( directory_entry->record_type == LIBFSHFS_RECORD_TYPE_HFS_DIRECTORY_RECORD ) ) { - result = libfshfs_directory_record_get_identifier( + result = libfshfs_directory_record_get_flags( (libfshfs_directory_record_t *) directory_entry->catalog_record, - identifier, + flags, error ); } else if( ( directory_entry->record_type == LIBFSHFS_RECORD_TYPE_HFSPLUS_FILE_RECORD ) || ( directory_entry->record_type == LIBFSHFS_RECORD_TYPE_HFS_FILE_RECORD ) ) { - result = libfshfs_file_record_get_identifier( + result = libfshfs_file_record_get_flags( (libfshfs_file_record_t *) directory_entry->catalog_record, - identifier, + flags, error ); } if( result != 1 ) @@ -561,7 +576,7 @@ error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve identifier from catalog record.", + "%s: unable to retrieve flags from catalog record.", function ); return( -1 ); @@ -569,15 +584,16 @@ return( 1 ); } -/* Retrieves the parent identifier +/* Retrieves the identifier * Returns 1 if successful or -1 on error */ -int libfshfs_directory_entry_get_parent_identifier( +int libfshfs_directory_entry_get_identifier( libfshfs_directory_entry_t *directory_entry, - uint32_t *parent_identifier, + uint32_t *identifier, libcerror_error_t **error ) { - static char *function = "libfshfs_directory_entry_get_parent_identifier"; + static char *function = "libfshfs_directory_entry_get_identifier"; + int result = 0; if( directory_entry == NULL ) { @@ -590,31 +606,59 @@ return( -1 ); } - if( parent_identifier == NULL ) + if( ( directory_entry->record_type != LIBFSHFS_RECORD_TYPE_HFSPLUS_DIRECTORY_RECORD ) + && ( directory_entry->record_type != LIBFSHFS_RECORD_TYPE_HFSPLUS_FILE_RECORD ) + && ( directory_entry->record_type != LIBFSHFS_RECORD_TYPE_HFS_DIRECTORY_RECORD ) + && ( directory_entry->record_type != LIBFSHFS_RECORD_TYPE_HFS_FILE_RECORD ) ) { libcerror_error_set( error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid link identifier.", + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, + "%s: invalid directory entry - unsupported record type.", function ); return( -1 ); } - *parent_identifier = directory_entry->parent_identifier; + if( ( directory_entry->record_type == LIBFSHFS_RECORD_TYPE_HFSPLUS_DIRECTORY_RECORD ) + || ( directory_entry->record_type == LIBFSHFS_RECORD_TYPE_HFS_DIRECTORY_RECORD ) ) + { + result = libfshfs_directory_record_get_identifier( + (libfshfs_directory_record_t *) directory_entry->catalog_record, + identifier, + error ); + } + else if( ( directory_entry->record_type == LIBFSHFS_RECORD_TYPE_HFSPLUS_FILE_RECORD ) + || ( directory_entry->record_type == LIBFSHFS_RECORD_TYPE_HFS_FILE_RECORD ) ) + { + result = libfshfs_file_record_get_identifier( + (libfshfs_file_record_t *) directory_entry->catalog_record, + identifier, + error ); + } + if( result != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve identifier from catalog record.", + function ); + return( -1 ); + } return( 1 ); } -/* Retrieves the link identifier - * Returns 1 if successful, 0 if not available or -1 on error +/* Retrieves the parent identifier + * Returns 1 if successful or -1 on error */ -int libfshfs_directory_entry_get_link_identifier( +int libfshfs_directory_entry_get_parent_identifier( libfshfs_directory_entry_t *directory_entry, - uint32_t *link_identifier, + uint32_t *parent_identifier, libcerror_error_t **error ) { - static char *function = "libfshfs_directory_entry_get_link_identifier"; + static char *function = "libfshfs_directory_entry_get_parent_identifier"; if( directory_entry == NULL ) { @@ -627,24 +671,20 @@ return( -1 ); } - if( link_identifier == NULL ) + if( parent_identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid link identifier.", + "%s: invalid parent identifier.", function ); return( -1 ); } - if( directory_entry->link_identifier != 0 ) - { - *link_identifier = directory_entry->link_identifier; + *parent_identifier = directory_entry->parent_identifier; - return( 1 ); - } - return( 0 ); + return( 1 ); } /* Retrieves the creation date and time @@ -1040,7 +1080,7 @@ posix_time, error ); } - if( result != 1 ) + if( result == -1 ) { libcerror_error_set( error, @@ -1259,6 +1299,65 @@ return( result ); } +/* Retrieves the special permissions + * Returns 1 if successful, 0 if not available or -1 on error + */ +int libfshfs_directory_entry_get_special_permissions( + libfshfs_directory_entry_t *directory_entry, + uint32_t *special_permissions, + libcerror_error_t **error ) +{ + static char *function = "libfshfs_directory_entry_get_special_permissions"; + int result = 0; + + if( directory_entry == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid directory entry.", + function ); + + return( -1 ); + } + if( ( directory_entry->record_type != LIBFSHFS_RECORD_TYPE_HFSPLUS_DIRECTORY_RECORD ) + && ( directory_entry->record_type != LIBFSHFS_RECORD_TYPE_HFSPLUS_FILE_RECORD ) + && ( directory_entry->record_type != LIBFSHFS_RECORD_TYPE_HFS_DIRECTORY_RECORD ) + && ( directory_entry->record_type != LIBFSHFS_RECORD_TYPE_HFS_FILE_RECORD ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, + "%s: invalid directory entry - unsupported record type.", + function ); + + return( -1 ); + } + if( ( directory_entry->record_type == LIBFSHFS_RECORD_TYPE_HFSPLUS_FILE_RECORD ) + || ( directory_entry->record_type == LIBFSHFS_RECORD_TYPE_HFS_FILE_RECORD ) ) + { + result = libfshfs_file_record_get_special_permissions( + (libfshfs_file_record_t *) directory_entry->catalog_record, + special_permissions, + error ); + + if( result == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve special permissions from catalog record.", + function ); + + return( -1 ); + } + } + return( result ); +} + /* Retrieves the link reference * Returns 1 if successful, 0 if not available or -1 on error */ @@ -1296,7 +1395,7 @@ return( -1 ); } if( ( directory_entry->record_type == LIBFSHFS_RECORD_TYPE_HFSPLUS_FILE_RECORD ) - && ( directory_entry->record_type != LIBFSHFS_RECORD_TYPE_HFS_FILE_RECORD ) ) + || ( directory_entry->record_type == LIBFSHFS_RECORD_TYPE_HFS_FILE_RECORD ) ) { result = libfshfs_file_record_get_link_reference( (libfshfs_file_record_t *) directory_entry->catalog_record, @@ -1343,6 +1442,7 @@ if( libfshfs_name_get_utf8_string_size( directory_entry->name, (size_t) directory_entry->name_size, + directory_entry->codepage, utf8_string_size, error ) != 1 ) { @@ -1384,6 +1484,7 @@ if( libfshfs_name_get_utf8_string( directory_entry->name, (size_t) directory_entry->name_size, + directory_entry->codepage, utf8_string, utf8_string_size, error ) != 1 ) @@ -1425,6 +1526,7 @@ if( libfshfs_name_get_utf16_string_size( directory_entry->name, (size_t) directory_entry->name_size, + directory_entry->codepage, utf16_string_size, error ) != 1 ) { @@ -1466,6 +1568,7 @@ if( libfshfs_name_get_utf16_string( directory_entry->name, (size_t) directory_entry->name_size, + directory_entry->codepage, utf16_string, utf16_string_size, error ) != 1 ) @@ -1585,7 +1688,7 @@ fork_descriptor, error ); - if( result != 1 ) + if( result == -1 ) { libcerror_error_set( error, diff -Nru libfshfs-20201104/libfshfs/libfshfs_directory_entry.h libfshfs-20240221/libfshfs/libfshfs_directory_entry.h --- libfshfs-20201104/libfshfs/libfshfs_directory_entry.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_directory_entry.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Directory entry functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -44,6 +44,10 @@ */ uint16_t name_size; + /* Codepage of the name + */ + int codepage; + /* Record type */ uint16_t record_type; @@ -55,10 +59,6 @@ /* Parent identifier */ uint32_t parent_identifier; - - /* Link identifier - */ - uint32_t link_identifier; }; int libfshfs_directory_entry_initialize( @@ -78,6 +78,7 @@ libfshfs_directory_entry_t *directory_entry, const uint8_t *name, size_t name_size, + int codepage, libcerror_error_t **error ); int libfshfs_directory_entry_set_catalog_record( @@ -86,6 +87,11 @@ intptr_t *catalog_record, libcerror_error_t **error ); +int libfshfs_directory_entry_get_flags( + libfshfs_directory_entry_t *directory_entry, + uint16_t *flags, + libcerror_error_t **error ); + int libfshfs_directory_entry_get_identifier( libfshfs_directory_entry_t *directory_entry, uint32_t *identifier, @@ -96,11 +102,6 @@ uint32_t *parent_identifier, libcerror_error_t **error ); -int libfshfs_directory_entry_get_link_identifier( - libfshfs_directory_entry_t *directory_entry, - uint32_t *link_identifier, - libcerror_error_t **error ); - int libfshfs_directory_entry_get_creation_time( libfshfs_directory_entry_t *directory_entry, uint32_t *hfs_time, @@ -146,6 +147,11 @@ uint32_t *group_identifier, libcerror_error_t **error ); +int libfshfs_directory_entry_get_special_permissions( + libfshfs_directory_entry_t *directory_entry, + uint32_t *special_permissions, + libcerror_error_t **error ); + int libfshfs_directory_entry_get_link_reference( libfshfs_directory_entry_t *directory_entry, uint32_t *link_reference, diff -Nru libfshfs-20201104/libfshfs/libfshfs_directory_record.c libfshfs-20240221/libfshfs/libfshfs_directory_record.c --- libfshfs-20201104/libfshfs/libfshfs_directory_record.c 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_directory_record.c 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Catalog B-tree file directory record functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -230,7 +230,6 @@ #if defined( HAVE_DEBUG_OUTPUT ) uint32_t value_32bit = 0; - uint16_t value_16bit = 0; int result = 0; #endif @@ -385,38 +384,17 @@ byte_stream_copy_to_uint32_big_endian( ( (fshfs_catalog_directory_record_hfs_t *) data )->backup_time, directory_record->backup_time ); - - byte_stream_copy_to_uint32_big_endian( - ( (fshfs_catalog_directory_record_hfs_t *) data )->backup_time, - directory_record->backup_time ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { - if( record_type == LIBFSHFS_RECORD_TYPE_HFSPLUS_DIRECTORY_RECORD ) - { - byte_stream_copy_to_uint16_big_endian( - ( (fshfs_catalog_directory_record_hfsplus_t *) data )->record_type, - value_16bit ); - } - else - { - value_16bit = ( (fshfs_catalog_directory_record_hfs_t *) data )->record_type; - } libcnotify_printf( "%s: record type\t\t\t: 0x%04" PRIx16 " (%s)\n", function, - value_16bit, + record_type, libfshfs_debug_print_catalog_record_type( record_type ) ); - if( record_type == LIBFSHFS_RECORD_TYPE_HFS_DIRECTORY_RECORD ) - { - libcnotify_printf( - "%s: unknown1\t\t\t: 0x%02" PRIx8 "\n", - function, - ( (fshfs_catalog_directory_record_hfs_t *) data )->unknown1 ); - } libcnotify_printf( "%s: flags\t\t\t\t: 0x%04" PRIx16 "\n", function, @@ -457,6 +435,7 @@ 4, LIBFDATETIME_ENDIAN_BIG, LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME, + 0, error ); } else @@ -468,6 +447,7 @@ 4, LIBFDATETIME_ENDIAN_BIG, LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME, + 1, error ); } if( result != 1 ) @@ -490,6 +470,7 @@ 4, LIBFDATETIME_ENDIAN_BIG, LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME, + 0, error ); } else @@ -501,6 +482,7 @@ 4, LIBFDATETIME_ENDIAN_BIG, LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME, + 1, error ); } if( result != 1 ) @@ -523,6 +505,7 @@ 4, LIBFDATETIME_ENDIAN_BIG, LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME, + 0, error ) != 1 ) { libcerror_error_set( @@ -541,6 +524,7 @@ 4, LIBFDATETIME_ENDIAN_BIG, LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME, + 0, error ) != 1 ) { libcerror_error_set( @@ -562,6 +546,7 @@ 4, LIBFDATETIME_ENDIAN_BIG, LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME, + 0, error ); } else @@ -573,6 +558,7 @@ 4, LIBFDATETIME_ENDIAN_BIG, LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME, + 1, error ); } if( result != 1 ) @@ -720,6 +706,43 @@ return( 1 ); } + +/* Retrieves the flags + * Returns 1 if successful or -1 on error + */ +int libfshfs_directory_record_get_flags( + libfshfs_directory_record_t *directory_record, + uint16_t *flags, + libcerror_error_t **error ) +{ + static char *function = "libfshfs_directory_record_get_flags"; + + if( directory_record == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid directory record.", + function ); + + return( -1 ); + } + if( flags == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid flags.", + function ); + + return( -1 ); + } + *flags = directory_record->flags; + + return( 1 ); +} /* Retrieves the identifier * Returns 1 if successful or -1 on error diff -Nru libfshfs-20201104/libfshfs/libfshfs_directory_record.h libfshfs-20240221/libfshfs/libfshfs_directory_record.h --- libfshfs-20201104/libfshfs/libfshfs_directory_record.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_directory_record.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Catalog B-tree file directory record functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -99,6 +99,11 @@ size_t data_size, libcerror_error_t **error ); +int libfshfs_directory_record_get_flags( + libfshfs_directory_record_t *directory_record, + uint16_t *flags, + libcerror_error_t **error ); + int libfshfs_directory_record_get_identifier( libfshfs_directory_record_t *directory_record, uint32_t *identifier, diff -Nru libfshfs-20201104/libfshfs/libfshfs_error.c libfshfs-20240221/libfshfs/libfshfs_error.c --- libfshfs-20201104/libfshfs/libfshfs_error.c 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_error.c 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Error functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfshfs/libfshfs_error.h libfshfs-20240221/libfshfs/libfshfs_error.h --- libfshfs-20201104/libfshfs/libfshfs_error.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_error.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Error functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfshfs/libfshfs_extended_attribute.c libfshfs-20240221/libfshfs/libfshfs_extended_attribute.c --- libfshfs-20201104/libfshfs/libfshfs_extended_attribute.c 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_extended_attribute.c 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Extended attribute functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -23,10 +23,19 @@ #include #include +#include "libfshfs_allocation_block_stream.h" #include "libfshfs_attribute_record.h" +#include "libfshfs_definitions.h" #include "libfshfs_extended_attribute.h" +#include "libfshfs_extent.h" +#include "libfshfs_file_system.h" +#include "libfshfs_fork_descriptor.h" +#include "libfshfs_io_handle.h" +#include "libfshfs_libbfio.h" +#include "libfshfs_libcdata.h" #include "libfshfs_libcerror.h" #include "libfshfs_libcthreads.h" +#include "libfshfs_libfdata.h" #include "libfshfs_types.h" /* Creates an extended_attribute @@ -35,6 +44,10 @@ */ int libfshfs_extended_attribute_initialize( libfshfs_extended_attribute_t **extended_attribute, + libfshfs_io_handle_t *io_handle, + libbfio_handle_t *file_io_handle, + libfshfs_file_system_t *file_system, + uint32_t identifier, libfshfs_attribute_record_t *attribute_record, libcerror_error_t **error ) { @@ -105,6 +118,10 @@ return( -1 ); } + internal_extended_attribute->io_handle = io_handle; + internal_extended_attribute->file_io_handle = file_io_handle; + internal_extended_attribute->file_system = file_system; + internal_extended_attribute->identifier = identifier; internal_extended_attribute->attribute_record = attribute_record; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBFSHFS ) @@ -177,6 +194,39 @@ result = -1; } #endif + if( internal_extended_attribute->data_stream != NULL ) + { + if( libfdata_stream_free( + &( internal_extended_attribute->data_stream ), + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free data stream.", + function ); + + result = -1; + } + } + if( internal_extended_attribute->extents_array != NULL ) + { + if( libcdata_array_free( + &( internal_extended_attribute->extents_array ), + (int (*)(intptr_t **, libcerror_error_t **)) &libfshfs_extent_free, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free extents array.", + function ); + + result = -1; + } + } memory_free( internal_extended_attribute ); } @@ -474,6 +524,798 @@ function ); return( -1 ); + } +#endif + return( result ); +} + +/* Determines the data stream + * Returns 1 if successful or -1 on error + */ +int libfshfs_internal_extended_attribute_get_data_stream( + libfshfs_internal_extended_attribute_t *internal_extended_attribute, + libcerror_error_t **error ) +{ + libfshfs_fork_descriptor_t *fork_descriptor = NULL; + static char *function = "libfshfs_internal_extended_attribute_get_data_stream"; + int result = 0; + + if( internal_extended_attribute == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid extended attribute.", + function ); + + return( -1 ); + } + if( internal_extended_attribute->attribute_record == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, + "%s: invalid extended attribute - missing attribute record.", + function ); + + return( -1 ); + } + if( internal_extended_attribute->data_stream != NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, + "%s: invalid extended attribute - data stream value already set.", + function ); + + return( -1 ); + } + if( internal_extended_attribute->attribute_record->record_type == LIBFSHFS_ATTRIBUTE_RECORD_TYPE_INLINE_DATA ) + { + result = libfshfs_allocation_block_stream_initialize_from_data( + &( internal_extended_attribute->data_stream ), + internal_extended_attribute->attribute_record->inline_data, + internal_extended_attribute->attribute_record->inline_data_size, + error ); + } + else if( internal_extended_attribute->attribute_record->record_type == LIBFSHFS_ATTRIBUTE_RECORD_TYPE_FORK_DATA ) + { + if( libfshfs_attribute_record_get_fork_descriptor( + internal_extended_attribute->attribute_record, + &fork_descriptor, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve fork descriptor from attribute record.", + function ); + + goto on_error; + } + result = libfshfs_allocation_block_stream_initialize_from_fork_descriptor( + &( internal_extended_attribute->data_stream ), + internal_extended_attribute->io_handle, + fork_descriptor, + error ); + } +/* TODO add support for LIBFSHFS_ATTRIBUTE_RECORD_TYPE_EXTENTS */ + else + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, + "%s: unsupported attribute record type.", + function ); + + goto on_error; + } + if( result != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to create data stream.", + function ); + + return( -1 ); + } + return( 1 ); + +on_error: + if( internal_extended_attribute->extents_array != NULL ) + { + libcdata_array_free( + &( internal_extended_attribute->extents_array ), + (int (*)(intptr_t **, libcerror_error_t **)) &libfshfs_extent_free, + NULL ); + } + return( -1 ); + +} + +/* Reads data at the current offset into a buffer + * Returns the number of bytes read or -1 on error + */ +ssize_t libfshfs_extended_attribute_read_buffer( + libfshfs_extended_attribute_t *extended_attribute, + void *buffer, + size_t buffer_size, + libcerror_error_t **error ) +{ + libfshfs_internal_extended_attribute_t *internal_extended_attribute = NULL; + static char *function = "libfshfs_extended_attribute_read_buffer"; + ssize_t read_count = 0; + + if( extended_attribute == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid extended attribute.", + function ); + + return( -1 ); + } + internal_extended_attribute = (libfshfs_internal_extended_attribute_t *) extended_attribute; + +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_grab_for_write( + internal_extended_attribute->read_write_lock, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to grab read/write lock for writing.", + function ); + + return( -1 ); + } +#endif + if( internal_extended_attribute->data_stream == NULL ) + { + if( libfshfs_internal_extended_attribute_get_data_stream( + internal_extended_attribute, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to determine data stream.", + function ); + + read_count = -1; + } + } + if( internal_extended_attribute->data_stream != NULL ) + { + read_count = libfdata_stream_read_buffer( + internal_extended_attribute->data_stream, + (intptr_t *) internal_extended_attribute->file_io_handle, + (uint8_t *) buffer, + buffer_size, + 0, + error ); + + if( read_count < 0 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_READ_FAILED, + "%s: unable to read buffer from data stream.", + function ); + + read_count = -1; + } + } +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_release_for_write( + internal_extended_attribute->read_write_lock, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to release read/write lock for writing.", + function ); + + return( -1 ); + } +#endif + return( read_count ); +} + +/* Reads data at a specific offset + * Returns the number of bytes read or -1 on error + */ +ssize_t libfshfs_extended_attribute_read_buffer_at_offset( + libfshfs_extended_attribute_t *extended_attribute, + void *buffer, + size_t buffer_size, + off64_t offset, + libcerror_error_t **error ) +{ + libfshfs_internal_extended_attribute_t *internal_extended_attribute = NULL; + static char *function = "libfshfs_extended_attribute_read_buffer_at_offset"; + ssize_t read_count = 0; + + if( extended_attribute == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid extended attribute.", + function ); + + return( -1 ); + } + internal_extended_attribute = (libfshfs_internal_extended_attribute_t *) extended_attribute; + +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_grab_for_write( + internal_extended_attribute->read_write_lock, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to grab read/write lock for writing.", + function ); + + return( -1 ); + } +#endif + if( internal_extended_attribute->data_stream == NULL ) + { + if( libfshfs_internal_extended_attribute_get_data_stream( + internal_extended_attribute, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to determine data stream.", + function ); + + read_count = -1; + } + } + if( internal_extended_attribute->data_stream != NULL ) + { + read_count = libfdata_stream_read_buffer_at_offset( + internal_extended_attribute->data_stream, + (intptr_t *) internal_extended_attribute->file_io_handle, + (uint8_t *) buffer, + buffer_size, + offset, + 0, + error ); + + if( read_count < 0 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_READ_FAILED, + "%s: unable to read buffer at offset from data stream.", + function ); + + read_count = -1; + } + } +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_release_for_write( + internal_extended_attribute->read_write_lock, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to release read/write lock for writing.", + function ); + + return( -1 ); + } +#endif + return( read_count ); +} + +/* Seeks a certain offset + * Returns the offset if seek is successful or -1 on error + */ +off64_t libfshfs_extended_attribute_seek_offset( + libfshfs_extended_attribute_t *extended_attribute, + off64_t offset, + int whence, + libcerror_error_t **error ) +{ + libfshfs_internal_extended_attribute_t *internal_extended_attribute = NULL; + static char *function = "libfshfs_extended_attribute_seek_offset"; + + if( extended_attribute == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid extended attribute.", + function ); + + return( -1 ); + } + internal_extended_attribute = (libfshfs_internal_extended_attribute_t *) extended_attribute; + +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_grab_for_write( + internal_extended_attribute->read_write_lock, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to grab read/write lock for writing.", + function ); + + return( -1 ); + } +#endif + if( internal_extended_attribute->data_stream == NULL ) + { + if( libfshfs_internal_extended_attribute_get_data_stream( + internal_extended_attribute, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to determine data stream.", + function ); + + offset = -1; + } + } + if( internal_extended_attribute->data_stream != NULL ) + { + offset = libfdata_stream_seek_offset( + internal_extended_attribute->data_stream, + offset, + whence, + error ); + + if( offset < 0 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_SEEK_FAILED, + "%s: unable to seek offset in data stream.", + function ); + + offset = -1; + } + } +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_release_for_write( + internal_extended_attribute->read_write_lock, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to release read/write lock for writing.", + function ); + + return( -1 ); + } +#endif + return( offset ); +} + +/* Retrieves the current offset + * Returns the offset if successful or -1 on error + */ +int libfshfs_extended_attribute_get_offset( + libfshfs_extended_attribute_t *extended_attribute, + off64_t *offset, + libcerror_error_t **error ) +{ + libfshfs_internal_extended_attribute_t *internal_extended_attribute = NULL; + static char *function = "libfshfs_extended_attribute_get_offset"; + int result = 1; + + if( extended_attribute == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid extended attribute.", + function ); + + return( -1 ); + } + internal_extended_attribute = (libfshfs_internal_extended_attribute_t *) extended_attribute; + +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_grab_for_write( + internal_extended_attribute->read_write_lock, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to grab read/write lock for writing.", + function ); + + return( -1 ); + } +#endif + if( internal_extended_attribute->data_stream == NULL ) + { + if( libfshfs_internal_extended_attribute_get_data_stream( + internal_extended_attribute, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to determine data stream.", + function ); + + result = -1; + } + } + if( internal_extended_attribute->data_stream != NULL ) + { + if( libfdata_stream_get_offset( + internal_extended_attribute->data_stream, + offset, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve offset from data stream.", + function ); + + result = -1; + } + } +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_release_for_write( + internal_extended_attribute->read_write_lock, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to release read/write lock for writing.", + function ); + + return( -1 ); + } +#endif + return( result ); +} + +/* Retrieves the size of the data stream object + * Returns 1 if successful or -1 on error + */ +int libfshfs_extended_attribute_get_size( + libfshfs_extended_attribute_t *extended_attribute, + size64_t *size, + libcerror_error_t **error ) +{ + libfshfs_internal_extended_attribute_t *internal_extended_attribute = NULL; + static char *function = "libfshfs_extended_attribute_get_size"; + int result = 1; + + if( extended_attribute == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid extended attribute.", + function ); + + return( -1 ); + } + internal_extended_attribute = (libfshfs_internal_extended_attribute_t *) extended_attribute; + +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_grab_for_write( + internal_extended_attribute->read_write_lock, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to grab read/write lock for writing.", + function ); + + return( -1 ); + } +#endif + if( internal_extended_attribute->data_stream == NULL ) + { + if( libfshfs_internal_extended_attribute_get_data_stream( + internal_extended_attribute, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to determine data stream.", + function ); + + result = -1; + } + } + if( internal_extended_attribute->data_stream != NULL ) + { + if( libfdata_stream_get_size( + internal_extended_attribute->data_stream, + size, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve size of data stream.", + function ); + + result = -1; + } + } +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_release_for_write( + internal_extended_attribute->read_write_lock, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to release read/write lock for writing.", + function ); + + return( -1 ); + } +#endif + return( result ); +} + +/* Retrieves the number of extents + * Returns 1 if successful or -1 on error + */ +int libfshfs_extended_attribute_get_number_of_extents( + libfshfs_extended_attribute_t *extended_attribute, + int *number_of_extents, + libcerror_error_t **error ) +{ + libfshfs_internal_extended_attribute_t *internal_extended_attribute = NULL; + static char *function = "libfshfs_extended_attribute_get_number_of_extents"; + int result = 1; + + if( extended_attribute == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid extended attribute.", + function ); + + return( -1 ); + } + internal_extended_attribute = (libfshfs_internal_extended_attribute_t *) extended_attribute; + +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_grab_for_write( + internal_extended_attribute->read_write_lock, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to grab read/write lock for writing.", + function ); + + return( -1 ); + } +#endif + if( internal_extended_attribute->data_stream == NULL ) + { + if( libfshfs_internal_extended_attribute_get_data_stream( + internal_extended_attribute, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to determine data stream.", + function ); + + result = -1; + } + } + if( internal_extended_attribute->data_stream != NULL ) + { + if( libcdata_array_get_number_of_entries( + internal_extended_attribute->extents_array, + number_of_extents, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve number of extents from array.", + function ); + + result = -1; + } + } +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_release_for_write( + internal_extended_attribute->read_write_lock, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to release read/write lock for writing.", + function ); + + return( -1 ); + } +#endif + return( result ); +} + +/* Retrieves a specific extent + * Returns 1 if successful or -1 on error + */ +int libfshfs_extended_attribute_get_extent_by_index( + libfshfs_extended_attribute_t *extended_attribute, + int extent_index, + off64_t *extent_offset, + size64_t *extent_size, + uint32_t *extent_flags, + libcerror_error_t **error ) +{ + libfshfs_extent_t *extent = NULL; + libfshfs_internal_extended_attribute_t *internal_extended_attribute = NULL; + static char *function = "libfshfs_extended_attribute_get_extent_by_index"; + int result = 1; + + if( extended_attribute == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid extended attribute.", + function ); + + return( -1 ); + } + internal_extended_attribute = (libfshfs_internal_extended_attribute_t *) extended_attribute; + +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_grab_for_write( + internal_extended_attribute->read_write_lock, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to grab read/write lock for writing.", + function ); + + return( -1 ); + } +#endif + if( internal_extended_attribute->data_stream == NULL ) + { + if( libfshfs_internal_extended_attribute_get_data_stream( + internal_extended_attribute, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to determine data stream.", + function ); + + result = -1; + } + } + if( internal_extended_attribute->data_stream != NULL ) + { + if( libcdata_array_get_entry_by_index( + internal_extended_attribute->extents_array, + extent_index, + (intptr_t **) &extent, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve extent: %d from array.", + function, + extent_index ); + + result = -1; + } + if( result == 1 ) + { + if( libfshfs_extent_get_values( + extent, + internal_extended_attribute->io_handle, + extent_offset, + extent_size, + extent_flags, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve extent: %d values.", + function, + extent_index ); + + result = -1; + } + } + } +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_release_for_write( + internal_extended_attribute->read_write_lock, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to release read/write lock for writing.", + function ); + + return( -1 ); } #endif return( result ); diff -Nru libfshfs-20201104/libfshfs/libfshfs_extended_attribute.h libfshfs-20240221/libfshfs/libfshfs_extended_attribute.h --- libfshfs-20201104/libfshfs/libfshfs_extended_attribute.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_extended_attribute.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Extended attribute functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -27,8 +27,13 @@ #include "libfshfs_attribute_record.h" #include "libfshfs_extern.h" +#include "libfshfs_file_system.h" +#include "libfshfs_io_handle.h" +#include "libfshfs_libbfio.h" +#include "libfshfs_libcdata.h" #include "libfshfs_libcerror.h" #include "libfshfs_libcthreads.h" +#include "libfshfs_libfdata.h" #include "libfshfs_types.h" #if defined( __cplusplus ) @@ -39,10 +44,34 @@ struct libfshfs_internal_extended_attribute { + /* The IO handle + */ + libfshfs_io_handle_t *io_handle; + + /* The file IO handle + */ + libbfio_handle_t *file_io_handle; + + /* The file system + */ + libfshfs_file_system_t *file_system; + + /* Identifier + */ + uint32_t identifier; + /* The attribute record */ libfshfs_attribute_record_t *attribute_record; + /* The extents array + */ + libcdata_array_t *extents_array; + + /* The data stream + */ + libfdata_stream_t *data_stream; + #if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) /* The read/write lock */ @@ -52,6 +81,10 @@ int libfshfs_extended_attribute_initialize( libfshfs_extended_attribute_t **extended_attribute, + libfshfs_io_handle_t *io_handle, + libbfio_handle_t *file_io_handle, + libfshfs_file_system_t *file_system, + uint32_t identifier, libfshfs_attribute_record_t *attribute_record, libcerror_error_t **error ); @@ -86,6 +119,59 @@ size_t utf16_string_size, libcerror_error_t **error ); +int libfshfs_internal_extended_attribute_get_data_stream( + libfshfs_internal_extended_attribute_t *internal_extended_attribute, + libcerror_error_t **error ); + +LIBFSHFS_EXTERN \ +ssize_t libfshfs_extended_attribute_read_buffer( + libfshfs_extended_attribute_t *extended_attribute, + void *buffer, + size_t buffer_size, + libcerror_error_t **error ); + +LIBFSHFS_EXTERN \ +ssize_t libfshfs_extended_attribute_read_buffer_at_offset( + libfshfs_extended_attribute_t *extended_attribute, + void *buffer, + size_t buffer_size, + off64_t offset, + libcerror_error_t **error ); + +LIBFSHFS_EXTERN \ +off64_t libfshfs_extended_attribute_seek_offset( + libfshfs_extended_attribute_t *extended_attribute, + off64_t offset, + int whence, + libcerror_error_t **error ); + +LIBFSHFS_EXTERN \ +int libfshfs_extended_attribute_get_offset( + libfshfs_extended_attribute_t *extended_attribute, + off64_t *offset, + libcerror_error_t **error ); + +LIBFSHFS_EXTERN \ +int libfshfs_extended_attribute_get_size( + libfshfs_extended_attribute_t *extended_attribute, + size64_t *size, + libcerror_error_t **error ); + +LIBFSHFS_EXTERN \ +int libfshfs_extended_attribute_get_number_of_extents( + libfshfs_extended_attribute_t *extended_attribute, + int *number_of_extents, + libcerror_error_t **error ); + +LIBFSHFS_EXTERN \ +int libfshfs_extended_attribute_get_extent_by_index( + libfshfs_extended_attribute_t *extended_attribute, + int extent_index, + off64_t *extent_offset, + size64_t *extent_size, + uint32_t *extent_flags, + libcerror_error_t **error ); + #if defined( __cplusplus ) } #endif diff -Nru libfshfs-20201104/libfshfs/libfshfs_extent.c libfshfs-20240221/libfshfs/libfshfs_extent.c --- libfshfs-20201104/libfshfs/libfshfs_extent.c 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_extent.c 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Extent functions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -24,6 +24,7 @@ #include #include "libfshfs_extent.h" +#include "libfshfs_io_handle.h" #include "libfshfs_libcerror.h" /* Creates an extent @@ -129,3 +130,111 @@ return( 1 ); } +/* Retrieves the extents values + * Returns 1 if successful or -1 on error + */ +int libfshfs_extent_get_values( + libfshfs_extent_t *extent, + libfshfs_io_handle_t *io_handle, + off64_t *extent_offset, + size64_t *extent_size, + uint32_t *extent_flags, + libcerror_error_t **error ) +{ + static char *function = "libfshfs_extent_get_values"; + + if( extent == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid extent.", + function ); + + return( -1 ); + } + if( io_handle == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid IO handle.", + function ); + + return( -1 ); + } + if( io_handle->block_size == 0 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid IO handle - block size value out of bounds.", + function ); + + return( -1 ); + } + if( extent_offset == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid extent offset.", + function ); + + return( -1 ); + } + if( extent_size == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid extent size.", + function ); + + return( -1 ); + } + if( extent_flags == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid extent flags.", + function ); + + return( -1 ); + } + if( extent->block_number > ( (uint64_t) INT64_MAX / io_handle->block_size ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid extent - invalid block number value out of bounds.", + function ); + + return( -1 ); + } + if( extent->number_of_blocks > ( (uint64_t) UINT64_MAX / io_handle->block_size ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid extent - invalid number of blocks value out of bounds.", + function ); + + return( -1 ); + } + *extent_offset = (off64_t) extent->block_number * (off64_t) io_handle->block_size; + *extent_size = (size64_t) extent->number_of_blocks * (size64_t) io_handle->block_size; + *extent_flags = 0; + + return( 1 ); +} + diff -Nru libfshfs-20201104/libfshfs/libfshfs_extent.h libfshfs-20240221/libfshfs/libfshfs_extent.h --- libfshfs-20201104/libfshfs/libfshfs_extent.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_extent.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Extent functions * - * Copyright (C) 2010-2020, Joachim Metz + * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -26,6 +26,7 @@ #include #include "libfshfs_libcerror.h" +#include "libfshfs_io_handle.h" #if defined( __cplusplus ) extern "C" { @@ -52,6 +53,14 @@ libfshfs_extent_t **extent, libcerror_error_t **error ); +int libfshfs_extent_get_values( + libfshfs_extent_t *extent, + libfshfs_io_handle_t *io_handle, + off64_t *extent_offset, + size64_t *extent_size, + uint32_t *extent_flags, + libcerror_error_t **error ); + #if defined( __cplusplus ) } #endif diff -Nru libfshfs-20201104/libfshfs/libfshfs_extents_btree_file.c libfshfs-20240221/libfshfs/libfshfs_extents_btree_file.c --- libfshfs-20201104/libfshfs/libfshfs_extents_btree_file.c 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_extents_btree_file.c 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The extents (overflow) B-tree file functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -24,6 +24,8 @@ #include #include "libfshfs_definitions.h" +#include "libfshfs_btree_file.h" +#include "libfshfs_btree_node_cache.h" #include "libfshfs_extent.h" #include "libfshfs_extents_btree_file.h" #include "libfshfs_extents_btree_key.h" @@ -247,7 +249,7 @@ return( -1 ); } -/* TODO add traditional HFS support extents_data_size = 12; */ +/* TODO add classic HFS support extents_data_size = 12; */ extents_data_size = 64; if( node_key->record_data_size < extents_data_size ) @@ -539,6 +541,7 @@ int libfshfs_extents_btree_file_get_extents_from_branch_node( libfshfs_btree_file_t *btree_file, libbfio_handle_t *file_io_handle, + libfshfs_btree_node_cache_t *node_cache, libfshfs_btree_node_t *node, uint32_t identifier, uint8_t fork_type, @@ -711,9 +714,10 @@ if( libfshfs_btree_file_get_node_by_number( btree_file, file_io_handle, + node_cache, + recursion_depth, sub_node_number, &sub_node, - recursion_depth, error ) == -1 ) { libcerror_error_set( @@ -746,6 +750,7 @@ result = libfshfs_extents_btree_file_get_extents_from_branch_node( btree_file, file_io_handle, + node_cache, sub_node, identifier, fork_type, @@ -799,6 +804,7 @@ int libfshfs_extents_btree_file_get_extents( libfshfs_btree_file_t *btree_file, libbfio_handle_t *file_io_handle, + libfshfs_btree_node_cache_t *node_cache, uint32_t identifier, uint8_t fork_type, libcdata_array_t *extents, @@ -812,8 +818,8 @@ if( libfshfs_btree_file_get_root_node( btree_file, file_io_handle, + node_cache, &root_node, - 0, error ) == -1 ) { libcerror_error_set( @@ -844,6 +850,7 @@ result = libfshfs_extents_btree_file_get_extents_from_branch_node( btree_file, file_io_handle, + node_cache, root_node, identifier, fork_type, diff -Nru libfshfs-20201104/libfshfs/libfshfs_extents_btree_file.h libfshfs-20240221/libfshfs/libfshfs_extents_btree_file.h --- libfshfs-20201104/libfshfs/libfshfs_extents_btree_file.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_extents_btree_file.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The extents (overflow) B-tree file functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -26,6 +26,7 @@ #include #include "libfshfs_btree_file.h" +#include "libfshfs_btree_node_cache.h" #include "libfshfs_extents_btree_key.h" #include "libfshfs_libbfio.h" #include "libfshfs_libcdata.h" @@ -63,6 +64,7 @@ int libfshfs_extents_btree_file_get_extents_from_branch_node( libfshfs_btree_file_t *btree_file, libbfio_handle_t *file_io_handle, + libfshfs_btree_node_cache_t *node_cache, libfshfs_btree_node_t *node, uint32_t identifier, uint8_t fork_type, @@ -73,6 +75,7 @@ int libfshfs_extents_btree_file_get_extents( libfshfs_btree_file_t *btree_file, libbfio_handle_t *file_io_handle, + libfshfs_btree_node_cache_t *node_cache, uint32_t identifier, uint8_t fork_type, libcdata_array_t *extents, diff -Nru libfshfs-20201104/libfshfs/libfshfs_extents_btree_key.c libfshfs-20240221/libfshfs/libfshfs_extents_btree_key.c --- libfshfs-20201104/libfshfs/libfshfs_extents_btree_key.c 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_extents_btree_key.c 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The extents (overflow) B-tree key functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfshfs/libfshfs_extents_btree_key.h libfshfs-20240221/libfshfs/libfshfs_extents_btree_key.h --- libfshfs-20201104/libfshfs/libfshfs_extents_btree_key.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_extents_btree_key.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The extents (overflow) B-tree key functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfshfs/libfshfs_extents_record.c libfshfs-20240221/libfshfs/libfshfs_extents_record.c --- libfshfs-20201104/libfshfs/libfshfs_extents_record.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_extents_record.c 2024-02-21 05:48:50.000000000 +0000 @@ -0,0 +1,161 @@ +/* + * Extents record functions + * + * Copyright (C) 2009-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include +#include +#include + +#include "libfshfs_extent.h" +#include "libfshfs_extents_record.h" +#include "libfshfs_fork_descriptor.h" +#include "libfshfs_libcerror.h" +#include "libfshfs_libcnotify.h" + +/* Reads the extents record into the fork descriptor + * Returns 1 if successful or -1 on error + */ +int libfshfs_extents_record_read_data( + libfshfs_fork_descriptor_t *fork_descriptor, + uint16_t extents_start_block_number, + const uint8_t *data, + size_t data_size, + libcerror_error_t **error ) +{ + static char *function = "libfshfs_extents_record_read_data"; + size_t data_offset = 0; + uint32_t physical_extent_block_number = 0; + uint16_t extent_block_number = 0; + uint16_t extent_number_of_blocks = 0; + int extent_index = 0; + + if( fork_descriptor == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid fork descriptor.", + function ); + + return( -1 ); + } + if( data == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, + "%s: invalid data.", + function ); + + return( -1 ); + } + if( data_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid data size value out of bounds.", + function ); + + return( -1 ); + } +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: extents records data:\n", + function ); + libcnotify_print_data( + data, + data_size, + LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); + } +#endif + if( data_size != 12 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, + "%s: unsupported extents record data size: %" PRIzd "\n", + function, + data_size ); + + return( -1 ); + } + while( data_offset < 12 ) + { + byte_stream_copy_to_uint16_big_endian( + &( data[ data_offset ] ), + extent_block_number ); + + data_offset += 2; + + byte_stream_copy_to_uint16_big_endian( + &( data[ data_offset ] ), + extent_number_of_blocks ); + + data_offset += 2; + + physical_extent_block_number = extent_block_number; + + if( extent_number_of_blocks > 0 ) + { + physical_extent_block_number += extents_start_block_number; + } +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: extent: %d block number\t\t: %" PRIu32 " (%" PRIu16 ")\n", + function, + extent_index, + physical_extent_block_number, + extent_block_number ); + + libcnotify_printf( + "%s: extent: %d number of blocks\t\t: %" PRIu16 "\n", + function, + extent_index, + extent_number_of_blocks ); + } +#endif /* defined( HAVE_DEBUG_OUTPUT ) */ + + fork_descriptor->extents[ extent_index ][ 0 ] = physical_extent_block_number; + fork_descriptor->extents[ extent_index ][ 1 ] = extent_number_of_blocks; + + fork_descriptor->number_of_blocks_in_extents += extent_number_of_blocks; + + extent_index++; + } +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "\n" ); + } +#endif + return( 1 ); +} + diff -Nru libfshfs-20201104/libfshfs/libfshfs_extents_record.h libfshfs-20240221/libfshfs/libfshfs_extents_record.h --- libfshfs-20201104/libfshfs/libfshfs_extents_record.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_extents_record.h 2024-02-21 05:48:50.000000000 +0000 @@ -0,0 +1,47 @@ +/* + * Extents record functions + * + * Copyright (C) 2009-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _LIBFSHFS_EXTENTS_RECORD_H ) +#define _LIBFSHFS_EXTENTS_RECORD_H + +#include +#include + +#include "libfshfs_fork_descriptor.h" +#include "libfshfs_libcerror.h" + +#if defined( __cplusplus ) +extern "C" { +#endif + +int libfshfs_extents_record_read_data( + libfshfs_fork_descriptor_t *fork_descriptor, + uint16_t extents_start_block_number, + const uint8_t *data, + size_t data_size, + libcerror_error_t **error ); + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _LIBFSHFS_EXTENTS_RECORD_H ) */ + diff -Nru libfshfs-20201104/libfshfs/libfshfs_extern.h libfshfs-20240221/libfshfs/libfshfs_extern.h --- libfshfs-20201104/libfshfs/libfshfs_extern.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_extern.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The internal extern definition * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -30,7 +30,7 @@ #include -#if defined( __CYGWIN__ ) +#if defined( __CYGWIN__ ) || defined( __MINGW32__ ) #define LIBFSHFS_EXTERN_VARIABLE extern #else #define LIBFSHFS_EXTERN_VARIABLE LIBFSHFS_EXTERN diff -Nru libfshfs-20201104/libfshfs/libfshfs_file_entry.c libfshfs-20240221/libfshfs/libfshfs_file_entry.c --- libfshfs-20201104/libfshfs/libfshfs_file_entry.c 2020-11-04 04:43:22.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_file_entry.c 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * File entry functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -23,6 +23,7 @@ #include #include +#include "libfshfs_allocation_block_stream.h" #include "libfshfs_attribute_record.h" #include "libfshfs_compressed_data_header.h" #include "libfshfs_data_stream.h" @@ -48,14 +49,13 @@ libfshfs_file_entry_t **file_entry, libfshfs_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, - libfshfs_directory_entry_t *directory_entry, libfshfs_file_system_t *file_system, + libfshfs_directory_entry_t *directory_entry, libcerror_error_t **error ) { libfshfs_internal_file_entry_t *internal_file_entry = NULL; static char *function = "libfshfs_file_entry_initialize"; uint16_t file_mode = 0; - int result = 0; if( file_entry == NULL ) { @@ -79,6 +79,17 @@ return( -1 ); } + if( directory_entry == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid directory entry.", + function ); + + return( -1 ); + } internal_file_entry = memory_allocate_structure( libfshfs_internal_file_entry_t ); @@ -124,43 +135,70 @@ goto on_error; } - result = libfshfs_directory_entry_get_file_mode( - directory_entry, - &file_mode, - error ); - -/* TODO handle result == 0 for HFS */ - if( result != 1 ) + if( libfshfs_directory_entry_get_parent_identifier( + directory_entry, + &( internal_file_entry->parent_identifier ), + error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve file mode from directory entry.", + "%s: unable to retrieve parent identifier from directory entry.", function ); goto on_error; } - internal_file_entry->io_handle = io_handle; - internal_file_entry->file_io_handle = file_io_handle; - internal_file_entry->directory_entry = directory_entry; - internal_file_entry->file_system = file_system; - internal_file_entry->file_mode = file_mode; - - if( libfshfs_internal_file_entry_get_data_size( - internal_file_entry, + if( libfshfs_directory_entry_get_link_reference( directory_entry, - error ) != 1 ) + &( internal_file_entry->link_reference ), + error ) == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve link reference from directory entry.", + function ); + + goto on_error; + } + if( internal_file_entry->link_reference > 2 ) + { + internal_file_entry->link_identifier = internal_file_entry->identifier; + internal_file_entry->identifier = internal_file_entry->link_reference; + } + /* Traditional HFS does not have a file mode so we derive it from the record type + */ + if( directory_entry->record_type == LIBFSHFS_RECORD_TYPE_HFS_DIRECTORY_RECORD ) + { + file_mode = LIBFSHFS_FILE_TYPE_DIRECTORY; + } + else if( directory_entry->record_type == LIBFSHFS_RECORD_TYPE_HFS_FILE_RECORD ) + { + file_mode = LIBFSHFS_FILE_TYPE_REGULAR_FILE; + } + else if( libfshfs_directory_entry_get_file_mode( + directory_entry, + &file_mode, + error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve data size.", + "%s: unable to retrieve file mode from directory entry.", function ); goto on_error; } + internal_file_entry->io_handle = io_handle; + internal_file_entry->file_io_handle = file_io_handle; + internal_file_entry->directory_entry = directory_entry; + internal_file_entry->file_system = file_system; + internal_file_entry->file_mode = file_mode; + internal_file_entry->data_size = (size64_t) -1; + #if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) if( libcthreads_read_write_lock_initialize( &( internal_file_entry->read_write_lock ), @@ -295,10 +333,10 @@ result = -1; } } - if( internal_file_entry->extents != NULL ) + if( internal_file_entry->extents_array != NULL ) { if( libcdata_array_free( - &( internal_file_entry->extents ), + &( internal_file_entry->extents_array ), (int (*)(intptr_t **, libcerror_error_t **)) &libfshfs_extent_free, error ) != 1 ) { @@ -334,24 +372,37 @@ memory_free( internal_file_entry->symbolic_link_data ); } + if( internal_file_entry->indirect_node_directory_entry != NULL ) + { + if( libfshfs_directory_entry_free( + &( internal_file_entry->indirect_node_directory_entry ), + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free indirect node directory entry.", + function ); + + result = -1; + } + } memory_free( internal_file_entry ); } return( result ); } -/* Retrieves the data size +/* Retrieves the (active) directory entry * Returns 1 if successful or -1 on error */ -int libfshfs_internal_file_entry_get_data_size( +int libfshfs_internal_file_entry_get_directory_entry( libfshfs_internal_file_entry_t *internal_file_entry, - libfshfs_directory_entry_t *directory_entry, + libfshfs_directory_entry_t **directory_entry, libcerror_error_t **error ) { - libfshfs_fork_descriptor_t *data_fork_descriptor = NULL; - static char *function = "libfshfs_internal_file_entry_get_data_size"; - size64_t data_size = 0; - int result = 0; + static char *function = "libfshfs_internal_file_entry_get_directory_entry"; if( internal_file_entry == NULL ) { @@ -364,162 +415,48 @@ return( -1 ); } - if( internal_file_entry->compressed_data_attribute_record != NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, - "%s: invalid file entry - compressed data attribute record value already set.", - function ); - - return( -1 ); - } - if( internal_file_entry->compressed_data_header != NULL ) + if( directory_entry == NULL ) { libcerror_error_set( error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, - "%s: invalid file entry - compressed data header value already set.", + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid directory entry.", function ); return( -1 ); } - result = libfshfs_directory_entry_get_data_fork_descriptor( - directory_entry, - &data_fork_descriptor, - error ); - - if( result == -1 ) + if( ( internal_file_entry->link_reference > 2 ) + && ( internal_file_entry->indirect_node_directory_entry == NULL ) ) { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve data fork descriptor from directory entry.", - function ); - - goto on_error; - } - else if( result != 0 ) - { - if( data_fork_descriptor == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, - "%s: missing data fork descriptor.", - function ); - - goto on_error; - } - result = libfshfs_internal_file_entry_get_attribute_record_by_utf8_name( - internal_file_entry, - (uint8_t *) "com.apple.decmpfs", - 17, - &( internal_file_entry->compressed_data_attribute_record ), - error ); - - if( result == -1 ) + if( libfshfs_file_system_get_indirect_node_directory_entry_by_identifier( + internal_file_entry->file_system, + internal_file_entry->io_handle, + internal_file_entry->file_io_handle, + internal_file_entry->link_reference, + &( internal_file_entry->indirect_node_directory_entry ), + error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve com.apple.decmpfs attribute record.", - function ); - - result = -1; - } - else if( result != 0 ) - { - if( libfshfs_compressed_data_header_initialize( - &( internal_file_entry->compressed_data_header ), - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, - "%s: unable to create compressed data header.", - function ); - - goto on_error; - } - result = 0; - - if( internal_file_entry->compressed_data_attribute_record->record_type == 0x00000010UL ) - { - result = libfshfs_compressed_data_header_read_data( - internal_file_entry->compressed_data_header, - internal_file_entry->compressed_data_attribute_record->inline_data, - internal_file_entry->compressed_data_attribute_record->inline_data_size, - error ); - - if( result == -1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_IO, - LIBCERROR_IO_ERROR_READ_FAILED, - "%s: unable to read compressed data header.", - function ); - - goto on_error; - } - } - else - { -/* TODO add support for additional attribute record types */ - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, - "%s: unsupported com.apple.decmpfs attribute record type.", - function ); - - goto on_error; - } - if( result != 0 ) - { - data_size = internal_file_entry->compressed_data_header->uncompressed_data_size; - } - else - { - if( libfshfs_compressed_data_header_free( - &( internal_file_entry->compressed_data_header ), - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, - "%s: unable to create compressed data header.", - function ); + "%s: unable to retrieve indirect node directory entry: %" PRIu32 ".", + function, + internal_file_entry->link_reference ); - goto on_error; - } - } - } - if( result == 0 ) - { - data_size = (size64_t) data_fork_descriptor->size; + return( -1 ); } } - internal_file_entry->data_size = data_size; - - return( 1 ); - -on_error: - if( internal_file_entry->compressed_data_header != NULL ) + if( internal_file_entry->indirect_node_directory_entry != NULL ) { - libfshfs_compressed_data_header_free( - &( internal_file_entry->compressed_data_header ), - NULL ); + *directory_entry = internal_file_entry->indirect_node_directory_entry; } - return( -1 ); + else + { + *directory_entry = internal_file_entry->directory_entry; + } + return( 1 ); } /* Retrieves the data stream from a fork descriptor @@ -531,6 +468,7 @@ libfdata_stream_t **data_stream, libcerror_error_t **error ) { + libfshfs_directory_entry_t *directory_entry = NULL; libfshfs_fork_descriptor_t *fork_descriptor = NULL; static char *function = "libfshfs_internal_file_entry_get_data_stream_from_fork_descriptor"; int result = 0; @@ -558,17 +496,31 @@ return( -1 ); } + if( libfshfs_internal_file_entry_get_directory_entry( + internal_file_entry, + &directory_entry, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve directory entry.", + function ); + + goto on_error; + } if( fork_type == LIBFSHFS_FORK_TYPE_DATA ) { result = libfshfs_directory_entry_get_data_fork_descriptor( - internal_file_entry->directory_entry, + directory_entry, &fork_descriptor, error ); } else { result = libfshfs_directory_entry_get_resource_fork_descriptor( - internal_file_entry->directory_entry, + directory_entry, &fork_descriptor, error ); } @@ -583,24 +535,13 @@ goto on_error; } - if( fork_descriptor == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, - "%s: missing fork descriptor.", - function ); - - return( -1 ); - } if( libfshfs_file_system_get_extents( internal_file_entry->file_system, internal_file_entry->file_io_handle, internal_file_entry->identifier, fork_type, fork_descriptor, - &( internal_file_entry->extents ), + &( internal_file_entry->extents_array ), error ) != 1 ) { libcerror_error_set( @@ -612,10 +553,10 @@ goto on_error; } - if( libfshfs_data_stream_initialize_from_extents( + if( libfshfs_allocation_block_stream_initialize_from_extents( data_stream, internal_file_entry->io_handle, - internal_file_entry->extents, + internal_file_entry->extents_array, (size64_t) fork_descriptor->size, error ) != 1 ) { @@ -631,10 +572,10 @@ return( 1 ); on_error: - if( internal_file_entry->extents != NULL ) + if( internal_file_entry->extents_array != NULL ) { libcdata_array_free( - &( internal_file_entry->extents ), + &( internal_file_entry->extents_array ), (int (*)(intptr_t **, libcerror_error_t **)) &libfshfs_extent_free, NULL ); } @@ -692,6 +633,11 @@ compression_method = LIBFSHFS_COMPRESSION_METHOD_LZVN; break; + case 11: + case 12: + compression_method = LIBFSHFS_COMPRESSION_METHOD_LZFSE; + break; + default: libcerror_error_set( error, @@ -724,7 +670,7 @@ } else { - if( libfshfs_data_stream_initialize_from_data( + if( libfshfs_allocation_block_stream_initialize_from_data( &compressed_data_stream, internal_file_entry->compressed_data_attribute_record->inline_data, internal_file_entry->compressed_data_attribute_record->inline_data_size, @@ -740,7 +686,7 @@ goto on_error; } } - if( libfshfs_data_stream_initialize_from_compressed_data_stream( + if( libfshfs_allocation_block_stream_initialize_from_compressed_stream( &( internal_file_entry->data_stream ), compressed_data_stream, internal_file_entry->compressed_data_header->uncompressed_data_size, @@ -800,6 +746,7 @@ libfshfs_internal_file_entry_t *internal_file_entry, libcerror_error_t **error ) { + libfshfs_directory_entry_t *directory_entry = NULL; libfshfs_fork_descriptor_t *data_fork_descriptor = NULL; static char *function = "libfshfs_internal_file_entry_get_symbolic_link_data"; ssize_t read_count = 0; @@ -837,10 +784,24 @@ "%s: invalid file entry - data stream value already set.", function ); - return( -1 ); + goto on_error; + } + if( libfshfs_internal_file_entry_get_directory_entry( + internal_file_entry, + &directory_entry, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve directory entry.", + function ); + + goto on_error; } if( libfshfs_directory_entry_get_data_fork_descriptor( - internal_file_entry->directory_entry, + directory_entry, &data_fork_descriptor, error ) != 1 ) { @@ -864,7 +825,7 @@ goto on_error; } - if( libfshfs_data_stream_initialize_from_fork_descriptor( + if( libfshfs_allocation_block_stream_initialize_from_fork_descriptor( &( internal_file_entry->data_stream ), internal_file_entry->io_handle, data_fork_descriptor, @@ -990,7 +951,7 @@ return( -1 ); } -#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT ) +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) if( libcthreads_read_write_lock_grab_for_read( internal_file_entry->read_write_lock, error ) != 1 ) @@ -1007,7 +968,7 @@ #endif *identifier = internal_file_entry->identifier; -#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT ) +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) if( libcthreads_read_write_lock_release_for_read( internal_file_entry->read_write_lock, error ) != 1 ) @@ -1035,7 +996,6 @@ { libfshfs_internal_file_entry_t *internal_file_entry = NULL; static char *function = "libfshfs_file_entry_get_parent_identifier"; - int result = 1; if( file_entry == NULL ) { @@ -1061,7 +1021,7 @@ return( -1 ); } -#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT ) +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) if( libcthreads_read_write_lock_grab_for_read( internal_file_entry->read_write_lock, error ) != 1 ) @@ -1076,22 +1036,76 @@ return( -1 ); } #endif - if( libfshfs_directory_entry_get_parent_identifier( - internal_file_entry->directory_entry, - parent_identifier, + *parent_identifier = internal_file_entry->parent_identifier; + +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_release_for_read( + internal_file_entry->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve parent identifier from directory entry.", + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to release read/write lock for reading.", function ); - result = -1; + return( -1 ); } -#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT ) - if( libcthreads_read_write_lock_release_for_read( +#endif + return( 1 ); +} + +/* Retrieves the parent file entry + * Returns 1 if successful, 0 if no such file entry or -1 on error + */ +int libfshfs_file_entry_get_parent_file_entry( + libfshfs_file_entry_t *file_entry, + libfshfs_file_entry_t **parent_file_entry, + libcerror_error_t **error ) +{ + libfshfs_directory_entry_t *parent_directory_entry = NULL; + libfshfs_internal_file_entry_t *internal_file_entry = NULL; + static char *function = "libfshfs_file_entry_get_parent_file_entry"; + int result = 0; + + if( file_entry == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file entry.", + function ); + + return( -1 ); + } + internal_file_entry = (libfshfs_internal_file_entry_t *) file_entry; + + if( parent_file_entry == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid parent file entry.", + function ); + + return( -1 ); + } + if( *parent_file_entry != NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, + "%s: invalid parent file entry value already set.", + function ); + + return( -1 ); + } +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_grab_for_write( internal_file_entry->read_write_lock, error ) != 1 ) { @@ -1099,13 +1113,84 @@ error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to release read/write lock for reading.", + "%s: unable to grab read/write lock for writing.", + function ); + + return( -1 ); + } +#endif + if( internal_file_entry->identifier > LIBFSHFS_ROOT_DIRECTORY_IDENTIFIER ) + { + if( libfshfs_file_system_get_directory_entry_by_identifier( + internal_file_entry->file_system, + internal_file_entry->io_handle, + internal_file_entry->file_io_handle, + internal_file_entry->parent_identifier, + &parent_directory_entry, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve parent directory entry: %" PRIu32 ".", + function, + internal_file_entry->parent_identifier ); + + goto on_error; + } + /* libfshfs_file_entry_initialize takes over management of parent_directory_entry + */ + if( libfshfs_file_entry_initialize( + parent_file_entry, + internal_file_entry->io_handle, + internal_file_entry->file_io_handle, + internal_file_entry->file_system, + parent_directory_entry, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to create parent file entry.", + function ); + + goto on_error; + } + parent_directory_entry = NULL; + result = 1; + } +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_release_for_write( + internal_file_entry->read_write_lock, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to release read/write lock for writing.", function ); return( -1 ); } #endif return( result ); + +on_error: + if( parent_directory_entry != NULL ) + { + libfshfs_directory_entry_free( + &parent_directory_entry, + NULL ); + } +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + libcthreads_read_write_lock_release_for_write( + internal_file_entry->read_write_lock, + NULL ); +#endif + return( -1 ); } /* Retrieves the hard link identifier (or catalog node identifier (CNID)) @@ -1144,7 +1229,7 @@ return( -1 ); } -#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT ) +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) if( libcthreads_read_write_lock_grab_for_read( internal_file_entry->read_write_lock, error ) != 1 ) @@ -1159,23 +1244,13 @@ return( -1 ); } #endif - result = libfshfs_directory_entry_get_link_identifier( - internal_file_entry->directory_entry, - link_identifier, - error ); - - if( result == -1 ) + if( internal_file_entry->link_reference > 2 ) { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve link identifier from directory entry.", - function ); + *link_identifier = internal_file_entry->link_identifier; - result = -1; + result = 1; } -#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT ) +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) if( libcthreads_read_write_lock_release_for_read( internal_file_entry->read_write_lock, error ) != 1 ) @@ -1202,6 +1277,7 @@ uint32_t *hfs_time, libcerror_error_t **error ) { + libfshfs_directory_entry_t *directory_entry = NULL; libfshfs_internal_file_entry_t *internal_file_entry = NULL; static char *function = "libfshfs_file_entry_get_creation_time"; int result = 1; @@ -1219,7 +1295,7 @@ } internal_file_entry = (libfshfs_internal_file_entry_t *) file_entry; -#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT ) +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) if( libcthreads_read_write_lock_grab_for_read( internal_file_entry->read_write_lock, error ) != 1 ) @@ -1234,21 +1310,38 @@ return( -1 ); } #endif - if( libfshfs_directory_entry_get_creation_time( - internal_file_entry->directory_entry, - hfs_time, + if( libfshfs_internal_file_entry_get_directory_entry( + internal_file_entry, + &directory_entry, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve creation time from directory entry.", + "%s: unable to retrieve directory entry.", function ); result = -1; } -#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT ) + else + { + if( libfshfs_directory_entry_get_creation_time( + directory_entry, + hfs_time, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve creation time from directory entry.", + function ); + + result = -1; + } + } +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) if( libcthreads_read_write_lock_release_for_read( internal_file_entry->read_write_lock, error ) != 1 ) @@ -1275,6 +1368,7 @@ uint32_t *hfs_time, libcerror_error_t **error ) { + libfshfs_directory_entry_t *directory_entry = NULL; libfshfs_internal_file_entry_t *internal_file_entry = NULL; static char *function = "libfshfs_file_entry_get_modification_time"; int result = 1; @@ -1292,7 +1386,7 @@ } internal_file_entry = (libfshfs_internal_file_entry_t *) file_entry; -#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT ) +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) if( libcthreads_read_write_lock_grab_for_read( internal_file_entry->read_write_lock, error ) != 1 ) @@ -1307,21 +1401,38 @@ return( -1 ); } #endif - if( libfshfs_directory_entry_get_modification_time( - internal_file_entry->directory_entry, - hfs_time, + if( libfshfs_internal_file_entry_get_directory_entry( + internal_file_entry, + &directory_entry, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve modification time from directory entry.", + "%s: unable to retrieve directory entry.", function ); result = -1; } -#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT ) + else + { + if( libfshfs_directory_entry_get_modification_time( + directory_entry, + hfs_time, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve modification time from directory entry.", + function ); + + result = -1; + } + } +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) if( libcthreads_read_write_lock_release_for_read( internal_file_entry->read_write_lock, error ) != 1 ) @@ -1348,6 +1459,7 @@ uint32_t *hfs_time, libcerror_error_t **error ) { + libfshfs_directory_entry_t *directory_entry = NULL; libfshfs_internal_file_entry_t *internal_file_entry = NULL; static char *function = "libfshfs_file_entry_get_entry_modification_time"; int result = 1; @@ -1365,7 +1477,7 @@ } internal_file_entry = (libfshfs_internal_file_entry_t *) file_entry; -#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT ) +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) if( libcthreads_read_write_lock_grab_for_read( internal_file_entry->read_write_lock, error ) != 1 ) @@ -1380,23 +1492,40 @@ return( -1 ); } #endif - result = libfshfs_directory_entry_get_entry_modification_time( - internal_file_entry->directory_entry, - hfs_time, - error ); - - if( result == -1 ) + if( libfshfs_internal_file_entry_get_directory_entry( + internal_file_entry, + &directory_entry, + error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve entry modification time from directory entry.", + "%s: unable to retrieve directory entry.", function ); result = -1; } -#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT ) + else + { + result = libfshfs_directory_entry_get_entry_modification_time( + directory_entry, + hfs_time, + error ); + + if( result == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve entry modification time from directory entry.", + function ); + + result = -1; + } + } +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) if( libcthreads_read_write_lock_release_for_read( internal_file_entry->read_write_lock, error ) != 1 ) @@ -1423,6 +1552,7 @@ uint32_t *hfs_time, libcerror_error_t **error ) { + libfshfs_directory_entry_t *directory_entry = NULL; libfshfs_internal_file_entry_t *internal_file_entry = NULL; static char *function = "libfshfs_file_entry_get_access_time"; int result = 1; @@ -1440,7 +1570,7 @@ } internal_file_entry = (libfshfs_internal_file_entry_t *) file_entry; -#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT ) +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) if( libcthreads_read_write_lock_grab_for_read( internal_file_entry->read_write_lock, error ) != 1 ) @@ -1455,23 +1585,40 @@ return( -1 ); } #endif - result = libfshfs_directory_entry_get_access_time( - internal_file_entry->directory_entry, - hfs_time, - error ); - - if( result == -1 ) + if( libfshfs_internal_file_entry_get_directory_entry( + internal_file_entry, + &directory_entry, + error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve access time from directory entry.", + "%s: unable to retrieve directory entry.", function ); result = -1; } -#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT ) + else + { + result = libfshfs_directory_entry_get_access_time( + directory_entry, + hfs_time, + error ); + + if( result == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve access time from directory entry.", + function ); + + result = -1; + } + } +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) if( libcthreads_read_write_lock_release_for_read( internal_file_entry->read_write_lock, error ) != 1 ) @@ -1498,6 +1645,7 @@ uint32_t *hfs_time, libcerror_error_t **error ) { + libfshfs_directory_entry_t *directory_entry = NULL; libfshfs_internal_file_entry_t *internal_file_entry = NULL; static char *function = "libfshfs_file_entry_get_backup_time"; int result = 1; @@ -1515,7 +1663,7 @@ } internal_file_entry = (libfshfs_internal_file_entry_t *) file_entry; -#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT ) +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) if( libcthreads_read_write_lock_grab_for_read( internal_file_entry->read_write_lock, error ) != 1 ) @@ -1530,21 +1678,38 @@ return( -1 ); } #endif - if( libfshfs_directory_entry_get_backup_time( - internal_file_entry->directory_entry, - hfs_time, + if( libfshfs_internal_file_entry_get_directory_entry( + internal_file_entry, + &directory_entry, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve backup time from directory entry.", + "%s: unable to retrieve directory entry.", function ); result = -1; } -#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT ) + else + { + if( libfshfs_directory_entry_get_backup_time( + directory_entry, + hfs_time, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve backup time from directory entry.", + function ); + + result = -1; + } + } +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) if( libcthreads_read_write_lock_release_for_read( internal_file_entry->read_write_lock, error ) != 1 ) @@ -1571,6 +1736,7 @@ int32_t *posix_time, libcerror_error_t **error ) { + libfshfs_directory_entry_t *directory_entry = NULL; libfshfs_internal_file_entry_t *internal_file_entry = NULL; static char *function = "libfshfs_file_entry_get_added_time"; int result = 1; @@ -1588,7 +1754,7 @@ } internal_file_entry = (libfshfs_internal_file_entry_t *) file_entry; -#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT ) +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) if( libcthreads_read_write_lock_grab_for_read( internal_file_entry->read_write_lock, error ) != 1 ) @@ -1603,23 +1769,40 @@ return( -1 ); } #endif - result = libfshfs_directory_entry_get_added_time( - internal_file_entry->directory_entry, - posix_time, - error ); - - if( result == -1 ) + if( libfshfs_internal_file_entry_get_directory_entry( + internal_file_entry, + &directory_entry, + error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve added time from directory entry.", + "%s: unable to retrieve directory entry.", function ); result = -1; } -#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT ) + else + { + result = libfshfs_directory_entry_get_added_time( + directory_entry, + posix_time, + error ); + + if( result == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve added time from directory entry.", + function ); + + result = -1; + } + } +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) if( libcthreads_read_write_lock_release_for_read( internal_file_entry->read_write_lock, error ) != 1 ) @@ -1645,6 +1828,7 @@ uint16_t *file_mode, libcerror_error_t **error ) { + libfshfs_directory_entry_t *directory_entry = NULL; libfshfs_internal_file_entry_t *internal_file_entry = NULL; static char *function = "libfshfs_file_entry_get_file_mode"; int result = 0; @@ -1662,7 +1846,7 @@ } internal_file_entry = (libfshfs_internal_file_entry_t *) file_entry; -#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT ) +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) if( libcthreads_read_write_lock_grab_for_read( internal_file_entry->read_write_lock, error ) != 1 ) @@ -1677,23 +1861,150 @@ return( -1 ); } #endif - result = libfshfs_directory_entry_get_file_mode( - internal_file_entry->directory_entry, - file_mode, - error ); - - if( result == -1 ) + if( libfshfs_internal_file_entry_get_directory_entry( + internal_file_entry, + &directory_entry, + error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve file mode from directory entry.", + "%s: unable to retrieve directory entry.", function ); result = -1; } -#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT ) + else + { + result = libfshfs_directory_entry_get_file_mode( + directory_entry, + file_mode, + error ); + + if( result == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve file mode from directory entry.", + function ); + + result = -1; + } + } +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_release_for_read( + internal_file_entry->read_write_lock, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to release read/write lock for reading.", + function ); + + return( -1 ); + } +#endif + return( result ); +} + +/* Retrieves the number of links + * This value is retrieved from the indirect node file if available otherwise it defaults to 1 + * Returns 1 if successful or -1 on error + */ +int libfshfs_file_entry_get_number_of_links( + libfshfs_file_entry_t *file_entry, + uint32_t *number_of_links, + libcerror_error_t **error ) +{ + libfshfs_internal_file_entry_t *internal_file_entry = NULL; + static char *function = "libfshfs_file_entry_get_number_of_links"; + uint32_t safe_number_of_links = 1; + int result = 1; + + if( file_entry == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file entry.", + function ); + + return( -1 ); + } + internal_file_entry = (libfshfs_internal_file_entry_t *) file_entry; + + if( number_of_links == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid number of links.", + function ); + + return( -1 ); + } +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_grab_for_read( + internal_file_entry->read_write_lock, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to grab read/write lock for reading.", + function ); + + return( -1 ); + } +#endif + if( ( internal_file_entry->link_reference > 2 ) + && ( internal_file_entry->indirect_node_directory_entry == NULL ) ) + { + if( libfshfs_file_system_get_indirect_node_directory_entry_by_identifier( + internal_file_entry->file_system, + internal_file_entry->io_handle, + internal_file_entry->file_io_handle, + internal_file_entry->link_reference, + &( internal_file_entry->indirect_node_directory_entry ), + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve indirect node directory entry: %" PRIu32 ".", + function, + internal_file_entry->link_reference ); + + result = -1; + } + } + if( internal_file_entry->indirect_node_directory_entry != NULL ) + { + if( libfshfs_directory_entry_get_special_permissions( + internal_file_entry->indirect_node_directory_entry, + &safe_number_of_links, + error ) == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve special permissions from indirect node directory entry.", + function ); + + result = -1; + } + } +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) if( libcthreads_read_write_lock_release_for_read( internal_file_entry->read_write_lock, error ) != 1 ) @@ -1708,6 +2019,8 @@ return( -1 ); } #endif + *number_of_links = safe_number_of_links; + return( result ); } @@ -1719,6 +2032,7 @@ uint32_t *owner_identifier, libcerror_error_t **error ) { + libfshfs_directory_entry_t *directory_entry = NULL; libfshfs_internal_file_entry_t *internal_file_entry = NULL; static char *function = "libfshfs_file_entry_get_owner_identifier"; int result = 0; @@ -1736,7 +2050,7 @@ } internal_file_entry = (libfshfs_internal_file_entry_t *) file_entry; -#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT ) +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) if( libcthreads_read_write_lock_grab_for_read( internal_file_entry->read_write_lock, error ) != 1 ) @@ -1751,23 +2065,40 @@ return( -1 ); } #endif - result = libfshfs_directory_entry_get_owner_identifier( - internal_file_entry->directory_entry, - owner_identifier, - error ); - - if( result == -1 ) + if( libfshfs_internal_file_entry_get_directory_entry( + internal_file_entry, + &directory_entry, + error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve owner identifier from directory entry.", + "%s: unable to retrieve directory entry.", function ); result = -1; } -#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT ) + else + { + result = libfshfs_directory_entry_get_owner_identifier( + directory_entry, + owner_identifier, + error ); + + if( result == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve owner identifier from directory entry.", + function ); + + result = -1; + } + } +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) if( libcthreads_read_write_lock_release_for_read( internal_file_entry->read_write_lock, error ) != 1 ) @@ -1793,6 +2124,7 @@ uint32_t *group_identifier, libcerror_error_t **error ) { + libfshfs_directory_entry_t *directory_entry = NULL; libfshfs_internal_file_entry_t *internal_file_entry = NULL; static char *function = "libfshfs_file_entry_get_group_identifier"; int result = 0; @@ -1810,7 +2142,7 @@ } internal_file_entry = (libfshfs_internal_file_entry_t *) file_entry; -#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT ) +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) if( libcthreads_read_write_lock_grab_for_read( internal_file_entry->read_write_lock, error ) != 1 ) @@ -1825,23 +2157,40 @@ return( -1 ); } #endif - result = libfshfs_directory_entry_get_group_identifier( - internal_file_entry->directory_entry, - group_identifier, - error ); - - if( result == -1 ) + if( libfshfs_internal_file_entry_get_directory_entry( + internal_file_entry, + &directory_entry, + error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve group identifier from directory entry.", + "%s: unable to retrieve directory entry.", function ); result = -1; } -#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT ) + else + { + result = libfshfs_directory_entry_get_group_identifier( + directory_entry, + group_identifier, + error ); + + if( result == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve group identifier from directory entry.", + function ); + + result = -1; + } + } +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) if( libcthreads_read_write_lock_release_for_read( internal_file_entry->read_write_lock, error ) != 1 ) @@ -1859,19 +2208,17 @@ return( result ); } -/* Retrieves the size of the UTF-8 encoded name - * The returned size includes the end of string character - * This value is retrieved from the catalog node key of the corresponding directory or file record - * Since / is used as path segment separator, / characters in file names are replaced by : +/* Retrieves the device identifier * Returns 1 if successful, 0 if not available or -1 on error */ -int libfshfs_file_entry_get_utf8_name_size( +int libfshfs_file_entry_get_device_identifier( libfshfs_file_entry_t *file_entry, - size_t *utf8_string_size, + uint32_t *device_identifier, libcerror_error_t **error ) { + libfshfs_directory_entry_t *directory_entry = NULL; libfshfs_internal_file_entry_t *internal_file_entry = NULL; - static char *function = "libfshfs_file_entry_get_utf8_name_size"; + static char *function = "libfshfs_file_entry_get_device_identifier"; int result = 0; if( file_entry == NULL ) @@ -1887,7 +2234,7 @@ } internal_file_entry = (libfshfs_internal_file_entry_t *) file_entry; -#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT ) +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) if( libcthreads_read_write_lock_grab_for_read( internal_file_entry->read_write_lock, error ) != 1 ) @@ -1902,26 +2249,258 @@ return( -1 ); } #endif - if( internal_file_entry->directory_entry != NULL ) + if( ( ( internal_file_entry->file_mode & 0xf000 ) == LIBFSHFS_FILE_TYPE_CHARACTER_DEVICE ) + || ( ( internal_file_entry->file_mode & 0xf000 ) == LIBFSHFS_FILE_TYPE_BLOCK_DEVICE ) ) { - result = libfshfs_directory_entry_get_utf8_name_size( - internal_file_entry->directory_entry, - utf8_string_size, - error ); + if( libfshfs_internal_file_entry_get_directory_entry( + internal_file_entry, + &directory_entry, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve directory entry.", + function ); - if( result != 1 ) + result = -1; + } + else + { + result = libfshfs_directory_entry_get_special_permissions( + directory_entry, + device_identifier, + error ); + + if( result == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve special permissions from directory entry.", + function ); + + result = -1; + } + } + } +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_release_for_read( + internal_file_entry->read_write_lock, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to release read/write lock for reading.", + function ); + + return( -1 ); + } +#endif + return( result ); +} + +/* Retrieves the device number + * Returns 1 if successful, 0 if not available or -1 on error + */ +int libfshfs_file_entry_get_device_number( + libfshfs_file_entry_t *file_entry, + uint32_t *major_device_number, + uint32_t *minor_device_number, + libcerror_error_t **error ) +{ + libfshfs_directory_entry_t *directory_entry = NULL; + libfshfs_internal_file_entry_t *internal_file_entry = NULL; + static char *function = "libfshfs_file_entry_get_device_number"; + uint32_t device_identifier = 0; + int result = 0; + + if( file_entry == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file entry.", + function ); + + return( -1 ); + } + internal_file_entry = (libfshfs_internal_file_entry_t *) file_entry; + + if( major_device_number == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid major device number.", + function ); + + return( -1 ); + } + if( minor_device_number == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid minor device number.", + function ); + + return( -1 ); + } +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_grab_for_read( + internal_file_entry->read_write_lock, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to grab read/write lock for reading.", + function ); + + return( -1 ); + } +#endif + if( ( ( internal_file_entry->file_mode & 0xf000 ) == LIBFSHFS_FILE_TYPE_CHARACTER_DEVICE ) + || ( ( internal_file_entry->file_mode & 0xf000 ) == LIBFSHFS_FILE_TYPE_BLOCK_DEVICE ) ) + { + if( libfshfs_internal_file_entry_get_directory_entry( + internal_file_entry, + &directory_entry, + error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve UTF-8 string size.", + "%s: unable to retrieve directory entry.", function ); result = -1; } + else + { + result = libfshfs_directory_entry_get_special_permissions( + directory_entry, + &device_identifier, + error ); + + if( result == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve special permissions from directory entry.", + function ); + + result = -1; + } + else if( result != 0 ) + { + if( ( device_identifier & 0xffff0000UL ) == 0 ) + { + *major_device_number = ( device_identifier >> 8 ) & 0x000000ffUL; + *minor_device_number = device_identifier & 0x000000ffUL; + } + else if( ( device_identifier & 0x00ffff00UL ) == 0 ) + { + *major_device_number = ( device_identifier >> 24 ) & 0x000000ffUL; + *minor_device_number = device_identifier & 0x000000ffUL; + } + else + { + result = 0; + } + } + } + } +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_release_for_read( + internal_file_entry->read_write_lock, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to release read/write lock for reading.", + function ); + + return( -1 ); + } +#endif + return( result ); +} + +/* Retrieves the size of the UTF-8 encoded name + * The returned size includes the end of string character + * This value is retrieved from the catalog node key of the corresponding directory or file record + * Since / is used as path segment separator, / characters in file names are replaced by : + * Returns 1 if successful, 0 if not available or -1 on error + */ +int libfshfs_file_entry_get_utf8_name_size( + libfshfs_file_entry_t *file_entry, + size_t *utf8_string_size, + libcerror_error_t **error ) +{ + libfshfs_internal_file_entry_t *internal_file_entry = NULL; + static char *function = "libfshfs_file_entry_get_utf8_name_size"; + int result = 0; + + if( file_entry == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file entry.", + function ); + + return( -1 ); } -#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT ) + internal_file_entry = (libfshfs_internal_file_entry_t *) file_entry; + +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_grab_for_read( + internal_file_entry->read_write_lock, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to grab read/write lock for reading.", + function ); + + return( -1 ); + } +#endif + result = libfshfs_directory_entry_get_utf8_name_size( + internal_file_entry->directory_entry, + utf8_string_size, + error ); + + if( result != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve UTF-8 string size.", + function ); + + result = -1; + } +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) if( libcthreads_read_write_lock_release_for_read( internal_file_entry->read_write_lock, error ) != 1 ) @@ -1968,7 +2547,7 @@ } internal_file_entry = (libfshfs_internal_file_entry_t *) file_entry; -#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT ) +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) if( libcthreads_read_write_lock_grab_for_read( internal_file_entry->read_write_lock, error ) != 1 ) @@ -1983,27 +2562,24 @@ return( -1 ); } #endif - if( internal_file_entry->directory_entry != NULL ) - { - result = libfshfs_directory_entry_get_utf8_name( - internal_file_entry->directory_entry, - utf8_string, - utf8_string_size, - error ); + result = libfshfs_directory_entry_get_utf8_name( + internal_file_entry->directory_entry, + utf8_string, + utf8_string_size, + error ); - if( result != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve UTF-8 string.", - function ); + if( result != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve UTF-8 string.", + function ); - result = -1; - } + result = -1; } -#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT ) +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) if( libcthreads_read_write_lock_release_for_read( internal_file_entry->read_write_lock, error ) != 1 ) @@ -2049,7 +2625,7 @@ } internal_file_entry = (libfshfs_internal_file_entry_t *) file_entry; -#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT ) +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) if( libcthreads_read_write_lock_grab_for_read( internal_file_entry->read_write_lock, error ) != 1 ) @@ -2064,26 +2640,23 @@ return( -1 ); } #endif - if( internal_file_entry->directory_entry != NULL ) - { - result = libfshfs_directory_entry_get_utf16_name_size( - internal_file_entry->directory_entry, - utf16_string_size, - error ); + result = libfshfs_directory_entry_get_utf16_name_size( + internal_file_entry->directory_entry, + utf16_string_size, + error ); - if( result != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve UTF-16 string size.", - function ); + if( result != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve UTF-16 string size.", + function ); - result = -1; - } + result = -1; } -#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT ) +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) if( libcthreads_read_write_lock_release_for_read( internal_file_entry->read_write_lock, error ) != 1 ) @@ -2130,7 +2703,7 @@ } internal_file_entry = (libfshfs_internal_file_entry_t *) file_entry; -#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT ) +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) if( libcthreads_read_write_lock_grab_for_read( internal_file_entry->read_write_lock, error ) != 1 ) @@ -2145,27 +2718,24 @@ return( -1 ); } #endif - if( internal_file_entry->directory_entry != NULL ) - { - result = libfshfs_directory_entry_get_utf16_name( - internal_file_entry->directory_entry, - utf16_string, - utf16_string_size, - error ); + result = libfshfs_directory_entry_get_utf16_name( + internal_file_entry->directory_entry, + utf16_string, + utf16_string_size, + error ); - if( result != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve UTF-16 string.", - function ); + if( result != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve UTF-16 string.", + function ); - result = -1; - } + result = -1; } -#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT ) +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) if( libcthreads_read_write_lock_release_for_read( internal_file_entry->read_write_lock, error ) != 1 ) @@ -2568,6 +3138,302 @@ return( result ); } +/* Determines if the file entry has a resource fork + * Returns 1 if the file entry has a resource fork, 0 if not or -1 on error + */ +int libfshfs_file_entry_has_resource_fork( + libfshfs_file_entry_t *file_entry, + libcerror_error_t **error ) +{ + libfshfs_directory_entry_t *directory_entry = NULL; + libfshfs_fork_descriptor_t *fork_descriptor = NULL; + libfshfs_internal_file_entry_t *internal_file_entry = NULL; + static char *function = "libfshfs_file_entry_has_resource_fork"; + int result = 0; + + if( file_entry == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file entry.", + function ); + + return( -1 ); + } + internal_file_entry = (libfshfs_internal_file_entry_t *) file_entry; + +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_grab_for_write( + internal_file_entry->read_write_lock, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to grab read/write lock for writing.", + function ); + + return( -1 ); + } +#endif + if( libfshfs_internal_file_entry_get_directory_entry( + internal_file_entry, + &directory_entry, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve directory entry.", + function ); + + result = -1; + } + else + { + result = libfshfs_directory_entry_get_resource_fork_descriptor( + directory_entry, + &fork_descriptor, + error ); + + if( result == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve resource fork descriptor from directory entry.", + function ); + + result = -1; + } + } +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_release_for_write( + internal_file_entry->read_write_lock, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to release read/write lock for writing.", + function ); + + return( -1 ); + } +#endif + return( result ); +} + +/* Retrieves a data stream of the resource fork + * Returns 1 if successful, 0 if not available or -1 on error + */ +int libfshfs_file_entry_get_resource_fork( + libfshfs_file_entry_t *file_entry, + libfshfs_data_stream_t **data_stream, + libcerror_error_t **error ) +{ + libfshfs_directory_entry_t *directory_entry = NULL; + libfshfs_fork_descriptor_t *fork_descriptor = NULL; + libfshfs_internal_file_entry_t *internal_file_entry = NULL; + static char *function = "libfshfs_file_entry_get_resource_fork"; + int result = 0; + + if( file_entry == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file entry.", + function ); + + return( -1 ); + } + internal_file_entry = (libfshfs_internal_file_entry_t *) file_entry; + +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_grab_for_write( + internal_file_entry->read_write_lock, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to grab read/write lock for writing.", + function ); + + return( -1 ); + } +#endif + if( libfshfs_internal_file_entry_get_directory_entry( + internal_file_entry, + &directory_entry, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve directory entry.", + function ); + + result = -1; + } + else + { + result = libfshfs_directory_entry_get_resource_fork_descriptor( + directory_entry, + &fork_descriptor, + error ); + + if( result == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve resource fork descriptor from directory entry.", + function ); + + result = -1; + } + else if( result != 0 ) + { + if( libfshfs_data_stream_initialize( + data_stream, + internal_file_entry->io_handle, + internal_file_entry->file_io_handle, + internal_file_entry->file_system, + internal_file_entry->identifier, + fork_descriptor, + LIBFSHFS_FORK_TYPE_RESOURCE, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to create resource fork data stream.", + function ); + + result = -1; + } + } + } +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_release_for_write( + internal_file_entry->read_write_lock, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to release read/write lock for writing.", + function ); + + return( -1 ); + } +#endif + return( result ); +} + +/* Retrieves the attributes + * Returns 1 if successful or -1 on error + */ +int libfshfs_internal_file_entry_get_attributes( + libfshfs_internal_file_entry_t *internal_file_entry, + libcerror_error_t **error ) +{ + libfshfs_directory_entry_t *directory_entry = NULL; + static char *function = "libfshfs_internal_file_entry_get_attributes"; + uint16_t flags = 0; + + if( internal_file_entry == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file entry.", + function ); + + return( -1 ); + } + if( libfshfs_internal_file_entry_get_directory_entry( + internal_file_entry, + &directory_entry, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve directory entry.", + function ); + + return( -1 ); + } + if( libfshfs_directory_entry_get_flags( + directory_entry, + &flags, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve flags from directory entry.", + function ); + + return( -1 ); + } + if( ( flags & 0x0004 ) != 0 ) + { + if( libfshfs_file_system_get_attributes( + internal_file_entry->file_system, + internal_file_entry->file_io_handle, + internal_file_entry->identifier, + &( internal_file_entry->attributes ), + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve attributes from file system.", + function ); + + return( -1 ); + } + } + else + { + if( libcdata_array_initialize( + &( internal_file_entry->attributes ), + 0, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to create attributes array.", + function ); + + return( -1 ); + } + } + return( 1 ); +} + /* Retrieves the number of extended attributes * Returns 1 if successful or -1 on error */ @@ -2610,11 +3476,8 @@ #endif if( internal_file_entry->attributes == NULL ) { - if( libfshfs_file_system_get_attributes( - internal_file_entry->file_system, - internal_file_entry->file_io_handle, - internal_file_entry->identifier, - &( internal_file_entry->attributes ), + if( libfshfs_internal_file_entry_get_attributes( + internal_file_entry, error ) != 1 ) { libcerror_error_set( @@ -2728,11 +3591,8 @@ #endif if( internal_file_entry->attributes == NULL ) { - if( libfshfs_file_system_get_attributes( - internal_file_entry->file_system, - internal_file_entry->file_io_handle, - internal_file_entry->identifier, - &( internal_file_entry->attributes ), + if( libfshfs_internal_file_entry_get_attributes( + internal_file_entry, error ) != 1 ) { libcerror_error_set( @@ -2765,6 +3625,10 @@ } else if( libfshfs_extended_attribute_initialize( extended_attribute, + internal_file_entry->io_handle, + internal_file_entry->file_io_handle, + internal_file_entry->file_system, + internal_file_entry->identifier, attribute_record, error ) != 1 ) { @@ -2826,11 +3690,8 @@ } if( internal_file_entry->attributes == NULL ) { - if( libfshfs_file_system_get_attributes( - internal_file_entry->file_system, - internal_file_entry->file_io_handle, - internal_file_entry->identifier, - &( internal_file_entry->attributes ), + if( libfshfs_internal_file_entry_get_attributes( + internal_file_entry, error ) != 1 ) { libcerror_error_set( @@ -2840,7 +3701,7 @@ "%s: unable to retrieve attributes.", function ); - return( -1 ); + result = -1; } } if( libcdata_array_get_number_of_entries( @@ -2933,11 +3794,8 @@ } if( internal_file_entry->attributes == NULL ) { - if( libfshfs_file_system_get_attributes( - internal_file_entry->file_system, - internal_file_entry->file_io_handle, - internal_file_entry->identifier, - &( internal_file_entry->attributes ), + if( libfshfs_internal_file_entry_get_attributes( + internal_file_entry, error ) != 1 ) { libcerror_error_set( @@ -2947,7 +3805,7 @@ "%s: unable to retrieve attributes.", function ); - return( -1 ); + result = -1; } } if( libcdata_array_get_number_of_entries( @@ -3254,6 +4112,10 @@ { if( libfshfs_extended_attribute_initialize( extended_attribute, + internal_file_entry->io_handle, + internal_file_entry->file_io_handle, + internal_file_entry->file_system, + internal_file_entry->identifier, attribute_record, error ) != 1 ) { @@ -3372,6 +4234,10 @@ { if( libfshfs_extended_attribute_initialize( extended_attribute, + internal_file_entry->io_handle, + internal_file_entry->file_io_handle, + internal_file_entry->file_system, + internal_file_entry->identifier, attribute_record, error ) != 1 ) { @@ -3428,7 +4294,7 @@ } internal_file_entry = (libfshfs_internal_file_entry_t *) file_entry; -#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT ) +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) if( libcthreads_read_write_lock_grab_for_write( internal_file_entry->read_write_lock, error ) != 1 ) @@ -3447,6 +4313,7 @@ { if( libfshfs_file_system_get_directory_entries( internal_file_entry->file_system, + internal_file_entry->io_handle, internal_file_entry->file_io_handle, internal_file_entry->identifier, &( internal_file_entry->sub_directory_entries ), @@ -3480,7 +4347,7 @@ result = -1; } } -#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT ) +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) if( libcthreads_read_write_lock_release_for_write( internal_file_entry->read_write_lock, error ) != 1 ) @@ -3548,7 +4415,7 @@ return( -1 ); } -#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT ) +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) if( libcthreads_read_write_lock_grab_for_write( internal_file_entry->read_write_lock, error ) != 1 ) @@ -3567,6 +4434,7 @@ { if( libfshfs_file_system_get_directory_entries( internal_file_entry->file_system, + internal_file_entry->io_handle, internal_file_entry->file_io_handle, internal_file_entry->identifier, &( internal_file_entry->sub_directory_entries ), @@ -3616,33 +4484,14 @@ result = -1; } - else if( libfshfs_file_system_resolve_indirect_node_directory_entry( - internal_file_entry->file_system, - internal_file_entry->file_io_handle, - safe_directory_entry, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, - "%s: unable to resolve indirect node directory entry.", - function ); - - libfshfs_directory_entry_free( - &safe_directory_entry, - NULL ); - - result = -1; - } /* libfshfs_file_entry_initialize takes over management of sub_directory_entry */ else if( libfshfs_file_entry_initialize( sub_file_entry, internal_file_entry->io_handle, internal_file_entry->file_io_handle, - safe_directory_entry, internal_file_entry->file_system, + safe_directory_entry, error ) != 1 ) { libcerror_error_set( @@ -3659,7 +4508,7 @@ result = -1; } } -#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT ) +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) if( libcthreads_read_write_lock_release_for_write( internal_file_entry->read_write_lock, error ) != 1 ) @@ -3744,8 +4593,9 @@ #endif result = libfshfs_file_system_get_directory_entry_by_utf8_name( internal_file_entry->file_system, + internal_file_entry->io_handle, internal_file_entry->file_io_handle, - internal_file_entry->directory_entry->parent_identifier, + internal_file_entry->parent_identifier, utf8_string, utf8_string_length, &sub_directory_entry, @@ -3770,8 +4620,8 @@ sub_file_entry, internal_file_entry->io_handle, internal_file_entry->file_io_handle, - sub_directory_entry, internal_file_entry->file_system, + sub_directory_entry, error ) != 1 ) { libcerror_error_set( @@ -3873,8 +4723,9 @@ #endif result = libfshfs_file_system_get_directory_entry_by_utf16_name( internal_file_entry->file_system, + internal_file_entry->io_handle, internal_file_entry->file_io_handle, - internal_file_entry->directory_entry->parent_identifier, + internal_file_entry->parent_identifier, utf16_string, utf16_string_length, &sub_directory_entry, @@ -3899,8 +4750,8 @@ sub_file_entry, internal_file_entry->io_handle, internal_file_entry->file_io_handle, - sub_directory_entry, internal_file_entry->file_system, + sub_directory_entry, error ) != 1 ) { libcerror_error_set( @@ -4003,7 +4854,7 @@ read_count = -1; } } - if( read_count != -1 ) + if( internal_file_entry->data_stream != NULL ) { read_count = libfdata_stream_read_buffer( internal_file_entry->data_stream, @@ -4112,7 +4963,7 @@ read_count = -1; } } - if( read_count != -1 ) + if( internal_file_entry->data_stream != NULL ) { read_count = libfdata_stream_read_buffer_at_offset( internal_file_entry->data_stream, @@ -4223,7 +5074,7 @@ result_offset = -1; } } - if( result_offset != -1 ) + if( internal_file_entry->data_stream != NULL ) { result_offset = libfdata_stream_seek_offset( internal_file_entry->data_stream, @@ -4328,7 +5179,7 @@ result = -1; } } - if( result != -1 ) + if( internal_file_entry->data_stream != NULL ) { if( libfdata_stream_get_offset( internal_file_entry->data_stream, @@ -4363,6 +5214,202 @@ return( result ); } +/* Retrieves the data size + * Returns 1 if successful or -1 on error + */ +int libfshfs_internal_file_entry_get_data_size( + libfshfs_internal_file_entry_t *internal_file_entry, + libcerror_error_t **error ) +{ + libfshfs_directory_entry_t *directory_entry = NULL; + libfshfs_fork_descriptor_t *data_fork_descriptor = NULL; + static char *function = "libfshfs_internal_file_entry_get_data_size"; + size64_t data_size = 0; + int result = 0; + + if( internal_file_entry == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file entry.", + function ); + + return( -1 ); + } + if( internal_file_entry->compressed_data_attribute_record != NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, + "%s: invalid file entry - compressed data attribute record value already set.", + function ); + + return( -1 ); + } + if( internal_file_entry->compressed_data_header != NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, + "%s: invalid file entry - compressed data header value already set.", + function ); + + return( -1 ); + } + if( libfshfs_internal_file_entry_get_directory_entry( + internal_file_entry, + &directory_entry, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve directory entry.", + function ); + + goto on_error; + } + result = libfshfs_directory_entry_get_data_fork_descriptor( + directory_entry, + &data_fork_descriptor, + error ); + + if( result == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve data fork descriptor from directory entry.", + function ); + + goto on_error; + } + else if( result != 0 ) + { + if( data_fork_descriptor == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, + "%s: missing data fork descriptor.", + function ); + + goto on_error; + } + result = libfshfs_internal_file_entry_get_attribute_record_by_utf8_name( + internal_file_entry, + (uint8_t *) "com.apple.decmpfs", + 17, + &( internal_file_entry->compressed_data_attribute_record ), + error ); + + if( result == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve com.apple.decmpfs attribute record.", + function ); + + result = -1; + } + else if( result != 0 ) + { + if( libfshfs_compressed_data_header_initialize( + &( internal_file_entry->compressed_data_header ), + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to create compressed data header.", + function ); + + goto on_error; + } + result = 0; + + if( internal_file_entry->compressed_data_attribute_record->record_type == LIBFSHFS_ATTRIBUTE_RECORD_TYPE_INLINE_DATA ) + { + result = libfshfs_compressed_data_header_read_data( + internal_file_entry->compressed_data_header, + internal_file_entry->compressed_data_attribute_record->inline_data, + internal_file_entry->compressed_data_attribute_record->inline_data_size, + error ); + + if( result == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_READ_FAILED, + "%s: unable to read compressed data header.", + function ); + + goto on_error; + } + } + else + { +/* TODO add support for additional attribute record types */ + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, + "%s: unsupported com.apple.decmpfs attribute record type.", + function ); + + goto on_error; + } + if( result != 0 ) + { + data_size = internal_file_entry->compressed_data_header->uncompressed_data_size; + } + else + { + if( libfshfs_compressed_data_header_free( + &( internal_file_entry->compressed_data_header ), + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to create compressed data header.", + function ); + + goto on_error; + } + } + } + if( result == 0 ) + { + data_size = (size64_t) data_fork_descriptor->size; + } + } + internal_file_entry->data_size = data_size; + + return( 1 ); + +on_error: + if( internal_file_entry->compressed_data_header != NULL ) + { + libfshfs_compressed_data_header_free( + &( internal_file_entry->compressed_data_header ), + NULL ); + } + return( -1 ); +} + /* Retrieves the size of the data * Returns 1 if successful or -1 on error */ @@ -4414,8 +5461,235 @@ return( -1 ); } #endif - *size = internal_file_entry->data_size; + if( internal_file_entry->data_size == (size64_t) -1 ) + { + if( libfshfs_internal_file_entry_get_data_size( + internal_file_entry, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve data size.", + function ); + + result = -1; + } + } + if( result == 1 ) + { + *size = internal_file_entry->data_size; + } +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_release_for_read( + internal_file_entry->read_write_lock, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to release read/write lock for reading.", + function ); + + return( -1 ); + } +#endif + return( result ); +} + +/* Retrieves the number of extents of the data + * Returns 1 if successful or -1 on error + */ +int libfshfs_file_entry_get_number_of_extents( + libfshfs_file_entry_t *file_entry, + int *number_of_extents, + libcerror_error_t **error ) +{ + libfshfs_internal_file_entry_t *internal_file_entry = NULL; + static char *function = "libfshfs_file_entry_get_number_of_extents"; + int result = 1; + + if( file_entry == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file entry.", + function ); + + return( -1 ); + } + internal_file_entry = (libfshfs_internal_file_entry_t *) file_entry; + +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_grab_for_read( + internal_file_entry->read_write_lock, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to grab read/write lock for reading.", + function ); + + return( -1 ); + } +#endif + if( internal_file_entry->data_stream == NULL ) + { + if( libfshfs_internal_file_entry_get_data_stream( + internal_file_entry, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve data stream.", + function ); + + result = -1; + } + } + if( internal_file_entry->data_stream != NULL ) + { + if( libcdata_array_get_number_of_entries( + internal_file_entry->extents_array, + number_of_extents, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve number of extents from array.", + function ); + + result = -1; + } + } +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_release_for_read( + internal_file_entry->read_write_lock, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to release read/write lock for reading.", + function ); + + return( -1 ); + } +#endif + return( result ); +} + +/* Retrieves a specific extent of the data + * Returns 1 if successful or -1 on error + */ +int libfshfs_file_entry_get_extent_by_index( + libfshfs_file_entry_t *file_entry, + int extent_index, + off64_t *extent_offset, + size64_t *extent_size, + uint32_t *extent_flags, + libcerror_error_t **error ) +{ + libfshfs_extent_t *extent = NULL; + libfshfs_internal_file_entry_t *internal_file_entry = NULL; + static char *function = "libfshfs_file_entry_get_extent_by_index"; + int result = 1; + + if( file_entry == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file entry.", + function ); + + return( -1 ); + } + internal_file_entry = (libfshfs_internal_file_entry_t *) file_entry; + +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_grab_for_read( + internal_file_entry->read_write_lock, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to grab read/write lock for reading.", + function ); + + return( -1 ); + } +#endif + if( internal_file_entry->data_stream == NULL ) + { + if( libfshfs_internal_file_entry_get_data_stream( + internal_file_entry, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve data stream.", + function ); + + result = -1; + } + } + if( internal_file_entry->data_stream != NULL ) + { + if( libcdata_array_get_entry_by_index( + internal_file_entry->extents_array, + extent_index, + (intptr_t **) &extent, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve extent: %d from array.", + function, + extent_index ); + + result = -1; + } + if( result == 1 ) + { + if( libfshfs_extent_get_values( + extent, + internal_file_entry->io_handle, + extent_offset, + extent_size, + extent_flags, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve extent: %d values.", + function, + extent_index ); + result = -1; + } + } + } #if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) if( libcthreads_read_write_lock_release_for_read( internal_file_entry->read_write_lock, diff -Nru libfshfs-20201104/libfshfs/libfshfs_file_entry.h libfshfs-20240221/libfshfs/libfshfs_file_entry.h --- libfshfs-20201104/libfshfs/libfshfs_file_entry.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_file_entry.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * File entry functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -58,14 +58,22 @@ */ libfshfs_file_system_t *file_system; - /* Directory entry - */ - libfshfs_directory_entry_t *directory_entry; - /* Identifier */ uint32_t identifier; + /* Parent identifier + */ + uint32_t parent_identifier; + + /* Link identifier + */ + uint32_t link_identifier; + + /* Directory entry + */ + libfshfs_directory_entry_t *directory_entry; + /* File mode */ uint16_t file_mode; @@ -90,9 +98,9 @@ */ size64_t data_size; - /* Extents + /* The extents array */ - libcdata_array_t *extents; + libcdata_array_t *extents_array; /* The symbolic link data */ @@ -102,6 +110,14 @@ */ size_t symbolic_link_data_size; + /* Link reference, contians the CNID of the indirect node file + */ + uint32_t link_reference; + + /* Indirectory node directory entry + */ + libfshfs_directory_entry_t *indirect_node_directory_entry; + /* Attributes */ libcdata_array_t *attributes; @@ -117,8 +133,8 @@ libfshfs_file_entry_t **file_entry, libfshfs_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, - libfshfs_directory_entry_t *directory_entry, libfshfs_file_system_t *file_system, + libfshfs_directory_entry_t *directory_entry, libcerror_error_t **error ); LIBFSHFS_EXTERN \ @@ -126,11 +142,6 @@ libfshfs_file_entry_t **file_entry, libcerror_error_t **error ); -int libfshfs_internal_file_entry_get_data_size( - libfshfs_internal_file_entry_t *internal_file_entry, - libfshfs_directory_entry_t *directory_entry, - libcerror_error_t **error ); - int libfshfs_internal_file_entry_get_data_stream_from_fork_descriptor( libfshfs_internal_file_entry_t *internal_file_entry, uint8_t fork_type, @@ -158,6 +169,12 @@ libcerror_error_t **error ); LIBFSHFS_EXTERN \ +int libfshfs_file_entry_get_parent_file_entry( + libfshfs_file_entry_t *file_entry, + libfshfs_file_entry_t **parent_file_entry, + libcerror_error_t **error ); + +LIBFSHFS_EXTERN \ int libfshfs_file_entry_get_link_identifier( libfshfs_file_entry_t *file_entry, uint32_t *link_identifier, @@ -206,6 +223,12 @@ libcerror_error_t **error ); LIBFSHFS_EXTERN \ +int libfshfs_file_entry_get_number_of_links( + libfshfs_file_entry_t *file_entry, + uint32_t *number_of_links, + libcerror_error_t **error ); + +LIBFSHFS_EXTERN \ int libfshfs_file_entry_get_owner_identifier( libfshfs_file_entry_t *file_entry, uint32_t *owner_identifier, @@ -218,6 +241,19 @@ libcerror_error_t **error ); LIBFSHFS_EXTERN \ +int libfshfs_file_entry_get_device_identifier( + libfshfs_file_entry_t *file_entry, + uint32_t *device_identifier, + libcerror_error_t **error ); + +LIBFSHFS_EXTERN \ +int libfshfs_file_entry_get_device_number( + libfshfs_file_entry_t *file_entry, + uint32_t *major_device_number, + uint32_t *minor_device_number, + libcerror_error_t **error ); + +LIBFSHFS_EXTERN \ int libfshfs_file_entry_get_utf8_name_size( libfshfs_file_entry_t *file_entry, size_t *utf8_string_size, @@ -270,6 +306,26 @@ libcerror_error_t **error ); LIBFSHFS_EXTERN \ +int libfshfs_file_entry_has_default_data_stream( + libfshfs_file_entry_t *file_entry, + libcerror_error_t **error ); + +LIBFSHFS_EXTERN \ +int libfshfs_file_entry_has_resource_fork( + libfshfs_file_entry_t *file_entry, + libcerror_error_t **error ); + +LIBFSHFS_EXTERN \ +int libfshfs_file_entry_get_resource_fork( + libfshfs_file_entry_t *file_entry, + libfshfs_data_stream_t **data_stream, + libcerror_error_t **error ); + +int libfshfs_internal_file_entry_get_attributes( + libfshfs_internal_file_entry_t *internal_file_entry, + libcerror_error_t **error ); + +LIBFSHFS_EXTERN \ int libfshfs_file_entry_get_number_of_extended_attributes( libfshfs_file_entry_t *file_entry, int *number_of_extended_attributes, @@ -383,12 +439,31 @@ off64_t *offset, libcerror_error_t **error ); +int libfshfs_internal_file_entry_get_data_size( + libfshfs_internal_file_entry_t *internal_file_entry, + libcerror_error_t **error ); + LIBFSHFS_EXTERN \ int libfshfs_file_entry_get_size( libfshfs_file_entry_t *file_entry, size64_t *size, libcerror_error_t **error ); +LIBFSHFS_EXTERN \ +int libfshfs_file_entry_get_number_of_extents( + libfshfs_file_entry_t *file_entry, + int *number_of_extents, + libcerror_error_t **error ); + +LIBFSHFS_EXTERN \ +int libfshfs_file_entry_get_extent_by_index( + libfshfs_file_entry_t *file_entry, + int extent_index, + off64_t *extent_offset, + size64_t *extent_size, + uint32_t *extent_flags, + libcerror_error_t **error ); + #if defined( __cplusplus ) } #endif diff -Nru libfshfs-20201104/libfshfs/libfshfs_file_record.c libfshfs-20240221/libfshfs/libfshfs_file_record.c --- libfshfs-20201104/libfshfs/libfshfs_file_record.c 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_file_record.c 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Catalog B-tree file file record functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -26,6 +26,7 @@ #include "libfshfs_debug.h" #include "libfshfs_definitions.h" +#include "libfshfs_extents_record.h" #include "libfshfs_file_record.h" #include "libfshfs_fork_descriptor.h" #include "libfshfs_libcerror.h" @@ -300,15 +301,18 @@ size_t data_size, libcerror_error_t **error ) { - static char *function = "libfshfs_file_record_read_data"; - size_t record_size = 0; - uint16_t record_type = 0; - uint8_t is_hard_link = 0; + libfshfs_fork_descriptor_t *resource_fork_descriptor = NULL; + static char *function = "libfshfs_file_record_read_data"; + size_t record_size = 0; + uint32_t data_fork_size = 0; + uint32_t resource_fork_size = 0; + uint16_t record_type = 0; #if defined( HAVE_DEBUG_OUTPUT ) - uint32_t value_32bit = 0; - uint16_t value_16bit = 0; - int result = 0; + uint32_t value_32bit = 0; + uint16_t value_16bit = 0; + uint8_t is_hard_link = 0; + int result = 0; #endif if( file_record == NULL ) @@ -434,19 +438,21 @@ ( (fshfs_catalog_file_record_hfsplus_t *) data )->file_mode, file_record->file_mode ); + byte_stream_copy_to_uint32_big_endian( + ( (fshfs_catalog_file_record_hfsplus_t *) data )->special_permissions, + file_record->special_permissions ); + if( ( ( file_record->flags & 0x0020 ) != 0 ) && ( memory_compare( ( (fshfs_catalog_file_record_hfsplus_t *) data )->file_information, "hlnkhfs+", 8 ) == 0 ) ) { + file_record->link_reference = file_record->special_permissions; + +#if defined( HAVE_DEBUG_OUTPUT ) is_hard_link = 1; - } - if( is_hard_link != 0 ) - { - byte_stream_copy_to_uint32_big_endian( - ( (fshfs_catalog_file_record_hfsplus_t *) data )->special_permissions, - file_record->link_reference ); +#endif } if( ( file_record->flags & 0x0080 ) != 0 ) { @@ -464,6 +470,14 @@ file_record->identifier ); byte_stream_copy_to_uint32_big_endian( + ( (fshfs_catalog_file_record_hfs_t *) data )->data_fork_size, + data_fork_size ); + + byte_stream_copy_to_uint32_big_endian( + ( (fshfs_catalog_file_record_hfs_t *) data )->resource_fork_size, + resource_fork_size ); + + byte_stream_copy_to_uint32_big_endian( ( (fshfs_catalog_file_record_hfs_t *) data )->creation_time, file_record->creation_time ); @@ -478,30 +492,13 @@ #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { - if( record_type == LIBFSHFS_RECORD_TYPE_HFSPLUS_FILE_RECORD ) - { - byte_stream_copy_to_uint16_big_endian( - ( (fshfs_catalog_file_record_hfsplus_t *) data )->record_type, - value_16bit ); - } - else - { - value_16bit = ( (fshfs_catalog_file_record_hfs_t *) data )->record_type; - } libcnotify_printf( "%s: record type\t\t\t\t: 0x%04" PRIx16 " (%s)\n", function, - value_16bit, + record_type, libfshfs_debug_print_catalog_record_type( record_type ) ); - if( record_type == LIBFSHFS_RECORD_TYPE_HFS_FILE_RECORD ) - { - libcnotify_printf( - "%s: unknown1\t\t\t\t: 0x%02" PRIx8 "\n", - function, - ( (fshfs_catalog_file_record_hfs_t *) data )->unknown1 ); - } libcnotify_printf( "%s: flags\t\t\t\t\t: 0x%04" PRIx16 "\n", function, @@ -545,22 +542,47 @@ if( record_type == LIBFSHFS_RECORD_TYPE_HFS_FILE_RECORD ) { -/* TODO refactor */ + byte_stream_copy_to_uint16_big_endian( + ( (fshfs_catalog_file_record_hfs_t *) data )->data_fork_block_number, + value_16bit ); libcnotify_printf( - "%s: data fork:\n", - function ); - libcnotify_print_data( - ( (fshfs_catalog_file_record_hfs_t *) data )->data_fork, - 10, - 0 ); + "%s: data fork block number\t\t\t: %" PRIu16 "\n", + function, + value_16bit ); libcnotify_printf( - "%s: resource fork:\n", - function ); - libcnotify_print_data( - ( (fshfs_catalog_file_record_hfs_t *) data )->resource_fork, - 10, - 0 ); + "%s: data fork size\t\t\t\t: %" PRIu32 "\n", + function, + value_32bit ); + + byte_stream_copy_to_uint32_big_endian( + ( (fshfs_catalog_file_record_hfs_t *) data )->data_fork_allocated_size, + value_32bit ); + libcnotify_printf( + "%s: data fork allocated size\t\t: %" PRIu32 "\n", + function, + value_32bit ); + + byte_stream_copy_to_uint16_big_endian( + ( (fshfs_catalog_file_record_hfs_t *) data )->resource_fork_block_number, + value_16bit ); + libcnotify_printf( + "%s: resource fork block number\t\t: %" PRIu16 "\n", + function, + value_16bit ); + + libcnotify_printf( + "%s: resource fork size\t\t\t: %" PRIu32 "\n", + function, + resource_fork_size ); + + byte_stream_copy_to_uint32_big_endian( + ( (fshfs_catalog_file_record_hfs_t *) data )->resource_fork_allocated_size, + value_32bit ); + libcnotify_printf( + "%s: resource fork allocated size\t\t: %" PRIu32 "\n", + function, + value_32bit ); } if( record_type == LIBFSHFS_RECORD_TYPE_HFSPLUS_FILE_RECORD ) { @@ -571,6 +593,7 @@ 4, LIBFDATETIME_ENDIAN_BIG, LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME, + 0, error ); } else @@ -582,6 +605,7 @@ 4, LIBFDATETIME_ENDIAN_BIG, LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME, + 1, error ); } if( result != 1 ) @@ -604,6 +628,7 @@ 4, LIBFDATETIME_ENDIAN_BIG, LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME, + 0, error ); } else @@ -615,6 +640,7 @@ 4, LIBFDATETIME_ENDIAN_BIG, LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME, + 1, error ); } if( result != 1 ) @@ -637,6 +663,7 @@ 4, LIBFDATETIME_ENDIAN_BIG, LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME, + 0, error ) != 1 ) { libcerror_error_set( @@ -655,6 +682,7 @@ 4, LIBFDATETIME_ENDIAN_BIG, LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME, + 0, error ) != 1 ) { libcerror_error_set( @@ -676,6 +704,7 @@ 4, LIBFDATETIME_ENDIAN_BIG, LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME, + 0, error ); } else @@ -687,6 +716,7 @@ 4, LIBFDATETIME_ENDIAN_BIG, LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME, + 1, error ); } if( result != 1 ) @@ -831,19 +861,6 @@ } #endif /* defined( HAVE_DEBUG_OUTPUT ) */ -/* TODO add HFS support */ - if( record_size < sizeof( fshfs_catalog_file_record_hfsplus_t ) ) - { - return( 1 ); - } -#if defined( HAVE_DEBUG_OUTPUT ) - if( libcnotify_verbose != 0 ) - { - libcnotify_printf( - "%s: data fork descriptor:\n", - function ); - } -#endif if( libfshfs_fork_descriptor_initialize( &( file_record->data_fork_descriptor ), error ) != 1 ) @@ -857,31 +874,68 @@ goto on_error; } - if( libfshfs_fork_descriptor_read_data( - file_record->data_fork_descriptor, - ( (fshfs_catalog_file_record_hfsplus_t *) data )->data_fork_descriptor, - 80, - error ) != 1 ) + if( record_type == LIBFSHFS_RECORD_TYPE_HFS_FILE_RECORD ) { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_IO, - LIBCERROR_IO_ERROR_READ_FAILED, - "%s: unable to read data fork descriptor.", - function ); + file_record->data_fork_descriptor->size = data_fork_size; + file_record->data_fork_descriptor->number_of_blocks = data_fork_size / 512; - goto on_error; - } + if( ( data_fork_size % 512 ) != 0 ) + { + file_record->data_fork_descriptor->number_of_blocks += 1; + } #if defined( HAVE_DEBUG_OUTPUT ) - if( libcnotify_verbose != 0 ) - { - libcnotify_printf( - "%s: resource fork descriptor:\n", - function ); + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: data fork extents record:\n", + function ); + } +#endif + if( libfshfs_extents_record_read_data( + file_record->data_fork_descriptor, + 0, + ( (fshfs_catalog_file_record_hfs_t *) data )->data_fork_extents_record, + 12, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_READ_FAILED, + "%s: unable to read data fork extents record.", + function ); + + goto on_error; + } } + else + { +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: data fork descriptor:\n", + function ); + } #endif + if( libfshfs_fork_descriptor_read_data( + file_record->data_fork_descriptor, + ( (fshfs_catalog_file_record_hfsplus_t *) data )->data_fork_descriptor, + 80, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_READ_FAILED, + "%s: unable to read data fork descriptor.", + function ); + + goto on_error; + } + } if( libfshfs_fork_descriptor_initialize( - &( file_record->resource_fork_descriptor ), + &resource_fork_descriptor, error ) != 1 ) { libcerror_error_set( @@ -893,28 +947,112 @@ goto on_error; } - if( libfshfs_fork_descriptor_read_data( - file_record->resource_fork_descriptor, - ( (fshfs_catalog_file_record_hfsplus_t *) data )->resource_fork_descriptor, - 80, - error ) != 1 ) + if( record_type == LIBFSHFS_RECORD_TYPE_HFS_FILE_RECORD ) { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_IO, - LIBCERROR_IO_ERROR_READ_FAILED, - "%s: unable to read resource fork descriptor.", - function ); + resource_fork_descriptor->size = resource_fork_size; + resource_fork_descriptor->number_of_blocks = resource_fork_size / 512; - goto on_error; + if( ( resource_fork_size % 512 ) != 0 ) + { + resource_fork_descriptor->number_of_blocks += 1; + } +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: resource fork extents record:\n", + function ); + } +#endif + if( libfshfs_extents_record_read_data( + resource_fork_descriptor, + 0, + ( (fshfs_catalog_file_record_hfs_t *) data )->resource_fork_extents_record, + 12, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_READ_FAILED, + "%s: unable to read resource fork extents record.", + function ); + + goto on_error; + } } + else + { +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: resource fork descriptor:\n", + function ); + } +#endif + if( libfshfs_fork_descriptor_read_data( + resource_fork_descriptor, + ( (fshfs_catalog_file_record_hfsplus_t *) data )->resource_fork_descriptor, + 80, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_READ_FAILED, + "%s: unable to read resource fork descriptor.", + function ); + + goto on_error; + } + } + if( resource_fork_descriptor->number_of_blocks != 0 ) + { + file_record->resource_fork_descriptor = resource_fork_descriptor; + } + else + { + if( libfshfs_fork_descriptor_free( + &resource_fork_descriptor, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free resource fork descriptor.", + function ); + + goto on_error; + } + } +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + if( record_type == LIBFSHFS_RECORD_TYPE_HFS_FILE_RECORD ) + { + byte_stream_copy_to_uint32_big_endian( + ( (fshfs_catalog_file_record_hfs_t *) data )->unknown1, + value_32bit ); + libcnotify_printf( + "%s: unknown2\t\t\t\t: 0x%08" PRIx32 "\n", + function, + value_32bit ); + + libcnotify_printf( + "\n" ); + } + } +#endif /* defined( HAVE_DEBUG_OUTPUT ) */ + return( 1 ); on_error: - if( file_record->resource_fork_descriptor == NULL ) + if( resource_fork_descriptor == NULL ) { libfshfs_fork_descriptor_free( - &( file_record->resource_fork_descriptor ), + &resource_fork_descriptor, NULL ); } if( file_record->data_fork_descriptor == NULL ) @@ -926,6 +1064,43 @@ return( -1 ); } +/* Retrieves the flags + * Returns 1 if successful or -1 on error + */ +int libfshfs_file_record_get_flags( + libfshfs_file_record_t *file_record, + uint16_t *flags, + libcerror_error_t **error ) +{ + static char *function = "libfshfs_file_record_get_flags"; + + if( file_record == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file record.", + function ); + + return( -1 ); + } + if( flags == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid flags.", + function ); + + return( -1 ); + } + *flags = file_record->flags; + + return( 1 ); +} + /* Retrieves the identifier * Returns 1 if successful or -1 on error */ @@ -1233,7 +1408,7 @@ } /* Retrieves the resource fork descriptor - * Returns 1 if successful or -1 on error + * Returns 1 if successful, 0 if not available or -1 on error */ int libfshfs_file_record_get_resource_fork_descriptor( libfshfs_file_record_t *file_record, @@ -1264,6 +1439,10 @@ return( -1 ); } + if( file_record->resource_fork_descriptor == NULL ) + { + return( 0 ); + } *fork_descriptor = file_record->resource_fork_descriptor; return( 1 ); @@ -1380,6 +1559,47 @@ return( 1 ); } +/* Retrieves the special permissions + * Returns 1 if successful, 0 if not available or -1 on error + */ +int libfshfs_file_record_get_special_permissions( + libfshfs_file_record_t *file_record, + uint32_t *special_permissions, + libcerror_error_t **error ) +{ + static char *function = "libfshfs_file_record_get_special_permissions"; + + if( file_record == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid file record.", + function ); + + return( -1 ); + } + if( special_permissions == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid special permissions.", + function ); + + return( -1 ); + } + if( file_record->special_permissions > 0 ) + { + *special_permissions = file_record->special_permissions; + + return( 1 ); + } + return( 0 ); +} + /* Retrieves the link reference * Returns 1 if successful, 0 if not available or -1 on error */ diff -Nru libfshfs-20201104/libfshfs/libfshfs_file_record.h libfshfs-20240221/libfshfs/libfshfs_file_record.h --- libfshfs-20201104/libfshfs/libfshfs_file_record.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_file_record.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Catalog B-tree file file record functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -80,6 +80,10 @@ */ uint16_t file_mode; + /* The special permissions + */ + uint32_t special_permissions; + /* The link reference */ uint32_t link_reference; @@ -112,6 +116,11 @@ size_t data_size, libcerror_error_t **error ); +int libfshfs_file_record_get_flags( + libfshfs_file_record_t *file_record, + uint16_t *flags, + libcerror_error_t **error ); + int libfshfs_file_record_get_identifier( libfshfs_file_record_t *file_record, uint32_t *identifier, @@ -172,6 +181,11 @@ uint32_t *group_identifier, libcerror_error_t **error ); +int libfshfs_file_record_get_special_permissions( + libfshfs_file_record_t *file_record, + uint32_t *special_permissions, + libcerror_error_t **error ); + int libfshfs_file_record_get_link_reference( libfshfs_file_record_t *file_record, uint32_t *link_reference, diff -Nru libfshfs-20201104/libfshfs/libfshfs_file_system.c libfshfs-20240221/libfshfs/libfshfs_file_system.c --- libfshfs-20201104/libfshfs/libfshfs_file_system.c 2020-11-04 05:31:25.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_file_system.c 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * File system functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -27,6 +27,7 @@ #include "libfshfs_attribute_record.h" #include "libfshfs_attributes_btree_file.h" #include "libfshfs_btree_file.h" +#include "libfshfs_btree_node_cache.h" #include "libfshfs_catalog_btree_file.h" #include "libfshfs_definitions.h" #include "libfshfs_directory_entry.h" @@ -34,9 +35,12 @@ #include "libfshfs_extents_btree_file.h" #include "libfshfs_file_system.h" #include "libfshfs_fork_descriptor.h" +#include "libfshfs_io_handle.h" #include "libfshfs_libbfio.h" #include "libfshfs_libcerror.h" #include "libfshfs_libcthreads.h" +#include "libfshfs_libuna.h" +#include "libfshfs_name.h" /* Creates a file system * Make sure the value file_system is referencing, is set to NULL @@ -172,6 +176,22 @@ result = -1; } #endif + if( ( *file_system )->extents_btree_node_cache != NULL ) + { + if( libfshfs_btree_node_cache_free( + &( ( *file_system )->extents_btree_node_cache ), + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free extents B-tree node cache.", + function ); + + result = -1; + } + } if( ( *file_system )->extents_btree_file != NULL ) { if( libfshfs_btree_file_free( @@ -188,6 +208,38 @@ result = -1; } } + if( ( *file_system )->indirect_node_catalog_btree_node_cache != NULL ) + { + if( libfshfs_btree_node_cache_free( + &( ( *file_system )->indirect_node_catalog_btree_node_cache ), + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free indirect node catalog B-tree node cache.", + function ); + + result = -1; + } + } + if( ( *file_system )->catalog_btree_node_cache != NULL ) + { + if( libfshfs_btree_node_cache_free( + &( ( *file_system )->catalog_btree_node_cache ), + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free catalog B-tree node cache.", + function ); + + result = -1; + } + } if( ( *file_system )->catalog_btree_file != NULL ) { if( libfshfs_btree_file_free( @@ -204,6 +256,22 @@ result = -1; } } + if( ( *file_system )->attributes_btree_node_cache != NULL ) + { + if( libfshfs_btree_node_cache_free( + &( ( *file_system )->attributes_btree_node_cache ), + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free attributes B-tree node cache.", + function ); + + result = -1; + } + } if( ( *file_system )->attributes_btree_file != NULL ) { if( libfshfs_btree_file_free( @@ -321,6 +389,7 @@ if( libfshfs_extents_btree_file_get_extents( file_system->extents_btree_file, file_io_handle, + file_system->extents_btree_node_cache, LIBFSHFS_ATTRIBUTES_FILE_IDENTIFIER, LIBFSHFS_FORK_TYPE_DATA, file_system->attributes_btree_file->extents, @@ -354,6 +423,19 @@ goto on_error; } + if( libfshfs_btree_node_cache_initialize( + &( file_system->attributes_btree_node_cache ), + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to create attributes B-tree node cache.", + function ); + + goto on_error; + } return( 1 ); on_error: @@ -459,6 +541,7 @@ if( libfshfs_extents_btree_file_get_extents( file_system->extents_btree_file, file_io_handle, + file_system->extents_btree_node_cache, LIBFSHFS_CATALOG_FILE_IDENTIFIER, LIBFSHFS_FORK_TYPE_DATA, file_system->catalog_btree_file->extents, @@ -492,9 +575,41 @@ goto on_error; } + if( libfshfs_btree_node_cache_initialize( + &( file_system->catalog_btree_node_cache ), + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to create catalog B-tree node cache.", + function ); + + goto on_error; + } + if( libfshfs_btree_node_cache_initialize( + &( file_system->indirect_node_catalog_btree_node_cache ), + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to create indirect node catalog B-tree node cache.", + function ); + + goto on_error; + } return( 1 ); on_error: + if( file_system->catalog_btree_node_cache != NULL ) + { + libfshfs_btree_node_cache_free( + &( file_system->catalog_btree_node_cache ), + NULL ); + } if( file_system->catalog_btree_file != NULL ) { libfshfs_btree_file_free( @@ -620,6 +735,19 @@ goto on_error; } + if( libfshfs_btree_node_cache_initialize( + &( file_system->extents_btree_node_cache ), + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to create extents B-tree node cache.", + function ); + + goto on_error; + } return( 1 ); on_error: @@ -632,24 +760,19 @@ return( -1 ); } -/* Resolves an indirect node directory entry if available - * Returns 1 if successful or -1 on error +/* Retrieves a directory entry for a specific identifier + * Returns 1 if successful, 0 if not found or -1 on error */ -int libfshfs_file_system_resolve_indirect_node_directory_entry( +int libfshfs_file_system_get_directory_entry_by_identifier( libfshfs_file_system_t *file_system, + libfshfs_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, - libfshfs_directory_entry_t *directory_entry, + uint32_t identifier, + libfshfs_directory_entry_t **directory_entry, libcerror_error_t **error ) { - char indirect_node_path[ 64 ]; - - libfshfs_directory_entry_t *link_directory_entry = NULL; - intptr_t *catalog_record = NULL; - static char *function = "libfshfs_file_system_resolve_indirect_node_directory_entry"; - size_t indirect_node_path_length = 0; - ssize_t print_count = 0; - uint32_t link_reference = 0; - int result = 0; + static char *function = "libfshfs_file_system_get_directory_entry_by_identifier"; + int result = 0; if( file_system == NULL ) { @@ -662,20 +785,14 @@ return( -1 ); } - if( directory_entry == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid directory entry.", - function ); - - return( -1 ); - } - result = libfshfs_directory_entry_get_link_reference( + result = libfshfs_catalog_btree_file_get_directory_entry_by_identifier( + file_system->catalog_btree_file, + io_handle, + file_io_handle, + file_system->catalog_btree_node_cache, + identifier, + file_system->use_case_folding, directory_entry, - &link_reference, error ); if( result == -1 ) @@ -684,111 +801,27 @@ error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve link reference.", - function ); - - goto on_error; - } - else if( ( result != 0 ) - && ( link_reference > 2 ) ) - { - print_count = narrow_string_snprintf( - indirect_node_path, - 64, - "/\xe2\x90\x80\xe2\x90\x80\xe2\x90\x80\xe2\x90\x80HFS+ Private Data/iNode%" PRIu32 "", - link_reference ); - - if( ( print_count <= -1 ) - || ( print_count > 64 ) ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to set indirect node path.", - function ); - - goto on_error; - } - indirect_node_path_length = narrow_string_length( - indirect_node_path ); - - result = libfshfs_catalog_btree_file_get_directory_entry_by_utf8_path( - file_system->catalog_btree_file, - file_io_handle, - (uint8_t *) indirect_node_path, - indirect_node_path_length, - file_system->use_case_folding, - &link_directory_entry, - error ); - - if( result != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve indirect node: %" PRIu32 " directory entry by UTF-8 path.", - function, - link_reference ); - - goto on_error; - } - if( libfshfs_directory_entry_get_identifier( - directory_entry, - &( directory_entry->link_identifier ), - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve directory entry identifier.", - function ); - - goto on_error; - } - catalog_record = directory_entry->catalog_record; - directory_entry->catalog_record = link_directory_entry->catalog_record; - link_directory_entry->catalog_record = catalog_record; - - if( libfshfs_directory_entry_free( - &link_directory_entry, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, - "%s: unable to free directory entry.", - function ); - - goto on_error; - } - } - return( 1 ); + "%s: unable to retrieve directory entry: %" PRIu32 ".", + function, + identifier ); -on_error: - if( link_directory_entry != NULL ) - { - libfshfs_directory_entry_free( - &link_directory_entry, - NULL ); + return( -1 ); } - return( -1 ); + return( result ); } -/* Retrieves a directory entry for a specific identifier +/* Retrieves an indirect node directory entry for a specific identifier * Returns 1 if successful, 0 if not found or -1 on error */ -int libfshfs_file_system_get_directory_entry_by_identifier( +int libfshfs_file_system_get_indirect_node_directory_entry_by_identifier( libfshfs_file_system_t *file_system, + libfshfs_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint32_t identifier, libfshfs_directory_entry_t **directory_entry, libcerror_error_t **error ) { - static char *function = "libfshfs_file_system_get_directory_entry_by_identifier"; + static char *function = "libfshfs_file_system_get_indirect_node_directory_entry_by_identifier"; int result = 0; if( file_system == NULL ) @@ -804,8 +837,11 @@ } result = libfshfs_catalog_btree_file_get_directory_entry_by_identifier( file_system->catalog_btree_file, + io_handle, file_io_handle, + file_system->indirect_node_catalog_btree_node_cache, identifier, + file_system->use_case_folding, directory_entry, error ); @@ -815,7 +851,7 @@ error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve directory entry: %" PRIu32 ".", + "%s: unable to retrieve indirect node directory entry: %" PRIu32 ".", function, identifier ); @@ -829,6 +865,7 @@ */ int libfshfs_file_system_get_directory_entry_by_utf8_name( libfshfs_file_system_t *file_system, + libfshfs_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint32_t parent_identifier, const uint8_t *utf8_string, @@ -838,6 +875,7 @@ { libfshfs_directory_entry_t *safe_directory_entry = NULL; static char *function = "libfshfs_file_system_get_directory_entry_by_utf8_name"; + uint32_t name_hash = 0; int result = 0; if( file_system == NULL ) @@ -862,10 +900,29 @@ return( -1 ); } + if( libfshfs_name_calculate_hash_utf8_string( + (libuna_utf8_character_t *) utf8_string, + utf8_string_length, + file_system->use_case_folding, + &name_hash, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GENERIC, + "%s: unable to calculate name hash.", + function ); + + goto on_error; + } result = libfshfs_catalog_btree_file_get_directory_entry_by_utf8_name( file_system->catalog_btree_file, + io_handle, file_io_handle, + file_system->catalog_btree_node_cache, parent_identifier, + name_hash, utf8_string, utf8_string_length, file_system->use_case_folding, @@ -885,21 +942,6 @@ } else if( result != 0 ) { - if( libfshfs_file_system_resolve_indirect_node_directory_entry( - file_system, - file_io_handle, - safe_directory_entry, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to resolve indirect node directory entry.", - function ); - - goto on_error; - } *directory_entry = safe_directory_entry; } return( result ); @@ -919,6 +961,7 @@ */ int libfshfs_file_system_get_directory_entry_by_utf8_path( libfshfs_file_system_t *file_system, + libfshfs_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, const uint8_t *utf8_string, size_t utf8_string_length, @@ -953,7 +996,9 @@ } result = libfshfs_catalog_btree_file_get_directory_entry_by_utf8_path( file_system->catalog_btree_file, + io_handle, file_io_handle, + file_system->catalog_btree_node_cache, utf8_string, utf8_string_length, file_system->use_case_folding, @@ -973,21 +1018,6 @@ } else if( result != 0 ) { - if( libfshfs_file_system_resolve_indirect_node_directory_entry( - file_system, - file_io_handle, - safe_directory_entry, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to resolve indirect node directory entry.", - function ); - - goto on_error; - } *directory_entry = safe_directory_entry; } return( result ); @@ -1007,6 +1037,7 @@ */ int libfshfs_file_system_get_directory_entry_by_utf16_name( libfshfs_file_system_t *file_system, + libfshfs_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint32_t parent_identifier, const uint16_t *utf16_string, @@ -1016,6 +1047,7 @@ { libfshfs_directory_entry_t *safe_directory_entry = NULL; static char *function = "libfshfs_file_system_get_directory_entry_by_utf16_name"; + uint32_t name_hash = 0; int result = 0; if( file_system == NULL ) @@ -1040,10 +1072,29 @@ return( -1 ); } + if( libfshfs_name_calculate_hash_utf16_string( + (libuna_utf16_character_t *) utf16_string, + utf16_string_length, + file_system->use_case_folding, + &name_hash, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GENERIC, + "%s: unable to calculate name hash.", + function ); + + goto on_error; + } result = libfshfs_catalog_btree_file_get_directory_entry_by_utf16_name( file_system->catalog_btree_file, + io_handle, file_io_handle, + file_system->catalog_btree_node_cache, parent_identifier, + name_hash, utf16_string, utf16_string_length, file_system->use_case_folding, @@ -1063,21 +1114,6 @@ } else if( result != 0 ) { - if( libfshfs_file_system_resolve_indirect_node_directory_entry( - file_system, - file_io_handle, - safe_directory_entry, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to resolve indirect node directory entry.", - function ); - - goto on_error; - } *directory_entry = safe_directory_entry; } return( result ); @@ -1097,6 +1133,7 @@ */ int libfshfs_file_system_get_directory_entry_by_utf16_path( libfshfs_file_system_t *file_system, + libfshfs_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, const uint16_t *utf16_string, size_t utf16_string_length, @@ -1131,7 +1168,9 @@ } result = libfshfs_catalog_btree_file_get_directory_entry_by_utf16_path( file_system->catalog_btree_file, + io_handle, file_io_handle, + file_system->catalog_btree_node_cache, utf16_string, utf16_string_length, file_system->use_case_folding, @@ -1151,21 +1190,6 @@ } else if( result != 0 ) { - if( libfshfs_file_system_resolve_indirect_node_directory_entry( - file_system, - file_io_handle, - safe_directory_entry, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to resolve indirect node directory entry.", - function ); - - goto on_error; - } *directory_entry = safe_directory_entry; } return( result ); @@ -1185,6 +1209,7 @@ */ int libfshfs_file_system_get_directory_entries( libfshfs_file_system_t *file_system, + libfshfs_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint32_t parent_identifier, libcdata_array_t **directory_entries, @@ -1230,7 +1255,9 @@ } if( libfshfs_catalog_btree_file_get_directory_entries( file_system->catalog_btree_file, + io_handle, file_io_handle, + file_system->catalog_btree_node_cache, parent_identifier, *directory_entries, error ) != 1 ) @@ -1344,6 +1371,7 @@ if( libfshfs_extents_btree_file_get_extents( file_system->extents_btree_file, file_io_handle, + file_system->extents_btree_node_cache, identifier, fork_type, *extents, @@ -1421,22 +1449,26 @@ goto on_error; } - if( libfshfs_attributes_btree_file_get_attributes( - file_system->attributes_btree_file, - file_io_handle, - parent_identifier, - *attributes, - error ) != 1 ) + if( file_system->attributes_btree_file != NULL ) { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve attributes for entry: %" PRIu32 " from attributes B-tree file.", - function, - parent_identifier ); + if( libfshfs_attributes_btree_file_get_attributes( + file_system->attributes_btree_file, + file_io_handle, + file_system->attributes_btree_node_cache, + parent_identifier, + *attributes, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve attributes for entry: %" PRIu32 " from attributes B-tree file.", + function, + parent_identifier ); - goto on_error; + goto on_error; + } } return( 1 ); diff -Nru libfshfs-20201104/libfshfs/libfshfs_file_system.h libfshfs-20240221/libfshfs/libfshfs_file_system.h --- libfshfs-20201104/libfshfs/libfshfs_file_system.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_file_system.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * File system functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -26,8 +26,10 @@ #include #include "libfshfs_btree_file.h" +#include "libfshfs_btree_node_cache.h" #include "libfshfs_directory_entry.h" #include "libfshfs_fork_descriptor.h" +#include "libfshfs_io_handle.h" #include "libfshfs_libbfio.h" #include "libfshfs_libcerror.h" #include "libfshfs_libcthreads.h" @@ -40,18 +42,34 @@ struct libfshfs_file_system { - /* The extents btree file + /* The extents B-tree file */ libfshfs_btree_file_t *extents_btree_file; - /* The catalog btree file + /* The extents B-tree node cache + */ + libfshfs_btree_node_cache_t *extents_btree_node_cache; + + /* The catalog B-tree file */ libfshfs_btree_file_t *catalog_btree_file; - /* The attributes btree file + /* The catalog B-tree node cache + */ + libfshfs_btree_node_cache_t *catalog_btree_node_cache; + + /* The catalog B-tree node cache for indirect node lookups + */ + libfshfs_btree_node_cache_t *indirect_node_catalog_btree_node_cache; + + /* The attributes B-tree file */ libfshfs_btree_file_t *attributes_btree_file; + /* The attributes B-tree node cache + */ + libfshfs_btree_node_cache_t *attributes_btree_node_cache; + /* Flag to indicate case folding should be used */ uint8_t use_case_folding; @@ -93,14 +111,17 @@ libfshfs_fork_descriptor_t *fork_descriptor, libcerror_error_t **error ); -int libfshfs_file_system_resolve_indirect_node_directory_entry( +int libfshfs_file_system_get_directory_entry_by_identifier( libfshfs_file_system_t *file_system, + libfshfs_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, - libfshfs_directory_entry_t *directory_entry, + uint32_t identifier, + libfshfs_directory_entry_t **directory_entry, libcerror_error_t **error ); -int libfshfs_file_system_get_directory_entry_by_identifier( +int libfshfs_file_system_get_indirect_node_directory_entry_by_identifier( libfshfs_file_system_t *file_system, + libfshfs_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint32_t identifier, libfshfs_directory_entry_t **directory_entry, @@ -108,6 +129,7 @@ int libfshfs_file_system_get_directory_entry_by_utf8_name( libfshfs_file_system_t *file_system, + libfshfs_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint32_t parent_identifier, const uint8_t *utf8_string, @@ -117,6 +139,7 @@ int libfshfs_file_system_get_directory_entry_by_utf8_path( libfshfs_file_system_t *file_system, + libfshfs_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, const uint8_t *utf8_string, size_t utf8_string_length, @@ -125,6 +148,7 @@ int libfshfs_file_system_get_directory_entry_by_utf16_name( libfshfs_file_system_t *file_system, + libfshfs_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint32_t parent_identifier, const uint16_t *utf16_string, @@ -134,6 +158,7 @@ int libfshfs_file_system_get_directory_entry_by_utf16_path( libfshfs_file_system_t *file_system, + libfshfs_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, const uint16_t *utf16_string, size_t utf16_string_length, @@ -142,6 +167,7 @@ int libfshfs_file_system_get_directory_entries( libfshfs_file_system_t *file_system, + libfshfs_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint32_t parent_identifier, libcdata_array_t **directory_entries, diff -Nru libfshfs-20201104/libfshfs/libfshfs_fork_descriptor.c libfshfs-20240221/libfshfs/libfshfs_fork_descriptor.c --- libfshfs-20201104/libfshfs/libfshfs_fork_descriptor.c 2020-11-04 05:27:40.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_fork_descriptor.c 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Fork descriptor functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -29,7 +29,7 @@ #include "libfshfs_libcerror.h" #include "libfshfs_libcnotify.h" -#include "fshfs_fork.h" +#include "fshfs_fork_descriptor.h" /* Creates a fork descriptor * Make sure the value fork_descriptor is referencing, is set to NULL diff -Nru libfshfs-20201104/libfshfs/libfshfs_fork_descriptor.h libfshfs-20240221/libfshfs/libfshfs_fork_descriptor.h --- libfshfs-20201104/libfshfs/libfshfs_fork_descriptor.h 2020-11-04 05:25:35.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_fork_descriptor.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Fork descriptor functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfshfs/libfshfs_huffman_tree.c libfshfs-20240221/libfshfs/libfshfs_huffman_tree.c --- libfshfs-20201104/libfshfs/libfshfs_huffman_tree.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_huffman_tree.c 2024-02-21 05:48:50.000000000 +0000 @@ -0,0 +1,557 @@ +/* + * Huffman tree functions + * + * Copyright (C) 2009-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include +#include + +#include "libfshfs_bit_stream.h" +#include "libfshfs_huffman_tree.h" +#include "libfshfs_libcerror.h" +#include "libfshfs_libcnotify.h" + +/* Creates a Huffman tree + * Make sure the value huffman_tree is referencing, is set to NULL + * Returns 1 if successful or -1 on error + */ +int libfshfs_huffman_tree_initialize( + libfshfs_huffman_tree_t **huffman_tree, + int number_of_symbols, + uint8_t maximum_code_size, + libcerror_error_t **error ) +{ + static char *function = "libfshfs_huffman_tree_initialize"; + size_t array_size = 0; + + if( huffman_tree == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid Huffman tree.", + function ); + + return( -1 ); + } + if( *huffman_tree != NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, + "%s: invalid Huffman tree value already set.", + function ); + + return( -1 ); + } + if( ( number_of_symbols < 0 ) + || ( number_of_symbols > 1024 ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid number of symbols value out of bounds.", + function ); + + return( -1 ); + } + if( maximum_code_size > 32 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid maximum code size value out of bounds.", + function ); + + return( -1 ); + } + *huffman_tree = memory_allocate_structure( + libfshfs_huffman_tree_t ); + + if( *huffman_tree == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_INSUFFICIENT, + "%s: unable to create Huffman tree.", + function ); + + goto on_error; + } + if( memory_set( + *huffman_tree, + 0, + sizeof( libfshfs_huffman_tree_t ) ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_SET_FAILED, + "%s: unable to clear Huffman tree.", + function ); + + memory_free( + *huffman_tree ); + + *huffman_tree = NULL; + + return( -1 ); + } + array_size = sizeof( uint16_t ) * number_of_symbols; + + ( *huffman_tree )->symbols = (uint16_t *) memory_allocate( + array_size ); + + if( ( *huffman_tree )->symbols == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_INSUFFICIENT, + "%s: unable to create symbols.", + function ); + + goto on_error; + } + if( memory_set( + ( *huffman_tree )->symbols, + 0, + array_size ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_SET_FAILED, + "%s: unable to clear symbols.", + function ); + + goto on_error; + } + array_size = sizeof( int ) * ( maximum_code_size + 1 ); + + ( *huffman_tree )->code_size_counts = (int *) memory_allocate( + array_size ); + + if( ( *huffman_tree )->code_size_counts == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_INSUFFICIENT, + "%s: unable to create code size counts.", + function ); + + goto on_error; + } + if( memory_set( + ( *huffman_tree )->code_size_counts, + 0, + array_size ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_SET_FAILED, + "%s: unable to clear code size counts.", + function ); + + goto on_error; + } + ( *huffman_tree )->maximum_code_size = maximum_code_size; + + return( 1 ); + +on_error: + if( *huffman_tree != NULL ) + { + if( ( *huffman_tree )->code_size_counts != NULL ) + { + memory_free( + ( *huffman_tree )->code_size_counts ); + } + if( ( *huffman_tree )->symbols != NULL ) + { + memory_free( + ( *huffman_tree )->symbols ); + } + memory_free( + *huffman_tree ); + + *huffman_tree = NULL; + } + return( -1 ); +} + +/* Frees a Huffman tree + * Returns 1 if successful or -1 on error + */ +int libfshfs_huffman_tree_free( + libfshfs_huffman_tree_t **huffman_tree, + libcerror_error_t **error ) +{ + static char *function = "libfshfs_huffman_tree_free"; + + if( huffman_tree == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid Huffman tree.", + function ); + + return( -1 ); + } + if( *huffman_tree != NULL ) + { + if( ( *huffman_tree )->code_size_counts != NULL ) + { + memory_free( + ( *huffman_tree )->code_size_counts ); + } + if( ( *huffman_tree )->symbols != NULL ) + { + memory_free( + ( *huffman_tree )->symbols ); + } + memory_free( + *huffman_tree ); + + *huffman_tree = NULL; + } + return( 1 ); +} + +/* Builds the Huffman tree + * Returns 1 on success, 0 if the tree is empty or -1 on error + */ +int libfshfs_huffman_tree_build( + libfshfs_huffman_tree_t *huffman_tree, + const uint8_t *code_sizes_array, + int number_of_code_sizes, + libcerror_error_t **error ) +{ + int *symbol_offsets = NULL; + static char *function = "libfshfs_huffman_tree_build"; + size_t array_size = 0; + uint16_t symbol = 0; + uint8_t bit_index = 0; + uint8_t code_size = 0; + int code_offset = 0; + int left_value = 0; + + if( huffman_tree == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid Huffman tree.", + function ); + + return( -1 ); + } + if( code_sizes_array == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid code sizes array.", + function ); + + return( -1 ); + } + if( ( number_of_code_sizes < 0 ) + || ( number_of_code_sizes > (int) INT16_MAX ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid number of code sizes value out of bounds.", + function ); + + return( -1 ); + } + /* Determine the code size frequencies + */ + array_size = sizeof( int ) * ( huffman_tree->maximum_code_size + 1 ); + + if( memory_set( + huffman_tree->code_size_counts, + 0, + array_size ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_SET_FAILED, + "%s: unable to clear code size counts.", + function ); + + goto on_error; + } + for( symbol = 0; + symbol < (uint16_t) number_of_code_sizes; + symbol++ ) + { + code_size = code_sizes_array[ symbol ]; + + if( code_size > huffman_tree->maximum_code_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid symbol: %d code size: %" PRIu8 " value out of bounds.", + function, + symbol, + code_size ); + + goto on_error; + } + huffman_tree->code_size_counts[ code_size ] += 1; + } + /* The tree has no codes + */ + if( huffman_tree->code_size_counts[ 0 ] == number_of_code_sizes ) + { + return( 0 ); + } + /* Check if the set of code sizes is incomplete or over-subscribed + */ + left_value = 1; + + for( bit_index = 1; + bit_index <= huffman_tree->maximum_code_size; + bit_index++ ) + { + left_value <<= 1; + left_value -= huffman_tree->code_size_counts[ bit_index ]; + + if( left_value < 0 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: code sizes are over-subscribed.", + function ); + + goto on_error; + } + } +/* TODO + if( left_value > 0 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: code sizes are incomplete.", + function ); + + goto on_error; + } +*/ + symbol_offsets = (int *) memory_allocate( + array_size ); + + if( symbol_offsets == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_INSUFFICIENT, + "%s: unable to create symbol offsets.", + function ); + + goto on_error; + } + /* Calculate the offsets to sort the symbols per code size + */ + symbol_offsets[ 0 ] = 0; + symbol_offsets[ 1 ] = 0; + + for( bit_index = 1; + bit_index < huffman_tree->maximum_code_size; + bit_index++ ) + { + symbol_offsets[ bit_index + 1 ] = symbol_offsets[ bit_index ] + huffman_tree->code_size_counts[ bit_index ]; + } + /* Fill the symbols sorted by code size + */ + for( symbol = 0; + symbol < (uint16_t) number_of_code_sizes; + symbol++ ) + { + code_size = code_sizes_array[ symbol ]; + + if( code_size == 0 ) + { + continue; + } + code_offset = symbol_offsets[ code_size ]; + + if( ( code_offset < 0 ) + || ( code_offset > number_of_code_sizes ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid symbol: %" PRIu16 " code offset: %d value out of bounds.", + function, + symbol, + code_offset ); + + goto on_error; + } + symbol_offsets[ code_size ] += 1; + + huffman_tree->symbols[ code_offset ] = symbol; + } + memory_free( + symbol_offsets ); + + return( 1 ); + +on_error: + if( symbol_offsets != NULL ) + { + memory_free( + symbol_offsets ); + } + return( -1 ); +} + +/* Retrieves a symbol based on the Huffman code read from the bit-stream + * Returns 1 on success or -1 on error + */ +int libfshfs_huffman_tree_get_symbol_from_bit_stream( + libfshfs_huffman_tree_t *huffman_tree, + libfshfs_bit_stream_t *bit_stream, + uint16_t *symbol, + libcerror_error_t **error ) +{ + static char *function = "libfshfs_huffman_tree_get_symbol_from_bit_stream"; + uint32_t value_32bit = 0; + uint16_t safe_symbol = 0; + uint8_t bit_index = 0; + int code_size_count = 0; + int first_huffman_code = 0; + int first_index = 0; + int huffman_code = 0; + int result = 0; + + if( huffman_tree == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid Huffman tree.", + function ); + + return( -1 ); + } + if( bit_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid bit stream.", + function ); + + return( -1 ); + } + if( symbol == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid symbol.", + function ); + + return( -1 ); + } +/* TODO get maximum_code_size of bits into local bit buffer */ + + for( bit_index = 1; + bit_index <= huffman_tree->maximum_code_size; + bit_index++ ) + { + if( libfshfs_bit_stream_get_value( + bit_stream, + 1, + &value_32bit, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve value from bit stream.", + function ); + + return( -1 ); + } + huffman_code <<= 1; + huffman_code |= (int) value_32bit; + + code_size_count = huffman_tree->code_size_counts[ bit_index ]; + + if( ( huffman_code - code_size_count ) < first_huffman_code ) + { + safe_symbol = huffman_tree->symbols[ first_index + ( huffman_code - first_huffman_code ) ]; + + result = 1; + + break; + } + first_huffman_code += code_size_count; + first_huffman_code <<= 1; + first_index += code_size_count; + } + if( result != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid Huffman code: 0x%08" PRIx32 ".", + function, + huffman_code ); + + return( -1 ); + } + *symbol = safe_symbol; + + return( 1 ); +} + diff -Nru libfshfs-20201104/libfshfs/libfshfs_huffman_tree.h libfshfs-20240221/libfshfs/libfshfs_huffman_tree.h --- libfshfs-20201104/libfshfs/libfshfs_huffman_tree.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_huffman_tree.h 2024-02-21 05:48:50.000000000 +0000 @@ -0,0 +1,79 @@ +/* + * Huffman tree functions + * + * Copyright (C) 2009-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _LIBFSHFS_HUFFMAN_TREE_H ) +#define _LIBFSHFS_HUFFMAN_TREE_H + +#include +#include + +#include "libfshfs_bit_stream.h" +#include "libfshfs_libcerror.h" + +#if defined( __cplusplus ) +extern "C" { +#endif + +typedef struct libfshfs_huffman_tree libfshfs_huffman_tree_t; + +struct libfshfs_huffman_tree +{ + /* The maximum number of bits allowed for a Huffman code + */ + uint8_t maximum_code_size; + + /* The symbols array + */ + uint16_t *symbols; + + /* The code size counts array + */ + int *code_size_counts; +}; + +int libfshfs_huffman_tree_initialize( + libfshfs_huffman_tree_t **huffman_tree, + int number_of_symbols, + uint8_t maximum_code_size, + libcerror_error_t **error ); + +int libfshfs_huffman_tree_free( + libfshfs_huffman_tree_t **huffman_tree, + libcerror_error_t **error ); + +int libfshfs_huffman_tree_build( + libfshfs_huffman_tree_t *huffman_tree, + const uint8_t *code_sizes_array, + int number_of_code_sizes, + libcerror_error_t **error ); + +int libfshfs_huffman_tree_get_symbol_from_bit_stream( + libfshfs_huffman_tree_t *huffman_tree, + libfshfs_bit_stream_t *bit_stream, + uint16_t *symbol, + libcerror_error_t **error ); + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _LIBFSHFS_HUFFMAN_TREE_H ) */ + diff -Nru libfshfs-20201104/libfshfs/libfshfs_io_handle.c libfshfs-20240221/libfshfs/libfshfs_io_handle.c --- libfshfs-20201104/libfshfs/libfshfs_io_handle.c 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_io_handle.c 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Input/Output (IO) handle functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -26,9 +26,7 @@ #include "libfshfs_io_handle.h" #include "libfshfs_libcerror.h" - -const char fshfs_volume_signature_hfsplus[ 2 ] = "H+"; -const char fshfs_volume_signature_hfsx[ 2 ] = "HX"; +#include "libfshfs_profiler.h" /* Creates an IO handle * Make sure the value io_handle is referencing, is set to NULL @@ -88,13 +86,56 @@ "%s: unable to clear IO handle.", function ); + memory_free( + *io_handle ); + + *io_handle = NULL; + + return( -1 ); + } +#if defined( HAVE_PROFILER ) + if( libfshfs_profiler_initialize( + &( ( *io_handle )->profiler ), + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to initialize profiler.", + function ); + + goto on_error; + } + if( libfshfs_profiler_open( + ( *io_handle )->profiler, + "profiler.csv", + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_OPEN_FAILED, + "%s: unable to open profiler.", + function ); + goto on_error; } +#endif /* defined( HAVE_PROFILER ) */ + return( 1 ); on_error: if( *io_handle != NULL ) { +#if defined( HAVE_PROFILER ) + if( ( *io_handle )->profiler != NULL ) + { + libfshfs_profiler_free( + &( ( *io_handle )->profiler ), + NULL ); + } +#endif memory_free( *io_handle ); @@ -111,6 +152,7 @@ libcerror_error_t **error ) { static char *function = "libfshfs_io_handle_free"; + int result = 1; if( io_handle == NULL ) { @@ -125,12 +167,40 @@ } if( *io_handle != NULL ) { +#if defined( HAVE_PROFILER ) + if( libfshfs_profiler_close( + ( *io_handle )->profiler, + error ) != 0 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_CLOSE_FAILED, + "%s: unable to close profiler.", + function ); + + result = -1; + } + if( libfshfs_profiler_free( + &( ( *io_handle )->profiler ), + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free profiler.", + function ); + + result = -1; + } +#endif /* defined( HAVE_PROFILER ) */ memory_free( *io_handle ); *io_handle = NULL; } - return( 1 ); + return( result ); } /* Clears the IO handle @@ -140,7 +210,11 @@ libfshfs_io_handle_t *io_handle, libcerror_error_t **error ) { - static char *function = "libfshfs_io_handle_clear"; + static char *function = "libfshfs_io_handle_clear"; + +#if defined( HAVE_PROFILER ) + libfshfs_profiler_t *profiler = NULL; +#endif if( io_handle == NULL ) { @@ -153,6 +227,9 @@ return( -1 ); } +#if defined( HAVE_PROFILER ) + profiler = io_handle->profiler; +#endif if( memory_set( io_handle, 0, @@ -167,6 +244,10 @@ return( -1 ); } + +#if defined( HAVE_PROFILER ) + io_handle->profiler = profiler; +#endif return( 1 ); } diff -Nru libfshfs-20201104/libfshfs/libfshfs_io_handle.h libfshfs-20240221/libfshfs/libfshfs_io_handle.h --- libfshfs-20201104/libfshfs/libfshfs_io_handle.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_io_handle.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Input/Output (IO) handle functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -26,14 +26,12 @@ #include #include "libfshfs_libcerror.h" +#include "libfshfs_profiler.h" #if defined( __cplusplus ) extern "C" { #endif -extern const char fshfs_volume_signature_hfsplus[ 2 ]; -extern const char fshfs_volume_signature_hfsx[ 2 ]; - typedef struct libfshfs_io_handle libfshfs_io_handle_t; struct libfshfs_io_handle @@ -46,6 +44,12 @@ */ uint32_t block_size; +#if defined( HAVE_PROFILER ) + /* The profiler + */ + libfshfs_profiler_t *profiler; +#endif + /* Value to indicate if abort was signalled */ int abort; diff -Nru libfshfs-20201104/libfshfs/libfshfs_libbfio.h libfshfs-20240221/libfshfs/libfshfs_libbfio.h --- libfshfs-20201104/libfshfs/libfshfs_libbfio.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_libbfio.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libbfio header wrapper * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfshfs/libfshfs_libcdata.h libfshfs-20240221/libfshfs/libfshfs_libcdata.h --- libfshfs-20201104/libfshfs/libfshfs_libcdata.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_libcdata.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libcdata header wrapper * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfshfs/libfshfs_libcerror.h libfshfs-20240221/libfshfs/libfshfs_libcerror.h --- libfshfs-20201104/libfshfs/libfshfs_libcerror.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_libcerror.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libcerror header wrapper * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfshfs/libfshfs_libclocale.h libfshfs-20240221/libfshfs/libfshfs_libclocale.h --- libfshfs-20201104/libfshfs/libfshfs_libclocale.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_libclocale.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libclocale header wrapper * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfshfs/libfshfs_libcnotify.h libfshfs-20240221/libfshfs/libfshfs_libcnotify.h --- libfshfs-20201104/libfshfs/libfshfs_libcnotify.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_libcnotify.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libcnotify header wrapper * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfshfs/libfshfs_libcthreads.h libfshfs-20240221/libfshfs/libfshfs_libcthreads.h --- libfshfs-20201104/libfshfs/libfshfs_libcthreads.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_libcthreads.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libcthreads header wrapper * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfshfs/libfshfs_libfcache.h libfshfs-20240221/libfshfs/libfshfs_libfcache.h --- libfshfs-20201104/libfshfs/libfshfs_libfcache.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_libfcache.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libfcache header wrapper * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfshfs/libfshfs_libfdata.h libfshfs-20240221/libfshfs/libfshfs_libfdata.h --- libfshfs-20201104/libfshfs/libfshfs_libfdata.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_libfdata.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libfdata header wrapper * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -34,8 +34,6 @@ #include #include #include -#include -#include #include #include diff -Nru libfshfs-20201104/libfshfs/libfshfs_libfdatetime.h libfshfs-20240221/libfshfs/libfshfs_libfdatetime.h --- libfshfs-20201104/libfshfs/libfshfs_libfdatetime.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_libfdatetime.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libfdatetime header wrapper * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfshfs/libfshfs_libfguid.h libfshfs-20240221/libfshfs/libfshfs_libfguid.h --- libfshfs-20201104/libfshfs/libfshfs_libfguid.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_libfguid.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libfguid header wrapper * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfshfs/libfshfs_libfmos.h libfshfs-20240221/libfshfs/libfshfs_libfmos.h --- libfshfs-20201104/libfshfs/libfshfs_libfmos.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_libfmos.h 2024-02-21 05:48:50.000000000 +0000 @@ -0,0 +1,51 @@ +/* + * The libfmos header wrapper + * + * Copyright (C) 2009-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _LIBFSHFS_LIBFMOS_H ) +#define _LIBFSHFS_LIBFMOS_H + +#include + +/* Define HAVE_LOCAL_LIBFMOS for local use of libfmos + */ +#if defined( HAVE_LOCAL_LIBFMOS ) + +#include +#include +#include +#include +#include + +#else + +/* If libtool DLL support is enabled set LIBFMOS_DLL_IMPORT + * before including libfmos.h + */ +#if defined( _WIN32 ) && defined( DLL_IMPORT ) +#define LIBFMOS_DLL_IMPORT +#endif + +#include + +#endif /* defined( HAVE_LOCAL_LIBFMOS ) */ + +#endif /* !defined( _LIBFSHFS_LIBFMOS_H ) */ + diff -Nru libfshfs-20201104/libfshfs/libfshfs_libuna.h libfshfs-20240221/libfshfs/libfshfs_libuna.h --- libfshfs-20201104/libfshfs/libfshfs_libuna.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_libuna.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libuna header wrapper * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfshfs/libfshfs_lzvn.c libfshfs-20240221/libfshfs/libfshfs_lzvn.c --- libfshfs-20201104/libfshfs/libfshfs_lzvn.c 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_lzvn.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,631 +0,0 @@ -/* - * LZVN (un)compression functions - * - * Copyright (C) 2009-2020, Joachim Metz - * - * Refer to AUTHORS for acknowledgements. - * - * This program 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 3 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - */ - -#include -#include -#include -#include - -#include "libfshfs_lzvn.h" -#include "libfshfs_libcerror.h" - -enum LIBFSHFS_LZVN_OPPCODE_TYPES -{ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_LARGE, - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_PREVIOUS, - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, - LIBFSHFS_LZVN_OPPCODE_TYPE_END_OF_STREAM, - LIBFSHFS_LZVN_OPPCODE_TYPE_INVALID, - LIBFSHFS_LZVN_OPPCODE_TYPE_LITERAL_LARGE, - LIBFSHFS_LZVN_OPPCODE_TYPE_LITERAL_SMALL, - LIBFSHFS_LZVN_OPPCODE_TYPE_MATCH_LARGE, - LIBFSHFS_LZVN_OPPCODE_TYPE_MATCH_SMALL, - LIBFSHFS_LZVN_OPPCODE_TYPE_NONE, -}; - -/* Lookup table to map an oppcode to its type - */ -uint8_t lzvn_oppcode_types[ 256 ] = { - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x00 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x01 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x02 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x03 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x04 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x05 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_END_OF_STREAM, /* 0x06 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_LARGE, /* 0x07 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x08 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x09 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x0a */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x0b */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x0c */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x0d */ - LIBFSHFS_LZVN_OPPCODE_TYPE_NONE, /* 0x0e */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_LARGE, /* 0x0f */ - - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x10 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x11 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x12 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x13 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x14 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x15 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_NONE, /* 0x16 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_LARGE, /* 0x17 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x18 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x19 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x1a */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x1b */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x1c */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x1d */ - LIBFSHFS_LZVN_OPPCODE_TYPE_INVALID, /* 0x1e */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_LARGE, /* 0x1f */ - - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x20 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x21 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x22 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x23 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x24 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x25 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_INVALID, /* 0x26 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_LARGE, /* 0x27 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x28 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x29 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x2a */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x2b */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x2c */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x2d */ - LIBFSHFS_LZVN_OPPCODE_TYPE_INVALID, /* 0x2e */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_LARGE, /* 0x2f */ - - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x30 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x31 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x32 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x33 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x34 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x35 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_INVALID, /* 0x36 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_LARGE, /* 0x37 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x38 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x39 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x3a */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x3b */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x3c */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x3d */ - LIBFSHFS_LZVN_OPPCODE_TYPE_INVALID, /* 0x3e */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_LARGE, /* 0x3f */ - - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x40 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x41 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x42 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x43 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x44 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x45 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_PREVIOUS, /* 0x46 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_LARGE, /* 0x47 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x48 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x49 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x4a */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x4b */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x4c */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x4d */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_PREVIOUS, /* 0x4e */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_LARGE, /* 0x4f */ - - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x50 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x51 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x52 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x53 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x54 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x55 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_PREVIOUS, /* 0x56 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_LARGE, /* 0x57 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x58 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x59 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x5a */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x5b */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x5c */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x5d */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_PREVIOUS, /* 0x5e */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_LARGE, /* 0x5f */ - - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x60 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x61 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x62 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x63 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x64 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x65 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_PREVIOUS, /* 0x66 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_LARGE, /* 0x67 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x68 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x69 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x6a */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x6b */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x6c */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x6d */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_PREVIOUS, /* 0x6e */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_LARGE, /* 0x6f */ - - LIBFSHFS_LZVN_OPPCODE_TYPE_INVALID, /* 0x70 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_INVALID, /* 0x71 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_INVALID, /* 0x72 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_INVALID, /* 0x73 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_INVALID, /* 0x74 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_INVALID, /* 0x75 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_INVALID, /* 0x76 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_INVALID, /* 0x77 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_INVALID, /* 0x78 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_INVALID, /* 0x79 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_INVALID, /* 0x7a */ - LIBFSHFS_LZVN_OPPCODE_TYPE_INVALID, /* 0x7b */ - LIBFSHFS_LZVN_OPPCODE_TYPE_INVALID, /* 0x7c */ - LIBFSHFS_LZVN_OPPCODE_TYPE_INVALID, /* 0x7d */ - LIBFSHFS_LZVN_OPPCODE_TYPE_INVALID, /* 0x7e */ - LIBFSHFS_LZVN_OPPCODE_TYPE_INVALID, /* 0x7f */ - - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x80 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x81 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x82 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x83 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x84 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x85 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_PREVIOUS, /* 0x86 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_LARGE, /* 0x87 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x88 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x89 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x8a */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x8b */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x8c */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x8d */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_PREVIOUS, /* 0x8e */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_LARGE, /* 0x8f */ - - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x90 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x91 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x92 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x93 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x94 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x95 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_PREVIOUS, /* 0x96 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_LARGE, /* 0x97 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x98 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x99 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x9a */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x9b */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x9c */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0x9d */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_PREVIOUS, /* 0x9e */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_LARGE, /* 0x9f */ - - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xa0 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xa1 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xa2 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xa3 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xa4 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xa5 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xa6 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xa7 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xa8 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xa9 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xaa */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xab */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xac */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xad */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xae */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xaf */ - - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xb0 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xb1 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xb2 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xb3 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xb4 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xb5 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xb6 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xb7 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xb8 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xb9 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xba */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xbb */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xbc */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xbd */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xbe */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM, /* 0xbf */ - - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0xc0 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0xc1 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0xc2 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0xc3 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0xc4 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0xc5 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_PREVIOUS, /* 0xc6 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_LARGE, /* 0xc7 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0xc8 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0xc9 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0xca */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0xcb */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0xcc */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL, /* 0xcd */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_PREVIOUS, /* 0xce */ - LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_LARGE, /* 0xcf */ - - LIBFSHFS_LZVN_OPPCODE_TYPE_INVALID, /* 0xd0 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_INVALID, /* 0xd1 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_INVALID, /* 0xd2 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_INVALID, /* 0xd3 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_INVALID, /* 0xd4 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_INVALID, /* 0xd5 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_INVALID, /* 0xd6 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_INVALID, /* 0xd7 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_INVALID, /* 0xd8 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_INVALID, /* 0xd9 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_INVALID, /* 0xda */ - LIBFSHFS_LZVN_OPPCODE_TYPE_INVALID, /* 0xdb */ - LIBFSHFS_LZVN_OPPCODE_TYPE_INVALID, /* 0xdc */ - LIBFSHFS_LZVN_OPPCODE_TYPE_INVALID, /* 0xdd */ - LIBFSHFS_LZVN_OPPCODE_TYPE_INVALID, /* 0xde */ - LIBFSHFS_LZVN_OPPCODE_TYPE_INVALID, /* 0xdf */ - - LIBFSHFS_LZVN_OPPCODE_TYPE_LITERAL_LARGE, /* 0xe0 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_LITERAL_SMALL, /* 0xe1 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_LITERAL_SMALL, /* 0xe2 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_LITERAL_SMALL, /* 0xe3 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_LITERAL_SMALL, /* 0xe4 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_LITERAL_SMALL, /* 0xe5 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_LITERAL_SMALL, /* 0xe6 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_LITERAL_SMALL, /* 0xe7 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_LITERAL_SMALL, /* 0xe8 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_LITERAL_SMALL, /* 0xe9 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_LITERAL_SMALL, /* 0xea */ - LIBFSHFS_LZVN_OPPCODE_TYPE_LITERAL_SMALL, /* 0xeb */ - LIBFSHFS_LZVN_OPPCODE_TYPE_LITERAL_SMALL, /* 0xec */ - LIBFSHFS_LZVN_OPPCODE_TYPE_LITERAL_SMALL, /* 0xed */ - LIBFSHFS_LZVN_OPPCODE_TYPE_LITERAL_SMALL, /* 0xee */ - LIBFSHFS_LZVN_OPPCODE_TYPE_LITERAL_SMALL, /* 0xef */ - - LIBFSHFS_LZVN_OPPCODE_TYPE_MATCH_LARGE, /* 0xf0 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_MATCH_SMALL, /* 0xf1 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_MATCH_SMALL, /* 0xf2 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_MATCH_SMALL, /* 0xf3 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_MATCH_SMALL, /* 0xf4 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_MATCH_SMALL, /* 0xf5 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_MATCH_SMALL, /* 0xf6 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_MATCH_SMALL, /* 0xf7 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_MATCH_SMALL, /* 0xf8 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_MATCH_SMALL, /* 0xf9 */ - LIBFSHFS_LZVN_OPPCODE_TYPE_MATCH_SMALL, /* 0xfa */ - LIBFSHFS_LZVN_OPPCODE_TYPE_MATCH_SMALL, /* 0xfb */ - LIBFSHFS_LZVN_OPPCODE_TYPE_MATCH_SMALL, /* 0xfc */ - LIBFSHFS_LZVN_OPPCODE_TYPE_MATCH_SMALL, /* 0xfd */ - LIBFSHFS_LZVN_OPPCODE_TYPE_MATCH_SMALL, /* 0xfe */ - LIBFSHFS_LZVN_OPPCODE_TYPE_MATCH_SMALL, /* 0xff */ -}; - -/* Decompresses LIBFSHFS_LZVN compressed data - * Returns 1 on success or -1 on error - */ -int libfshfs_lzvn_decompress( - const uint8_t *compressed_data, - size_t compressed_data_size, - uint8_t *uncompressed_data, - size_t *uncompressed_data_size, - libcerror_error_t **error ) -{ - static char *function = "libfshfs_lzvn_decompress"; - size_t compressed_data_offset = 0; - size_t match_offset = 0; - size_t uncompressed_data_offset = 0; - uint16_t distance = 0; - uint16_t literal_size = 0; - uint16_t match_size = 0; - uint8_t oppcode = 0; - uint8_t oppcode_type = 0; - uint8_t oppcode_value = 0; - - if( compressed_data == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid compressed data.", - function ); - - return( -1 ); - } - if( compressed_data_size > (size_t) SSIZE_MAX ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, - "%s: invalid compressed data size value exceeds maximum.", - function ); - - return( -1 ); - } - if( uncompressed_data == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid uncompressed data.", - function ); - - return( -1 ); - } - if( uncompressed_data_size == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid uncompressed data size.", - function ); - - return( -1 ); - } - if( *uncompressed_data_size > (size_t) SSIZE_MAX ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, - "%s: invalid uncompressed data size value exceeds maximum.", - function ); - - return( -1 ); - } - while( compressed_data_offset < compressed_data_size ) - { - if( uncompressed_data_offset >= *uncompressed_data_size ) - { - break; - } - if( compressed_data_offset >= compressed_data_size ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, - "%s: compressed data size value too small.", - function ); - - return( -1 ); - } - oppcode = compressed_data[ compressed_data_offset++ ]; - - oppcode_type = lzvn_oppcode_types[ oppcode ]; - - literal_size = 0; - match_size = 0; - - switch( oppcode_type ) - { - case LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_LARGE: - if( ( compressed_data_offset + 1 ) >= compressed_data_size ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, - "%s: compressed data size value too small.", - function ); - - return( -1 ); - } - oppcode_value = compressed_data[ compressed_data_offset++ ]; - - literal_size = ( oppcode & 0xc0 ) >> 6; - match_size = ( ( oppcode & 0x38 ) >> 3 ) + 3; - distance = ( (uint16_t) compressed_data[ compressed_data_offset++ ] << 8 ) | oppcode_value; - - break; - - case LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_MEDIUM: - if( ( compressed_data_offset + 1 ) >= compressed_data_size ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, - "%s: compressed data size value too small.", - function ); - - return( -1 ); - } - oppcode_value = compressed_data[ compressed_data_offset++ ]; - - literal_size = ( oppcode & 0x18 ) >> 3; - match_size = ( ( ( oppcode & 0x07 ) << 2 ) | ( oppcode_value & 0x03 ) ) + 3; - distance = ( (uint16_t) compressed_data[ compressed_data_offset++ ] << 6 ) | ( ( oppcode_value & 0xfc ) >> 2 ); - - break; - - case LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_PREVIOUS: - literal_size = ( oppcode & 0xc0 ) >> 6; - match_size = ( ( oppcode & 0x38 ) >> 3 ) + 3; - - break; - - case LIBFSHFS_LZVN_OPPCODE_TYPE_DISTANCE_SMALL: - if( compressed_data_offset >= compressed_data_size ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, - "%s: compressed data size value too small.", - function ); - - return( -1 ); - } - literal_size = ( oppcode & 0xc0 ) >> 6; - match_size = ( ( oppcode & 0x38 ) >> 3 ) + 3; - distance = ( (uint16_t) ( oppcode & 0x07 ) << 8 ) | compressed_data[ compressed_data_offset++ ]; - - break; - - case LIBFSHFS_LZVN_OPPCODE_TYPE_LITERAL_LARGE: - if( compressed_data_offset >= compressed_data_size ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, - "%s: compressed data size value too small.", - function ); - - return( -1 ); - } - literal_size = (uint16_t) compressed_data[ compressed_data_offset++ ] + 16; - - break; - - case LIBFSHFS_LZVN_OPPCODE_TYPE_LITERAL_SMALL: - literal_size = oppcode & 0x0f; - - break; - - case LIBFSHFS_LZVN_OPPCODE_TYPE_MATCH_LARGE: - if( compressed_data_offset >= compressed_data_size ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, - "%s: compressed data size value too small.", - function ); - - return( -1 ); - } - match_size = (uint16_t) compressed_data[ compressed_data_offset++ ] + 16; - - break; - - case LIBFSHFS_LZVN_OPPCODE_TYPE_MATCH_SMALL: - match_size = oppcode & 0x0f; - - break; - - case LIBFSHFS_LZVN_OPPCODE_TYPE_END_OF_STREAM: - case LIBFSHFS_LZVN_OPPCODE_TYPE_NONE: - break; - - case LIBFSHFS_LZVN_OPPCODE_TYPE_INVALID: - default: - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, - "%s: invalid oppcode: 0x%02" PRIx8 ".", - function, - oppcode ); - - return( -1 ); - } - if( oppcode_type == LIBFSHFS_LZVN_OPPCODE_TYPE_END_OF_STREAM ) - { - break; - } - if( literal_size > 0 ) - { - if( ( (size_t) literal_size > compressed_data_size ) - || ( compressed_data_offset > ( compressed_data_size - literal_size ) ) ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, - "%s: literal size value exceeds compressed data size.", - function ); - - return( -1 ); - } - if( ( (size_t) literal_size > *uncompressed_data_size ) - || ( uncompressed_data_offset > ( *uncompressed_data_size - literal_size ) ) ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, - "%s: literal size value exceeds uncompressed data size.", - function ); - - return( -1 ); - } - if( memory_copy( - &( uncompressed_data[ uncompressed_data_offset ] ), - &( compressed_data[ compressed_data_offset ] ), - (size_t) literal_size ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_COPY_FAILED, - "%s: unable to copy literal to uncompressed data.", - function ); - - return( -1 ); - } - compressed_data_offset += (size_t) literal_size; - uncompressed_data_offset += (size_t) literal_size; - } - if( match_size > 0 ) - { - if( (size_t) distance > uncompressed_data_offset ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, - "%s: distance value exceeds uncompressed data offset.", - function ); - - return( -1 ); - } - match_offset = uncompressed_data_offset - distance; - - if( ( (size_t) match_size > *uncompressed_data_size ) - || ( uncompressed_data_offset > ( *uncompressed_data_size - match_size ) ) ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, - "%s: match size value exceeds uncompressed data size.", - function ); - - return( -1 ); - } - while( match_size > 0 ) - { - uncompressed_data[ uncompressed_data_offset++ ] = uncompressed_data[ match_offset++ ]; - - match_size--; - } - } - } - *uncompressed_data_size = uncompressed_data_offset; - - return( 1 ); -} - diff -Nru libfshfs-20201104/libfshfs/libfshfs_lzvn.h libfshfs-20240221/libfshfs/libfshfs_lzvn.h --- libfshfs-20201104/libfshfs/libfshfs_lzvn.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_lzvn.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ -/* - * LZVN (un)compression functions - * - * Copyright (C) 2009-2020, Joachim Metz - * - * Refer to AUTHORS for acknowledgements. - * - * This program 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 3 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - */ - -#if !defined( _LIBFSHFS_LZVN_COMPRESSION_H ) -#define _LIBFSHFS_LZVN_COMPRESSION_H - -#include -#include - -#include "libfshfs_libcerror.h" - -#if defined( __cplusplus ) -extern "C" { -#endif - -int libfshfs_lzvn_decompress( - const uint8_t *compressed_data, - size_t compressed_data_size, - uint8_t *uncompressed_data, - size_t *uncompressed_data_size, - libcerror_error_t **error ); - -#if defined( __cplusplus ) -} -#endif - -#endif /* !defined( _LIBFSHFS_LZVN_COMPRESSION_H ) */ - diff -Nru libfshfs-20201104/libfshfs/libfshfs_master_directory_block.c libfshfs-20240221/libfshfs/libfshfs_master_directory_block.c --- libfshfs-20201104/libfshfs/libfshfs_master_directory_block.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_master_directory_block.c 2024-02-21 05:48:50.000000000 +0000 @@ -0,0 +1,898 @@ +/* + * Master directory block functions + * + * Copyright (C) 2009-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include +#include +#include + +#include "libfshfs_debug.h" +#include "libfshfs_extents_record.h" +#include "libfshfs_fork_descriptor.h" +#include "libfshfs_libbfio.h" +#include "libfshfs_libcerror.h" +#include "libfshfs_libcnotify.h" +#include "libfshfs_libfdatetime.h" +#include "libfshfs_master_directory_block.h" +#include "libfshfs_libuna.h" + +#include "fshfs_master_directory_block.h" + +/* Creates a master directory block + * Make sure the value master_directory_block is referencing, is set to NULL + * Returns 1 if successful or -1 on error + */ +int libfshfs_master_directory_block_initialize( + libfshfs_master_directory_block_t **master_directory_block, + libcerror_error_t **error ) +{ + static char *function = "libfshfs_master_directory_block_initialize"; + + if( master_directory_block == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid master directory block.", + function ); + + return( -1 ); + } + if( *master_directory_block != NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, + "%s: invalid master directory block value already set.", + function ); + + return( -1 ); + } + *master_directory_block = memory_allocate_structure( + libfshfs_master_directory_block_t ); + + if( *master_directory_block == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_INSUFFICIENT, + "%s: unable to create master directory block.", + function ); + + goto on_error; + } + if( memory_set( + *master_directory_block, + 0, + sizeof( libfshfs_master_directory_block_t ) ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_SET_FAILED, + "%s: unable to clear master directory block.", + function ); + + memory_free( + *master_directory_block ); + + *master_directory_block = NULL; + + return( -1 ); + } + if( libfshfs_fork_descriptor_initialize( + &( ( *master_directory_block )->extents_file_fork_descriptor ), + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to create extents file fork descriptor.", + function ); + + goto on_error; + } + if( libfshfs_fork_descriptor_initialize( + &( ( *master_directory_block )->catalog_file_fork_descriptor ), + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to create catalog file fork descriptor.", + function ); + + goto on_error; + } + return( 1 ); + +on_error: + if( *master_directory_block != NULL ) + { + if( ( *master_directory_block )->extents_file_fork_descriptor != NULL ) + { + libfshfs_fork_descriptor_free( + &( ( *master_directory_block )->extents_file_fork_descriptor ), + NULL ); + } + memory_free( + *master_directory_block ); + + *master_directory_block = NULL; + } + return( -1 ); +} + +/* Frees a master directory block + * Returns 1 if successful or -1 on error + */ +int libfshfs_master_directory_block_free( + libfshfs_master_directory_block_t **master_directory_block, + libcerror_error_t **error ) +{ + static char *function = "libfshfs_master_directory_block_free"; + int result = 1; + + if( master_directory_block == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid master directory block.", + function ); + + return( -1 ); + } + if( *master_directory_block != NULL ) + { + if( libfshfs_fork_descriptor_free( + &( ( *master_directory_block )->extents_file_fork_descriptor ), + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free extents file fork descriptor.", + function ); + + result = -1; + } + if( libfshfs_fork_descriptor_free( + &( ( *master_directory_block )->catalog_file_fork_descriptor ), + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free catalog file fork descriptor.", + function ); + + result = -1; + } + memory_free( + *master_directory_block ); + + *master_directory_block = NULL; + } + return( result ); +} + +/* Reads a master directory block + * Returns 1 if successful or -1 on error + */ +int libfshfs_master_directory_block_read_data( + libfshfs_master_directory_block_t *master_directory_block, + const uint8_t *data, + size_t data_size, + libcerror_error_t **error ) +{ + static char *function = "libfshfs_master_directory_block_read_data"; + uint16_t embedded_volume_signature = 0; + +#if defined( HAVE_DEBUG_OUTPUT ) + uint32_t value_32bit = 0; + uint16_t value_16bit = 0; +#endif + + if( master_directory_block == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid master directory block.", + function ); + + return( -1 ); + } + if( data == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid data.", + function ); + + return( -1 ); + } + if( ( data_size < sizeof( fshfs_master_directory_block_t ) ) + || ( data_size > (size_t) SSIZE_MAX ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid data size value out of bounds.", + function ); + + return( -1 ); + } +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: master directory block data:\n", + function ); + libcnotify_print_data( + data, + sizeof( fshfs_master_directory_block_t ), + LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); + } +#endif + if( memory_compare( + ( (fshfs_master_directory_block_t *) data )->signature, + "BD", + 2 ) != 0 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, + "%s: unsupported master directory block signature.", + function ); + + return( -1 ); + } + byte_stream_copy_to_uint32_big_endian( + ( (fshfs_master_directory_block_t *) data )->allocation_block_size, + master_directory_block->allocation_block_size ); + + byte_stream_copy_to_uint16_big_endian( + ( (fshfs_master_directory_block_t *) data )->extents_start_block_number, + master_directory_block->extents_start_block_number ); + + master_directory_block->volume_label_size = ( (fshfs_master_directory_block_t *) data )->volume_label_size; + + if( memory_copy( + master_directory_block->volume_label, + ( (fshfs_master_directory_block_t *) data )->volume_label, + 27 ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_COPY_FAILED, + "%s: unable to copy volume label.", + function ); + + return( -1 ); + } + byte_stream_copy_to_uint16_big_endian( + ( (fshfs_master_directory_block_t *) data )->embedded_volume_signature, + embedded_volume_signature ); + +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: signature\t\t\t\t: %c%c\n", + function, + ( (fshfs_master_directory_block_t *) data )->signature[ 0 ], + ( (fshfs_master_directory_block_t *) data )->signature[ 1 ] ); + + if( libfshfs_debug_print_hfs_time_value( + function, + "creation time\t\t\t", + ( (fshfs_master_directory_block_t *) data )->creation_time, + 4, + LIBFDATETIME_ENDIAN_BIG, + LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME, + 1, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, + "%s: unable to print HFS time value.", + function ); + + return( -1 ); + } + if( libfshfs_debug_print_hfs_time_value( + function, + "modification time\t\t\t", + ( (fshfs_master_directory_block_t *) data )->modification_time, + 4, + LIBFDATETIME_ENDIAN_BIG, + LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME, + 1, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, + "%s: unable to print HFS time value.", + function ); + + return( -1 ); + } + byte_stream_copy_to_uint16_big_endian( + ( (fshfs_master_directory_block_t *) data )->attribute_flags, + value_16bit ); + libcnotify_printf( + "%s: attribute flags\t\t\t: 0x%04" PRIx16 "\n", + function, + value_16bit ); + libfshfs_debug_print_volume_attribute_flags( + value_16bit ); + libcnotify_printf( + "\n" ); + + byte_stream_copy_to_uint16_big_endian( + ( (fshfs_master_directory_block_t *) data )->number_of_files_in_root, + value_16bit ); + libcnotify_printf( + "%s: number of files in root\t\t: %" PRIu16 "\n", + function, + value_16bit ); + + byte_stream_copy_to_uint16_big_endian( + ( (fshfs_master_directory_block_t *) data )->bitmap_block_number, + value_16bit ); + libcnotify_printf( + "%s: bitmap block number\t\t\t: %" PRIu16 "\n", + function, + value_16bit ); + + byte_stream_copy_to_uint16_big_endian( + ( (fshfs_master_directory_block_t *) data )->unknown1, + value_16bit ); + libcnotify_printf( + "%s: unknown1\t\t\t\t: 0x%04" PRIx16 "\n", + function, + value_16bit ); + + byte_stream_copy_to_uint16_big_endian( + ( (fshfs_master_directory_block_t *) data )->number_of_blocks, + value_16bit ); + libcnotify_printf( + "%s: number of blocks\t\t\t: %" PRIu16 "\n", + function, + value_16bit ); + + libcnotify_printf( + "%s: allocation block size\t\t: %" PRIu32 "\n", + function, + master_directory_block->allocation_block_size ); + + byte_stream_copy_to_uint32_big_endian( + ( (fshfs_master_directory_block_t *) data )->default_clump_size, + value_32bit ); + libcnotify_printf( + "%s: default clump size\t\t\t: %" PRIu32 "\n", + function, + value_32bit ); + + libcnotify_printf( + "%s: extents start block number\t\t: %" PRIu16 "\n", + function, + master_directory_block->extents_start_block_number ); + + byte_stream_copy_to_uint16_big_endian( + ( (fshfs_master_directory_block_t *) data )->number_of_unused_blocks, + value_16bit ); + libcnotify_printf( + "%s: number of unused blocks\t\t: %" PRIu16 "\n", + function, + value_16bit ); + + libcnotify_printf( + "%s: volume label size\t\t\t: %" PRIu8 "\n", + function, + ( (fshfs_master_directory_block_t *) data )->volume_label_size ); + + libcnotify_printf( + "%s: volume label:\n", + function ); + libcnotify_print_data( + ( (fshfs_master_directory_block_t *) data )->volume_label, + 27, + 0 ); + + if( libfshfs_debug_print_hfs_time_value( + function, + "backup time\t\t\t\t", + ( (fshfs_master_directory_block_t *) data )->backup_time, + 4, + LIBFDATETIME_ENDIAN_BIG, + LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME, + 1, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, + "%s: unable to print HFS time value.", + function ); + + return( -1 ); + } + byte_stream_copy_to_uint16_big_endian( + ( (fshfs_master_directory_block_t *) data )->backup_sequence_number, + value_16bit ); + libcnotify_printf( + "%s: backup sequence number\t\t: %" PRIu16 "\n", + function, + value_16bit ); + + byte_stream_copy_to_uint32_big_endian( + ( (fshfs_master_directory_block_t *) data )->volume_write_count, + value_32bit ); + libcnotify_printf( + "%s: volume write count\t\t\t: %" PRIu32 "\n", + function, + value_32bit ); + + byte_stream_copy_to_uint32_big_endian( + ( (fshfs_master_directory_block_t *) data )->extents_overflow_clump_size, + value_32bit ); + libcnotify_printf( + "%s: extents overflow clump size\t\t: %" PRIu32 "\n", + function, + value_32bit ); + + byte_stream_copy_to_uint32_big_endian( + ( (fshfs_master_directory_block_t *) data )->catalog_clump_size, + value_32bit ); + libcnotify_printf( + "%s: catalog clump size\t\t\t: %" PRIu32 "\n", + function, + value_32bit ); + + byte_stream_copy_to_uint16_big_endian( + ( (fshfs_master_directory_block_t *) data )->number_of_directories_in_root, + value_16bit ); + libcnotify_printf( + "%s: number of directories in root\t: %" PRIu16 "\n", + function, + value_16bit ); + + byte_stream_copy_to_uint32_big_endian( + ( (fshfs_master_directory_block_t *) data )->number_of_files, + value_32bit ); + libcnotify_printf( + "%s: number of files\t\t\t: %" PRIu32 "\n", + function, + value_32bit ); + + byte_stream_copy_to_uint32_big_endian( + ( (fshfs_master_directory_block_t *) data )->number_of_directories, + value_32bit ); + libcnotify_printf( + "%s: number of directories\t\t: %" PRIu32 "\n", + function, + value_32bit ); + + libcnotify_printf( + "%s: finder information:\n", + function ); + libcnotify_print_data( + ( (fshfs_master_directory_block_t *) data )->finder_information, + 32, + 0 ); + + libcnotify_printf( + "%s: embedded volume signature\t\t: 0x%04" PRIx16 "\n", + function, + embedded_volume_signature ); + + byte_stream_copy_to_uint32_big_endian( + ( (fshfs_master_directory_block_t *) data )->embedded_volume_extent, + value_32bit ); + libcnotify_printf( + "%s: embedded volume extent\t\t: 0x%08" PRIx32 "\n", + function, + value_32bit ); + + libcnotify_printf( + "\n" ); + } +#endif /* defined( HAVE_DEBUG_OUTPUT ) */ + + byte_stream_copy_to_uint32_big_endian( + ( (fshfs_master_directory_block_t *) data )->extents_file_size, + master_directory_block->extents_file_fork_descriptor->size ); + +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: extents file size\t\t\t: %" PRIu32 "\n", + function, + master_directory_block->extents_file_fork_descriptor->size ); + + libcnotify_printf( + "%s: extents file extents record:\n", + function ); + } +#endif + master_directory_block->extents_file_fork_descriptor->number_of_blocks = master_directory_block->extents_file_fork_descriptor->size / 512; + + if( ( master_directory_block->extents_file_fork_descriptor->size % 512 ) != 0 ) + { + master_directory_block->extents_file_fork_descriptor->number_of_blocks += 1; + } + if( libfshfs_extents_record_read_data( + master_directory_block->extents_file_fork_descriptor, + master_directory_block->extents_start_block_number, + ( (fshfs_master_directory_block_t *) data )->extents_file_extents_record, + 12, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_READ_FAILED, + "%s: unable to read extents file extents record.", + function ); + + return( -1 ); + } + byte_stream_copy_to_uint32_big_endian( + ( (fshfs_master_directory_block_t *) data )->catalog_file_size, + master_directory_block->catalog_file_fork_descriptor->size ); + +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: catalog file size\t\t\t: %" PRIu32 "\n", + function, + master_directory_block->catalog_file_fork_descriptor->size ); + + libcnotify_printf( + "%s: catalog file extents record:\n", + function ); + } +#endif + master_directory_block->catalog_file_fork_descriptor->number_of_blocks = master_directory_block->catalog_file_fork_descriptor->size / 512; + + if( ( master_directory_block->catalog_file_fork_descriptor->size % 512 ) != 0 ) + { + master_directory_block->catalog_file_fork_descriptor->number_of_blocks += 1; + } + if( libfshfs_extents_record_read_data( + master_directory_block->catalog_file_fork_descriptor, + master_directory_block->extents_start_block_number, + ( (fshfs_master_directory_block_t *) data )->catalog_file_extents_record, + 12, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_READ_FAILED, + "%s: unable to read catalog file extents record.", + function ); + + return( -1 ); + } + if( master_directory_block->allocation_block_size != 512 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, + "%s: unsupported allocation block size: %" PRIu16 "\n", + function, + master_directory_block->allocation_block_size ); + + return( -1 ); + } + if( master_directory_block->volume_label_size > 27 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid volume label size value out of bounds.", + function ); + + return( -1 ); + } + if( embedded_volume_signature != 0 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, + "%s: unsupported embedded volume signature: 0x%04" PRIx16 "\n", + function, + embedded_volume_signature ); + + return( -1 ); + } + return( 1 ); +} + +/* Reads the master directory block + * Returns 1 if successful or -1 on error + */ +int libfshfs_master_directory_block_read_file_io_handle( + libfshfs_master_directory_block_t *master_directory_block, + libbfio_handle_t *file_io_handle, + off64_t file_offset, + libcerror_error_t **error ) +{ + uint8_t master_directory_block_data[ 512 ]; + + static char *function = "libfshfs_master_directory_block_read_file_io_handle"; + ssize_t read_count = 0; + + if( master_directory_block == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid master directory block.", + function ); + + return( -1 ); + } +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "%s: reading master directory block at offset: %" PRIi64 " (0x%08" PRIx64 ")\n", + function, + file_offset, + file_offset ); + } +#endif + read_count = libbfio_handle_read_buffer_at_offset( + file_io_handle, + (uint8_t *) &master_directory_block_data, + 512, + file_offset, + error ); + + if( read_count != (ssize_t) 512 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_READ_FAILED, + "%s: unable to read master directory block data at offset: %" PRIi64 " (0x%08" PRIx64 ").", + function, + file_offset, + file_offset ); + + return( -1 ); + } + if( libfshfs_master_directory_block_read_data( + master_directory_block, + (uint8_t *) &master_directory_block_data, + 512, + error ) != 1) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_READ_FAILED, + "%s: unable to read master directory block data.", + function ); + + return( -1 ); + } + return( 1 ); +} + +/* Retrieves the size of the UTF-8 encoded volume label + * The returned size includes the end of string character + * Returns 1 if successful or -1 on error + */ +int libfshfs_master_directory_block_get_utf8_volume_label_size( + libfshfs_master_directory_block_t *master_directory_block, + size_t *utf8_string_size, + libcerror_error_t **error ) +{ + static char *function = "libfshfs_master_directory_block_get_utf8_volume_label_size"; + + if( master_directory_block == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid master directory block.", + function ); + + return( -1 ); + } + if( libuna_utf8_string_size_from_byte_stream( + master_directory_block->volume_label, + (size_t) master_directory_block->volume_label_size, + LIBUNA_CODEPAGE_ASCII, + utf8_string_size, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve UTF-8 string size.", + function ); + + return( -1 ); + } + return( 1 ); +} + +/* Retrieves the UTF-8 encoded volume label + * The size should include the end of string character + * Returns 1 if successful or -1 on error + */ +int libfshfs_master_directory_block_get_utf8_volume_label( + libfshfs_master_directory_block_t *master_directory_block, + uint8_t *utf8_string, + size_t utf8_string_size, + libcerror_error_t **error ) +{ + static char *function = "libfshfs_master_directory_block_get_utf8_volume_label"; + + if( master_directory_block == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid master directory block.", + function ); + + return( -1 ); + } + if( libuna_utf8_string_copy_from_byte_stream( + utf8_string, + utf8_string_size, + master_directory_block->volume_label, + (size_t) master_directory_block->volume_label_size, + LIBUNA_CODEPAGE_ASCII, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve UTF-8 string.", + function ); + + return( -1 ); + } + return( 1 ); +} + +/* Retrieves the size of the UTF-16 encoded volume label + * The returned size includes the end of string character + * Returns 1 if successful or -1 on error + */ +int libfshfs_master_directory_block_get_utf16_volume_label_size( + libfshfs_master_directory_block_t *master_directory_block, + size_t *utf16_string_size, + libcerror_error_t **error ) +{ + static char *function = "libfshfs_master_directory_block_get_utf16_volume_label_size"; + + if( master_directory_block == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid master directory block.", + function ); + + return( -1 ); + } + if( libuna_utf16_string_size_from_byte_stream( + master_directory_block->volume_label, + (size_t) master_directory_block->volume_label_size, + LIBUNA_CODEPAGE_ASCII, + utf16_string_size, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve UTF-16 string size.", + function ); + + return( -1 ); + } + return( 1 ); +} + +/* Retrieves the UTF-16 encoded volume label + * The size should include the end of string character + * Returns 1 if successful or -1 on error + */ +int libfshfs_master_directory_block_get_utf16_volume_label( + libfshfs_master_directory_block_t *master_directory_block, + uint16_t *utf16_string, + size_t utf16_string_size, + libcerror_error_t **error ) +{ + static char *function = "libfshfs_master_directory_block_get_utf16_volume_label"; + + if( master_directory_block == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid master directory block.", + function ); + + return( -1 ); + } + if( libuna_utf16_string_copy_from_byte_stream( + utf16_string, + utf16_string_size, + master_directory_block->volume_label, + (size_t) master_directory_block->volume_label_size, + LIBUNA_CODEPAGE_ASCII, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve UTF-16 string.", + function ); + + return( -1 ); + } + return( 1 ); +} + diff -Nru libfshfs-20201104/libfshfs/libfshfs_master_directory_block.h libfshfs-20240221/libfshfs/libfshfs_master_directory_block.h --- libfshfs-20201104/libfshfs/libfshfs_master_directory_block.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_master_directory_block.h 2024-02-21 05:48:50.000000000 +0000 @@ -0,0 +1,112 @@ +/* + * Master directory block functions + * + * Copyright (C) 2009-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _LIBFSHFS_MASTER_DIRECTORY_BLOCK_H ) +#define _LIBFSHFS_MASTER_DIRECTORY_BLOCK_H + +#include +#include + +#include "libfshfs_fork_descriptor.h" +#include "libfshfs_libbfio.h" +#include "libfshfs_libcerror.h" + +#if defined( __cplusplus ) +extern "C" { +#endif + +typedef struct libfshfs_master_directory_block libfshfs_master_directory_block_t; + +struct libfshfs_master_directory_block +{ + /* Allocation block size + */ + uint16_t allocation_block_size; + + /* Extents start block number + */ + uint16_t extents_start_block_number; + + /* Volume label + */ + uint8_t volume_label[ 28 ]; + + /* Volume label size + */ + size_t volume_label_size; + + /* Extents file fork descriptor + */ + libfshfs_fork_descriptor_t *extents_file_fork_descriptor; + + /* Catalog file fork descriptor + */ + libfshfs_fork_descriptor_t *catalog_file_fork_descriptor; +}; + +int libfshfs_master_directory_block_initialize( + libfshfs_master_directory_block_t **master_directory_block, + libcerror_error_t **error ); + +int libfshfs_master_directory_block_free( + libfshfs_master_directory_block_t **master_directory_block, + libcerror_error_t **error ); + +int libfshfs_master_directory_block_read_data( + libfshfs_master_directory_block_t *master_directory_block, + const uint8_t *data, + size_t data_size, + libcerror_error_t **error ); + +int libfshfs_master_directory_block_read_file_io_handle( + libfshfs_master_directory_block_t *master_directory_block, + libbfio_handle_t *file_io_handle, + off64_t file_offset, + libcerror_error_t **error ); + +int libfshfs_master_directory_block_get_utf8_volume_label_size( + libfshfs_master_directory_block_t *master_directory_block, + size_t *utf8_string_size, + libcerror_error_t **error ); + +int libfshfs_master_directory_block_get_utf8_volume_label( + libfshfs_master_directory_block_t *master_directory_block, + uint8_t *utf8_string, + size_t utf8_string_size, + libcerror_error_t **error ); + +int libfshfs_master_directory_block_get_utf16_volume_label_size( + libfshfs_master_directory_block_t *master_directory_block, + size_t *utf16_string_size, + libcerror_error_t **error ); + +int libfshfs_master_directory_block_get_utf16_volume_label( + libfshfs_master_directory_block_t *master_directory_block, + uint16_t *utf16_string, + size_t utf16_string_size, + libcerror_error_t **error ); + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _LIBFSHFS_MASTER_DIRECTORY_BLOCK_H ) */ + diff -Nru libfshfs-20201104/libfshfs/libfshfs_name.c libfshfs-20240221/libfshfs/libfshfs_name.c --- libfshfs-20201104/libfshfs/libfshfs_name.c 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_name.c 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Name functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -5324,12 +5324,184 @@ /* 0x0000fb4f */ { 1, { 0x0000fb4f } } }; +/* Compares two UTF-16 big-endian encoded file entry name + * Returns LIBUNA_COMPARE_LESS, LIBUNA_COMPARE_EQUAL, LIBUNA_COMPARE_GREATER if successful or -1 on error + */ +int libfshfs_name_compare( + const uint8_t *first_name, + size_t first_name_size, + const uint8_t *second_name, + size_t second_name_size, + int codepage, + uint8_t use_case_folding, + libcerror_error_t **error ) +{ + static char *function = "libfshfs_name_compare"; + libuna_unicode_character_t first_name_unicode_character = 0; + libuna_unicode_character_t second_name_unicode_character = 0; + size_t first_name_index = 0; + size_t second_name_index = 0; + + if( first_name == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid first name.", + function ); + + return( -1 ); + } + if( ( first_name_size == 0 ) + || ( first_name_size > (size_t) SSIZE_MAX ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid first name size value out of bounds.", + function ); + + return( -1 ); + } + if( second_name == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid second name.", + function ); + + return( -1 ); + } + if( ( second_name_size == 0 ) + || ( second_name_size > (size_t) SSIZE_MAX ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid second name size value out of bounds.", + function ); + + return( -1 ); + } + while( ( first_name_index < first_name_size ) + && ( second_name_index < second_name_size ) ) + { + if( codepage == LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN ) + { + if( libuna_unicode_character_copy_from_utf16_stream( + &first_name_unicode_character, + first_name, + first_name_size, + &first_name_index, + LIBUNA_ENDIAN_BIG, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_CONVERSION, + LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, + "%s: unable to copy Unicode character from first UTF-16 big-endian encoded name.", + function ); + + return( -1 ); + } + if( libuna_unicode_character_copy_from_utf16_stream( + &second_name_unicode_character, + second_name, + second_name_size, + &second_name_index, + LIBUNA_ENDIAN_BIG, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_CONVERSION, + LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, + "%s: unable to copy Unicode character from second UTF-16 big-endian encoded name.", + function ); + + return( -1 ); + } + } + else + { + if( libuna_unicode_character_copy_from_byte_stream( + &first_name_unicode_character, + first_name, + first_name_size, + &first_name_index, + codepage, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_CONVERSION, + LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, + "%s: unable to copy Unicode character from first ASCII encoded name.", + function ); + + return( -1 ); + } + if( libuna_unicode_character_copy_from_byte_stream( + &second_name_unicode_character, + second_name, + second_name_size, + &second_name_index, + codepage, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_CONVERSION, + LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, + "%s: unable to copy Unicode character from second ASCII encoded name.", + function ); + + return( -1 ); + } + } + if( use_case_folding != 0 ) + { + libfshfs_name_get_case_folding_mapping( + first_name_unicode_character ); + } + if( use_case_folding != 0 ) + { + libfshfs_name_get_case_folding_mapping( + second_name_unicode_character ); + } + if( first_name_unicode_character < second_name_unicode_character ) + { + return( LIBUNA_COMPARE_LESS ); + } + else if( first_name_unicode_character > second_name_unicode_character ) + { + return( LIBUNA_COMPARE_GREATER ); + } + } + if( first_name_size < second_name_size ) + { + return( LIBUNA_COMPARE_LESS ); + } + else if( first_name_size > second_name_size ) + { + return( LIBUNA_COMPARE_GREATER ); + } + return( LIBUNA_COMPARE_EQUAL ); +} + /* Determines the size of an UTF-8 string from an UTF-16 big-endian encoded file entry name * Returns 1 if successful or -1 on error */ int libfshfs_name_get_utf8_string_size( const uint8_t *name, size_t name_size, + int codepage, size_t *utf8_string_size, libcerror_error_t **error ) { @@ -5343,7 +5515,7 @@ error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid UTF-16 encoded name.", + "%s: invalid name.", function ); return( -1 ); @@ -5354,21 +5526,24 @@ error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, - "%s: invalid UTF-16 encoded name size value exceeds maximum.", + "%s: invalid name size value exceeds maximum.", function ); return( -1 ); } - if( ( name_size % 2 ) != 0 ) + if( codepage == LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN ) { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, - "%s: missing UTF-16 encoded name value.", - function ); + if( ( name_size % 2 ) != 0 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid UTF-16 encoded name - size value not a multitude of 2.", + function ); - return( -1 ); + return( -1 ); + } } if( utf8_string_size == NULL ) { @@ -5387,26 +5562,47 @@ { return( 1 ); } - while( ( name_index + 1 ) < name_size ) + while( name_index < name_size ) { - /* Convert the UTF-16 stream bytes into an Unicode character - */ - if( libuna_unicode_character_copy_from_utf16_stream( - &unicode_character, - name, - name_size, - &name_index, - LIBUNA_ENDIAN_BIG, - error ) != 1 ) + if( codepage == LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN ) { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_CONVERSION, - LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, - "%s: unable to copy Unicode character from UTF-16 encoded name.", - function ); + if( libuna_unicode_character_copy_from_utf16_stream( + &unicode_character, + name, + name_size, + &name_index, + LIBUNA_ENDIAN_BIG, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_CONVERSION, + LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, + "%s: unable to copy Unicode character from UTF-16 encoded name.", + function ); - return( -1 ); + return( -1 ); + } + } + else + { + if( libuna_unicode_character_copy_from_byte_stream( + &unicode_character, + name, + name_size, + &name_index, + codepage, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_CONVERSION, + LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, + "%s: unable to copy Unicode character from ASCII encoded name.", + function ); + + return( -1 ); + } } /* ':' is stored as '/' */ @@ -5446,6 +5642,7 @@ int libfshfs_name_get_utf8_string( const uint8_t *name, size_t name_size, + int codepage, libuna_utf8_character_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) @@ -5461,33 +5658,36 @@ error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid UTF-16 encoded name.", + "%s: invalid name.", function ); return( -1 ); } - if( name_size > (size_t) SSIZE_MAX ) + if( ( name_size == 0 ) + || ( name_size > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, - "%s: invalid UTF-16 encoded name size value exceeds maximum.", + LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid name size value out of bounds.", function ); return( -1 ); } - if( ( name_size == 0 ) - || ( ( name_size % 2 ) != 0 ) ) + if( codepage == LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN ) { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, - "%s: missing UTF-16 encoded name value.", - function ); + if( ( name_size % 2 ) != 0 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid UTF-16 encoded name - size value not a multitude of 2.", + function ); - return( -1 ); + return( -1 ); + } } if( utf8_string == NULL ) { @@ -5511,26 +5711,47 @@ return( -1 ); } - while( ( name_index + 1 ) < name_size ) + while( name_index < name_size ) { - /* Convert the UTF-16 stream bytes into an Unicode character - */ - if( libuna_unicode_character_copy_from_utf16_stream( - &unicode_character, - name, - name_size, - &name_index, - LIBUNA_ENDIAN_BIG, - error ) != 1 ) + if( codepage == LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN ) { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_CONVERSION, - LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, - "%s: unable to copy Unicode character from UTF-16 encoded name.", - function ); + if( libuna_unicode_character_copy_from_utf16_stream( + &unicode_character, + name, + name_size, + &name_index, + LIBUNA_ENDIAN_BIG, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_CONVERSION, + LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, + "%s: unable to copy Unicode character from UTF-16 encoded name.", + function ); - return( -1 ); + return( -1 ); + } + } + else + { + if( libuna_unicode_character_copy_from_byte_stream( + &unicode_character, + name, + name_size, + &name_index, + codepage, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_CONVERSION, + LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, + "%s: unable to copy Unicode character from ASCII encoded name.", + function ); + + return( -1 ); + } } /* ':' is stored as '/' */ @@ -5587,6 +5808,7 @@ int libfshfs_name_compare_with_utf8_string( const uint8_t *name, size_t name_size, + int codepage, const libuna_utf8_character_t *utf8_string, size_t utf8_string_length, uint8_t use_case_folding, @@ -5608,29 +5830,19 @@ error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid UTF-16 encoded name.", + "%s: invalid name.", function ); return( -1 ); } - if( name_size > (size_t) SSIZE_MAX ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, - "%s: invalid UTF-16 encoded name size value exceeds maximum.", - function ); - - return( -1 ); - } - if( name_size == 0 ) + if( ( name_size == 0 ) + || ( name_size > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, - "%s: missing UTF-16 encoded name value.", + LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid name size value out of bounds.", function ); return( -1 ); @@ -5690,52 +5902,75 @@ nfd_character_index < utf8_nfd_mapping->number_of_characters; nfd_character_index++ ) { - if( libuna_unicode_character_copy_from_utf16_stream( - &name_unicode_character, - name, - name_size, - &name_index, - LIBUNA_ENDIAN_BIG, - error ) != 1 ) + if( codepage == LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN ) { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_CONVERSION, - LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, - "%s: unable to copy Unicode character from UTF-16 big-endian encoded name.", - function ); + if( libuna_unicode_character_copy_from_utf16_stream( + &name_unicode_character, + name, + name_size, + &name_index, + LIBUNA_ENDIAN_BIG, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_CONVERSION, + LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, + "%s: unable to copy Unicode character from UTF-16 big-endian encoded name.", + function ); - return( -1 ); + return( -1 ); + } + } + else + { + if( libuna_unicode_character_copy_from_byte_stream( + &name_unicode_character, + name, + name_size, + &name_index, + codepage, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_CONVERSION, + LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, + "%s: unable to copy Unicode character from ASCII encoded name.", + function ); + + return( -1 ); + } + } + if( use_case_folding != 0 ) + { + libfshfs_name_get_case_folding_mapping( + name_unicode_character ); } + utf8_unicode_character = utf8_nfd_mapping->characters[ nfd_character_index ]; + /* ':' is stored as '/' */ - if( name_unicode_character == (libuna_unicode_character_t) '/' ) + if( utf8_unicode_character == (libuna_unicode_character_t) ':' ) { - name_unicode_character = (libuna_unicode_character_t) ':'; + utf8_unicode_character = (libuna_unicode_character_t) '/'; } /* U+2400 is stored as U+0 */ - else if( name_unicode_character == (libuna_unicode_character_t) 0x00000000UL ) + else if( utf8_unicode_character == (libuna_unicode_character_t) 0x00002400UL ) { - name_unicode_character = (libuna_unicode_character_t) 0x00002400UL; + utf8_unicode_character = (libuna_unicode_character_t) 0x00000000UL; } else if( use_case_folding != 0 ) { libfshfs_name_get_case_folding_mapping( - name_unicode_character ); - } - utf8_unicode_character = utf8_nfd_mapping->characters[ nfd_character_index ]; - - if( use_case_folding != 0 ) - { - libfshfs_name_get_case_folding_mapping( utf8_unicode_character ); } - if( utf8_unicode_character < name_unicode_character ) + if( name_unicode_character < utf8_unicode_character ) { return( LIBUNA_COMPARE_LESS ); } - else if( utf8_unicode_character > name_unicode_character ) + else if( name_unicode_character > utf8_unicode_character ) { return( LIBUNA_COMPARE_GREATER ); } @@ -5747,11 +5982,11 @@ } if( utf8_string_index < utf8_string_length ) { - return( LIBUNA_COMPARE_GREATER ); + return( LIBUNA_COMPARE_LESS ); } else if( name_index < name_size ) { - return( LIBUNA_COMPARE_LESS ); + return( LIBUNA_COMPARE_GREATER ); } return( LIBUNA_COMPARE_EQUAL ); } @@ -5762,6 +5997,7 @@ int libfshfs_name_get_utf16_string_size( const uint8_t *name, size_t name_size, + int codepage, size_t *utf16_string_size, libcerror_error_t **error ) { @@ -5775,7 +6011,7 @@ error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid UTF-16 encoded name.", + "%s: invalid name.", function ); return( -1 ); @@ -5786,21 +6022,24 @@ error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, - "%s: invalid UTF-16 encoded name size value exceeds maximum.", + "%s: invalid name size value exceeds maximum.", function ); return( -1 ); } - if( ( name_size % 2 ) != 0 ) + if( codepage == LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN ) { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, - "%s: missing UTF-16 encoded name value.", - function ); + if( ( name_size % 2 ) != 0 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid UTF-16 encoded name - size value not a multitude of 2.", + function ); - return( -1 ); + return( -1 ); + } } if( utf16_string_size == NULL ) { @@ -5819,26 +6058,47 @@ { return( 1 ); } - while( ( name_index + 1 ) < name_size ) + while( name_index < name_size ) { - /* Convert the UTF-16 stream bytes into an Unicode character - */ - if( libuna_unicode_character_copy_from_utf16_stream( - &unicode_character, - name, - name_size, - &name_index, - LIBUNA_ENDIAN_BIG, - error ) != 1 ) + if( codepage == LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN ) { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_CONVERSION, - LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, - "%s: unable to copy Unicode character from UTF-16 encoded name.", - function ); + if( libuna_unicode_character_copy_from_utf16_stream( + &unicode_character, + name, + name_size, + &name_index, + LIBUNA_ENDIAN_BIG, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_CONVERSION, + LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, + "%s: unable to copy Unicode character from UTF-16 encoded name.", + function ); - return( -1 ); + return( -1 ); + } + } + else + { + if( libuna_unicode_character_copy_from_byte_stream( + &unicode_character, + name, + name_size, + &name_index, + codepage, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_CONVERSION, + LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, + "%s: unable to copy Unicode character from ASCII encoded name.", + function ); + + return( -1 ); + } } /* ':' is stored as '/' */ @@ -5878,6 +6138,7 @@ int libfshfs_name_get_utf16_string( const uint8_t *name, size_t name_size, + int codepage, libuna_utf16_character_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) @@ -5893,33 +6154,36 @@ error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid UTF-16 encoded name.", + "%s: invalid name.", function ); return( -1 ); } - if( name_size > (size_t) SSIZE_MAX ) + if( ( name_size == 0 ) + || ( name_size > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, - "%s: invalid UTF-16 encoded name size value exceeds maximum.", + LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid name size value out of bounds.", function ); return( -1 ); } - if( ( name_size == 0 ) - || ( ( name_size % 2 ) != 0 ) ) + if( codepage == LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN ) { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, - "%s: missing UTF-16 encoded name value.", - function ); + if( ( name_size % 2 ) != 0 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid UTF-16 encoded name - size value not a multitude of 2.", + function ); - return( -1 ); + return( -1 ); + } } if( utf16_string == NULL ) { @@ -5943,26 +6207,47 @@ return( -1 ); } - while( ( name_index + 1 ) < name_size ) + while( name_index < name_size ) { - /* Convert the UTF-16 stream bytes into an Unicode character - */ - if( libuna_unicode_character_copy_from_utf16_stream( - &unicode_character, - name, - name_size, - &name_index, - LIBUNA_ENDIAN_BIG, - error ) != 1 ) + if( codepage == LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN ) { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_CONVERSION, - LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, - "%s: unable to copy Unicode character from UTF-16 encoded name.", - function ); + if( libuna_unicode_character_copy_from_utf16_stream( + &unicode_character, + name, + name_size, + &name_index, + LIBUNA_ENDIAN_BIG, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_CONVERSION, + LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, + "%s: unable to copy Unicode character from UTF-16 encoded name.", + function ); - return( -1 ); + return( -1 ); + } + } + else + { + if( libuna_unicode_character_copy_from_byte_stream( + &unicode_character, + name, + name_size, + &name_index, + codepage, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_CONVERSION, + LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, + "%s: unable to copy Unicode character from ASCII encoded name.", + function ); + + return( -1 ); + } } /* ':' is stored as '/' */ @@ -6017,6 +6302,7 @@ int libfshfs_name_compare_with_utf16_string( const uint8_t *name, size_t name_size, + int codepage, const libuna_utf16_character_t *utf16_string, size_t utf16_string_length, uint8_t use_case_folding, @@ -6038,29 +6324,19 @@ error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid UTF-16 encoded name.", + "%s: invalid name.", function ); return( -1 ); } - if( name_size > (size_t) SSIZE_MAX ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, - "%s: invalid UTF-16 encoded name size value exceeds maximum.", - function ); - - return( -1 ); - } - if( name_size == 0 ) + if( ( name_size == 0 ) + || ( name_size > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, - "%s: missing UTF-16 encoded name value.", + LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid name size value out of bounds.", function ); return( -1 ); @@ -6120,52 +6396,75 @@ nfd_character_index < utf16_nfd_mapping->number_of_characters; nfd_character_index++ ) { - if( libuna_unicode_character_copy_from_utf16_stream( - &name_unicode_character, - name, - name_size, - &name_index, - LIBUNA_ENDIAN_BIG, - error ) != 1 ) + if( codepage == LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN ) { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_CONVERSION, - LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, - "%s: unable to copy Unicode character from UTF-16 big-endian encoded name.", - function ); + if( libuna_unicode_character_copy_from_utf16_stream( + &name_unicode_character, + name, + name_size, + &name_index, + LIBUNA_ENDIAN_BIG, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_CONVERSION, + LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, + "%s: unable to copy Unicode character from UTF-16 big-endian encoded name.", + function ); - return( -1 ); + return( -1 ); + } } + else + { + if( libuna_unicode_character_copy_from_byte_stream( + &name_unicode_character, + name, + name_size, + &name_index, + codepage, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_CONVERSION, + LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, + "%s: unable to copy Unicode character from ASCII encoded name.", + function ); + + return( -1 ); + } + } + if( use_case_folding != 0 ) + { + libfshfs_name_get_case_folding_mapping( + name_unicode_character ); + } + utf16_unicode_character = utf16_nfd_mapping->characters[ nfd_character_index ]; + /* ':' is stored as '/' */ - if( name_unicode_character == (libuna_unicode_character_t) '/' ) + if( utf16_unicode_character == (libuna_unicode_character_t) ':' ) { - name_unicode_character = (libuna_unicode_character_t) ':'; + utf16_unicode_character = (libuna_unicode_character_t) '/'; } /* U+2400 is stored as U+0 */ - else if( name_unicode_character == (libuna_unicode_character_t) 0x00000000UL ) + else if( utf16_unicode_character == (libuna_unicode_character_t) 0x00002400UL ) { - name_unicode_character = (libuna_unicode_character_t) 0x00002400UL; + utf16_unicode_character = (libuna_unicode_character_t) 0x00000000UL; } else if( use_case_folding != 0 ) { libfshfs_name_get_case_folding_mapping( - name_unicode_character ); - } - utf16_unicode_character = utf16_nfd_mapping->characters[ nfd_character_index ]; - - if( use_case_folding != 0 ) - { - libfshfs_name_get_case_folding_mapping( utf16_unicode_character ); } - if( utf16_unicode_character < name_unicode_character ) + if( name_unicode_character < utf16_unicode_character ) { return( LIBUNA_COMPARE_LESS ); } - else if( utf16_unicode_character > name_unicode_character ) + else if( name_unicode_character > utf16_unicode_character ) { return( LIBUNA_COMPARE_GREATER ); } @@ -6177,12 +6476,350 @@ } if( utf16_string_index < utf16_string_length ) { - return( LIBUNA_COMPARE_GREATER ); + return( LIBUNA_COMPARE_LESS ); } else if( name_index < name_size ) { - return( LIBUNA_COMPARE_LESS ); + return( LIBUNA_COMPARE_GREATER ); } return( LIBUNA_COMPARE_EQUAL ); } +/* Calculates a Fowler–Noll–Vo string hash of the name + * Returns 1 if successful or -1 on error + */ +int libfshfs_name_calculate_hash( + const uint8_t *name, + size_t name_size, + int codepage, + uint8_t use_case_folding, + uint32_t *name_hash, + libcerror_error_t **error ) +{ + static char *function = "libfshfs_name_calculate_hash"; + libuna_unicode_character_t unicode_character = 0; + size_t name_index = 0; + uint32_t safe_name_hash = 0x811c9dc5UL; + + if( name == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid name.", + function ); + + return( -1 ); + } + if( ( name_size == 0 ) + || ( name_size > (size_t) SSIZE_MAX ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid name size value out of bounds.", + function ); + + return( -1 ); + } + if( name_hash == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid name hash.", + function ); + + return( -1 ); + } + while( name_index < name_size ) + { + if( codepage == LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN ) + { + if( libuna_unicode_character_copy_from_utf16_stream( + &unicode_character, + name, + name_size, + &name_index, + LIBUNA_ENDIAN_BIG, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_CONVERSION, + LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, + "%s: unable to copy Unicode character from UTF-16 encoded name.", + function ); + + return( -1 ); + } + } + else + { + if( libuna_unicode_character_copy_from_byte_stream( + &unicode_character, + name, + name_size, + &name_index, + codepage, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_CONVERSION, + LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, + "%s: unable to copy Unicode character from ASCII encoded name.", + function ); + + return( -1 ); + } + } + /* ':' is stored as '/' + */ + if( unicode_character == (libuna_unicode_character_t) '/' ) + { + unicode_character = (libuna_unicode_character_t) ':'; + } + /* U+2400 is stored as U+0 + */ + else if( unicode_character == (libuna_unicode_character_t) 0x00000000UL ) + { + unicode_character = (libuna_unicode_character_t) 0x00002400UL; + } + else if( use_case_folding != 0 ) + { + libfshfs_name_get_case_folding_mapping( + unicode_character ); + } + safe_name_hash *= 0x1000193UL; + safe_name_hash ^= (uint8_t) ( unicode_character & 0xff ); + + unicode_character >>= 8; + + safe_name_hash *= 0x1000193UL; + safe_name_hash ^= (uint8_t) ( unicode_character & 0xff ); + + unicode_character >>= 8; + + safe_name_hash *= 0x1000193UL; + safe_name_hash ^= (uint8_t) ( unicode_character & 0xff ); + + unicode_character >>= 8; + + safe_name_hash *= 0x1000193UL; + safe_name_hash ^= (uint8_t) ( unicode_character & 0xff ); + } + *name_hash = safe_name_hash; + + return( 1 ); +} + +/* Calculates a Fowler–Noll–Vo string hash of an UTF-8 string + * Returns 1 if successful or -1 on error + */ +int libfshfs_name_calculate_hash_utf8_string( + const libuna_utf8_character_t *utf8_string, + size_t utf8_string_length, + uint8_t use_case_folding, + uint32_t *name_hash, + libcerror_error_t **error ) +{ + libfshfs_name_decomposition_mapping_t utf8_single_nfd_mapping = { 1, { 0 } }; + + libfshfs_name_decomposition_mapping_t *utf8_nfd_mapping = NULL; + static char *function = "libfshfs_name_calculate_hash_utf8_string"; + libuna_unicode_character_t utf8_unicode_character = 0; + size_t utf8_string_index = 0; + uint32_t safe_name_hash = 0x811c9dc5UL; + uint8_t nfd_character_index = 0; + + if( utf8_string == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid UTF-8 string.", + function ); + + return( -1 ); + } + if( name_hash == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid name hash.", + function ); + + return( -1 ); + } + while( utf8_string_index < utf8_string_length ) + { + if( libuna_unicode_character_copy_from_utf8( + &utf8_unicode_character, + utf8_string, + utf8_string_length, + &utf8_string_index, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_CONVERSION, + LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, + "%s: unable to copy Unicode character from UTF-8 string.", + function ); + + return( -1 ); + } + if( utf8_unicode_character == 0 ) + { + break; + } + libfshfs_name_get_decomposition_mapping( + utf8_unicode_character, + utf8_nfd_mapping, + utf8_single_nfd_mapping ); + + for( nfd_character_index = 0; + nfd_character_index < utf8_nfd_mapping->number_of_characters; + nfd_character_index++ ) + { + utf8_unicode_character = utf8_nfd_mapping->characters[ nfd_character_index ]; + + if( use_case_folding != 0 ) + { + libfshfs_name_get_case_folding_mapping( + utf8_unicode_character ); + } + safe_name_hash *= 0x1000193UL; + safe_name_hash ^= (uint8_t) ( utf8_unicode_character & 0xff ); + + utf8_unicode_character >>= 8; + + safe_name_hash *= 0x1000193UL; + safe_name_hash ^= (uint8_t) ( utf8_unicode_character & 0xff ); + + utf8_unicode_character >>= 8; + + safe_name_hash *= 0x1000193UL; + safe_name_hash ^= (uint8_t) ( utf8_unicode_character & 0xff ); + + utf8_unicode_character >>= 8; + + safe_name_hash *= 0x1000193UL; + safe_name_hash ^= (uint8_t) ( utf8_unicode_character & 0xff ); + } + } + *name_hash = safe_name_hash; + + return( 1 ); +} + +/* Calculates a Fowler–Noll–Vo string hash of an UTF-16 string + * Returns 1 if successful or -1 on error + */ +int libfshfs_name_calculate_hash_utf16_string( + const libuna_utf16_character_t *utf16_string, + size_t utf16_string_length, + uint8_t use_case_folding, + uint32_t *name_hash, + libcerror_error_t **error ) +{ + libfshfs_name_decomposition_mapping_t utf16_single_nfd_mapping = { 1, { 0 } }; + + libfshfs_name_decomposition_mapping_t *utf16_nfd_mapping = NULL; + static char *function = "libfshfs_name_calculate_hash_utf16_string"; + libuna_unicode_character_t utf16_unicode_character = 0; + size_t utf16_string_index = 0; + uint32_t safe_name_hash = 0x811c9dc5UL; + uint8_t nfd_character_index = 0; + + if( utf16_string == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid UTF-16 string.", + function ); + + return( -1 ); + } + if( name_hash == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid name hash.", + function ); + + return( -1 ); + } + while( utf16_string_index < utf16_string_length ) + { + if( libuna_unicode_character_copy_from_utf16( + &utf16_unicode_character, + utf16_string, + utf16_string_length, + &utf16_string_index, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_CONVERSION, + LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, + "%s: unable to copy Unicode character from UTF-16 string.", + function ); + + return( -1 ); + } + if( utf16_unicode_character == 0 ) + { + break; + } + libfshfs_name_get_decomposition_mapping( + utf16_unicode_character, + utf16_nfd_mapping, + utf16_single_nfd_mapping ); + + for( nfd_character_index = 0; + nfd_character_index < utf16_nfd_mapping->number_of_characters; + nfd_character_index++ ) + { + utf16_unicode_character = utf16_nfd_mapping->characters[ nfd_character_index ]; + + if( use_case_folding != 0 ) + { + libfshfs_name_get_case_folding_mapping( + utf16_unicode_character ); + } + safe_name_hash *= 0x1000193UL; + safe_name_hash ^= (uint8_t) ( utf16_unicode_character & 0xff ); + + utf16_unicode_character >>= 8; + + safe_name_hash *= 0x1000193UL; + safe_name_hash ^= (uint8_t) ( utf16_unicode_character & 0xff ); + + utf16_unicode_character >>= 8; + + safe_name_hash *= 0x1000193UL; + safe_name_hash ^= (uint8_t) ( utf16_unicode_character & 0xff ); + + utf16_unicode_character >>= 8; + + safe_name_hash *= 0x1000193UL; + safe_name_hash ^= (uint8_t) ( utf16_unicode_character & 0xff ); + } + } + *name_hash = safe_name_hash; + + return( 1 ); +} + diff -Nru libfshfs-20201104/libfshfs/libfshfs_name.h libfshfs-20240221/libfshfs/libfshfs_name.h --- libfshfs-20201104/libfshfs/libfshfs_name.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_name.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Name functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -331,15 +331,26 @@ nfd_mapping = &single_nfd_mapping; \ } \ +int libfshfs_name_compare( + const uint8_t *first_name, + size_t first_name_size, + const uint8_t *second_name, + size_t second_name_size, + int codepage, + uint8_t use_case_folding, + libcerror_error_t **error ); + int libfshfs_name_get_utf8_string_size( const uint8_t *name, size_t name_size, + int codepage, size_t *utf8_string_size, libcerror_error_t **error ); int libfshfs_name_get_utf8_string( const uint8_t *name, size_t name_size, + int codepage, libuna_utf8_character_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); @@ -347,6 +358,7 @@ int libfshfs_name_compare_with_utf8_string( const uint8_t *name, size_t name_size, + int codepage, const libuna_utf8_character_t *utf8_string, size_t utf8_string_length, uint8_t use_case_folding, @@ -355,12 +367,14 @@ int libfshfs_name_get_utf16_string_size( const uint8_t *name, size_t name_size, + int codepage, size_t *utf16_string_size, libcerror_error_t **error ); int libfshfs_name_get_utf16_string( const uint8_t *name, size_t name_size, + int codepage, libuna_utf16_character_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); @@ -368,9 +382,32 @@ int libfshfs_name_compare_with_utf16_string( const uint8_t *name, size_t name_size, + int codepage, + const libuna_utf16_character_t *utf16_string, + size_t utf16_string_length, + uint8_t use_case_folding, + libcerror_error_t **error ); + +int libfshfs_name_calculate_hash( + const uint8_t *name, + size_t name_size, + int codepage, + uint8_t use_case_folding, + uint32_t *name_hash, + libcerror_error_t **error ); + +int libfshfs_name_calculate_hash_utf8_string( + const libuna_utf8_character_t *utf8_string, + size_t utf8_string_length, + uint8_t use_case_folding, + uint32_t *name_hash, + libcerror_error_t **error ); + +int libfshfs_name_calculate_hash_utf16_string( const libuna_utf16_character_t *utf16_string, size_t utf16_string_length, uint8_t use_case_folding, + uint32_t *name_hash, libcerror_error_t **error ); #if defined( __cplusplus ) diff -Nru libfshfs-20201104/libfshfs/libfshfs_notify.c libfshfs-20240221/libfshfs/libfshfs_notify.c --- libfshfs-20201104/libfshfs/libfshfs_notify.c 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_notify.c 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Notification functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfshfs/libfshfs_notify.h libfshfs-20240221/libfshfs/libfshfs_notify.h --- libfshfs-20201104/libfshfs/libfshfs_notify.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_notify.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Notification functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfshfs/libfshfs_profiler.c libfshfs-20240221/libfshfs/libfshfs_profiler.c --- libfshfs-20201104/libfshfs/libfshfs_profiler.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_profiler.c 2024-02-21 05:48:50.000000000 +0000 @@ -0,0 +1,397 @@ +/* + * The profiler functions + * + * Copyright (C) 2009-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include +#include +#include + +#if defined( HAVE_SYS_TIME_H ) +#include +#endif + +#include + +#include "libfshfs_libcerror.h" +#include "libfshfs_profiler.h" + +#if defined( HAVE_PROFILER ) + +/* Creates a profiler + * Make sure the value profiler is referencing, is set to NULL + * Returns 1 if successful or -1 on error + */ +int libfshfs_profiler_initialize( + libfshfs_profiler_t **profiler, + libcerror_error_t **error ) +{ + static char *function = "libfshfs_profiler_initialize"; + + if( profiler == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid profiler.", + function ); + + return( -1 ); + } + if( *profiler != NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, + "%s: invalid profiler value already set.", + function ); + + return( -1 ); + } + *profiler = memory_allocate_structure( + libfshfs_profiler_t ); + + if( *profiler == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_INSUFFICIENT, + "%s: unable to create profiler.", + function ); + + goto on_error; + } + if( memory_set( + *profiler, + 0, + sizeof( libfshfs_profiler_t ) ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_SET_FAILED, + "%s: unable to clear profiler.", + function ); + + memory_free( + *profiler ); + + *profiler = NULL; + + return( -1 ); + } + return( 1 ); + +on_error: + if( *profiler != NULL ) + { + memory_free( + *profiler ); + + *profiler = NULL; + } + return( -1 ); +} + +/* Frees a profiler + * Returns 1 if successful or -1 on error + */ +int libfshfs_profiler_free( + libfshfs_profiler_t **profiler, + libcerror_error_t **error ) +{ + static char *function = "libfshfs_profiler_free"; + + if( profiler == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid profiler.", + function ); + + return( -1 ); + } + if( *profiler != NULL ) + { + memory_free( + *profiler ); + + *profiler = NULL; + } + return( 1 ); +} + +/* Opens the profiler + * Returns 1 if successful or -1 on error + */ +int libfshfs_profiler_open( + libfshfs_profiler_t *profiler, + const char *filename, + libcerror_error_t **error ) +{ + static char *function = "libfshfs_profiler_open"; + + if( profiler == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid profiler.", + function ); + + return( -1 ); + } + if( profiler->output_stream != NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, + "%s: invalid profiler - output stream value already set.", + function ); + + return( -1 ); + } + profiler->output_stream = file_stream_open( + filename, + "w" ); + + if( profiler->output_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_OPEN_FAILED, + "%s: unable to open profiler.", + function ); + + goto on_error; + } + if( fprintf( + profiler->output_stream, + "timestamp,name,offset,size,duration,cache_hit_or_miss\n" ) <= -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_WRITE_FAILED, + "%s: unable to write header.", + function ); + + goto on_error; + } + return( 1 ); + +on_error: + if( profiler->output_stream != NULL ) + { + file_stream_close( + profiler->output_stream ); + + profiler->output_stream = NULL; + } + return( -1 ); +} + +/* Closes the profiler + * Returns 0 if successful or -1 on error + */ +int libfshfs_profiler_close( + libfshfs_profiler_t *profiler, + libcerror_error_t **error ) +{ + static char *function = "libfshfs_profiler_close"; + + if( profiler == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid profiler.", + function ); + + return( -1 ); + } + if( profiler->output_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, + "%s: invalid profiler - missing output stream.", + function ); + + return( -1 ); + } + if( file_stream_close( + profiler->output_stream ) != 0 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_CLOSE_FAILED, + "%s: unable to close profiler.", + function ); + + return( -1 ); + } + profiler->output_stream = NULL; + + return( 0 ); +} + +/* Starts timing + * Returns 1 if successful or -1 on error + */ +int libfshfs_profiler_start_timing( + libfshfs_profiler_t *profiler, + int64_t *start_timestamp, + libcerror_error_t **error ) +{ + struct timespec start_time; + + static char *function = "libfshfs_profiler_start_timing"; + + if( profiler == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid profiler.", + function ); + + return( -1 ); + } + if( start_timestamp == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid start timestamp.", + function ); + + return( -1 ); + } + if( clock_gettime( + CLOCK_REALTIME, + &start_time ) != 0 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve start time.", + function ); + + return( -1 ); + } + *start_timestamp = ( (int64_t) start_time.tv_sec * 1000000000 ) + start_time.tv_nsec; + + return( 1 ); +} + +/* Stops timing + * Returns 1 if successful or -1 on error + */ +int libfshfs_profiler_stop_timing( + libfshfs_profiler_t *profiler, + int64_t start_timestamp, + const char *name, + off64_t offset, + size64_t size, + const char *cache_hit_or_miss, + libcerror_error_t **error ) +{ + struct timespec stop_time; + + static char *function = "libfshfs_profiler_start_timing"; + int64_t sample_time = 0; + + if( profiler == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid profiler.", + function ); + + return( -1 ); + } + if( profiler->output_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, + "%s: invalid profiler - missing output stream.", + function ); + + return( -1 ); + } + if( clock_gettime( + CLOCK_REALTIME, + &stop_time ) != 0 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve stop time.", + function ); + + return( -1 ); + } + sample_time = ( (int64_t) stop_time.tv_sec * 1000000000 ) + stop_time.tv_nsec; + sample_time -= start_timestamp; + + if( fprintf( + profiler->output_stream, + "%" PRIi64 ",%s,%" PRIi64 ",%" PRIu64 ",%" PRIi64 ",%s\n", + start_timestamp, + name, + offset, + size, + sample_time, + cache_hit_or_miss ) <= -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_WRITE_FAILED, + "%s: unable to write sample.", + function ); + + return( -1 ); + } + return( 1 ); +} + +#endif /* defined( HAVE_PROFILER ) */ + diff -Nru libfshfs-20201104/libfshfs/libfshfs_profiler.h libfshfs-20240221/libfshfs/libfshfs_profiler.h --- libfshfs-20201104/libfshfs/libfshfs_profiler.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_profiler.h 2024-02-21 05:48:50.000000000 +0000 @@ -0,0 +1,84 @@ +/* + * The profiler functions + * + * Copyright (C) 2009-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _LIBFSHFS_PROFILER_H ) +#define _LIBFSHFS_PROFILER_H + +#include +#include +#include + +#include "libfshfs_libcerror.h" + +#if defined( __cplusplus ) +extern "C" { +#endif + +#if defined( HAVE_PROFILER ) + +typedef struct libfshfs_profiler libfshfs_profiler_t; + +struct libfshfs_profiler +{ + /* The output stream + */ + FILE *output_stream; +}; + +int libfshfs_profiler_initialize( + libfshfs_profiler_t **profiler, + libcerror_error_t **error ); + +int libfshfs_profiler_free( + libfshfs_profiler_t **profiler, + libcerror_error_t **error ); + +int libfshfs_profiler_open( + libfshfs_profiler_t *profiler, + const char *filename, + libcerror_error_t **error ); + +int libfshfs_profiler_close( + libfshfs_profiler_t *profiler, + libcerror_error_t **error ); + +int libfshfs_profiler_start_timing( + libfshfs_profiler_t *profiler, + int64_t *start_timestamp, + libcerror_error_t **error ); + +int libfshfs_profiler_stop_timing( + libfshfs_profiler_t *profiler, + int64_t start_timestamp, + const char *name, + off64_t offset, + size64_t size, + const char *cache_hit_or_miss, + libcerror_error_t **error ); + +#endif /* defined( HAVE_PROFILER ) */ + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _LIBFSHFS_PROFILER_H ) */ + diff -Nru libfshfs-20201104/libfshfs/libfshfs_support.c libfshfs-20240221/libfshfs/libfshfs_support.c --- libfshfs-20201104/libfshfs/libfshfs_support.c 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_support.c 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Support functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -26,7 +26,6 @@ #include #include "libfshfs_definitions.h" -#include "libfshfs_io_handle.h" #include "libfshfs_libbfio.h" #include "libfshfs_libcerror.h" #include "libfshfs_libclocale.h" @@ -356,7 +355,7 @@ "%s: unable to open file.", function ); - return( -1 ); + goto on_error; } else if( file_io_handle_is_open == 0 ) { @@ -372,34 +371,14 @@ "%s: unable to open file.", function ); - return( -1 ); + goto on_error; } } - if( libbfio_handle_seek_offset( - file_io_handle, - 1024, - SEEK_SET, - error ) == -1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_IO, - LIBCERROR_IO_ERROR_SEEK_FAILED, - "%s: unable to seek file header offset: 1024.", - function ); - - if( file_io_handle_is_open == 0 ) - { - libbfio_handle_close( - file_io_handle, - error ); - } - return( -1 ); - } - read_count = libbfio_handle_read_buffer( + read_count = libbfio_handle_read_buffer_at_offset( file_io_handle, signature, 2, + 1024, error ); if( read_count != 2 ) @@ -408,16 +387,10 @@ error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, - "%s: unable to read signature.", + "%s: unable to read signature at offset 1024 (0x00000400).", function ); - if( file_io_handle_is_open == 0 ) - { - libbfio_handle_close( - file_io_handle, - error ); - } - return( -1 ); + goto on_error; } if( file_io_handle_is_open == 0 ) { @@ -432,25 +405,41 @@ "%s: unable to close file.", function ); - return( -1 ); + goto on_error; } } if( memory_compare( - fshfs_volume_signature_hfsplus, + "BD", signature, 2 ) == 0 ) { return( 1 ); } else if( memory_compare( - fshfs_volume_signature_hfsx, + "H+", + signature, + 2 ) == 0 ) + { + return( 1 ); + } + else if( memory_compare( + "HX", signature, 2 ) == 0 ) { return( 1 ); } - /* TODO also check major version? */ + /* TODO also check HFS+/HFSX major version? */ return( 0 ); + +on_error: + if( file_io_handle_is_open == 0 ) + { + libbfio_handle_close( + file_io_handle, + error ); + } + return( -1 ); } diff -Nru libfshfs-20201104/libfshfs/libfshfs_support.h libfshfs-20240221/libfshfs/libfshfs_support.h --- libfshfs-20201104/libfshfs/libfshfs_support.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_support.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Support functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfshfs/libfshfs_thread_record.c libfshfs-20240221/libfshfs/libfshfs_thread_record.c --- libfshfs-20201104/libfshfs/libfshfs_thread_record.c 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_thread_record.c 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Catalog B-tree file thread record functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -153,13 +153,14 @@ size_t data_size, libcerror_error_t **error ) { - static char *function = "libfshfs_thread_record_read_data"; - size_t header_size = 0; - uint16_t name_size = 0; - uint16_t record_type = 0; + static char *function = "libfshfs_thread_record_read_data"; + size_t header_size = 0; + uint16_t name_size = 0; + uint16_t record_type = 0; #if defined( HAVE_DEBUG_OUTPUT ) - uint16_t value_16bit = 0; + size_t record_data_size = 0; + uint16_t value_16bit = 0; #endif if( thread_record == NULL ) @@ -173,6 +174,17 @@ return( -1 ); } + if( thread_record->name != NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, + "%s: invalid thread record - name value already set.", + function ); + + return( -1 ); + } if( data == NULL ) { libcerror_error_set( @@ -239,10 +251,45 @@ byte_stream_copy_to_uint16_big_endian( ( (fshfs_catalog_thread_record_hfsplus_t *) data )->name_size, name_size ); + + thread_record->codepage = LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN; + + if( name_size > ( ( data_size - header_size ) / 2 ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid name size value out of bounds.", + function ); + + goto on_error; + } +#if defined( HAVE_DEBUG_OUTPUT ) + record_data_size = header_size + ( name_size * 2 ); +#endif } else { -/* TODO add HFS support */ + name_size = ( (fshfs_catalog_thread_record_hfs_t *) data )->name_size; + +/* TODO add support for Mac OS codepages */ + thread_record->codepage = LIBUNA_CODEPAGE_ASCII; + + if( name_size > ( data_size - header_size ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid name size value out of bounds.", + function ); + + goto on_error; + } +#if defined( HAVE_DEBUG_OUTPUT ) + record_data_size = header_size + name_size; +#endif } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) @@ -252,7 +299,7 @@ function ); libcnotify_print_data( data, - header_size + ( name_size * 2 ), + record_data_size, LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); } #endif @@ -326,39 +373,31 @@ function, thread_record->parent_identifier ); - libcnotify_printf( - "%s: name number of characters\t\t: %" PRIu16 " (%" PRIu32 ")\n", - function, - thread_record->name_size, - (uint32_t) thread_record->name_size * 2 ); + if( ( record_type == LIBFSHFS_RECORD_TYPE_HFSPLUS_DIRECTORY_THREAD_RECORD ) + || ( record_type == LIBFSHFS_RECORD_TYPE_HFSPLUS_FILE_THREAD_RECORD ) ) + { + libcnotify_printf( + "%s: name number of characters\t\t: %" PRIu16 " (%" PRIu32 ")\n", + function, + thread_record->name_size, + (uint32_t) thread_record->name_size * 2 ); + } + else + { + libcnotify_printf( + "%s: name number of characters\t\t: %" PRIu16 "\n", + function, + thread_record->name_size ); + } } #endif /* defined( HAVE_DEBUG_OUTPUT ) */ if( thread_record->name_size > 0 ) { - if( (uint32_t) thread_record->name_size > ( (uint32_t) UINT16_MAX / 2 ) ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, - "%s: invalid thread record - name size value out of bounds.", - function ); - - goto on_error; - } - thread_record->name_size *= 2; - - if( thread_record->name_size > ( data_size - header_size ) ) + if( ( record_type == LIBFSHFS_RECORD_TYPE_HFSPLUS_DIRECTORY_THREAD_RECORD ) + || ( record_type == LIBFSHFS_RECORD_TYPE_HFSPLUS_FILE_THREAD_RECORD ) ) { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, - "%s: invalid thread record - name size value out of bounds.", - function ); - - goto on_error; + thread_record->name_size *= 2; } thread_record->name = (uint8_t *) memory_allocate( sizeof( uint8_t ) * thread_record->name_size ); @@ -391,25 +430,49 @@ #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { - if( libfshfs_debug_print_utf16_name_value( - function, - "name\t\t\t\t\t", - &( data[ header_size ] ), - (size_t) thread_record->name_size, - LIBUNA_ENDIAN_BIG, - error ) != 1 ) + if( ( record_type == LIBFSHFS_RECORD_TYPE_HFSPLUS_DIRECTORY_THREAD_RECORD ) + || ( record_type == LIBFSHFS_RECORD_TYPE_HFSPLUS_FILE_THREAD_RECORD ) ) { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, - "%s: unable to print UTF-16 name value.", - function ); + if( libfshfs_debug_print_utf16_name_value( + function, + "name\t\t\t\t\t", + &( data[ header_size ] ), + (size_t) thread_record->name_size, + LIBUNA_ENDIAN_BIG, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, + "%s: unable to print UTF-16 name value.", + function ); - goto on_error; + goto on_error; + } + } + else + { + if( libfshfs_debug_print_string_value( + function, + "name\t\t\t\t\t", + &( data[ header_size ] ), + (size_t) thread_record->name_size, + thread_record->codepage, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, + "%s: unable to print ASCII name value.", + function ); + + return( -1 ); + } } } -#endif +#endif /* defined( HAVE_DEBUG_OUTPUT ) */ } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) @@ -421,6 +484,15 @@ return( 1 ); on_error: + if( thread_record->name != NULL ) + { + memory_free( + thread_record->name ); + + thread_record->name = NULL; + } + thread_record->name_size = 0; + return( -1 ); } diff -Nru libfshfs-20201104/libfshfs/libfshfs_thread_record.h libfshfs-20240221/libfshfs/libfshfs_thread_record.h --- libfshfs-20201104/libfshfs/libfshfs_thread_record.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_thread_record.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Catalog B-tree file thread record functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -50,6 +50,10 @@ /* Name */ uint8_t *name; + + /* Codepage of the name + */ + int codepage; }; int libfshfs_thread_record_initialize( diff -Nru libfshfs-20201104/libfshfs/libfshfs_types.h libfshfs-20240221/libfshfs/libfshfs_types.h --- libfshfs-20201104/libfshfs/libfshfs_types.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_types.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The internal type definitions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -34,11 +34,13 @@ /* The following type definitions hide internal data structures */ #if defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) +typedef struct libfshfs_data_stream {} libfshfs_data_stream_t; typedef struct libfshfs_extended_attribute {} libfshfs_extended_attribute_t; typedef struct libfshfs_file_entry {} libfshfs_file_entry_t; typedef struct libfshfs_volume {} libfshfs_volume_t; #else +typedef intptr_t libfshfs_data_stream_t; typedef intptr_t libfshfs_extended_attribute_t; typedef intptr_t libfshfs_file_entry_t; typedef intptr_t libfshfs_volume_t; diff -Nru libfshfs-20201104/libfshfs/libfshfs_unused.h libfshfs-20240221/libfshfs/libfshfs_unused.h --- libfshfs-20201104/libfshfs/libfshfs_unused.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_unused.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Definitions to silence compiler warnings about unused function attributes/parameters. * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfshfs/libfshfs_volume.c libfshfs-20240221/libfshfs/libfshfs_volume.c --- libfshfs-20201104/libfshfs/libfshfs_volume.c 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_volume.c 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Volume functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -29,11 +29,13 @@ #include "libfshfs_definitions.h" #include "libfshfs_directory_entry.h" #include "libfshfs_file_entry.h" +#include "libfshfs_fork_descriptor.h" #include "libfshfs_io_handle.h" #include "libfshfs_libcdata.h" #include "libfshfs_libcerror.h" #include "libfshfs_libcnotify.h" #include "libfshfs_libcthreads.h" +#include "libfshfs_master_directory_block.h" #include "libfshfs_thread_record.h" #include "libfshfs_volume.h" #include "libfshfs_volume_header.h" @@ -608,9 +610,9 @@ { libfshfs_internal_volume_t *internal_volume = NULL; static char *function = "libfshfs_volume_open_file_io_handle"; + uint8_t file_io_handle_opened_in_library = 0; int bfio_access_flags = 0; int file_io_handle_is_open = 0; - int file_io_handle_opened_in_library = 0; if( volume == NULL ) { @@ -887,18 +889,37 @@ result = -1; } - if( libfshfs_volume_header_free( - &( internal_volume->volume_header ), - error ) != 1 ) + if( internal_volume->volume_header != NULL ) { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, - "%s: unable to free volume header.", - function ); + if( libfshfs_volume_header_free( + &( internal_volume->volume_header ), + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free volume header.", + function ); - result = -1; + result = -1; + } + } + if( internal_volume->master_directory_block != NULL ) + { + if( libfshfs_master_directory_block_free( + &( internal_volume->master_directory_block ), + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free master directory block.", + function ); + + result = -1; + } } if( internal_volume->file_system != NULL ) { @@ -959,9 +980,15 @@ off64_t file_offset, libcerror_error_t **error ) { - static char *function = "libfshfs_internal_volume_open_read"; - uint8_t use_case_folding = 0; - int result = 0; + uint8_t signature[ 2 ]; + + libfshfs_fork_descriptor_t *attributes_file_fork_descriptor = NULL; + libfshfs_fork_descriptor_t *catalog_file_fork_descriptor = NULL; + libfshfs_fork_descriptor_t *extents_file_fork_descriptor = NULL; + static char *function = "libfshfs_internal_volume_open_read"; + ssize_t read_count = 0; + uint8_t use_case_folding = 0; + int result = 0; if( internal_volume == NULL ) { @@ -996,70 +1023,168 @@ return( -1 ); } - if( internal_volume->file_system != NULL ) + if( internal_volume->master_directory_block != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, - "%s: invalid volume - file system value already set.", + "%s: invalid volume - master directory block value already set.", function ); return( -1 ); } - if( internal_volume->root_directory_entry != NULL ) + if( internal_volume->file_system != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, - "%s: invalid volume - root directory entry value already set.", + "%s: invalid volume - file system value already set.", function ); return( -1 ); } - if( libfshfs_volume_header_initialize( - &( internal_volume->volume_header ), - error ) != 1 ) + if( internal_volume->root_directory_entry != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, - "%s: unable to create volume header.", + LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, + "%s: invalid volume - root directory entry value already set.", function ); - goto on_error; - } -#if defined( HAVE_DEBUG_OUTPUT ) - if( libcnotify_verbose != 0 ) - { - libcnotify_printf( - "Reading volume header:\n" ); + return( -1 ); } -#endif - if( libfshfs_volume_header_read_file_io_handle( - internal_volume->volume_header, - file_io_handle, - file_offset, - error ) != 1 ) + read_count = libbfio_handle_read_buffer_at_offset( + file_io_handle, + signature, + 2, + file_offset, + error ); + + if( read_count != 2 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, - "%s: unable to read volume header at offset: %" PRIi64 ".", + "%s: unable to read signature at offset: %" PRIi64 " (0x%08" PRIx64 ").", function, + file_offset, file_offset ); goto on_error; } - internal_volume->io_handle->file_system_type = internal_volume->volume_header->file_system_type; - internal_volume->io_handle->block_size = internal_volume->volume_header->allocation_block_size; - - if( internal_volume->volume_header->file_system_type == LIBFSHFS_EXTENT_FILE_SYSTEM_TYPE_HFS_PLUS ) + if( memory_compare( + "BD", + signature, + 2 ) == 0 ) { +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "Reading master directory block:\n" ); + } +#endif + if( libfshfs_master_directory_block_initialize( + &( internal_volume->master_directory_block ), + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to create master directory block.", + function ); + + goto on_error; + } + if( libfshfs_master_directory_block_read_file_io_handle( + internal_volume->master_directory_block, + file_io_handle, + file_offset, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_READ_FAILED, + "%s: unable to read master directory block at offset: %" PRIi64 " (0x%08" PRIx64 ").", + function, + file_offset, + file_offset ); + + goto on_error; + } + internal_volume->io_handle->file_system_type = LIBFSHFS_FILE_SYSTEM_TYPE_HFS; + internal_volume->io_handle->block_size = 512; + use_case_folding = 1; + + extents_file_fork_descriptor = internal_volume->master_directory_block->extents_file_fork_descriptor; + catalog_file_fork_descriptor = internal_volume->master_directory_block->catalog_file_fork_descriptor; + +/* TODO impement classic HFS support */ + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, + "%s: classic HFS not supported.", + function ); + + goto on_error; + } + else + { +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "Reading volume header:\n" ); + } +#endif + if( libfshfs_volume_header_initialize( + &( internal_volume->volume_header ), + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to create volume header.", + function ); + + goto on_error; + } + if( libfshfs_volume_header_read_file_io_handle( + internal_volume->volume_header, + file_io_handle, + file_offset, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_READ_FAILED, + "%s: unable to read volume header at offset: %" PRIi64 " (0x%08" PRIx64 ").", + function, + file_offset, + file_offset ); + + goto on_error; + } + internal_volume->io_handle->file_system_type = internal_volume->volume_header->file_system_type; + internal_volume->io_handle->block_size = internal_volume->volume_header->allocation_block_size; + + if( internal_volume->volume_header->file_system_type == LIBFSHFS_FILE_SYSTEM_TYPE_HFS_PLUS ) + { + use_case_folding = 1; + } + extents_file_fork_descriptor = internal_volume->volume_header->extents_file_fork_descriptor; + catalog_file_fork_descriptor = internal_volume->volume_header->catalog_file_fork_descriptor; + attributes_file_fork_descriptor = internal_volume->volume_header->attributes_file_fork_descriptor; } if( libfshfs_file_system_initialize( &( internal_volume->file_system ), @@ -1086,7 +1211,7 @@ internal_volume->file_system, internal_volume->io_handle, file_io_handle, - internal_volume->volume_header->extents_file_fork_descriptor, + extents_file_fork_descriptor, error ) != 1 ) { libcerror_error_set( @@ -1109,7 +1234,7 @@ internal_volume->file_system, internal_volume->io_handle, file_io_handle, - internal_volume->volume_header->catalog_file_fork_descriptor, + catalog_file_fork_descriptor, error ) != 1 ) { libcerror_error_set( @@ -1121,28 +1246,31 @@ goto on_error; } -#if defined( HAVE_DEBUG_OUTPUT ) - if( libcnotify_verbose != 0 ) + if( attributes_file_fork_descriptor != NULL ) { - libcnotify_printf( - "Reading attributes B-tree file:\n" ); - } +#if defined( HAVE_DEBUG_OUTPUT ) + if( libcnotify_verbose != 0 ) + { + libcnotify_printf( + "Reading attributes B-tree file:\n" ); + } #endif - if( libfshfs_file_system_read_attributes_file( - internal_volume->file_system, - internal_volume->io_handle, - file_io_handle, - internal_volume->volume_header->attributes_file_fork_descriptor, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, - "%s: unable to read attributes B-tree file.", - function ); + if( libfshfs_file_system_read_attributes_file( + internal_volume->file_system, + internal_volume->io_handle, + file_io_handle, + attributes_file_fork_descriptor, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to read attributes B-tree file.", + function ); - goto on_error; + goto on_error; + } } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) @@ -1153,6 +1281,7 @@ #endif result = libfshfs_file_system_get_directory_entry_by_identifier( internal_volume->file_system, + internal_volume->io_handle, file_io_handle, LIBFSHFS_ROOT_DIRECTORY_IDENTIFIER, &( internal_volume->root_directory_entry ), @@ -1184,6 +1313,12 @@ &( internal_volume->file_system ), NULL ); } + if( internal_volume->master_directory_block != NULL ) + { + libfshfs_master_directory_block_free( + &( internal_volume->master_directory_block ), + NULL ); + } if( internal_volume->volume_header != NULL ) { libfshfs_volume_header_free( @@ -1234,10 +1369,21 @@ return( -1 ); } #endif - if( libfshfs_directory_entry_get_utf8_name_size( - internal_volume->root_directory_entry, - utf8_string_size, - error ) != 1 ) + if( internal_volume->root_directory_entry != NULL ) + { + result = libfshfs_directory_entry_get_utf8_name_size( + internal_volume->root_directory_entry, + utf8_string_size, + error ); + } + else + { + result = libfshfs_master_directory_block_get_utf8_volume_label_size( + internal_volume->master_directory_block, + utf8_string_size, + error ); + } + if( result != 1 ) { libcerror_error_set( error, @@ -1308,11 +1454,23 @@ return( -1 ); } #endif - if( libfshfs_directory_entry_get_utf8_name( - internal_volume->root_directory_entry, - utf8_string, - utf8_string_size, - error ) != 1 ) + if( internal_volume->root_directory_entry != NULL ) + { + result = libfshfs_directory_entry_get_utf8_name( + internal_volume->root_directory_entry, + utf8_string, + utf8_string_size, + error ); + } + else + { + result = libfshfs_master_directory_block_get_utf8_volume_label( + internal_volume->master_directory_block, + utf8_string, + utf8_string_size, + error ); + } + if( result != 1 ) { libcerror_error_set( error, @@ -1382,10 +1540,21 @@ return( -1 ); } #endif - if( libfshfs_directory_entry_get_utf16_name_size( - internal_volume->root_directory_entry, - utf16_string_size, - error ) != 1 ) + if( internal_volume->root_directory_entry != NULL ) + { + result = libfshfs_directory_entry_get_utf16_name_size( + internal_volume->root_directory_entry, + utf16_string_size, + error ); + } + else + { + result = libfshfs_master_directory_block_get_utf16_volume_label_size( + internal_volume->master_directory_block, + utf16_string_size, + error ); + } + if( result != 1 ) { libcerror_error_set( error, @@ -1456,11 +1625,23 @@ return( -1 ); } #endif - if( libfshfs_directory_entry_get_utf16_name( - internal_volume->root_directory_entry, - utf16_string, - utf16_string_size, - error ) != 1 ) + if( internal_volume->root_directory_entry != NULL ) + { + result = libfshfs_directory_entry_get_utf16_name( + internal_volume->root_directory_entry, + utf16_string, + utf16_string_size, + error ); + } + else + { + result = libfshfs_master_directory_block_get_utf16_volume_label( + internal_volume->master_directory_block, + utf16_string, + utf16_string_size, + error ); + } + if( result != 1 ) { libcerror_error_set( error, @@ -1489,19 +1670,18 @@ return( result ); } -/* Retrieves the file entry for a specific identifier (or catalog node identifier (CNID)) - * Returns 1 if successful, 0 if not available or -1 on error +/* Retrieves the root directory file entry + * Returns 1 if successful or -1 on error */ -int libfshfs_volume_get_file_entry_by_identifier( +int libfshfs_volume_get_root_directory( libfshfs_volume_t *volume, - uint32_t identifier, libfshfs_file_entry_t **file_entry, libcerror_error_t **error ) { - libfshfs_directory_entry_t *directory_entry = NULL; - libfshfs_internal_volume_t *internal_volume = NULL; - static char *function = "libfshfs_volume_get_file_entry_by_identifier"; - int result = 0; + libfshfs_directory_entry_t *safe_directory_entry = NULL; + libfshfs_internal_volume_t *internal_volume = NULL; + static char *function = "libfshfs_volume_get_root_directory"; + int result = 1; if( volume == NULL ) { @@ -1538,8 +1718,8 @@ return( -1 ); } -#if defined( HAVE_LIBFSAPFS_MULTI_THREAD_SUPPORT ) - if( libcthreads_read_write_lock_grab_for_write( +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_grab_for_read( internal_volume->read_write_lock, error ) != 1 ) { @@ -1547,32 +1727,27 @@ error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to grab read/write lock for writing.", + "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } #endif - result = libfshfs_file_system_get_directory_entry_by_identifier( - internal_volume->file_system, - internal_volume->file_io_handle, - identifier, - &directory_entry, - error ); - - if( result == -1 ) + if( libfshfs_directory_entry_clone( + &safe_directory_entry, + internal_volume->root_directory_entry, + error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve directory entry: %" PRIu32 ".", - function, - identifier ); + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to clone root directory entry.", + function ); result = -1; } - else if( result != 0 ) + else { /* libfshfs_file_entry_initialize takes over management of directory_entry */ @@ -1580,8 +1755,8 @@ file_entry, internal_volume->io_handle, internal_volume->file_io_handle, - directory_entry, internal_volume->file_system, + safe_directory_entry, error ) != 1 ) { libcerror_error_set( @@ -1592,14 +1767,14 @@ function ); libfshfs_directory_entry_free( - &directory_entry, + &safe_directory_entry, NULL ); result = -1; } } -#if defined( HAVE_LIBFSAPFS_MULTI_THREAD_SUPPORT ) - if( libcthreads_read_write_lock_release_for_write( +#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_release_for_read( internal_volume->read_write_lock, error ) != 1 ) { @@ -1607,7 +1782,7 @@ error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to release read/write lock for writing.", + "%s: unable to release read/write lock for reading.", function ); return( -1 ); @@ -1616,18 +1791,19 @@ return( result ); } -/* Retrieves the root directory file entry - * Returns 1 if successful or -1 on error +/* Retrieves the file entry for a specific identifier (or catalog node identifier (CNID)) + * Returns 1 if successful, 0 if not available or -1 on error */ -int libfshfs_volume_get_root_directory( +int libfshfs_volume_get_file_entry_by_identifier( libfshfs_volume_t *volume, + uint32_t identifier, libfshfs_file_entry_t **file_entry, libcerror_error_t **error ) { - libfshfs_directory_entry_t *safe_directory_entry = NULL; - libfshfs_internal_volume_t *internal_volume = NULL; - static char *function = "libfshfs_volume_get_root_directory"; - int result = 1; + libfshfs_directory_entry_t *directory_entry = NULL; + libfshfs_internal_volume_t *internal_volume = NULL; + static char *function = "libfshfs_volume_get_file_entry_by_identifier"; + int result = 0; if( volume == NULL ) { @@ -1664,8 +1840,8 @@ return( -1 ); } -#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) - if( libcthreads_read_write_lock_grab_for_read( +#if defined( HAVE_LIBFSAPFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_grab_for_write( internal_volume->read_write_lock, error ) != 1 ) { @@ -1673,27 +1849,33 @@ error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to grab read/write lock for reading.", + "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } #endif - if( libfshfs_directory_entry_clone( - &safe_directory_entry, - internal_volume->root_directory_entry, - error ) != 1 ) + result = libfshfs_file_system_get_directory_entry_by_identifier( + internal_volume->file_system, + internal_volume->io_handle, + internal_volume->file_io_handle, + identifier, + &directory_entry, + error ); + + if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, - "%s: unable to clone root directory entry.", - function ); + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve directory entry: %" PRIu32 ".", + function, + identifier ); result = -1; } - else + else if( result != 0 ) { /* libfshfs_file_entry_initialize takes over management of directory_entry */ @@ -1701,8 +1883,8 @@ file_entry, internal_volume->io_handle, internal_volume->file_io_handle, - safe_directory_entry, internal_volume->file_system, + directory_entry, error ) != 1 ) { libcerror_error_set( @@ -1713,14 +1895,14 @@ function ); libfshfs_directory_entry_free( - &safe_directory_entry, + &directory_entry, NULL ); result = -1; } } -#if defined( HAVE_LIBFSHFS_MULTI_THREAD_SUPPORT ) - if( libcthreads_read_write_lock_release_for_read( +#if defined( HAVE_LIBFSAPFS_MULTI_THREAD_SUPPORT ) + if( libcthreads_read_write_lock_release_for_write( internal_volume->read_write_lock, error ) != 1 ) { @@ -1728,7 +1910,7 @@ error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to release read/write lock for reading.", + "%s: unable to release read/write lock for writing.", function ); return( -1 ); @@ -1804,6 +1986,7 @@ #endif result = libfshfs_file_system_get_directory_entry_by_utf8_path( internal_volume->file_system, + internal_volume->io_handle, internal_volume->file_io_handle, utf8_string, utf8_string_length, @@ -1829,8 +2012,8 @@ file_entry, internal_volume->io_handle, internal_volume->file_io_handle, - directory_entry, internal_volume->file_system, + directory_entry, error ) != 1 ) { libcerror_error_set( @@ -1936,6 +2119,7 @@ #endif result = libfshfs_file_system_get_directory_entry_by_utf16_path( internal_volume->file_system, + internal_volume->io_handle, internal_volume->file_io_handle, utf16_string, utf16_string_length, @@ -1961,8 +2145,8 @@ file_entry, internal_volume->io_handle, internal_volume->file_io_handle, - directory_entry, internal_volume->file_system, + directory_entry, error ) != 1 ) { libcerror_error_set( diff -Nru libfshfs-20201104/libfshfs/libfshfs_volume.h libfshfs-20240221/libfshfs/libfshfs_volume.h --- libfshfs-20201104/libfshfs/libfshfs_volume.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_volume.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Volume functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -36,6 +36,7 @@ #include "libfshfs_libbfio.h" #include "libfshfs_libcerror.h" #include "libfshfs_libcthreads.h" +#include "libfshfs_master_directory_block.h" #include "libfshfs_types.h" #include "libfshfs_volume_header.h" @@ -63,10 +64,14 @@ */ uint8_t file_io_handle_opened_in_library; - /* The volume header + /* The HFS+/HFSX volume header */ libfshfs_volume_header_t *volume_header; + /* The HFS master directory block + */ + libfshfs_master_directory_block_t *master_directory_block; + /* The file system */ libfshfs_file_system_t *file_system; @@ -160,15 +165,15 @@ libcerror_error_t **error ); LIBFSHFS_EXTERN \ -int libfshfs_volume_get_file_entry_by_identifier( +int libfshfs_volume_get_root_directory( libfshfs_volume_t *volume, - uint32_t identifier, libfshfs_file_entry_t **file_entry, libcerror_error_t **error ); LIBFSHFS_EXTERN \ -int libfshfs_volume_get_root_directory( +int libfshfs_volume_get_file_entry_by_identifier( libfshfs_volume_t *volume, + uint32_t identifier, libfshfs_file_entry_t **file_entry, libcerror_error_t **error ); diff -Nru libfshfs-20201104/libfshfs/libfshfs_volume_header.c libfshfs-20240221/libfshfs/libfshfs_volume_header.c --- libfshfs-20201104/libfshfs/libfshfs_volume_header.c 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_volume_header.c 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Volume header functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -26,14 +26,13 @@ #include "libfshfs_debug.h" #include "libfshfs_definitions.h" -#include "libfshfs_io_handle.h" #include "libfshfs_libbfio.h" #include "libfshfs_libcerror.h" #include "libfshfs_libcnotify.h" #include "libfshfs_libfdatetime.h" #include "libfshfs_volume_header.h" -#include "fshfs_volume.h" +#include "fshfs_volume_header.h" /* Creates a volume header * Make sure the value volume_header is referencing, is set to NULL @@ -362,17 +361,17 @@ #endif if( memory_compare( ( (fshfs_volume_header_t *) data )->signature, - fshfs_volume_signature_hfsplus, + "H+", 2 ) == 0 ) { - volume_header->file_system_type = LIBFSHFS_EXTENT_FILE_SYSTEM_TYPE_HFS_PLUS; + volume_header->file_system_type = LIBFSHFS_FILE_SYSTEM_TYPE_HFS_PLUS; } else if( memory_compare( ( (fshfs_volume_header_t *) data )->signature, - fshfs_volume_signature_hfsx, + "HX", 2 ) == 0 ) { - volume_header->file_system_type = LIBFSHFS_EXTENT_FILE_SYSTEM_TYPE_HFSX; + volume_header->file_system_type = LIBFSHFS_FILE_SYSTEM_TYPE_HFSX; } else { @@ -380,7 +379,7 @@ error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, - "%s: invalid volume system signature.", + "%s: unsupported volume header signature.", function ); return( -1 ); @@ -441,6 +440,7 @@ 4, LIBFDATETIME_ENDIAN_BIG, LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME, + 0, error ) != 1 ) { libcerror_error_set( @@ -459,6 +459,7 @@ 4, LIBFDATETIME_ENDIAN_BIG, LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME, + 0, error ) != 1 ) { libcerror_error_set( @@ -477,6 +478,7 @@ 4, LIBFDATETIME_ENDIAN_BIG, LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME, + 0, error ) != 1 ) { libcerror_error_set( @@ -495,6 +497,7 @@ 4, LIBFDATETIME_ENDIAN_BIG, LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME, + 0, error ) != 1 ) { libcerror_error_set( @@ -507,10 +510,10 @@ return( -1 ); } byte_stream_copy_to_uint32_big_endian( - ( (fshfs_volume_header_t *) data )->number_of_special_files, + ( (fshfs_volume_header_t *) data )->number_of_files, value_32bit ); libcnotify_printf( - "%s: number of special files\t\t: %" PRIu32 "\n", + "%s: number of files\t\t\t: %" PRIu32 "\n", function, value_32bit ); @@ -552,18 +555,18 @@ value_32bit ); byte_stream_copy_to_uint32_big_endian( - ( (fshfs_volume_header_t *) data )->resource_clump_size, + ( (fshfs_volume_header_t *) data )->resource_fork_clump_size, value_32bit ); libcnotify_printf( - "%s: resource clump size\t\t\t: %" PRIu32 "\n", + "%s: resource fork clump size\t\t: %" PRIu32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_big_endian( - ( (fshfs_volume_header_t *) data )->data_clump_size, + ( (fshfs_volume_header_t *) data )->data_fork_clump_size, value_32bit ); libcnotify_printf( - "%s: data clump size\t\t\t: %" PRIu32 "\n", + "%s: data fork clump size\t\t\t: %" PRIu32 "\n", function, value_32bit ); @@ -587,11 +590,12 @@ "%s: finder information:\n", function ); libcnotify_print_data( - ( (fshfs_volume_header_t *) data )->encodings_bitmap, + ( (fshfs_volume_header_t *) data )->finder_information, 32, 0 ); } -#endif +#endif /* defined( HAVE_DEBUG_OUTPUT ) */ + #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { @@ -745,27 +749,11 @@ file_offset ); } #endif - if( libbfio_handle_seek_offset( - file_io_handle, - file_offset, - SEEK_SET, - error ) == -1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_IO, - LIBCERROR_IO_ERROR_SEEK_FAILED, - "%s: unable to seek volume header offset: %" PRIi64 " (0x%08" PRIx64 ").", - function, - file_offset, - file_offset ); - - return( -1 ); - } - read_count = libbfio_handle_read_buffer( + read_count = libbfio_handle_read_buffer_at_offset( file_io_handle, (uint8_t *) &volume_header_data, 1024, + file_offset, error ); if( read_count != (ssize_t) 1024 ) @@ -774,8 +762,10 @@ error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, - "%s: unable to read volume header data.", - function ); + "%s: unable to read volume header data at offset: %" PRIi64 " (0x%08" PRIx64 ").", + function, + file_offset, + file_offset ); return( -1 ); } diff -Nru libfshfs-20201104/libfshfs/libfshfs_volume_header.h libfshfs-20240221/libfshfs/libfshfs_volume_header.h --- libfshfs-20201104/libfshfs/libfshfs_volume_header.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/libfshfs/libfshfs_volume_header.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Volume header functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libfshfs.pc.in libfshfs-20240221/libfshfs.pc.in --- libfshfs-20201104/libfshfs.pc.in 2020-11-04 04:19:34.000000000 +0000 +++ libfshfs-20240221/libfshfs.pc.in 2024-02-21 05:48:48.000000000 +0000 @@ -7,6 +7,6 @@ Description: Library to access the Hierarchical File System (HFS) format Version: @VERSION@ Libs: -L${libdir} -lfshfs -Libs.private: @ax_libbfio_pc_libs_private@ @ax_libcdata_pc_libs_private@ @ax_libcerror_pc_libs_private@ @ax_libcfile_pc_libs_private@ @ax_libclocale_pc_libs_private@ @ax_libcnotify_pc_libs_private@ @ax_libcpath_pc_libs_private@ @ax_libcsplit_pc_libs_private@ @ax_libcthreads_pc_libs_private@ @ax_libfcache_pc_libs_private@ @ax_libfdata_pc_libs_private@ @ax_libfdatetime_pc_libs_private@ @ax_libfguid_pc_libs_private@ @ax_libuna_pc_libs_private@ @ax_pthread_pc_libs_private@ @ax_zlib_pc_libs_private@ +Libs.private: @ax_libbfio_pc_libs_private@ @ax_libcdata_pc_libs_private@ @ax_libcerror_pc_libs_private@ @ax_libcfile_pc_libs_private@ @ax_libclocale_pc_libs_private@ @ax_libcnotify_pc_libs_private@ @ax_libcpath_pc_libs_private@ @ax_libcsplit_pc_libs_private@ @ax_libcthreads_pc_libs_private@ @ax_libfcache_pc_libs_private@ @ax_libfdata_pc_libs_private@ @ax_libfdatetime_pc_libs_private@ @ax_libfguid_pc_libs_private@ @ax_libfmos_pc_libs_private@ @ax_libuna_pc_libs_private@ @ax_pthread_pc_libs_private@ @ax_zlib_pc_libs_private@ Cflags: -I${includedir} diff -Nru libfshfs-20201104/libfshfs.spec libfshfs-20240221/libfshfs.spec --- libfshfs-20201104/libfshfs.spec 2020-11-04 11:56:45.000000000 +0000 +++ libfshfs-20240221/libfshfs.spec 2024-02-21 06:04:37.000000000 +0000 @@ -1,14 +1,13 @@ Name: libfshfs -Version: 20201104 +Version: 20240221 Release: 1 Summary: Library to access the Hierarchical File System (HFS) format Group: System Environment/Libraries -License: LGPL +License: LGPL-3.0-or-later Source: %{name}-%{version}.tar.gz URL: https://github.com/libyal/libfshfs -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -Requires: zlib -BuildRequires: gcc zlib-devel +Requires: zlib +BuildRequires: gcc zlib-devel %description -n libfshfs Library to access the Hierarchical File System (HFS) format @@ -29,22 +28,11 @@ %description -n libfshfs-devel Header files and libraries for developing applications for libfshfs. -%package -n libfshfs-python2 -Obsoletes: libfshfs-python < %{version} -Provides: libfshfs-python = %{version} -Summary: Python 2 bindings for libfshfs -Group: System Environment/Libraries -Requires: libfshfs = %{version}-%{release} python2 -BuildRequires: python2-devel - -%description -n libfshfs-python2 -Python 2 bindings for libfshfs - %package -n libfshfs-python3 Summary: Python 3 bindings for libfshfs Group: System Environment/Libraries Requires: libfshfs = %{version}-%{release} python3 -BuildRequires: python3-devel +BuildRequires: python3-devel python3-setuptools %description -n libfshfs-python3 Python 3 bindings for libfshfs @@ -52,8 +40,8 @@ %package -n libfshfs-tools Summary: Several tools for reading Hierarchical File System (HFS) volumes Group: Applications/System -Requires: libfshfs = %{version}-%{release} openssl -BuildRequires: openssl-devel +Requires: libfshfs = %{version}-%{release} openssl fuse-libs +BuildRequires: openssl-devel fuse-devel %description -n libfshfs-tools Several tools for reading Hierarchical File System (HFS) volumes @@ -62,7 +50,7 @@ %setup -q %build -%configure --prefix=/usr --libdir=%{_libdir} --mandir=%{_mandir} --enable-python2 --enable-python3 +%configure --prefix=/usr --libdir=%{_libdir} --mandir=%{_mandir} --enable-python make %{?_smp_mflags} %install @@ -77,51 +65,36 @@ %postun -p /sbin/ldconfig %files -n libfshfs -%defattr(644,root,root,755) %license COPYING COPYING.LESSER %doc AUTHORS README -%attr(755,root,root) %{_libdir}/*.so.* +%{_libdir}/*.so.* %files -n libfshfs-static -%defattr(644,root,root,755) %license COPYING COPYING.LESSER %doc AUTHORS README -%attr(755,root,root) %{_libdir}/*.a +%{_libdir}/*.a %files -n libfshfs-devel -%defattr(644,root,root,755) %license COPYING COPYING.LESSER %doc AUTHORS README -%{_libdir}/*.la %{_libdir}/*.so %{_libdir}/pkgconfig/libfshfs.pc %{_includedir}/* %{_mandir}/man3/* -%files -n libfshfs-python2 -%defattr(644,root,root,755) -%license COPYING COPYING.LESSER -%doc AUTHORS README -%{_libdir}/python2*/site-packages/*.a -%{_libdir}/python2*/site-packages/*.la -%{_libdir}/python2*/site-packages/*.so - %files -n libfshfs-python3 -%defattr(644,root,root,755) %license COPYING COPYING.LESSER %doc AUTHORS README %{_libdir}/python3*/site-packages/*.a -%{_libdir}/python3*/site-packages/*.la %{_libdir}/python3*/site-packages/*.so %files -n libfshfs-tools -%defattr(644,root,root,755) %license COPYING COPYING.LESSER %doc AUTHORS README -%attr(755,root,root) %{_bindir}/* +%{_bindir}/* %{_mandir}/man1/* %changelog -* Wed Nov 4 2020 Joachim Metz 20201104-1 +* Wed Feb 21 2024 Joachim Metz 20240221-1 - Auto-generated diff -Nru libfshfs-20201104/libfshfs.spec.in libfshfs-20240221/libfshfs.spec.in --- libfshfs-20201104/libfshfs.spec.in 2020-11-04 04:19:36.000000000 +0000 +++ libfshfs-20240221/libfshfs.spec.in 2024-02-21 05:48:48.000000000 +0000 @@ -3,12 +3,11 @@ Release: 1 Summary: Library to access the Hierarchical File System (HFS) format Group: System Environment/Libraries -License: LGPL +License: LGPL-3.0-or-later Source: %{name}-%{version}.tar.gz URL: https://github.com/libyal/libfshfs -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -@libfshfs_spec_requires@ @ax_libbfio_spec_requires@ @ax_libcdata_spec_requires@ @ax_libcerror_spec_requires@ @ax_libcfile_spec_requires@ @ax_libclocale_spec_requires@ @ax_libcnotify_spec_requires@ @ax_libcpath_spec_requires@ @ax_libcsplit_spec_requires@ @ax_libcthreads_spec_requires@ @ax_libfcache_spec_requires@ @ax_libfdata_spec_requires@ @ax_libfdatetime_spec_requires@ @ax_libfguid_spec_requires@ @ax_libuna_spec_requires@ @ax_zlib_spec_requires@ -BuildRequires: gcc @ax_libbfio_spec_build_requires@ @ax_libcdata_spec_build_requires@ @ax_libcerror_spec_build_requires@ @ax_libcfile_spec_build_requires@ @ax_libclocale_spec_build_requires@ @ax_libcnotify_spec_build_requires@ @ax_libcpath_spec_build_requires@ @ax_libcsplit_spec_build_requires@ @ax_libcthreads_spec_build_requires@ @ax_libfcache_spec_build_requires@ @ax_libfdata_spec_build_requires@ @ax_libfdatetime_spec_build_requires@ @ax_libfguid_spec_build_requires@ @ax_libuna_spec_build_requires@ @ax_zlib_spec_build_requires@ +@libfshfs_spec_requires@ @ax_libbfio_spec_requires@ @ax_libcdata_spec_requires@ @ax_libcerror_spec_requires@ @ax_libcfile_spec_requires@ @ax_libclocale_spec_requires@ @ax_libcnotify_spec_requires@ @ax_libcpath_spec_requires@ @ax_libcsplit_spec_requires@ @ax_libcthreads_spec_requires@ @ax_libfcache_spec_requires@ @ax_libfdata_spec_requires@ @ax_libfdatetime_spec_requires@ @ax_libfguid_spec_requires@ @ax_libfmos_spec_requires@ @ax_libuna_spec_requires@ @ax_zlib_spec_requires@ +BuildRequires: gcc @ax_libbfio_spec_build_requires@ @ax_libcdata_spec_build_requires@ @ax_libcerror_spec_build_requires@ @ax_libcfile_spec_build_requires@ @ax_libclocale_spec_build_requires@ @ax_libcnotify_spec_build_requires@ @ax_libcpath_spec_build_requires@ @ax_libcsplit_spec_build_requires@ @ax_libcthreads_spec_build_requires@ @ax_libfcache_spec_build_requires@ @ax_libfdata_spec_build_requires@ @ax_libfdatetime_spec_build_requires@ @ax_libfguid_spec_build_requires@ @ax_libfmos_spec_build_requires@ @ax_libuna_spec_build_requires@ @ax_zlib_spec_build_requires@ %description -n libfshfs Library to access the Hierarchical File System (HFS) format @@ -29,22 +28,11 @@ %description -n libfshfs-devel Header files and libraries for developing applications for libfshfs. -%package -n libfshfs-python2 -Obsoletes: libfshfs-python < %{version} -Provides: libfshfs-python = %{version} -Summary: Python 2 bindings for libfshfs -Group: System Environment/Libraries -Requires: libfshfs = %{version}-%{release} python2 -BuildRequires: python2-devel - -%description -n libfshfs-python2 -Python 2 bindings for libfshfs - %package -n libfshfs-python3 Summary: Python 3 bindings for libfshfs Group: System Environment/Libraries Requires: libfshfs = %{version}-%{release} python3 -BuildRequires: python3-devel +BuildRequires: python3-devel python3-setuptools %description -n libfshfs-python3 Python 3 bindings for libfshfs @@ -52,8 +40,8 @@ %package -n libfshfs-tools Summary: Several tools for reading Hierarchical File System (HFS) volumes Group: Applications/System -Requires: libfshfs = %{version}-%{release} @ax_libcrypto_spec_requires@ @ax_libhmac_spec_requires@ -@libfshfs_spec_tools_build_requires@ @ax_libcrypto_spec_build_requires@ @ax_libhmac_spec_build_requires@ +Requires: libfshfs = %{version}-%{release} @ax_libcrypto_spec_requires@ @ax_libfuse_spec_requires@ @ax_libhmac_spec_requires@ +@libfshfs_spec_tools_build_requires@ @ax_libcrypto_spec_build_requires@ @ax_libfuse_spec_build_requires@ @ax_libhmac_spec_build_requires@ %description -n libfshfs-tools Several tools for reading Hierarchical File System (HFS) volumes @@ -62,7 +50,7 @@ %setup -q %build -%configure --prefix=/usr --libdir=%{_libdir} --mandir=%{_mandir} --enable-python2 --enable-python3 +%configure --prefix=/usr --libdir=%{_libdir} --mandir=%{_mandir} --enable-python make %{?_smp_mflags} %install @@ -77,48 +65,33 @@ %postun -p /sbin/ldconfig %files -n libfshfs -%defattr(644,root,root,755) %license COPYING COPYING.LESSER %doc AUTHORS README -%attr(755,root,root) %{_libdir}/*.so.* +%{_libdir}/*.so.* %files -n libfshfs-static -%defattr(644,root,root,755) %license COPYING COPYING.LESSER %doc AUTHORS README -%attr(755,root,root) %{_libdir}/*.a +%{_libdir}/*.a %files -n libfshfs-devel -%defattr(644,root,root,755) %license COPYING COPYING.LESSER %doc AUTHORS README -%{_libdir}/*.la %{_libdir}/*.so %{_libdir}/pkgconfig/libfshfs.pc %{_includedir}/* %{_mandir}/man3/* -%files -n libfshfs-python2 -%defattr(644,root,root,755) -%license COPYING COPYING.LESSER -%doc AUTHORS README -%{_libdir}/python2*/site-packages/*.a -%{_libdir}/python2*/site-packages/*.la -%{_libdir}/python2*/site-packages/*.so - %files -n libfshfs-python3 -%defattr(644,root,root,755) %license COPYING COPYING.LESSER %doc AUTHORS README %{_libdir}/python3*/site-packages/*.a -%{_libdir}/python3*/site-packages/*.la %{_libdir}/python3*/site-packages/*.so %files -n libfshfs-tools -%defattr(644,root,root,755) %license COPYING COPYING.LESSER %doc AUTHORS README -%attr(755,root,root) %{_bindir}/* +%{_bindir}/* %{_mandir}/man1/* %changelog diff -Nru libfshfs-20201104/libhmac/Makefile.am libfshfs-20240221/libhmac/Makefile.am --- libfshfs-20201104/libhmac/Makefile.am 2020-11-04 11:56:11.000000000 +0000 +++ libfshfs-20240221/libhmac/Makefile.am 2024-02-21 06:04:12.000000000 +0000 @@ -2,7 +2,9 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/common \ - @LIBCERROR_CPPFLAGS@ + @LIBCERROR_CPPFLAGS@ \ + @LIBCRYPTO_CPPFLAGS@ \ + @PTHREAD_CPPFLAGS@ noinst_LTLIBRARIES = libhmac.la @@ -13,10 +15,15 @@ libhmac_error.c libhmac_error.h \ libhmac_libcerror.h \ libhmac_md5.c libhmac_md5.h \ + libhmac_md5_context.c libhmac_md5_context.h \ libhmac_sha1.c libhmac_sha1.h \ + libhmac_sha1_context.c libhmac_sha1_context.h \ libhmac_sha224.c libhmac_sha224.h \ + libhmac_sha224_context.c libhmac_sha224_context.h \ libhmac_sha256.c libhmac_sha256.h \ + libhmac_sha256_context.c libhmac_sha256_context.h \ libhmac_sha512.c libhmac_sha512.h \ + libhmac_sha512_context.c libhmac_sha512_context.h \ libhmac_support.c libhmac_support.h \ libhmac_types.h \ libhmac_unused.h @@ -26,9 +33,11 @@ Makefile.in distclean: clean - /bin/rm -f Makefile + -rm -f Makefile -splint: +sources-local: $(BUILT_SOURCES) + +splint-local: @echo "Running splint on libhmac ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libhmac_la_SOURCES) diff -Nru libfshfs-20201104/libhmac/Makefile.in libfshfs-20240221/libhmac/Makefile.in --- libfshfs-20201104/libhmac/Makefile.in 2020-11-04 11:56:31.000000000 +0000 +++ libfshfs-20240221/libhmac/Makefile.in 2024-02-21 06:04:26.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -91,25 +91,26 @@ subdir = libhmac ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcdata.m4 \ - $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \ - $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \ - $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcrypto.m4 \ - $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcthreads.m4 \ - $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ - $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ - $(top_srcdir)/m4/libhmac.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/libuna.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \ - $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \ - $(top_srcdir)/m4/zlib.m4 $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libbfio.m4 \ + $(top_srcdir)/m4/libcdata.m4 $(top_srcdir)/m4/libcerror.m4 \ + $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ + $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ + $(top_srcdir)/m4/libcrypto.m4 $(top_srcdir)/m4/libcsplit.m4 \ + $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \ + $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ + $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmos.m4 \ + $(top_srcdir)/m4/libfuse.m4 $(top_srcdir)/m4/libhmac.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/pthread.m4 \ + $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ + $(top_srcdir)/m4/types.m4 $(top_srcdir)/m4/zlib.m4 \ + $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) @@ -122,14 +123,26 @@ am__libhmac_la_SOURCES_DIST = libhmac_byte_stream.h \ libhmac_definitions.h libhmac_extern.h libhmac_error.c \ libhmac_error.h libhmac_libcerror.h libhmac_md5.c \ - libhmac_md5.h libhmac_sha1.c libhmac_sha1.h libhmac_sha224.c \ - libhmac_sha224.h libhmac_sha256.c libhmac_sha256.h \ - libhmac_sha512.c libhmac_sha512.h libhmac_support.c \ - libhmac_support.h libhmac_types.h libhmac_unused.h + libhmac_md5.h libhmac_md5_context.c libhmac_md5_context.h \ + libhmac_sha1.c libhmac_sha1.h libhmac_sha1_context.c \ + libhmac_sha1_context.h libhmac_sha224.c libhmac_sha224.h \ + libhmac_sha224_context.c libhmac_sha224_context.h \ + libhmac_sha256.c libhmac_sha256.h libhmac_sha256_context.c \ + libhmac_sha256_context.h libhmac_sha512.c libhmac_sha512.h \ + libhmac_sha512_context.c libhmac_sha512_context.h \ + libhmac_support.c libhmac_support.h libhmac_types.h \ + libhmac_unused.h @HAVE_LOCAL_LIBHMAC_TRUE@am_libhmac_la_OBJECTS = libhmac_error.lo \ -@HAVE_LOCAL_LIBHMAC_TRUE@ libhmac_md5.lo libhmac_sha1.lo \ -@HAVE_LOCAL_LIBHMAC_TRUE@ libhmac_sha224.lo libhmac_sha256.lo \ -@HAVE_LOCAL_LIBHMAC_TRUE@ libhmac_sha512.lo libhmac_support.lo +@HAVE_LOCAL_LIBHMAC_TRUE@ libhmac_md5.lo libhmac_md5_context.lo \ +@HAVE_LOCAL_LIBHMAC_TRUE@ libhmac_sha1.lo \ +@HAVE_LOCAL_LIBHMAC_TRUE@ libhmac_sha1_context.lo \ +@HAVE_LOCAL_LIBHMAC_TRUE@ libhmac_sha224.lo \ +@HAVE_LOCAL_LIBHMAC_TRUE@ libhmac_sha224_context.lo \ +@HAVE_LOCAL_LIBHMAC_TRUE@ libhmac_sha256.lo \ +@HAVE_LOCAL_LIBHMAC_TRUE@ libhmac_sha256_context.lo \ +@HAVE_LOCAL_LIBHMAC_TRUE@ libhmac_sha512.lo \ +@HAVE_LOCAL_LIBHMAC_TRUE@ libhmac_sha512_context.lo \ +@HAVE_LOCAL_LIBHMAC_TRUE@ libhmac_support.lo libhmac_la_OBJECTS = $(am_libhmac_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) @@ -152,9 +165,17 @@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/libhmac_error.Plo \ - ./$(DEPDIR)/libhmac_md5.Plo ./$(DEPDIR)/libhmac_sha1.Plo \ - ./$(DEPDIR)/libhmac_sha224.Plo ./$(DEPDIR)/libhmac_sha256.Plo \ - ./$(DEPDIR)/libhmac_sha512.Plo ./$(DEPDIR)/libhmac_support.Plo + ./$(DEPDIR)/libhmac_md5.Plo \ + ./$(DEPDIR)/libhmac_md5_context.Plo \ + ./$(DEPDIR)/libhmac_sha1.Plo \ + ./$(DEPDIR)/libhmac_sha1_context.Plo \ + ./$(DEPDIR)/libhmac_sha224.Plo \ + ./$(DEPDIR)/libhmac_sha224_context.Plo \ + ./$(DEPDIR)/libhmac_sha256.Plo \ + ./$(DEPDIR)/libhmac_sha256_context.Plo \ + ./$(DEPDIR)/libhmac_sha512.Plo \ + ./$(DEPDIR)/libhmac_sha512_context.Plo \ + ./$(DEPDIR)/libhmac_support.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -181,6 +202,7 @@ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -198,8 +220,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ @@ -216,6 +236,8 @@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ @@ -231,8 +253,10 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -252,6 +276,8 @@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ +HAVE_LIBFMOS = @HAVE_LIBFMOS@ +HAVE_LIBFUSE = @HAVE_LIBFUSE@ HAVE_LIBHMAC = @HAVE_LIBHMAC@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ @@ -267,6 +293,7 @@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ +HAVE_LOCAL_LIBFMOS = @HAVE_LOCAL_LIBFMOS@ HAVE_LOCAL_LIBHMAC = @HAVE_LOCAL_LIBHMAC@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ @@ -320,8 +347,12 @@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ +LIBFMOS_CPPFLAGS = @LIBFMOS_CPPFLAGS@ +LIBFMOS_LIBADD = @LIBFMOS_LIBADD@ LIBFSHFS_DLL_EXPORT = @LIBFSHFS_DLL_EXPORT@ LIBFSHFS_DLL_IMPORT = @LIBFSHFS_DLL_IMPORT@ +LIBFUSE_CPPFLAGS = @LIBFUSE_CPPFLAGS@ +LIBFUSE_LIBADD = @LIBFUSE_LIBADD@ LIBHMAC_CPPFLAGS = @LIBHMAC_CPPFLAGS@ LIBHMAC_LIBADD = @LIBHMAC_LIBADD@ LIBICONV = @LIBICONV@ @@ -343,8 +374,8 @@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ @@ -367,26 +398,6 @@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ -PYTHON2 = @PYTHON2@ -PYTHON2_CONFIG = @PYTHON2_CONFIG@ -PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ -PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ -PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ -PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ -PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ -PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ -PYTHON2_PREFIX = @PYTHON2_PREFIX@ -PYTHON2_VERSION = @PYTHON2_VERSION@ -PYTHON3 = @PYTHON3@ -PYTHON3_CONFIG = @PYTHON3_CONFIG@ -PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ -PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ -PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ -PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ -PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ -PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ -PYTHON3_PREFIX = @PYTHON3_PREFIX@ -PYTHON3_VERSION = @PYTHON3_VERSION@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ @@ -464,6 +475,12 @@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ +ax_libfmos_pc_libs_private = @ax_libfmos_pc_libs_private@ +ax_libfmos_spec_build_requires = @ax_libfmos_spec_build_requires@ +ax_libfmos_spec_requires = @ax_libfmos_spec_requires@ +ax_libfuse_pc_libs_private = @ax_libfuse_pc_libs_private@ +ax_libfuse_spec_build_requires = @ax_libfuse_spec_build_requires@ +ax_libfuse_spec_requires = @ax_libfuse_spec_requires@ ax_libhmac_pc_libs_private = @ax_libhmac_pc_libs_private@ ax_libhmac_spec_build_requires = @ax_libhmac_spec_build_requires@ ax_libhmac_spec_requires = @ax_libhmac_spec_requires@ @@ -488,6 +505,8 @@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +fuse_CFLAGS = @fuse_CFLAGS@ +fuse_LIBS = @fuse_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -525,6 +544,8 @@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ +libfmos_CFLAGS = @libfmos_CFLAGS@ +libfmos_LIBS = @libfmos_LIBS@ libfshfs_spec_requires = @libfshfs_spec_requires@ libfshfs_spec_tools_build_requires = @libfshfs_spec_tools_build_requires@ libhmac_CFLAGS = @libhmac_CFLAGS@ @@ -543,11 +564,8 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ -pyexecdir2 = @pyexecdir2@ -pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ -pythondir2 = @pythondir2@ -pythondir3 = @pythondir3@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -561,7 +579,9 @@ @HAVE_LOCAL_LIBHMAC_TRUE@AM_CPPFLAGS = \ @HAVE_LOCAL_LIBHMAC_TRUE@ -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBHMAC_TRUE@ -I$(top_srcdir)/common \ -@HAVE_LOCAL_LIBHMAC_TRUE@ @LIBCERROR_CPPFLAGS@ +@HAVE_LOCAL_LIBHMAC_TRUE@ @LIBCERROR_CPPFLAGS@ \ +@HAVE_LOCAL_LIBHMAC_TRUE@ @LIBCRYPTO_CPPFLAGS@ \ +@HAVE_LOCAL_LIBHMAC_TRUE@ @PTHREAD_CPPFLAGS@ @HAVE_LOCAL_LIBHMAC_TRUE@noinst_LTLIBRARIES = libhmac.la @HAVE_LOCAL_LIBHMAC_TRUE@libhmac_la_SOURCES = \ @@ -571,10 +591,15 @@ @HAVE_LOCAL_LIBHMAC_TRUE@ libhmac_error.c libhmac_error.h \ @HAVE_LOCAL_LIBHMAC_TRUE@ libhmac_libcerror.h \ @HAVE_LOCAL_LIBHMAC_TRUE@ libhmac_md5.c libhmac_md5.h \ +@HAVE_LOCAL_LIBHMAC_TRUE@ libhmac_md5_context.c libhmac_md5_context.h \ @HAVE_LOCAL_LIBHMAC_TRUE@ libhmac_sha1.c libhmac_sha1.h \ +@HAVE_LOCAL_LIBHMAC_TRUE@ libhmac_sha1_context.c libhmac_sha1_context.h \ @HAVE_LOCAL_LIBHMAC_TRUE@ libhmac_sha224.c libhmac_sha224.h \ +@HAVE_LOCAL_LIBHMAC_TRUE@ libhmac_sha224_context.c libhmac_sha224_context.h \ @HAVE_LOCAL_LIBHMAC_TRUE@ libhmac_sha256.c libhmac_sha256.h \ +@HAVE_LOCAL_LIBHMAC_TRUE@ libhmac_sha256_context.c libhmac_sha256_context.h \ @HAVE_LOCAL_LIBHMAC_TRUE@ libhmac_sha512.c libhmac_sha512.h \ +@HAVE_LOCAL_LIBHMAC_TRUE@ libhmac_sha512_context.c libhmac_sha512_context.h \ @HAVE_LOCAL_LIBHMAC_TRUE@ libhmac_support.c libhmac_support.h \ @HAVE_LOCAL_LIBHMAC_TRUE@ libhmac_types.h \ @HAVE_LOCAL_LIBHMAC_TRUE@ libhmac_unused.h @@ -638,10 +663,15 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhmac_error.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhmac_md5.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhmac_md5_context.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhmac_sha1.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhmac_sha1_context.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhmac_sha224.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhmac_sha224_context.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhmac_sha256.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhmac_sha256_context.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhmac_sha512.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhmac_sha512_context.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhmac_support.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @@ -676,6 +706,8 @@ clean-libtool: -rm -rf .libs _libs +sources-local: +splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique @@ -728,7 +760,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am @@ -848,10 +879,15 @@ maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/libhmac_error.Plo -rm -f ./$(DEPDIR)/libhmac_md5.Plo + -rm -f ./$(DEPDIR)/libhmac_md5_context.Plo -rm -f ./$(DEPDIR)/libhmac_sha1.Plo + -rm -f ./$(DEPDIR)/libhmac_sha1_context.Plo -rm -f ./$(DEPDIR)/libhmac_sha224.Plo + -rm -f ./$(DEPDIR)/libhmac_sha224_context.Plo -rm -f ./$(DEPDIR)/libhmac_sha256.Plo + -rm -f ./$(DEPDIR)/libhmac_sha256_context.Plo -rm -f ./$(DEPDIR)/libhmac_sha512.Plo + -rm -f ./$(DEPDIR)/libhmac_sha512_context.Plo -rm -f ./$(DEPDIR)/libhmac_support.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -869,6 +905,14 @@ ps-am: +sources: sources-am + +sources-am: sources-local + +splint: splint-am + +splint-am: splint-local + uninstall-am: .MAKE: install-am install-strip @@ -885,15 +929,18 @@ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am + sources-am sources-local splint-am splint-local tags tags-am \ + uninstall uninstall-am .PRECIOUS: Makefile distclean: clean - /bin/rm -f Makefile + -rm -f Makefile + +sources-local: $(BUILT_SOURCES) -splint: +splint-local: @echo "Running splint on libhmac ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libhmac_la_SOURCES) diff -Nru libfshfs-20201104/libhmac/libhmac_byte_stream.h libfshfs-20240221/libhmac/libhmac_byte_stream.h --- libfshfs-20201104/libhmac/libhmac_byte_stream.h 2020-11-04 11:56:11.000000000 +0000 +++ libfshfs-20240221/libhmac/libhmac_byte_stream.h 2024-02-21 06:04:12.000000000 +0000 @@ -1,7 +1,7 @@ /* * Byte stream functions * - * Copyright (C) 2011-2020, Joachim Metz + * Copyright (C) 2011-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libhmac/libhmac_definitions.h libfshfs-20240221/libhmac/libhmac_definitions.h --- libfshfs-20201104/libhmac/libhmac_definitions.h 2020-11-04 11:56:11.000000000 +0000 +++ libfshfs-20240221/libhmac/libhmac_definitions.h 2024-02-21 06:04:12.000000000 +0000 @@ -1,7 +1,7 @@ /* * The internal definitions * - * Copyright (C) 2011-2020, Joachim Metz + * Copyright (C) 2011-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -34,11 +34,11 @@ * for local use of libhmac */ #else -#define LIBHMAC_VERSION 20200104 +#define LIBHMAC_VERSION 20240129 /* The libhmac version string */ -#define LIBHMAC_VERSION_STRING "20200104" +#define LIBHMAC_VERSION_STRING "20240129" /* The digest hash sizes */ diff -Nru libfshfs-20201104/libhmac/libhmac_error.c libfshfs-20240221/libhmac/libhmac_error.c --- libfshfs-20201104/libhmac/libhmac_error.c 2020-11-04 11:56:11.000000000 +0000 +++ libfshfs-20240221/libhmac/libhmac_error.c 2024-02-21 06:04:12.000000000 +0000 @@ -1,7 +1,7 @@ /* * Error functions * - * Copyright (C) 2011-2020, Joachim Metz + * Copyright (C) 2011-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libhmac/libhmac_error.h libfshfs-20240221/libhmac/libhmac_error.h --- libfshfs-20201104/libhmac/libhmac_error.h 2020-11-04 11:56:11.000000000 +0000 +++ libfshfs-20240221/libhmac/libhmac_error.h 2024-02-21 06:04:12.000000000 +0000 @@ -1,7 +1,7 @@ /* * Error functions * - * Copyright (C) 2011-2020, Joachim Metz + * Copyright (C) 2011-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libhmac/libhmac_extern.h libfshfs-20240221/libhmac/libhmac_extern.h --- libfshfs-20201104/libhmac/libhmac_extern.h 2020-11-04 11:56:11.000000000 +0000 +++ libfshfs-20240221/libhmac/libhmac_extern.h 2024-02-21 06:04:12.000000000 +0000 @@ -1,7 +1,7 @@ /* * The internal extern definition * - * Copyright (C) 2011-2020, Joachim Metz + * Copyright (C) 2011-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -30,7 +30,11 @@ #include +#if defined( __CYGWIN__ ) || defined( __MINGW32__ ) +#define LIBHMAC_EXTERN_VARIABLE extern +#else #define LIBHMAC_EXTERN_VARIABLE LIBHMAC_EXTERN +#endif #else #define LIBHMAC_EXTERN /* extern */ diff -Nru libfshfs-20201104/libhmac/libhmac_libcerror.h libfshfs-20240221/libhmac/libhmac_libcerror.h --- libfshfs-20201104/libhmac/libhmac_libcerror.h 2020-11-04 11:56:11.000000000 +0000 +++ libfshfs-20240221/libhmac/libhmac_libcerror.h 2024-02-21 06:04:12.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libcerror header wrapper * - * Copyright (C) 2011-2020, Joachim Metz + * Copyright (C) 2011-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libhmac/libhmac_md5.c libfshfs-20240221/libhmac/libhmac_md5.c --- libfshfs-20201104/libhmac/libhmac_md5.c 2020-11-04 11:56:11.000000000 +0000 +++ libfshfs-20240221/libhmac/libhmac_md5.c 2024-02-21 06:04:12.000000000 +0000 @@ -1,7 +1,7 @@ /* * MD5 functions * - * Copyright (C) 2011-2020, Joachim Metz + * Copyright (C) 2011-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -20,402 +20,13 @@ */ #include -#include #include #include -#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_MD5_H ) -#include - -#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) -#include -#include - -#endif - -#include "libhmac_byte_stream.h" #include "libhmac_definitions.h" #include "libhmac_libcerror.h" #include "libhmac_md5.h" - -#if !defined( LIBHMAC_HAVE_MD5_SUPPORT ) - -/* RFC 1321 based MD5 functions - */ - -/* TODO decription what these values are based on - */ -uint32_t libhmac_md5_fixed_constants[ 4 ] = { - 0x67452301UL, 0xefcdab89UL, 0x98badcfeUL, 0x10325476UL -}; - -/* The first 32-bits of the sines (in radians) of the first 64 integers [ 0, 63 ] - */ -uint32_t libhmac_md5_sines[ 64 ] = { - 0xd76aa478UL, 0xe8c7b756UL, 0x242070dbUL, 0xc1bdceeeUL, - 0xf57c0fafUL, 0x4787c62aUL, 0xa8304613UL, 0xfd469501UL, - 0x698098d8UL, 0x8b44f7afUL, 0xffff5bb1UL, 0x895cd7beUL, - 0x6b901122UL, 0xfd987193UL, 0xa679438eUL, 0x49b40821UL, - 0xf61e2562UL, 0xc040b340UL, 0x265e5a51UL, 0xe9b6c7aaUL, - 0xd62f105dUL, 0x02441453UL, 0xd8a1e681UL, 0xe7d3fbc8UL, - 0x21e1cde6UL, 0xc33707d6UL, 0xf4d50d87UL, 0x455a14edUL, - 0xa9e3e905UL, 0xfcefa3f8UL, 0x676f02d9UL, 0x8d2a4c8aUL, - 0xfffa3942UL, 0x8771f681UL, 0x6d9d6122UL, 0xfde5380cUL, - 0xa4beea44UL, 0x4bdecfa9UL, 0xf6bb4b60UL, 0xbebfbc70UL, - 0x289b7ec6UL, 0xeaa127faUL, 0xd4ef3085UL, 0x04881d05UL, - 0xd9d4d039UL, 0xe6db99e5UL, 0x1fa27cf8UL, 0xc4ac5665UL, - 0xf4292244UL, 0x432aff97UL, 0xab9423a7UL, 0xfc93a039UL, - 0x655b59c3UL, 0x8f0ccc92UL, 0xffeff47dUL, 0x85845dd1UL, - 0x6fa87e4fUL, 0xfe2ce6e0UL, 0xa3014314UL, 0x4e0811a1UL, - 0xf7537e82UL, 0xbd3af235UL, 0x2ad7d2bbUL, 0xeb86d391UL -}; - -/* The bit shifts - */ -uint8_t libhmac_md5_bit_shifts[ 64 ] = { - 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, - 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, - 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, - 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21 -}; - -/* The 32-bit values indexes - * [ 0, 15 ] => index - * [ 16, 31 ] => ( ( 5 x index ) + 1 ) mod 16 - * [ 32, 47 ] => ( ( 3 x index ) + 5 ) mod 16 - * [ 48, 63 ] => ( 7 x index ) mod 16 - */ -uint8_t libhmac_md5_values_32bit_index[ 64 ] = { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 1, 6, 11, 0, 5, 10, 15, 4, 9, 14, 3, 8, 13, 2, 7, 12, - 5, 8, 11, 14, 1, 4, 7, 10, 13, 0, 3, 6, 9, 12, 15, 2, - 0, 7, 14, 5, 12, 3, 10, 1, 8, 15, 6, 13, 4, 11, 2, 9 -}; - -#define libhmac_md5_transform_unfolded_calculate_hash_value_round1( values_32bit, value_32bit_index, hash_values, hash_value_index0, hash_value_index1, hash_value_index2, hash_value_index3, block_index ) \ - hash_values[ hash_value_index0 ] += ( hash_values[ hash_value_index1 ] & hash_values[ hash_value_index2 ] ) \ - | ( ~( hash_values[ hash_value_index1 ] ) & hash_values[ hash_value_index3 ] ); \ - hash_values[ hash_value_index0 ] += values_32bit[ value_32bit_index ]; \ - hash_values[ hash_value_index0 ] += libhmac_md5_sines[ block_index ]; \ -\ - hash_values[ hash_value_index0 ] = byte_stream_bit_rotate_left_32bit( \ - hash_values[ hash_value_index0 ], \ - libhmac_md5_bit_shifts[ block_index ] ); \ -\ - hash_values[ hash_value_index0 ] += hash_values[ hash_value_index1 ]; - -#define libhmac_md5_transform_unfolded_calculate_hash_value_round2( values_32bit, value_32bit_index, hash_values, hash_value_index0, hash_value_index1, hash_value_index2, hash_value_index3, block_index ) \ - hash_values[ hash_value_index0 ] += ( hash_values[ hash_value_index1 ] & hash_values[ hash_value_index3 ] ) \ - | ( hash_values[ hash_value_index2 ] & ~( hash_values[ hash_value_index3 ] ) ); \ - hash_values[ hash_value_index0 ] += values_32bit[ value_32bit_index ]; \ - hash_values[ hash_value_index0 ] += libhmac_md5_sines[ block_index ]; \ -\ - hash_values[ hash_value_index0 ] = byte_stream_bit_rotate_left_32bit( \ - hash_values[ hash_value_index0 ], \ - libhmac_md5_bit_shifts[ block_index ] ); \ -\ - hash_values[ hash_value_index0 ] += hash_values[ hash_value_index1 ]; - -#define libhmac_md5_transform_unfolded_calculate_hash_value_round3( values_32bit, value_32bit_index, hash_values, hash_value_index0, hash_value_index1, hash_value_index2, hash_value_index3, block_index ) \ - hash_values[ hash_value_index0 ] += hash_values[ hash_value_index1 ] \ - ^ hash_values[ hash_value_index2 ] \ - ^ hash_values[ hash_value_index3 ]; \ - hash_values[ hash_value_index0 ] += values_32bit[ value_32bit_index ]; \ - hash_values[ hash_value_index0 ] += libhmac_md5_sines[ block_index ]; \ -\ - hash_values[ hash_value_index0 ] = byte_stream_bit_rotate_left_32bit( \ - hash_values[ hash_value_index0 ], \ - libhmac_md5_bit_shifts[ block_index ] ); \ -\ - hash_values[ hash_value_index0 ] += hash_values[ hash_value_index1 ]; - -#define libhmac_md5_transform_unfolded_calculate_hash_value_round4( values_32bit, value_32bit_index, hash_values, hash_value_index0, hash_value_index1, hash_value_index2, hash_value_index3, block_index ) \ - hash_values[ hash_value_index0 ] += hash_values[ hash_value_index2 ] \ - ^ ( hash_values[ hash_value_index1 ] | ~( hash_values[ hash_value_index3 ] ) ); \ - hash_values[ hash_value_index0 ] += values_32bit[ value_32bit_index ]; \ - hash_values[ hash_value_index0 ] += libhmac_md5_sines[ block_index ]; \ -\ - hash_values[ hash_value_index0 ] = byte_stream_bit_rotate_left_32bit( \ - hash_values[ hash_value_index0 ], \ - libhmac_md5_bit_shifts[ block_index ] ); \ -\ - hash_values[ hash_value_index0 ] += hash_values[ hash_value_index1 ]; - -#define libhmac_md5_transform_unfolded_calculate_hash_values( values_32bit, hash_values ) \ - libhmac_md5_transform_unfolded_calculate_hash_value_round1( values_32bit, 0, hash_values, 0, 1, 2, 3, 0 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round1( values_32bit, 1, hash_values, 3, 0, 1, 2, 1 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round1( values_32bit, 2, hash_values, 2, 3, 0, 1, 2 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round1( values_32bit, 3, hash_values, 1, 2, 3, 0, 3 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round1( values_32bit, 4, hash_values, 0, 1, 2, 3, 4 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round1( values_32bit, 5, hash_values, 3, 0, 1, 2, 5 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round1( values_32bit, 6, hash_values, 2, 3, 0, 1, 6 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round1( values_32bit, 7, hash_values, 1, 2, 3, 0, 7 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round1( values_32bit, 8, hash_values, 0, 1, 2, 3, 8 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round1( values_32bit, 9, hash_values, 3, 0, 1, 2, 9 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round1( values_32bit, 10, hash_values, 2, 3, 0, 1, 10 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round1( values_32bit, 11, hash_values, 1, 2, 3, 0, 11 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round1( values_32bit, 12, hash_values, 0, 1, 2, 3, 12 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round1( values_32bit, 13, hash_values, 3, 0, 1, 2, 13 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round1( values_32bit, 14, hash_values, 2, 3, 0, 1, 14 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round1( values_32bit, 15, hash_values, 1, 2, 3, 0, 15 ); \ -\ - libhmac_md5_transform_unfolded_calculate_hash_value_round2( values_32bit, 1, hash_values, 0, 1, 2, 3, 16 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round2( values_32bit, 6, hash_values, 3, 0, 1, 2, 17 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round2( values_32bit, 11, hash_values, 2, 3, 0, 1, 18 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round2( values_32bit, 0, hash_values, 1, 2, 3, 0, 19 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round2( values_32bit, 5, hash_values, 0, 1, 2, 3, 20 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round2( values_32bit, 10, hash_values, 3, 0, 1, 2, 21 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round2( values_32bit, 15, hash_values, 2, 3, 0, 1, 22 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round2( values_32bit, 4, hash_values, 1, 2, 3, 0, 23 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round2( values_32bit, 9, hash_values, 0, 1, 2, 3, 24 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round2( values_32bit, 14, hash_values, 3, 0, 1, 2, 25 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round2( values_32bit, 3, hash_values, 2, 3, 0, 1, 26 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round2( values_32bit, 8, hash_values, 1, 2, 3, 0, 27 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round2( values_32bit, 13, hash_values, 0, 1, 2, 3, 28 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round2( values_32bit, 2, hash_values, 3, 0, 1, 2, 29 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round2( values_32bit, 7, hash_values, 2, 3, 0, 1, 30 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round2( values_32bit, 12, hash_values, 1, 2, 3, 0, 31 ); \ -\ - libhmac_md5_transform_unfolded_calculate_hash_value_round3( values_32bit, 5, hash_values, 0, 1, 2, 3, 32 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round3( values_32bit, 8, hash_values, 3, 0, 1, 2, 33 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round3( values_32bit, 11, hash_values, 2, 3, 0, 1, 34 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round3( values_32bit, 14, hash_values, 1, 2, 3, 0, 35 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round3( values_32bit, 1, hash_values, 0, 1, 2, 3, 36 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round3( values_32bit, 4, hash_values, 3, 0, 1, 2, 37 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round3( values_32bit, 7, hash_values, 2, 3, 0, 1, 38 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round3( values_32bit, 10, hash_values, 1, 2, 3, 0, 39 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round3( values_32bit, 13, hash_values, 0, 1, 2, 3, 40 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round3( values_32bit, 0, hash_values, 3, 0, 1, 2, 41 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round3( values_32bit, 3, hash_values, 2, 3, 0, 1, 42 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round3( values_32bit, 6, hash_values, 1, 2, 3, 0, 43 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round3( values_32bit, 9, hash_values, 0, 1, 2, 3, 44 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round3( values_32bit, 12, hash_values, 3, 0, 1, 2, 45 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round3( values_32bit, 15, hash_values, 2, 3, 0, 1, 46 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round3( values_32bit, 2, hash_values, 1, 2, 3, 0, 47 ); \ -\ - libhmac_md5_transform_unfolded_calculate_hash_value_round4( values_32bit, 0, hash_values, 0, 1, 2, 3, 48 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round4( values_32bit, 7, hash_values, 3, 0, 1, 2, 49 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round4( values_32bit, 14, hash_values, 2, 3, 0, 1, 50 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round4( values_32bit, 5, hash_values, 1, 2, 3, 0, 51 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round4( values_32bit, 12, hash_values, 0, 1, 2, 3, 52 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round4( values_32bit, 3, hash_values, 3, 0, 1, 2, 53 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round4( values_32bit, 10, hash_values, 2, 3, 0, 1, 54 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round4( values_32bit, 1, hash_values, 1, 2, 3, 0, 55 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round4( values_32bit, 8, hash_values, 0, 1, 2, 3, 56 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round4( values_32bit, 15, hash_values, 3, 0, 1, 2, 57 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round4( values_32bit, 6, hash_values, 2, 3, 0, 1, 58 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round4( values_32bit, 13, hash_values, 1, 2, 3, 0, 59 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round4( values_32bit, 4, hash_values, 0, 1, 2, 3, 60 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round4( values_32bit, 11, hash_values, 3, 0, 1, 2, 61 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round4( values_32bit, 2, hash_values, 2, 3, 0, 1, 62 ); \ - libhmac_md5_transform_unfolded_calculate_hash_value_round4( values_32bit, 9, hash_values, 1, 2, 3, 0, 63 ); - -/* Calculates the MD5 of 64 byte sized blocks of data in a buffer - * Returns the number of bytes used if successful or -1 on error - */ -ssize_t libhmac_md5_transform( - libhmac_internal_md5_context_t *internal_context, - const uint8_t *buffer, - size_t size, - libcerror_error_t **error ) -{ - uint32_t hash_values[ 4 ]; - uint32_t values_32bit[ 16 ]; - - static char *function = "libhmac_md5_transform"; - size_t buffer_offset = 0; - -#if !defined( LIBHMAC_UNFOLLED_LOOPS ) - uint32_t hash_value = 0; - uint8_t block_index = 0; - uint8_t hash_values_index = 0; - uint8_t value_32bit_index = 0; -#endif - - if( internal_context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid internal context.", - function ); - - return( -1 ); - } - if( buffer == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid buffer.", - function ); - - return( -1 ); - } - if( size > (size_t) SSIZE_MAX ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, - "%s: invalid size value exceeds maximum.", - function ); - - return( -1 ); - } - while( size >= LIBHMAC_MD5_BLOCK_SIZE ) - { - if( memory_copy( - hash_values, - internal_context->hash_values, - sizeof( uint32_t ) * 4 ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_COPY_FAILED, - "%s: unable to copy hash values.", - function ); - - goto on_error; - } -#if defined( LIBHMAC_UNFOLLED_LOOPS ) - /* Break the block into 16 x 32-bit values - */ - libhmac_byte_stream_copy_to_16x_uint32_little_endian( - &( buffer[ buffer_offset ] ), - values_32bit ); - - buffer_offset += LIBHMAC_MD5_BLOCK_SIZE; - - /* Calculate the hash values for the 32-bit values - */ - libhmac_md5_transform_unfolded_calculate_hash_values( - values_32bit, - hash_values ); - - /* Update the hash values in the context - */ - internal_context->hash_values[ 0 ] += hash_values[ 0 ]; - internal_context->hash_values[ 1 ] += hash_values[ 1 ]; - internal_context->hash_values[ 2 ] += hash_values[ 2 ]; - internal_context->hash_values[ 3 ] += hash_values[ 3 ]; - -#else - /* Break the block into 16 x 32-bit values - */ - for( value_32bit_index = 0; - value_32bit_index < 16; - value_32bit_index++ ) - { - byte_stream_copy_to_uint32_little_endian( - &( buffer[ buffer_offset ] ), - values_32bit[ value_32bit_index ] ); - - buffer_offset += sizeof( uint32_t ); - } - /* Calculate the hash values for the 32-bit values - */ - for( block_index = 0; - block_index < 64; - block_index++ ) - { - if( block_index < 16 ) - { - hash_values[ 0 ] += ( hash_values[ 1 ] & hash_values[ 2 ] ) - | ( ~( hash_values[ 1 ] ) & hash_values[ 3 ] ); - } - else if( block_index < 32 ) - { - hash_values[ 0 ] += ( hash_values[ 1 ] & hash_values[ 3 ] ) - | ( hash_values[ 2 ] & ~( hash_values[ 3 ] ) ); - } - else if( block_index < 48 ) - { - hash_values[ 0 ] += hash_values[ 1 ] - ^ hash_values[ 2 ] - ^ hash_values[ 3 ]; - } - else - { - hash_values[ 0 ] += hash_values[ 2 ] - ^ ( hash_values[ 1 ] | ~( hash_values[ 3 ] ) ); - } - value_32bit_index = libhmac_md5_values_32bit_index[ block_index ]; - - hash_values[ 0 ] += values_32bit[ value_32bit_index ]; - hash_values[ 0 ] += libhmac_md5_sines[ block_index ]; - hash_values[ 0 ] = byte_stream_bit_rotate_left_32bit( - hash_values[ 0 ], - libhmac_md5_bit_shifts[ block_index ] ); - - hash_value = hash_values[ 3 ]; - hash_values[ 3 ] = hash_values[ 2 ]; - hash_values[ 2 ] = hash_values[ 1 ]; - hash_values[ 1 ] += hash_values[ 0 ]; - hash_values[ 0 ] = hash_value; - } - /* Update the hash values in the context - */ - for( hash_values_index = 0; - hash_values_index < 4; - hash_values_index++ ) - { - internal_context->hash_values[ hash_values_index ] += hash_values[ hash_values_index ]; - } -#endif /* defined( LIBHMAC_UNFOLLED_LOOPS ) */ - - size -= LIBHMAC_MD5_BLOCK_SIZE; - } - /* Prevent sensitive data from leaking - */ - if( memory_set( - hash_values, - 0, - sizeof( uint32_t ) * 4 ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_SET_FAILED, - "%s: unable to clear hash values.", - function ); - - goto on_error; - } - if( memory_set( - values_32bit, - 0, - sizeof( uint32_t ) * 16 ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_SET_FAILED, - "%s: unable to clear 32-bit values.", - function ); - - goto on_error; - } - return( (ssize_t) buffer_offset ); - -on_error: - memory_set( - values_32bit, - 0, - sizeof( uint32_t ) * 16 ); - - memory_set( - hash_values, - 0, - sizeof( uint32_t ) * 4 ); - - return( -1 ); -} - -#endif /* !defined( LIBHMAC_HAVE_MD5_SUPPORT ) */ +#include "libhmac_md5_context.h" /* Creates a MD5 context * Make sure the value context is referencing, is set to NULL @@ -425,65 +36,11 @@ libhmac_md5_context_t **context, libcerror_error_t **error ) { - libhmac_internal_md5_context_t *internal_context = NULL; - static char *function = "libhmac_md5_initialize"; - - if( context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid context.", - function ); + static char *function = "libhmac_md5_initialize"; - return( -1 ); - } - if( *context != NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, - "%s: invalid context value already set.", - function ); - - return( -1 ); - } - internal_context = memory_allocate_structure( - libhmac_internal_md5_context_t ); - - if( internal_context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_INSUFFICIENT, - "%s: unable to create context.", - function ); - - goto on_error; - } - if( memory_set( - internal_context, - 0, - sizeof( libhmac_internal_md5_context_t ) ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_SET_FAILED, - "%s: unable to clear context.", - function ); - - memory_free( - internal_context ); - - return( -1 ); - } -#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_MD5_H ) && defined( MD5_DIGEST_LENGTH ) - if( MD5_Init( - &( internal_context->md5_context ) ) != 1 ) + if( libhmac_md5_context_initialize( + context, + error ) != 1 ) { libcerror_error_set( error, @@ -492,84 +49,9 @@ "%s: unable to initialize context.", function ); - goto on_error; - } - -#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_MD5 ) -#if defined( HAVE_EVP_MD_CTX_INIT ) - EVP_MD_CTX_init( - &( internal_context->internal_evp_md_context ) ); - - internal_context->evp_md_context = &( internal_context->internal_evp_md_context ); -#else - internal_context->evp_md_context = EVP_MD_CTX_new(); - - if( internal_context->evp_md_context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, - "%s: unable to create EVP message digest context.", - function ); - - goto on_error; - } -#endif /* defined( HAVE_EVP_MD_CTX_INIT ) */ - - if( EVP_DigestInit_ex( - internal_context->evp_md_context, - EVP_md5(), - NULL ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, - "%s: unable to initialize EVP message digest context.", - function ); - -#if defined( HAVE_EVP_MD_CTX_CLEANUP ) - EVP_MD_CTX_cleanup( - &( internal_context->internal_evp_md_context ) ); - ERR_remove_thread_state( - NULL ); -#else - EVP_MD_CTX_free( - internal_context->evp_md_context ); -#endif - internal_context->evp_md_context = NULL; - - goto on_error; - } -#else - if( memory_copy( - internal_context->hash_values, - libhmac_md5_fixed_constants, - sizeof( uint32_t ) * 4 ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_COPY_FAILED, - "%s: unable to copy fixed constants to hash values.", - function ); - - goto on_error; + return( -1 ); } -#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_MD5_H ) && defined( MD5_DIGEST_LENGTH ) */ - - *context = (libhmac_md5_context_t *) internal_context; - return( 1 ); - -on_error: - if( internal_context != NULL ) - { - memory_free( - internal_context ); - } - return( -1 ); } /* Frees a MD5 context @@ -579,133 +61,17 @@ libhmac_md5_context_t **context, libcerror_error_t **error ) { - libhmac_internal_md5_context_t *internal_context = NULL; - static char *function = "libhmac_md5_free"; - - if( context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid context.", - function ); - - return( -1 ); - } - if( *context != NULL ) - { - internal_context = (libhmac_internal_md5_context_t *) *context; - *context = NULL; - -#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_MD5_H ) && defined( MD5_DIGEST_LENGTH ) - /* No additional clean up necessary - */ - -#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_MD5 ) -#if defined( HAVE_EVP_MD_CTX_CLEANUP ) - if( EVP_MD_CTX_cleanup( - &( internal_context->internal_evp_md_context ) ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, - "%s: unable to clean up EVP message digest context.", - function ); - } - /* Make sure the error state is removed otherwise OpenSSL will leak memory - */ - ERR_remove_thread_state( - NULL ); -#else - EVP_MD_CTX_free( - internal_context->evp_md_context ); - -#endif /* defined( HAVE_EVP_MD_CTX_CLEANUP ) */ - - internal_context->evp_md_context = NULL; -#else - /* No additional clean up necessary - */ -#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_MD5_H ) && defined( MD5_DIGEST_LENGTH ) */ - - memory_free( - internal_context ); - } - return( 1 ); -} - -#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_MD5_H ) && defined( MD5_DIGEST_LENGTH ) - -/* Updates the MD5 context using OpenSSL - * Returns 1 if successful or -1 on error - */ -int libhmac_md5_update( - libhmac_md5_context_t *context, - const uint8_t *buffer, - size_t size, - libcerror_error_t **error ) -{ - libhmac_internal_md5_context_t *internal_context = NULL; - static char *function = "libhmac_md5_update"; - unsigned long safe_hash_size = 0; + static char *function = "libhmac_md5_free"; - if( context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid context.", - function ); - - return( -1 ); - } - internal_context = (libhmac_internal_md5_context_t *) context; - - if( buffer == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid buffer.", - function ); - - return( -1 ); - } -#if ( SIZEOF_LONG < SIZEOF_SIZE_T ) - if( size > (size_t) ULONG_MAX ) -#else - if( size > (size_t) SSIZE_MAX ) -#endif - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, - "%s: invalid size value exceeds maximum.", - function ); - - return( -1 ); - } - if( size == 0 ) - { - return( 1 ); - } - safe_hash_size = (unsigned long) size; - - if( MD5_Update( - &( internal_context->md5_context ), - (const void *) buffer, - size ) != 1 ) + if( libhmac_md5_context_free( + context, + error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to update context.", + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free context.", function ); return( -1 ); @@ -713,9 +79,7 @@ return( 1 ); } -#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_MD5 ) - -/* Updates the MD5 context using OpenSSL EVP +/* Updates the MD5 context * Returns 1 if successful or -1 on error */ int libhmac_md5_update( @@ -724,52 +88,13 @@ size_t size, libcerror_error_t **error ) { - libhmac_internal_md5_context_t *internal_context = NULL; - static char *function = "libhmac_md5_update"; - - if( context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid context.", - function ); - - return( -1 ); - } - internal_context = (libhmac_internal_md5_context_t *) context; - - if( buffer == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid buffer.", - function ); + static char *function = "libhmac_md5_update"; - return( -1 ); - } - if( size > (size_t) SSIZE_MAX ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, - "%s: invalid size value exceeds maximum.", - function ); - - return( -1 ); - } - if( size == 0 ) - { - return( 1 ); - } - if( EVP_DigestUpdate( - internal_context->evp_md_context, - (const void *) buffer, - size ) != 1 ) + if( libhmac_md5_context_update( + context, + buffer, + size, + error ) != 1 ) { libcerror_error_set( error, @@ -783,174 +108,7 @@ return( 1 ); } -#else - -/* Updates the MD5 context using fallback implementation - * Returns 1 if successful or -1 on error - */ -int libhmac_md5_update( - libhmac_md5_context_t *context, - const uint8_t *buffer, - size_t size, - libcerror_error_t **error ) -{ - libhmac_internal_md5_context_t *internal_context = NULL; - static char *function = "libhmac_md5_update"; - size_t buffer_offset = 0; - size_t remaining_block_size = 0; - ssize_t process_count = 0; - - if( context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid context.", - function ); - - return( -1 ); - } - internal_context = (libhmac_internal_md5_context_t *) context; - - if( buffer == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid buffer.", - function ); - - return( -1 ); - } - if( size > (size_t) SSIZE_MAX ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, - "%s: invalid size value exceeds maximum.", - function ); - - return( -1 ); - } - if( size == 0 ) - { - return( 1 ); - } - if( internal_context->block_offset > 0 ) - { - remaining_block_size = LIBHMAC_MD5_BLOCK_SIZE - internal_context->block_offset; - - if( remaining_block_size > size ) - { - remaining_block_size = size; - } - if( memory_copy( - &( internal_context->block[ internal_context->block_offset ] ), - buffer, - remaining_block_size ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_COPY_FAILED, - "%s: unable to copy data to context block.", - function ); - - return( -1 ); - } - internal_context->block_offset += remaining_block_size; - - if( internal_context->block_offset < LIBHMAC_MD5_BLOCK_SIZE ) - { - return( 1 ); - } - buffer_offset += remaining_block_size; - size -= remaining_block_size; - - process_count = libhmac_md5_transform( - internal_context, - internal_context->block, - LIBHMAC_MD5_BLOCK_SIZE, - error ); - - if( process_count == -1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to transform context block.", - function ); - - return( -1 ); - } - internal_context->hash_count += process_count; - internal_context->block_offset = 0; - } - if( size > 0 ) - { - process_count = libhmac_md5_transform( - internal_context, - &( buffer[ buffer_offset ] ), - size, - error ); - - if( process_count == -1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to transform buffer.", - function ); - - return( -1 ); - } - internal_context->hash_count += process_count; - - buffer_offset += process_count; - size -= process_count; - } - if( size > 0 ) - { - if( size >= LIBHMAC_MD5_BLOCK_SIZE ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, - "%s: invalid size value out of bounds.", - function ); - - return( -1 ); - } - if( memory_copy( - internal_context->block, - &( buffer[ buffer_offset ] ), - size ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_COPY_FAILED, - "%s: unable to copy remaining data to context block.", - function ); - - return( -1 ); - } - internal_context->block_offset = size; - } - return( 1 ); -} - -#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_MD5_H ) && defined( MD5_DIGEST_LENGTH ) */ - -#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_MD5_H ) && defined( MD5_DIGEST_LENGTH ) - -/* Finalizes the MD5 context using OpenSSL +/* Finalizes the MD5 context * Returns 1 if successful or -1 on error */ int libhmac_md5_finalize( @@ -959,138 +117,13 @@ size_t hash_size, libcerror_error_t **error ) { - libhmac_internal_md5_context_t *internal_context = NULL; - static char *function = "libhmac_md5_finalize"; + static char *function = "libhmac_md5_finalize"; - if( context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid context.", - function ); - - return( -1 ); - } - internal_context = (libhmac_internal_md5_context_t *) context; - - if( hash == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid hash.", - function ); - - return( -1 ); - } - if( hash_size > (size_t) SSIZE_MAX ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, - "%s: invalid hash size value exceeds maximum.", - function ); - - return( -1 ); - } - if( hash_size < (size_t) LIBHMAC_MD5_HASH_SIZE ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, - "%s: invalid hash size value too small.", - function ); - - return( -1 ); - } - if( MD5_Final( + if( libhmac_md5_context_finalize( + context, hash, - &( internal_context->md5_context ) ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, - "%s: unable to finalize context.", - function ); - - return( -1 ); - } - return( 1 ); -} - -#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_MD5 ) - -/* Finalizes the MD5 context using OpenSSL EVP - * Returns 1 if successful or -1 on error - */ -int libhmac_md5_finalize( - libhmac_md5_context_t *context, - uint8_t *hash, - size_t hash_size, - libcerror_error_t **error ) -{ - libhmac_internal_md5_context_t *internal_context = NULL; - static char *function = "libhmac_md5_finalize"; - unsigned int safe_hash_size = 0; - - if( context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid context.", - function ); - - return( -1 ); - } - internal_context = (libhmac_internal_md5_context_t *) context; - - if( hash == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid hash.", - function ); - - return( -1 ); - } - if( hash_size > (size_t) UINT_MAX ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, - "%s: invalid hash size value exceeds maximum.", - function ); - - return( -1 ); - } - if( hash_size < (size_t) LIBHMAC_MD5_HASH_SIZE ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, - "%s: invalid hash size value too small.", - function ); - - return( -1 ); - } - safe_hash_size = (unsigned int) hash_size; - - if( EVP_DigestFinal_ex( - internal_context->evp_md_context, - (unsigned char *) hash, - &safe_hash_size ) != 1 ) + hash_size, + error ) != 1 ) { libcerror_error_set( error, @@ -1104,177 +137,6 @@ return( 1 ); } -#else - -/* Finalizes the MD5 context using fallback implementation - * Returns 1 if successful or -1 on error - */ -int libhmac_md5_finalize( - libhmac_md5_context_t *context, - uint8_t *hash, - size_t hash_size, - libcerror_error_t **error ) -{ - libhmac_internal_md5_context_t *internal_context = NULL; - static char *function = "libhmac_md5_finalize"; - size_t block_size = 0; - size_t number_of_blocks = 0; - ssize_t process_count = 0; - uint64_t bit_size = 0; - -#if !defined( LIBHMAC_UNFOLLED_LOOPS ) - size_t hash_index = 0; - int hash_values_index = 0; -#endif - - if( context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid context.", - function ); - - return( -1 ); - } - internal_context = (libhmac_internal_md5_context_t *) context; - - if( hash == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid hash.", - function ); - - return( -1 ); - } - if( hash_size > (size_t) SSIZE_MAX ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, - "%s: invalid hash size value exceeds maximum.", - function ); - - return( -1 ); - } - if( hash_size < (size_t) LIBHMAC_MD5_HASH_SIZE ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, - "%s: invalid hash size value too small.", - function ); - - return( -1 ); - } - /* Add padding with a size of 56 mod 64 - */ - number_of_blocks = 1; - - if( internal_context->block_offset > 55 ) - { - number_of_blocks += 1; - } - block_size = number_of_blocks * LIBHMAC_MD5_BLOCK_SIZE; - - if( memory_set( - &( internal_context->block[ internal_context->block_offset ] ), - 0, - block_size - internal_context->block_offset ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_SET_FAILED, - "%s: unable to clear context block.", - function ); - - return( -1 ); - } - /* The first byte of the padding contains 0x80 - */ - internal_context->block[ internal_context->block_offset ] = 0x80; - - bit_size = ( internal_context->hash_count + internal_context->block_offset ) * 8; - - byte_stream_copy_from_uint64_little_endian( - &( internal_context->block[ block_size - 8 ] ), - bit_size ); - - process_count = libhmac_md5_transform( - internal_context, - internal_context->block, - block_size, - error ); - - if( process_count == -1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to transform context block.", - function ); - - return( -1 ); - } -#if !defined( LIBHMAC_UNFOLLED_LOOPS ) - for( hash_values_index = 0; - hash_values_index < 4; - hash_values_index++ ) - { - byte_stream_copy_from_uint32_little_endian( - &( hash[ hash_index ] ), - internal_context->hash_values[ hash_values_index ] ); - - hash_index += sizeof( uint32_t ); - } -#else - byte_stream_copy_from_uint32_little_endian( - &( hash[ 0 ] ), - internal_context->hash_values[ 0 ] ); - - byte_stream_copy_from_uint32_little_endian( - &( hash[ 4 ] ), - internal_context->hash_values[ 1 ] ); - - byte_stream_copy_from_uint32_little_endian( - &( hash[ 8 ] ), - internal_context->hash_values[ 2 ] ); - - byte_stream_copy_from_uint32_little_endian( - &( hash[ 12 ] ), - internal_context->hash_values[ 3 ] ); - -#endif /* !defined( LIBHMAC_UNFOLLED_LOOPS ) */ - - /* Prevent sensitive data from leaking - */ - if( memory_set( - internal_context, - 0, - sizeof( libhmac_internal_md5_context_t ) ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_SET_FAILED, - "%s: unable to clear context.", - function ); - - return( -1 ); - } - return( 1 ); -} - -#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_MD5_H ) && defined( MD5_DIGEST_LENGTH ) */ - /* Calculates the MD5 of the buffer * Returns 1 if successful or -1 on error */ @@ -1288,7 +150,7 @@ libhmac_md5_context_t *context = NULL; static char *function = "libhmac_md5_calculate"; - if( libhmac_md5_initialize( + if( libhmac_md5_context_initialize( &context, error ) != 1 ) { @@ -1301,7 +163,7 @@ goto on_error; } - if( libhmac_md5_update( + if( libhmac_md5_context_update( context, buffer, size, @@ -1316,7 +178,7 @@ goto on_error; } - if( libhmac_md5_finalize( + if( libhmac_md5_context_finalize( context, hash, hash_size, @@ -1331,7 +193,7 @@ goto on_error; } - if( libhmac_md5_free( + if( libhmac_md5_context_free( &context, error ) != 1 ) { @@ -1349,7 +211,7 @@ on_error: if( context != NULL ) { - libhmac_md5_free( + libhmac_md5_context_free( &context, NULL ); } @@ -1459,7 +321,7 @@ } else { - if( libhmac_md5_initialize( + if( libhmac_md5_context_initialize( &context, error ) != 1 ) { @@ -1472,7 +334,7 @@ goto on_error; } - if( libhmac_md5_update( + if( libhmac_md5_context_update( context, key, key_size, @@ -1487,7 +349,7 @@ goto on_error; } - if( libhmac_md5_finalize( + if( libhmac_md5_context_finalize( context, key_hash, LIBHMAC_MD5_HASH_SIZE, @@ -1502,7 +364,7 @@ goto on_error; } - if( libhmac_md5_free( + if( libhmac_md5_context_free( &context, error ) != 1 ) { @@ -1610,7 +472,7 @@ inner_padding[ block_index ] ^= key_data[ block_index ]; outer_padding[ block_index ] ^= key_data[ block_index ]; } - if( libhmac_md5_initialize( + if( libhmac_md5_context_initialize( &context, error ) != 1 ) { @@ -1623,7 +485,7 @@ goto on_error; } - if( libhmac_md5_update( + if( libhmac_md5_context_update( context, inner_padding, block_size, @@ -1638,7 +500,7 @@ goto on_error; } - if( libhmac_md5_update( + if( libhmac_md5_context_update( context, buffer, size, @@ -1653,7 +515,7 @@ goto on_error; } - if( libhmac_md5_finalize( + if( libhmac_md5_context_finalize( context, hmac, hmac_size, @@ -1668,7 +530,7 @@ goto on_error; } - if( libhmac_md5_free( + if( libhmac_md5_context_free( &context, error ) != 1 ) { @@ -1681,7 +543,7 @@ goto on_error; } - if( libhmac_md5_initialize( + if( libhmac_md5_context_initialize( &context, error ) != 1 ) { @@ -1694,7 +556,7 @@ goto on_error; } - if( libhmac_md5_update( + if( libhmac_md5_context_update( context, outer_padding, block_size, @@ -1709,7 +571,7 @@ goto on_error; } - if( libhmac_md5_update( + if( libhmac_md5_context_update( context, hmac, LIBHMAC_MD5_HASH_SIZE, @@ -1724,7 +586,7 @@ goto on_error; } - if( libhmac_md5_finalize( + if( libhmac_md5_context_finalize( context, hmac, hmac_size, @@ -1739,7 +601,7 @@ goto on_error; } - if( libhmac_md5_free( + if( libhmac_md5_context_free( &context, error ) != 1 ) { @@ -1814,7 +676,7 @@ on_error: if( context != NULL ) { - libhmac_md5_free( + libhmac_md5_context_free( &context, NULL ); } diff -Nru libfshfs-20201104/libhmac/libhmac_md5.h libfshfs-20240221/libhmac/libhmac_md5.h --- libfshfs-20201104/libhmac/libhmac_md5.h 2020-11-04 11:56:11.000000000 +0000 +++ libfshfs-20240221/libhmac/libhmac_md5.h 2024-02-21 06:04:12.000000000 +0000 @@ -1,7 +1,7 @@ /* * MD5 functions * - * Copyright (C) 2011-2020, Joachim Metz + * Copyright (C) 2011-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -25,82 +25,15 @@ #include #include -#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_MD5_H ) -#include - -#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) -#include - -#endif - #include "libhmac_extern.h" #include "libhmac_libcerror.h" +#include "libhmac_md5_context.h" #include "libhmac_types.h" #if defined( __cplusplus ) extern "C" { #endif -#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_MD5_H ) && defined( MD5_DIGEST_LENGTH ) -#define LIBHMAC_HAVE_MD5_SUPPORT - -#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_MD5 ) -#define LIBHMAC_HAVE_MD5_SUPPORT - -#endif - -#if !defined( LIBHMAC_HAVE_MD5_SUPPORT ) -#define LIBHMAC_MD5_BLOCK_SIZE 64 -#endif - -typedef struct libhmac_internal_md5_context libhmac_internal_md5_context_t; - -struct libhmac_internal_md5_context -{ -#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_MD5_H ) && defined( MD5_DIGEST_LENGTH ) - /* The MD5 context - */ - MD5_CTX md5_context; - -#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_MD5 ) - /* The EVP message digest context - */ -#if defined( HAVE_EVP_MD_CTX_INIT ) - EVP_MD_CTX internal_evp_md_context; -#endif - - EVP_MD_CTX *evp_md_context; - -#else - /* The number of bytes hashed - */ - uint64_t hash_count; - - /* The hash values - */ - uint32_t hash_values[ 4 ]; - - /* The block offset - */ - size_t block_offset; - - /* The (data) block - */ - uint8_t block[ 128 ]; - -#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_MD5_H ) && defined( MD5_DIGEST_LENGTH ) */ -}; - -#if !defined( LIBHMAC_HAVE_MD5_SUPPORT ) - -ssize_t libhmac_md5_transform( - libhmac_internal_md5_context_t *internal_context, - const uint8_t *buffer, - size_t size, - libcerror_error_t **error ); - -#endif /* !defined( LIBHMAC_HAVE_MD5_SUPPORT ) */ - LIBHMAC_EXTERN \ int libhmac_md5_initialize( libhmac_md5_context_t **context, diff -Nru libfshfs-20201104/libhmac/libhmac_md5_context.c libfshfs-20240221/libhmac/libhmac_md5_context.c --- libfshfs-20201104/libhmac/libhmac_md5_context.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libhmac/libhmac_md5_context.c 2024-02-21 06:04:12.000000000 +0000 @@ -0,0 +1,1292 @@ +/* + * MD5 functions + * + * Copyright (C) 2011-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include +#include +#include + +#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_MD5_H ) +#include + +#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) +#include +#include + +#endif + +#include "libhmac_byte_stream.h" +#include "libhmac_definitions.h" +#include "libhmac_libcerror.h" +#include "libhmac_md5_context.h" + +#if !defined( LIBHMAC_HAVE_MD5_SUPPORT ) + +/* RFC 1321 based MD5 functions + */ + +/* TODO decription what these values are based on + */ +uint32_t libhmac_md5_context_fixed_constants[ 4 ] = { + 0x67452301UL, 0xefcdab89UL, 0x98badcfeUL, 0x10325476UL +}; + +/* The first 32-bits of the sines (in radians) of the first 64 integers [ 0, 63 ] + */ +uint32_t libhmac_md5_context_sines[ 64 ] = { + 0xd76aa478UL, 0xe8c7b756UL, 0x242070dbUL, 0xc1bdceeeUL, + 0xf57c0fafUL, 0x4787c62aUL, 0xa8304613UL, 0xfd469501UL, + 0x698098d8UL, 0x8b44f7afUL, 0xffff5bb1UL, 0x895cd7beUL, + 0x6b901122UL, 0xfd987193UL, 0xa679438eUL, 0x49b40821UL, + 0xf61e2562UL, 0xc040b340UL, 0x265e5a51UL, 0xe9b6c7aaUL, + 0xd62f105dUL, 0x02441453UL, 0xd8a1e681UL, 0xe7d3fbc8UL, + 0x21e1cde6UL, 0xc33707d6UL, 0xf4d50d87UL, 0x455a14edUL, + 0xa9e3e905UL, 0xfcefa3f8UL, 0x676f02d9UL, 0x8d2a4c8aUL, + 0xfffa3942UL, 0x8771f681UL, 0x6d9d6122UL, 0xfde5380cUL, + 0xa4beea44UL, 0x4bdecfa9UL, 0xf6bb4b60UL, 0xbebfbc70UL, + 0x289b7ec6UL, 0xeaa127faUL, 0xd4ef3085UL, 0x04881d05UL, + 0xd9d4d039UL, 0xe6db99e5UL, 0x1fa27cf8UL, 0xc4ac5665UL, + 0xf4292244UL, 0x432aff97UL, 0xab9423a7UL, 0xfc93a039UL, + 0x655b59c3UL, 0x8f0ccc92UL, 0xffeff47dUL, 0x85845dd1UL, + 0x6fa87e4fUL, 0xfe2ce6e0UL, 0xa3014314UL, 0x4e0811a1UL, + 0xf7537e82UL, 0xbd3af235UL, 0x2ad7d2bbUL, 0xeb86d391UL +}; + +/* The bit shifts + */ +uint8_t libhmac_md5_context_bit_shifts[ 64 ] = { + 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, + 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, + 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, + 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21 +}; + +/* The 32-bit values indexes + * [ 0, 15 ] => index + * [ 16, 31 ] => ( ( 5 x index ) + 1 ) mod 16 + * [ 32, 47 ] => ( ( 3 x index ) + 5 ) mod 16 + * [ 48, 63 ] => ( 7 x index ) mod 16 + */ +uint8_t libhmac_md5_context_values_32bit_index[ 64 ] = { + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 1, 6, 11, 0, 5, 10, 15, 4, 9, 14, 3, 8, 13, 2, 7, 12, + 5, 8, 11, 14, 1, 4, 7, 10, 13, 0, 3, 6, 9, 12, 15, 2, + 0, 7, 14, 5, 12, 3, 10, 1, 8, 15, 6, 13, 4, 11, 2, 9 +}; + +#define libhmac_md5_context_transform_unfolded_calculate_hash_value_round1( values_32bit, value_32bit_index, hash_values, hash_value_index0, hash_value_index1, hash_value_index2, hash_value_index3, block_index ) \ + hash_values[ hash_value_index0 ] += ( hash_values[ hash_value_index1 ] & hash_values[ hash_value_index2 ] ) \ + | ( ~( hash_values[ hash_value_index1 ] ) & hash_values[ hash_value_index3 ] ); \ + hash_values[ hash_value_index0 ] += values_32bit[ value_32bit_index ]; \ + hash_values[ hash_value_index0 ] += libhmac_md5_context_sines[ block_index ]; \ +\ + hash_values[ hash_value_index0 ] = byte_stream_bit_rotate_left_32bit( \ + hash_values[ hash_value_index0 ], \ + libhmac_md5_context_bit_shifts[ block_index ] ); \ +\ + hash_values[ hash_value_index0 ] += hash_values[ hash_value_index1 ]; + +#define libhmac_md5_context_transform_unfolded_calculate_hash_value_round2( values_32bit, value_32bit_index, hash_values, hash_value_index0, hash_value_index1, hash_value_index2, hash_value_index3, block_index ) \ + hash_values[ hash_value_index0 ] += ( hash_values[ hash_value_index1 ] & hash_values[ hash_value_index3 ] ) \ + | ( hash_values[ hash_value_index2 ] & ~( hash_values[ hash_value_index3 ] ) ); \ + hash_values[ hash_value_index0 ] += values_32bit[ value_32bit_index ]; \ + hash_values[ hash_value_index0 ] += libhmac_md5_context_sines[ block_index ]; \ +\ + hash_values[ hash_value_index0 ] = byte_stream_bit_rotate_left_32bit( \ + hash_values[ hash_value_index0 ], \ + libhmac_md5_context_bit_shifts[ block_index ] ); \ +\ + hash_values[ hash_value_index0 ] += hash_values[ hash_value_index1 ]; + +#define libhmac_md5_context_transform_unfolded_calculate_hash_value_round3( values_32bit, value_32bit_index, hash_values, hash_value_index0, hash_value_index1, hash_value_index2, hash_value_index3, block_index ) \ + hash_values[ hash_value_index0 ] += hash_values[ hash_value_index1 ] \ + ^ hash_values[ hash_value_index2 ] \ + ^ hash_values[ hash_value_index3 ]; \ + hash_values[ hash_value_index0 ] += values_32bit[ value_32bit_index ]; \ + hash_values[ hash_value_index0 ] += libhmac_md5_context_sines[ block_index ]; \ +\ + hash_values[ hash_value_index0 ] = byte_stream_bit_rotate_left_32bit( \ + hash_values[ hash_value_index0 ], \ + libhmac_md5_context_bit_shifts[ block_index ] ); \ +\ + hash_values[ hash_value_index0 ] += hash_values[ hash_value_index1 ]; + +#define libhmac_md5_context_transform_unfolded_calculate_hash_value_round4( values_32bit, value_32bit_index, hash_values, hash_value_index0, hash_value_index1, hash_value_index2, hash_value_index3, block_index ) \ + hash_values[ hash_value_index0 ] += hash_values[ hash_value_index2 ] \ + ^ ( hash_values[ hash_value_index1 ] | ~( hash_values[ hash_value_index3 ] ) ); \ + hash_values[ hash_value_index0 ] += values_32bit[ value_32bit_index ]; \ + hash_values[ hash_value_index0 ] += libhmac_md5_context_sines[ block_index ]; \ +\ + hash_values[ hash_value_index0 ] = byte_stream_bit_rotate_left_32bit( \ + hash_values[ hash_value_index0 ], \ + libhmac_md5_context_bit_shifts[ block_index ] ); \ +\ + hash_values[ hash_value_index0 ] += hash_values[ hash_value_index1 ]; + +#define libhmac_md5_context_transform_unfolded_calculate_hash_values( values_32bit, hash_values ) \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round1( values_32bit, 0, hash_values, 0, 1, 2, 3, 0 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round1( values_32bit, 1, hash_values, 3, 0, 1, 2, 1 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round1( values_32bit, 2, hash_values, 2, 3, 0, 1, 2 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round1( values_32bit, 3, hash_values, 1, 2, 3, 0, 3 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round1( values_32bit, 4, hash_values, 0, 1, 2, 3, 4 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round1( values_32bit, 5, hash_values, 3, 0, 1, 2, 5 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round1( values_32bit, 6, hash_values, 2, 3, 0, 1, 6 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round1( values_32bit, 7, hash_values, 1, 2, 3, 0, 7 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round1( values_32bit, 8, hash_values, 0, 1, 2, 3, 8 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round1( values_32bit, 9, hash_values, 3, 0, 1, 2, 9 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round1( values_32bit, 10, hash_values, 2, 3, 0, 1, 10 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round1( values_32bit, 11, hash_values, 1, 2, 3, 0, 11 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round1( values_32bit, 12, hash_values, 0, 1, 2, 3, 12 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round1( values_32bit, 13, hash_values, 3, 0, 1, 2, 13 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round1( values_32bit, 14, hash_values, 2, 3, 0, 1, 14 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round1( values_32bit, 15, hash_values, 1, 2, 3, 0, 15 ); \ +\ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round2( values_32bit, 1, hash_values, 0, 1, 2, 3, 16 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round2( values_32bit, 6, hash_values, 3, 0, 1, 2, 17 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round2( values_32bit, 11, hash_values, 2, 3, 0, 1, 18 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round2( values_32bit, 0, hash_values, 1, 2, 3, 0, 19 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round2( values_32bit, 5, hash_values, 0, 1, 2, 3, 20 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round2( values_32bit, 10, hash_values, 3, 0, 1, 2, 21 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round2( values_32bit, 15, hash_values, 2, 3, 0, 1, 22 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round2( values_32bit, 4, hash_values, 1, 2, 3, 0, 23 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round2( values_32bit, 9, hash_values, 0, 1, 2, 3, 24 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round2( values_32bit, 14, hash_values, 3, 0, 1, 2, 25 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round2( values_32bit, 3, hash_values, 2, 3, 0, 1, 26 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round2( values_32bit, 8, hash_values, 1, 2, 3, 0, 27 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round2( values_32bit, 13, hash_values, 0, 1, 2, 3, 28 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round2( values_32bit, 2, hash_values, 3, 0, 1, 2, 29 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round2( values_32bit, 7, hash_values, 2, 3, 0, 1, 30 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round2( values_32bit, 12, hash_values, 1, 2, 3, 0, 31 ); \ +\ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round3( values_32bit, 5, hash_values, 0, 1, 2, 3, 32 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round3( values_32bit, 8, hash_values, 3, 0, 1, 2, 33 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round3( values_32bit, 11, hash_values, 2, 3, 0, 1, 34 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round3( values_32bit, 14, hash_values, 1, 2, 3, 0, 35 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round3( values_32bit, 1, hash_values, 0, 1, 2, 3, 36 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round3( values_32bit, 4, hash_values, 3, 0, 1, 2, 37 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round3( values_32bit, 7, hash_values, 2, 3, 0, 1, 38 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round3( values_32bit, 10, hash_values, 1, 2, 3, 0, 39 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round3( values_32bit, 13, hash_values, 0, 1, 2, 3, 40 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round3( values_32bit, 0, hash_values, 3, 0, 1, 2, 41 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round3( values_32bit, 3, hash_values, 2, 3, 0, 1, 42 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round3( values_32bit, 6, hash_values, 1, 2, 3, 0, 43 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round3( values_32bit, 9, hash_values, 0, 1, 2, 3, 44 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round3( values_32bit, 12, hash_values, 3, 0, 1, 2, 45 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round3( values_32bit, 15, hash_values, 2, 3, 0, 1, 46 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round3( values_32bit, 2, hash_values, 1, 2, 3, 0, 47 ); \ +\ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round4( values_32bit, 0, hash_values, 0, 1, 2, 3, 48 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round4( values_32bit, 7, hash_values, 3, 0, 1, 2, 49 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round4( values_32bit, 14, hash_values, 2, 3, 0, 1, 50 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round4( values_32bit, 5, hash_values, 1, 2, 3, 0, 51 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round4( values_32bit, 12, hash_values, 0, 1, 2, 3, 52 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round4( values_32bit, 3, hash_values, 3, 0, 1, 2, 53 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round4( values_32bit, 10, hash_values, 2, 3, 0, 1, 54 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round4( values_32bit, 1, hash_values, 1, 2, 3, 0, 55 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round4( values_32bit, 8, hash_values, 0, 1, 2, 3, 56 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round4( values_32bit, 15, hash_values, 3, 0, 1, 2, 57 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round4( values_32bit, 6, hash_values, 2, 3, 0, 1, 58 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round4( values_32bit, 13, hash_values, 1, 2, 3, 0, 59 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round4( values_32bit, 4, hash_values, 0, 1, 2, 3, 60 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round4( values_32bit, 11, hash_values, 3, 0, 1, 2, 61 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round4( values_32bit, 2, hash_values, 2, 3, 0, 1, 62 ); \ + libhmac_md5_context_transform_unfolded_calculate_hash_value_round4( values_32bit, 9, hash_values, 1, 2, 3, 0, 63 ); + +/* Calculates the MD5 of 64 byte sized blocks of data in a buffer + * Returns the number of bytes used if successful or -1 on error + */ +ssize_t libhmac_md5_context_transform( + libhmac_internal_md5_context_t *internal_context, + const uint8_t *buffer, + size_t size, + libcerror_error_t **error ) +{ + uint32_t hash_values[ 4 ]; + uint32_t values_32bit[ 16 ]; + + static char *function = "libhmac_md5_context_transform"; + size_t buffer_offset = 0; + +#if !defined( LIBHMAC_UNFOLLED_LOOPS ) + uint32_t hash_value = 0; + uint8_t block_index = 0; + uint8_t hash_values_index = 0; + uint8_t value_32bit_index = 0; +#endif + + if( internal_context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid internal context.", + function ); + + return( -1 ); + } + if( buffer == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid buffer.", + function ); + + return( -1 ); + } + if( size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid size value exceeds maximum.", + function ); + + return( -1 ); + } + while( size >= LIBHMAC_MD5_BLOCK_SIZE ) + { + if( memory_copy( + hash_values, + internal_context->hash_values, + sizeof( uint32_t ) * 4 ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_COPY_FAILED, + "%s: unable to copy hash values.", + function ); + + goto on_error; + } +#if defined( LIBHMAC_UNFOLLED_LOOPS ) + /* Break the block into 16 x 32-bit values + */ + libhmac_byte_stream_copy_to_16x_uint32_little_endian( + &( buffer[ buffer_offset ] ), + values_32bit ); + + buffer_offset += LIBHMAC_MD5_BLOCK_SIZE; + + /* Calculate the hash values for the 32-bit values + */ + libhmac_md5_context_transform_unfolded_calculate_hash_values( + values_32bit, + hash_values ); + + /* Update the hash values in the context + */ + internal_context->hash_values[ 0 ] += hash_values[ 0 ]; + internal_context->hash_values[ 1 ] += hash_values[ 1 ]; + internal_context->hash_values[ 2 ] += hash_values[ 2 ]; + internal_context->hash_values[ 3 ] += hash_values[ 3 ]; + +#else + /* Break the block into 16 x 32-bit values + */ + for( value_32bit_index = 0; + value_32bit_index < 16; + value_32bit_index++ ) + { + byte_stream_copy_to_uint32_little_endian( + &( buffer[ buffer_offset ] ), + values_32bit[ value_32bit_index ] ); + + buffer_offset += sizeof( uint32_t ); + } + /* Calculate the hash values for the 32-bit values + */ + for( block_index = 0; + block_index < 64; + block_index++ ) + { + if( block_index < 16 ) + { + hash_values[ 0 ] += ( hash_values[ 1 ] & hash_values[ 2 ] ) + | ( ~( hash_values[ 1 ] ) & hash_values[ 3 ] ); + } + else if( block_index < 32 ) + { + hash_values[ 0 ] += ( hash_values[ 1 ] & hash_values[ 3 ] ) + | ( hash_values[ 2 ] & ~( hash_values[ 3 ] ) ); + } + else if( block_index < 48 ) + { + hash_values[ 0 ] += hash_values[ 1 ] + ^ hash_values[ 2 ] + ^ hash_values[ 3 ]; + } + else + { + hash_values[ 0 ] += hash_values[ 2 ] + ^ ( hash_values[ 1 ] | ~( hash_values[ 3 ] ) ); + } + value_32bit_index = libhmac_md5_context_values_32bit_index[ block_index ]; + + hash_values[ 0 ] += values_32bit[ value_32bit_index ]; + hash_values[ 0 ] += libhmac_md5_context_sines[ block_index ]; + hash_values[ 0 ] = byte_stream_bit_rotate_left_32bit( + hash_values[ 0 ], + libhmac_md5_context_bit_shifts[ block_index ] ); + + hash_value = hash_values[ 3 ]; + hash_values[ 3 ] = hash_values[ 2 ]; + hash_values[ 2 ] = hash_values[ 1 ]; + hash_values[ 1 ] += hash_values[ 0 ]; + hash_values[ 0 ] = hash_value; + } + /* Update the hash values in the context + */ + for( hash_values_index = 0; + hash_values_index < 4; + hash_values_index++ ) + { + internal_context->hash_values[ hash_values_index ] += hash_values[ hash_values_index ]; + } +#endif /* defined( LIBHMAC_UNFOLLED_LOOPS ) */ + + size -= LIBHMAC_MD5_BLOCK_SIZE; + } + /* Prevent sensitive data from leaking + */ + if( memory_set( + hash_values, + 0, + sizeof( uint32_t ) * 4 ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_SET_FAILED, + "%s: unable to clear hash values.", + function ); + + goto on_error; + } + if( memory_set( + values_32bit, + 0, + sizeof( uint32_t ) * 16 ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_SET_FAILED, + "%s: unable to clear 32-bit values.", + function ); + + goto on_error; + } + return( (ssize_t) buffer_offset ); + +on_error: + memory_set( + values_32bit, + 0, + sizeof( uint32_t ) * 16 ); + + memory_set( + hash_values, + 0, + sizeof( uint32_t ) * 4 ); + + return( -1 ); +} + +#endif /* !defined( LIBHMAC_HAVE_MD5_SUPPORT ) */ + +/* Creates a MD5 context + * Make sure the value context is referencing, is set to NULL + * Returns 1 if successful or -1 on error + */ +int libhmac_md5_context_initialize( + libhmac_md5_context_t **context, + libcerror_error_t **error ) +{ + libhmac_internal_md5_context_t *internal_context = NULL; + static char *function = "libhmac_md5_context_initialize"; + +#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_MD5 ) + const EVP_MD *evp_md_type = NULL; +#endif + + if( context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid context.", + function ); + + return( -1 ); + } + if( *context != NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, + "%s: invalid context value already set.", + function ); + + return( -1 ); + } + internal_context = memory_allocate_structure( + libhmac_internal_md5_context_t ); + + if( internal_context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_INSUFFICIENT, + "%s: unable to create context.", + function ); + + goto on_error; + } + if( memory_set( + internal_context, + 0, + sizeof( libhmac_internal_md5_context_t ) ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_SET_FAILED, + "%s: unable to clear context.", + function ); + + memory_free( + internal_context ); + + return( -1 ); + } +#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_MD5_H ) && defined( MD5_DIGEST_LENGTH ) + if( MD5_Init( + &( internal_context->md5_context ) ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to initialize context.", + function ); + + goto on_error; + } + +#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_MD5 ) +#if defined( HAVE_EVP_MD_CTX_INIT ) + EVP_MD_CTX_init( + &( internal_context->internal_evp_md_context ) ); + + internal_context->evp_md_context = &( internal_context->internal_evp_md_context ); +#else + internal_context->evp_md_context = EVP_MD_CTX_new(); + + if( internal_context->evp_md_context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to create EVP message digest context.", + function ); + + goto on_error; + } +#endif /* defined( HAVE_EVP_MD_CTX_INIT ) */ + +/* TODO use EVP_MD_fetch for EVP_DigestInit_ex2 */ + evp_md_type = EVP_md5(); + +#if defined( HAVE_EVP_DIGESTINIT_EX2 ) + if( EVP_DigestInit_ex2( + internal_context->evp_md_context, + evp_md_type, + NULL ) != 1 ) +#else + if( EVP_DigestInit_ex( + internal_context->evp_md_context, + evp_md_type, + NULL ) != 1 ) +#endif + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to initialize EVP message digest context.", + function ); + +#if defined( HAVE_EVP_MD_CTX_CLEANUP ) + EVP_MD_CTX_cleanup( + &( internal_context->internal_evp_md_context ) ); + ERR_remove_thread_state( + NULL ); +#else + EVP_MD_CTX_free( + internal_context->evp_md_context ); +#endif + internal_context->evp_md_context = NULL; + + goto on_error; + } +#else + if( memory_copy( + internal_context->hash_values, + libhmac_md5_context_fixed_constants, + sizeof( uint32_t ) * 4 ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_COPY_FAILED, + "%s: unable to copy fixed constants to hash values.", + function ); + + goto on_error; + } +#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_MD5_H ) && defined( MD5_DIGEST_LENGTH ) */ + + *context = (libhmac_md5_context_t *) internal_context; + + return( 1 ); + +on_error: + if( internal_context != NULL ) + { + memory_free( + internal_context ); + } + return( -1 ); +} + +/* Frees a MD5 context + * Returns 1 if successful or -1 on error + */ +int libhmac_md5_context_free( + libhmac_md5_context_t **context, + libcerror_error_t **error ) +{ + libhmac_internal_md5_context_t *internal_context = NULL; + static char *function = "libhmac_md5_context_free"; + + if( context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid context.", + function ); + + return( -1 ); + } + if( *context != NULL ) + { + internal_context = (libhmac_internal_md5_context_t *) *context; + *context = NULL; + +#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_MD5_H ) && defined( MD5_DIGEST_LENGTH ) + /* No additional clean up necessary + */ + +#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_MD5 ) +#if defined( HAVE_EVP_MD_CTX_CLEANUP ) + if( EVP_MD_CTX_cleanup( + &( internal_context->internal_evp_md_context ) ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to clean up EVP message digest context.", + function ); + } + /* Make sure the error state is removed otherwise OpenSSL will leak memory + */ + ERR_remove_thread_state( + NULL ); +#else + EVP_MD_CTX_free( + internal_context->evp_md_context ); + +#endif /* defined( HAVE_EVP_MD_CTX_CLEANUP ) */ + + internal_context->evp_md_context = NULL; +#else + /* No additional clean up necessary + */ +#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_MD5_H ) && defined( MD5_DIGEST_LENGTH ) */ + + memory_free( + internal_context ); + } + return( 1 ); +} + +#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_MD5_H ) && defined( MD5_DIGEST_LENGTH ) + +/* Updates the MD5 context using OpenSSL + * Returns 1 if successful or -1 on error + */ +int libhmac_md5_context_update( + libhmac_md5_context_t *context, + const uint8_t *buffer, + size_t size, + libcerror_error_t **error ) +{ + libhmac_internal_md5_context_t *internal_context = NULL; + static char *function = "libhmac_md5_context_update"; + unsigned long safe_hash_size = 0; + + if( context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid context.", + function ); + + return( -1 ); + } + internal_context = (libhmac_internal_md5_context_t *) context; + + if( buffer == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid buffer.", + function ); + + return( -1 ); + } +#if ( SIZEOF_LONG < SIZEOF_SIZE_T ) + if( size > (size_t) ULONG_MAX ) +#else + if( size > (size_t) SSIZE_MAX ) +#endif + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid size value exceeds maximum.", + function ); + + return( -1 ); + } + if( size == 0 ) + { + return( 1 ); + } + safe_hash_size = (unsigned long) size; + + if( MD5_Update( + &( internal_context->md5_context ), + (const void *) buffer, + size ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to update context.", + function ); + + return( -1 ); + } + return( 1 ); +} + +#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_MD5 ) + +/* Updates the MD5 context using OpenSSL EVP + * Returns 1 if successful or -1 on error + */ +int libhmac_md5_context_update( + libhmac_md5_context_t *context, + const uint8_t *buffer, + size_t size, + libcerror_error_t **error ) +{ + libhmac_internal_md5_context_t *internal_context = NULL; + static char *function = "libhmac_md5_context_update"; + + if( context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid context.", + function ); + + return( -1 ); + } + internal_context = (libhmac_internal_md5_context_t *) context; + + if( buffer == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid buffer.", + function ); + + return( -1 ); + } + if( size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid size value exceeds maximum.", + function ); + + return( -1 ); + } + if( size == 0 ) + { + return( 1 ); + } + if( EVP_DigestUpdate( + internal_context->evp_md_context, + (const void *) buffer, + size ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to update context.", + function ); + + return( -1 ); + } + return( 1 ); +} + +#else + +/* Updates the MD5 context using fallback implementation + * Returns 1 if successful or -1 on error + */ +int libhmac_md5_context_update( + libhmac_md5_context_t *context, + const uint8_t *buffer, + size_t size, + libcerror_error_t **error ) +{ + libhmac_internal_md5_context_t *internal_context = NULL; + static char *function = "libhmac_md5_context_update"; + size_t buffer_offset = 0; + size_t remaining_block_size = 0; + ssize_t process_count = 0; + + if( context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid context.", + function ); + + return( -1 ); + } + internal_context = (libhmac_internal_md5_context_t *) context; + + if( buffer == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid buffer.", + function ); + + return( -1 ); + } + if( size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid size value exceeds maximum.", + function ); + + return( -1 ); + } + if( size == 0 ) + { + return( 1 ); + } + if( internal_context->block_offset > 0 ) + { + if( internal_context->block_offset >= LIBHMAC_MD5_BLOCK_SIZE ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid context - block offset value out of bounds.", + function ); + + return( -1 ); + } + remaining_block_size = LIBHMAC_MD5_BLOCK_SIZE - internal_context->block_offset; + + if( remaining_block_size > size ) + { + remaining_block_size = size; + } + if( memory_copy( + &( internal_context->block[ internal_context->block_offset ] ), + buffer, + remaining_block_size ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_COPY_FAILED, + "%s: unable to copy data to context block.", + function ); + + return( -1 ); + } + internal_context->block_offset += remaining_block_size; + + if( internal_context->block_offset < LIBHMAC_MD5_BLOCK_SIZE ) + { + return( 1 ); + } + buffer_offset += remaining_block_size; + size -= remaining_block_size; + + process_count = libhmac_md5_context_transform( + internal_context, + internal_context->block, + LIBHMAC_MD5_BLOCK_SIZE, + error ); + + if( process_count == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to transform context block.", + function ); + + return( -1 ); + } + internal_context->hash_count += process_count; + internal_context->block_offset = 0; + } + if( size > 0 ) + { + process_count = libhmac_md5_context_transform( + internal_context, + &( buffer[ buffer_offset ] ), + size, + error ); + + if( process_count == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to transform buffer.", + function ); + + return( -1 ); + } + internal_context->hash_count += process_count; + + buffer_offset += process_count; + size -= process_count; + } + if( size > 0 ) + { + if( size >= LIBHMAC_MD5_BLOCK_SIZE ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid size value out of bounds.", + function ); + + return( -1 ); + } + if( memory_copy( + internal_context->block, + &( buffer[ buffer_offset ] ), + size ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_COPY_FAILED, + "%s: unable to copy remaining data to context block.", + function ); + + return( -1 ); + } + internal_context->block_offset = size; + } + return( 1 ); +} + +#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_MD5_H ) && defined( MD5_DIGEST_LENGTH ) */ + +#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_MD5_H ) && defined( MD5_DIGEST_LENGTH ) + +/* Finalizes the MD5 context using OpenSSL + * Returns 1 if successful or -1 on error + */ +int libhmac_md5_context_finalize( + libhmac_md5_context_t *context, + uint8_t *hash, + size_t hash_size, + libcerror_error_t **error ) +{ + libhmac_internal_md5_context_t *internal_context = NULL; + static char *function = "libhmac_md5_context_finalize"; + + if( context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid context.", + function ); + + return( -1 ); + } + internal_context = (libhmac_internal_md5_context_t *) context; + + if( hash == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid hash.", + function ); + + return( -1 ); + } + if( hash_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid hash size value exceeds maximum.", + function ); + + return( -1 ); + } + if( hash_size < (size_t) LIBHMAC_MD5_HASH_SIZE ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: invalid hash size value too small.", + function ); + + return( -1 ); + } + if( MD5_Final( + hash, + &( internal_context->md5_context ) ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to finalize context.", + function ); + + return( -1 ); + } + return( 1 ); +} + +#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_MD5 ) + +/* Finalizes the MD5 context using OpenSSL EVP + * Returns 1 if successful or -1 on error + */ +int libhmac_md5_context_finalize( + libhmac_md5_context_t *context, + uint8_t *hash, + size_t hash_size, + libcerror_error_t **error ) +{ + libhmac_internal_md5_context_t *internal_context = NULL; + static char *function = "libhmac_md5_context_finalize"; + unsigned int safe_hash_size = 0; + + if( context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid context.", + function ); + + return( -1 ); + } + internal_context = (libhmac_internal_md5_context_t *) context; + + if( hash == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid hash.", + function ); + + return( -1 ); + } + if( ( hash_size < (size_t) LIBHMAC_MD5_HASH_SIZE ) + || ( hash_size > (size_t) UINT_MAX ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid hash size value out of bounds.", + function ); + + return( -1 ); + } + safe_hash_size = (unsigned int) hash_size; + + if( EVP_DigestFinal_ex( + internal_context->evp_md_context, + (unsigned char *) hash, + &safe_hash_size ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to finalize context.", + function ); + + return( -1 ); + } + return( 1 ); +} + +#else + +/* Finalizes the MD5 context using fallback implementation + * Returns 1 if successful or -1 on error + */ +int libhmac_md5_context_finalize( + libhmac_md5_context_t *context, + uint8_t *hash, + size_t hash_size, + libcerror_error_t **error ) +{ + libhmac_internal_md5_context_t *internal_context = NULL; + static char *function = "libhmac_md5_context_finalize"; + size_t block_size = 0; + size_t number_of_blocks = 0; + ssize_t process_count = 0; + uint64_t bit_size = 0; + +#if !defined( LIBHMAC_UNFOLLED_LOOPS ) + size_t hash_index = 0; + int hash_values_index = 0; +#endif + + if( context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid context.", + function ); + + return( -1 ); + } + internal_context = (libhmac_internal_md5_context_t *) context; + + if( hash == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid hash.", + function ); + + return( -1 ); + } + if( hash_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid hash size value exceeds maximum.", + function ); + + return( -1 ); + } + if( hash_size < (size_t) LIBHMAC_MD5_HASH_SIZE ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: invalid hash size value too small.", + function ); + + return( -1 ); + } + /* Add padding with a size of 56 mod 64 + */ + number_of_blocks = 1; + + if( internal_context->block_offset > 55 ) + { + number_of_blocks += 1; + } + block_size = number_of_blocks * LIBHMAC_MD5_BLOCK_SIZE; + + if( memory_set( + &( internal_context->block[ internal_context->block_offset ] ), + 0, + block_size - internal_context->block_offset ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_SET_FAILED, + "%s: unable to clear context block.", + function ); + + return( -1 ); + } + /* The first byte of the padding contains 0x80 + */ + internal_context->block[ internal_context->block_offset ] = 0x80; + + bit_size = ( internal_context->hash_count + internal_context->block_offset ) * 8; + + byte_stream_copy_from_uint64_little_endian( + &( internal_context->block[ block_size - 8 ] ), + bit_size ); + + process_count = libhmac_md5_context_transform( + internal_context, + internal_context->block, + block_size, + error ); + + if( process_count == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to transform context block.", + function ); + + return( -1 ); + } +#if !defined( LIBHMAC_UNFOLLED_LOOPS ) + for( hash_values_index = 0; + hash_values_index < 4; + hash_values_index++ ) + { + byte_stream_copy_from_uint32_little_endian( + &( hash[ hash_index ] ), + internal_context->hash_values[ hash_values_index ] ); + + hash_index += sizeof( uint32_t ); + } +#else + byte_stream_copy_from_uint32_little_endian( + &( hash[ 0 ] ), + internal_context->hash_values[ 0 ] ); + + byte_stream_copy_from_uint32_little_endian( + &( hash[ 4 ] ), + internal_context->hash_values[ 1 ] ); + + byte_stream_copy_from_uint32_little_endian( + &( hash[ 8 ] ), + internal_context->hash_values[ 2 ] ); + + byte_stream_copy_from_uint32_little_endian( + &( hash[ 12 ] ), + internal_context->hash_values[ 3 ] ); + +#endif /* !defined( LIBHMAC_UNFOLLED_LOOPS ) */ + + /* Prevent sensitive data from leaking + */ + if( memory_set( + internal_context, + 0, + sizeof( libhmac_internal_md5_context_t ) ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_SET_FAILED, + "%s: unable to clear context.", + function ); + + return( -1 ); + } + return( 1 ); +} + +#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_MD5_H ) && defined( MD5_DIGEST_LENGTH ) */ + diff -Nru libfshfs-20201104/libhmac/libhmac_md5_context.h libfshfs-20240221/libhmac/libhmac_md5_context.h --- libfshfs-20201104/libhmac/libhmac_md5_context.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libhmac/libhmac_md5_context.h 2024-02-21 06:04:12.000000000 +0000 @@ -0,0 +1,130 @@ +/* + * MD5 context functions + * + * Copyright (C) 2011-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _LIBHMAC_MD5_CONTEXT_H ) +#define _LIBHMAC_MD5_CONTEXT_H + +#include +#include + +#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_MD5_H ) +#include + +#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) +#include +#endif + +#include "libhmac_extern.h" +#include "libhmac_libcerror.h" +#include "libhmac_types.h" + +#if defined( __cplusplus ) +extern "C" { +#endif + +#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_MD5_H ) && defined( MD5_DIGEST_LENGTH ) +#define LIBHMAC_HAVE_MD5_SUPPORT + +#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_MD5 ) +#define LIBHMAC_HAVE_MD5_SUPPORT + +#endif + +#define LIBHMAC_MD5_BLOCK_SIZE 64 + +typedef struct libhmac_internal_md5_context libhmac_internal_md5_context_t; + +struct libhmac_internal_md5_context +{ +#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_MD5_H ) && defined( MD5_DIGEST_LENGTH ) + /* The MD5 context + */ + MD5_CTX md5_context; + +#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_MD5 ) + /* The EVP message digest context + */ +#if defined( HAVE_EVP_MD_CTX_INIT ) + EVP_MD_CTX internal_evp_md_context; +#endif + + EVP_MD_CTX *evp_md_context; + +#else + /* The number of bytes hashed + */ + uint64_t hash_count; + + /* The hash values + */ + uint32_t hash_values[ 4 ]; + + /* The block offset + */ + size_t block_offset; + + /* The (data) block + */ + uint8_t block[ 2 * LIBHMAC_MD5_BLOCK_SIZE ]; + +#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_MD5_H ) && defined( MD5_DIGEST_LENGTH ) */ +}; + +#if !defined( LIBHMAC_HAVE_MD5_SUPPORT ) + +ssize_t libhmac_context_md5_transform( + libhmac_internal_md5_context_t *internal_context, + const uint8_t *buffer, + size_t size, + libcerror_error_t **error ); + +#endif /* !defined( LIBHMAC_HAVE_MD5_SUPPORT ) */ + +LIBHMAC_EXTERN \ +int libhmac_md5_context_initialize( + libhmac_md5_context_t **context, + libcerror_error_t **error ); + +LIBHMAC_EXTERN \ +int libhmac_md5_context_free( + libhmac_md5_context_t **context, + libcerror_error_t **error ); + +LIBHMAC_EXTERN \ +int libhmac_md5_context_update( + libhmac_md5_context_t *context, + const uint8_t *buffer, + size_t size, + libcerror_error_t **error ); + +LIBHMAC_EXTERN \ +int libhmac_md5_context_finalize( + libhmac_md5_context_t *context, + uint8_t *hash, + size_t hash_size, + libcerror_error_t **error ); + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _LIBHMAC_MD5_CONTEXT_H ) */ + diff -Nru libfshfs-20201104/libhmac/libhmac_sha1.c libfshfs-20240221/libhmac/libhmac_sha1.c --- libfshfs-20201104/libhmac/libhmac_sha1.c 2020-11-04 11:56:11.000000000 +0000 +++ libfshfs-20240221/libhmac/libhmac_sha1.c 2024-02-21 06:04:12.000000000 +0000 @@ -1,7 +1,7 @@ /* * SHA1 functions * - * Copyright (C) 2011-2020, Joachim Metz + * Copyright (C) 2011-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -20,476 +20,13 @@ */ #include -#include #include #include -#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) -#include - -#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) -#include -#include - -#endif - -#include "libhmac_byte_stream.h" #include "libhmac_definitions.h" #include "libhmac_libcerror.h" #include "libhmac_sha1.h" - -#if !defined( LIBHMAC_HAVE_SHA1_SUPPORT ) - -/* RFC 3174/FIPS 180-1 based SHA-1 functions - */ - -/* TODO decription what these values are based on - */ -uint32_t libhmac_sha1_fixed_constants[ 5 ] = { - 0x67452301UL, 0xefcdab89UL, 0x98badcfeUL, 0x10325476UL, 0xc3d2e1f0UL -}; - -#define libhmac_sha1_transform_extend_32bit_value( values_32bit, value_32bit_index ) \ - values_32bit[ value_32bit_index ] = values_32bit[ value_32bit_index - 3 ] \ - ^ values_32bit[ value_32bit_index - 8 ] \ - ^ values_32bit[ value_32bit_index - 14 ] \ - ^ values_32bit[ value_32bit_index - 16 ]; \ - values_32bit[ value_32bit_index ] = byte_stream_bit_rotate_left_32bit( \ - values_32bit[ value_32bit_index ], \ - 1 ); - -#define libhmac_sha1_transform_unfolded_extend_32bit_values( values_32bit ) \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 16 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 17 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 18 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 19 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 20 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 21 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 22 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 23 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 24 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 25 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 26 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 27 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 28 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 29 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 30 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 31 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 32 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 33 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 34 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 35 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 36 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 37 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 38 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 39 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 40 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 41 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 42 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 43 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 44 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 45 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 46 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 47 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 48 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 49 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 50 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 51 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 52 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 53 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 54 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 55 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 56 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 57 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 58 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 59 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 60 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 61 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 62 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 63 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 64 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 65 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 66 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 67 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 68 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 69 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 70 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 71 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 72 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 73 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 74 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 75 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 76 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 77 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 78 ); \ - libhmac_sha1_transform_extend_32bit_value( values_32bit, 79 ); - -#define libhmac_sha1_transform_unfolded_calculate_hash_value_round1( values_32bit, value_32bit_index, hash_values, hash_value_index0, hash_value_index1, hash_value_index2, hash_value_index3, hash_value_index4 ) \ - hash_values[ hash_value_index4 ] += ( hash_values[ hash_value_index1 ] & hash_values[ hash_value_index2 ] ) \ - | ( ~( hash_values[ hash_value_index1 ] ) & hash_values[ hash_value_index3 ] ); \ - hash_values[ hash_value_index4 ] += 0x5a827999UL; \ - hash_values[ hash_value_index4 ] += byte_stream_bit_rotate_left_32bit( \ - hash_values[ hash_value_index0 ], \ - 5 ); \ - hash_values[ hash_value_index4 ] += values_32bit[ value_32bit_index ]; \ -\ - hash_values[ hash_value_index1 ] = byte_stream_bit_rotate_left_32bit( \ - hash_values[ hash_value_index1 ], \ - 30 ); - -#define libhmac_sha1_transform_unfolded_calculate_hash_value_round2( values_32bit, value_32bit_index, hash_values, hash_value_index0, hash_value_index1, hash_value_index2, hash_value_index3, hash_value_index4 ) \ - hash_values[ hash_value_index4 ] += hash_values[ hash_value_index1 ] \ - ^ hash_values[ hash_value_index2 ] \ - ^ hash_values[ hash_value_index3 ]; \ - hash_values[ hash_value_index4 ] += 0x6ed9eba1UL; \ - hash_values[ hash_value_index4 ] += byte_stream_bit_rotate_left_32bit( \ - hash_values[ hash_value_index0 ], \ - 5 ); \ - hash_values[ hash_value_index4 ] += values_32bit[ value_32bit_index ]; \ -\ - hash_values[ hash_value_index1 ] = byte_stream_bit_rotate_left_32bit( \ - hash_values[ hash_value_index1 ], \ - 30 ); - -#define libhmac_sha1_transform_unfolded_calculate_hash_value_round3( values_32bit, value_32bit_index, hash_values, hash_value_index0, hash_value_index1, hash_value_index2, hash_value_index3, hash_value_index4 ) \ - hash_values[ hash_value_index4 ] += ( hash_values[ hash_value_index1 ] & hash_values[ hash_value_index2 ] ) \ - | ( hash_values[ hash_value_index1 ] & hash_values[ hash_value_index3 ] ) \ - | ( hash_values[ hash_value_index2 ] & hash_values[ hash_value_index3 ] ); \ - hash_values[ hash_value_index4 ] += 0x8f1bbcdcUL; \ - hash_values[ hash_value_index4 ] += byte_stream_bit_rotate_left_32bit( \ - hash_values[ hash_value_index0 ], \ - 5 ); \ - hash_values[ hash_value_index4 ] += values_32bit[ value_32bit_index ]; \ -\ - hash_values[ hash_value_index1 ] = byte_stream_bit_rotate_left_32bit( \ - hash_values[ hash_value_index1 ], \ - 30 ); - -#define libhmac_sha1_transform_unfolded_calculate_hash_value_round4( values_32bit, value_32bit_index, hash_values, hash_value_index0, hash_value_index1, hash_value_index2, hash_value_index3, hash_value_index4 ) \ - hash_values[ hash_value_index4 ] += hash_values[ hash_value_index1 ] \ - ^ hash_values[ hash_value_index2 ] \ - ^ hash_values[ hash_value_index3 ]; \ - hash_values[ hash_value_index4 ] += 0xca62c1d6UL; \ - hash_values[ hash_value_index4 ] += byte_stream_bit_rotate_left_32bit( \ - hash_values[ hash_value_index0 ], \ - 5 ); \ - hash_values[ hash_value_index4 ] += values_32bit[ value_32bit_index ]; \ -\ - hash_values[ hash_value_index1 ] = byte_stream_bit_rotate_left_32bit( \ - hash_values[ hash_value_index1 ], \ - 30 ); - -#define libhmac_sha1_transform_unfolded_calculate_hash_values( values_32bit, hash_values ) \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round1( values_32bit, 0, hash_values, 0, 1, 2, 3, 4 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round1( values_32bit, 1, hash_values, 4, 0, 1, 2, 3 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round1( values_32bit, 2, hash_values, 3 ,4, 0, 1, 2 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round1( values_32bit, 3, hash_values, 2, 3, 4, 0, 1 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round1( values_32bit, 4, hash_values, 1, 2, 3, 4, 0 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round1( values_32bit, 5, hash_values, 0, 1, 2, 3, 4 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round1( values_32bit, 6, hash_values, 4, 0, 1, 2, 3 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round1( values_32bit, 7, hash_values, 3 ,4, 0, 1, 2 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round1( values_32bit, 8, hash_values, 2, 3, 4, 0, 1 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round1( values_32bit, 9, hash_values, 1, 2, 3, 4, 0 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round1( values_32bit, 10, hash_values, 0, 1, 2, 3, 4 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round1( values_32bit, 11, hash_values, 4, 0, 1, 2, 3 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round1( values_32bit, 12, hash_values, 3 ,4, 0, 1, 2 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round1( values_32bit, 13, hash_values, 2, 3, 4, 0, 1 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round1( values_32bit, 14, hash_values, 1, 2, 3, 4, 0 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round1( values_32bit, 15, hash_values, 0, 1, 2, 3, 4 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round1( values_32bit, 16, hash_values, 4, 0, 1, 2, 3 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round1( values_32bit, 17, hash_values, 3 ,4, 0, 1, 2 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round1( values_32bit, 18, hash_values, 2, 3, 4, 0, 1 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round1( values_32bit, 19, hash_values, 1, 2, 3, 4, 0 ); \ -\ - libhmac_sha1_transform_unfolded_calculate_hash_value_round2( values_32bit, 20, hash_values, 0, 1, 2, 3, 4 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round2( values_32bit, 21, hash_values, 4, 0, 1, 2, 3 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round2( values_32bit, 22, hash_values, 3 ,4, 0, 1, 2 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round2( values_32bit, 23, hash_values, 2, 3, 4, 0, 1 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round2( values_32bit, 24, hash_values, 1, 2, 3, 4, 0 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round2( values_32bit, 25, hash_values, 0, 1, 2, 3, 4 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round2( values_32bit, 26, hash_values, 4, 0, 1, 2, 3 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round2( values_32bit, 27, hash_values, 3 ,4, 0, 1, 2 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round2( values_32bit, 28, hash_values, 2, 3, 4, 0, 1 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round2( values_32bit, 29, hash_values, 1, 2, 3, 4, 0 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round2( values_32bit, 30, hash_values, 0, 1, 2, 3, 4 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round2( values_32bit, 31, hash_values, 4, 0, 1, 2, 3 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round2( values_32bit, 32, hash_values, 3 ,4, 0, 1, 2 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round2( values_32bit, 33, hash_values, 2, 3, 4, 0, 1 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round2( values_32bit, 34, hash_values, 1, 2, 3, 4, 0 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round2( values_32bit, 35, hash_values, 0, 1, 2, 3, 4 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round2( values_32bit, 36, hash_values, 4, 0, 1, 2, 3 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round2( values_32bit, 37, hash_values, 3 ,4, 0, 1, 2 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round2( values_32bit, 38, hash_values, 2, 3, 4, 0, 1 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round2( values_32bit, 39, hash_values, 1, 2, 3, 4, 0 ); \ -\ - libhmac_sha1_transform_unfolded_calculate_hash_value_round3( values_32bit, 40, hash_values, 0, 1, 2, 3, 4 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round3( values_32bit, 41, hash_values, 4, 0, 1, 2, 3 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round3( values_32bit, 42, hash_values, 3 ,4, 0, 1, 2 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round3( values_32bit, 43, hash_values, 2, 3, 4, 0, 1 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round3( values_32bit, 44, hash_values, 1, 2, 3, 4, 0 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round3( values_32bit, 45, hash_values, 0, 1, 2, 3, 4 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round3( values_32bit, 46, hash_values, 4, 0, 1, 2, 3 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round3( values_32bit, 47, hash_values, 3 ,4, 0, 1, 2 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round3( values_32bit, 48, hash_values, 2, 3, 4, 0, 1 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round3( values_32bit, 49, hash_values, 1, 2, 3, 4, 0 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round3( values_32bit, 50, hash_values, 0, 1, 2, 3, 4 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round3( values_32bit, 51, hash_values, 4, 0, 1, 2, 3 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round3( values_32bit, 52, hash_values, 3 ,4, 0, 1, 2 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round3( values_32bit, 53, hash_values, 2, 3, 4, 0, 1 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round3( values_32bit, 54, hash_values, 1, 2, 3, 4, 0 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round3( values_32bit, 55, hash_values, 0, 1, 2, 3, 4 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round3( values_32bit, 56, hash_values, 4, 0, 1, 2, 3 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round3( values_32bit, 57, hash_values, 3 ,4, 0, 1, 2 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round3( values_32bit, 58, hash_values, 2, 3, 4, 0, 1 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round3( values_32bit, 59, hash_values, 1, 2, 3, 4, 0 ); \ -\ - libhmac_sha1_transform_unfolded_calculate_hash_value_round4( values_32bit, 60, hash_values, 0, 1, 2, 3, 4 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round4( values_32bit, 61, hash_values, 4, 0, 1, 2, 3 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round4( values_32bit, 62, hash_values, 3 ,4, 0, 1, 2 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round4( values_32bit, 63, hash_values, 2, 3, 4, 0, 1 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round4( values_32bit, 64, hash_values, 1, 2, 3, 4, 0 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round4( values_32bit, 65, hash_values, 0, 1, 2, 3, 4 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round4( values_32bit, 66, hash_values, 4, 0, 1, 2, 3 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round4( values_32bit, 67, hash_values, 3 ,4, 0, 1, 2 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round4( values_32bit, 68, hash_values, 2, 3, 4, 0, 1 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round4( values_32bit, 69, hash_values, 1, 2, 3, 4, 0 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round4( values_32bit, 70, hash_values, 0, 1, 2, 3, 4 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round4( values_32bit, 71, hash_values, 4, 0, 1, 2, 3 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round4( values_32bit, 72, hash_values, 3 ,4, 0, 1, 2 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round4( values_32bit, 73, hash_values, 2, 3, 4, 0, 1 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round4( values_32bit, 74, hash_values, 1, 2, 3, 4, 0 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round4( values_32bit, 75, hash_values, 0, 1, 2, 3, 4 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round4( values_32bit, 76, hash_values, 4, 0, 1, 2, 3 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round4( values_32bit, 77, hash_values, 3 ,4, 0, 1, 2 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round4( values_32bit, 78, hash_values, 2, 3, 4, 0, 1 ); \ - libhmac_sha1_transform_unfolded_calculate_hash_value_round4( values_32bit, 79, hash_values, 1, 2, 3, 4, 0 ); - -/* Calculates the SHA1 of 64 byte sized blocks of data in a buffer - * Returns the number of bytes used if successful or -1 on error - */ -ssize_t libhmac_sha1_transform( - libhmac_internal_sha1_context_t *internal_context, - const uint8_t *buffer, - size_t size, - libcerror_error_t **error ) -{ - uint32_t hash_values[ 5 ]; - uint32_t values_32bit[ 80 ]; - - static char *function = "libhmac_sha1_transform"; - size_t buffer_offset = 0; - -#if !defined( LIBHMAC_UNFOLLED_LOOPS ) - uint32_t hash_value = 0; - uint8_t hash_values_index = 0; - uint8_t value_32bit_index = 0; -#endif - - if( internal_context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid internal context.", - function ); - - return( -1 ); - } - if( buffer == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid buffer.", - function ); - - return( -1 ); - } - if( size > (size_t) SSIZE_MAX ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, - "%s: invalid size value exceeds maximum.", - function ); - - return( -1 ); - } - while( size >= LIBHMAC_SHA1_BLOCK_SIZE ) - { - if( memory_copy( - hash_values, - internal_context->hash_values, - sizeof( uint32_t ) * 5 ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_COPY_FAILED, - "%s: unable to copy hash values.", - function ); - - goto on_error; - } -#if defined( LIBHMAC_UNFOLLED_LOOPS ) - /* Break the block into 16 x 32-bit values - */ - libhmac_byte_stream_copy_to_16x_uint32_big_endian( - &( buffer[ buffer_offset ] ), - values_32bit ); - - buffer_offset += LIBHMAC_SHA1_BLOCK_SIZE; - - /* Extend to 80 x 32-bit values - */ - libhmac_sha1_transform_unfolded_extend_32bit_values( - values_32bit ); - - /* Calculate the hash values for the 32-bit values - */ - libhmac_sha1_transform_unfolded_calculate_hash_values( - values_32bit, - hash_values ); - - /* Update the hash values in the context - */ - internal_context->hash_values[ 0 ] += hash_values[ 0 ]; - internal_context->hash_values[ 1 ] += hash_values[ 1 ]; - internal_context->hash_values[ 2 ] += hash_values[ 2 ]; - internal_context->hash_values[ 3 ] += hash_values[ 3 ]; - internal_context->hash_values[ 4 ] += hash_values[ 4 ]; -#else - /* Break the block into 16 x 32-bit values - */ - for( value_32bit_index = 0; - value_32bit_index < 16; - value_32bit_index++ ) - { - byte_stream_copy_to_uint32_big_endian( - &( buffer[ buffer_offset ] ), - values_32bit[ value_32bit_index ] ); - - buffer_offset += sizeof( uint32_t ); - } - /* Extend to 80 x 32-bit values - */ - for( value_32bit_index = 16; - value_32bit_index < 80; - value_32bit_index++ ) - { - libhmac_sha1_transform_extend_32bit_value( - values_32bit, - value_32bit_index ); - } - /* Calculate the hash values for the 32-bit values - */ - for( value_32bit_index = 0; - value_32bit_index < 80; - value_32bit_index++ ) - { - if( value_32bit_index < 20 ) - { - hash_values[ 4 ] += ( hash_values[ 1 ] & hash_values[ 2 ] ) - | ( ~( hash_values[ 1 ] ) & hash_values[ 3 ] ); - hash_values[ 4 ] += 0x5a827999UL; - } - else if( value_32bit_index < 40 ) - { - hash_values[ 4 ] += hash_values[ 1 ] - ^ hash_values[ 2 ] - ^ hash_values[ 3 ]; - hash_values[ 4 ] += 0x6ed9eba1UL; - } - else if( value_32bit_index < 60 ) - { - hash_values[ 4 ] += ( hash_values[ 1 ] & hash_values[ 2 ] ) - | ( hash_values[ 1 ] & hash_values[ 3 ] ) - | ( hash_values[ 2 ] & hash_values[ 3 ] ); - hash_values[ 4 ] += 0x8f1bbcdcUL; - } - else - { - hash_values[ 4 ] += hash_values[ 1 ] - ^ hash_values[ 2 ] - ^ hash_values[ 3 ]; - hash_values[ 4 ] += 0xca62c1d6UL; - } - hash_values[ 4 ] += byte_stream_bit_rotate_left_32bit( - hash_values[ 0 ], - 5 ); - hash_values[ 4 ] += values_32bit[ value_32bit_index ]; - - hash_value = hash_values[ 4 ]; - hash_values[ 4 ] = hash_values[ 3 ]; - hash_values[ 3 ] = hash_values[ 2 ]; - hash_values[ 2 ] = byte_stream_bit_rotate_left_32bit( - hash_values[ 1 ], - 30 ); - hash_values[ 1 ] = hash_values[ 0 ]; - hash_values[ 0 ] = hash_value; - } - /* Update the hash values in the context - */ - for( hash_values_index = 0; - hash_values_index < 5; - hash_values_index++ ) - { - internal_context->hash_values[ hash_values_index ] += hash_values[ hash_values_index ]; - } -#endif /* defined( LIBHMAC_UNFOLLED_LOOPS ) */ - - size -= LIBHMAC_SHA1_BLOCK_SIZE; - } - /* Prevent sensitive data from leaking - */ - if( memory_set( - hash_values, - 0, - sizeof( uint32_t ) * 5 ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_SET_FAILED, - "%s: unable to clear hash values.", - function ); - - goto on_error; - } - if( memory_set( - values_32bit, - 0, - sizeof( uint32_t ) * 16 ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_SET_FAILED, - "%s: unable to clear 32-bit values.", - function ); - - goto on_error; - } - return( (ssize_t) buffer_offset ); - -on_error: - memory_set( - values_32bit, - 0, - sizeof( uint32_t ) * 64 ); - - memory_set( - hash_values, - 0, - sizeof( uint32_t ) * 5 ); - - return( -1 ); -} - -#endif /* !defined( LIBHMAC_HAVE_SHA1_SUPPORT ) */ +#include "libhmac_sha1_context.h" /* Creates a SHA1 context * Make sure the value context is referencing, is set to NULL @@ -499,102 +36,11 @@ libhmac_sha1_context_t **context, libcerror_error_t **error ) { - libhmac_internal_sha1_context_t *internal_context = NULL; - static char *function = "libhmac_sha1_initialize"; - - if( context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid context.", - function ); - - return( -1 ); - } - if( *context != NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, - "%s: invalid context value already set.", - function ); - - return( -1 ); - } - internal_context = memory_allocate_structure( - libhmac_internal_sha1_context_t ); - - if( internal_context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_INSUFFICIENT, - "%s: unable to create context.", - function ); - - goto on_error; - } - if( memory_set( - internal_context, - 0, - sizeof( libhmac_internal_sha1_context_t ) ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_SET_FAILED, - "%s: unable to clear context.", - function ); - - memory_free( - internal_context ); - - return( -1 ); - } -#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA_DIGEST_LENGTH ) - if( SHA1_Init( - &( internal_context->sha1_context ) ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, - "%s: unable to initialize context.", - function ); - - goto on_error; - } - -#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA1 ) -#if defined( HAVE_EVP_MD_CTX_INIT ) - EVP_MD_CTX_init( - &( internal_context->internal_evp_md_context ) ); - - internal_context->evp_md_context = &( internal_context->internal_evp_md_context ); -#else - internal_context->evp_md_context = EVP_MD_CTX_new(); - - if( internal_context->evp_md_context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, - "%s: unable to create EVP message digest context.", - function ); + static char *function = "libhmac_sha1_initialize"; - goto on_error; - } -#endif /* defined( HAVE_EVP_MD_CTX_INIT ) */ - - if( EVP_DigestInit_ex( - internal_context->evp_md_context, - EVP_sha1(), - NULL ) != 1 ) + if( libhmac_sha1_context_initialize( + context, + error ) != 1 ) { libcerror_error_set( error, @@ -603,47 +49,9 @@ "%s: unable to initialize context.", function ); -#if defined( HAVE_EVP_MD_CTX_CLEANUP ) - EVP_MD_CTX_cleanup( - &( internal_context->internal_evp_md_context ) ); - ERR_remove_thread_state( - NULL ); -#else - EVP_MD_CTX_free( - internal_context->evp_md_context ); -#endif - internal_context->evp_md_context = NULL; - - goto on_error; - } -#else - if( memory_copy( - internal_context->hash_values, - libhmac_sha1_fixed_constants, - sizeof( uint32_t ) * 5 ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_COPY_FAILED, - "%s: unable to copy fixed constants to hash values.", - function ); - - goto on_error; + return( -1 ); } -#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA_DIGEST_LENGTH ) */ - - *context = (libhmac_sha1_context_t *) internal_context; - return( 1 ); - -on_error: - if( internal_context != NULL ) - { - memory_free( - internal_context ); - } - return( -1 ); } /* Frees a SHA1 context @@ -653,133 +61,17 @@ libhmac_sha1_context_t **context, libcerror_error_t **error ) { - libhmac_internal_sha1_context_t *internal_context = NULL; - static char *function = "libhmac_sha1_free"; - - if( context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid context.", - function ); - - return( -1 ); - } - if( *context != NULL ) - { - internal_context = (libhmac_internal_sha1_context_t *) *context; - *context = NULL; - -#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA_DIGEST_LENGTH ) - /* No additional clean up necessary - */ - -#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA1 ) -#if defined( HAVE_EVP_MD_CTX_CLEANUP ) - if( EVP_MD_CTX_cleanup( - &( internal_context->internal_evp_md_context ) ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, - "%s: unable to clean up EVP message digest context.", - function ); - } - /* Make sure the error state is removed otherwise OpenSSL will leak memory - */ - ERR_remove_thread_state( - NULL ); -#else - EVP_MD_CTX_free( - internal_context->evp_md_context ); - -#endif /* defined( HAVE_EVP_MD_CTX_CLEANUP ) */ - - internal_context->evp_md_context = NULL; -#else - /* No additional clean up necessary - */ - -#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA_DIGEST_LENGTH ) */ - memory_free( - internal_context ); - } - return( 1 ); -} - -#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA_DIGEST_LENGTH ) - -/* Updates the SHA1 context using OpenSSL - * Returns 1 if successful or -1 on error - */ -int libhmac_sha1_update( - libhmac_sha1_context_t *context, - const uint8_t *buffer, - size_t size, - libcerror_error_t **error ) -{ - libhmac_internal_sha1_context_t *internal_context = NULL; - static char *function = "libhmac_sha1_update"; - unsigned long safe_hash_size = 0; - - if( context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid context.", - function ); + static char *function = "libhmac_sha1_free"; - return( -1 ); - } - internal_context = (libhmac_internal_sha1_context_t *) context; - - if( buffer == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid buffer.", - function ); - - return( -1 ); - } -#if ( SIZEOF_LONG < SIZEOF_SIZE_T ) - if( size > (size_t) ULONG_MAX ) -#else - if( size > (size_t) SSIZE_MAX ) -#endif - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, - "%s: invalid size value exceeds maximum.", - function ); - - return( -1 ); - } - if( size == 0 ) - { - return( 1 ); - } - safe_hash_size = (unsigned long) size; - - if( SHA1_Update( - &( internal_context->sha1_context ), - (const void *) buffer, - size ) != 1 ) + if( libhmac_sha1_context_free( + context, + error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to update context.", + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free context.", function ); return( -1 ); @@ -787,9 +79,7 @@ return( 1 ); } -#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA1 ) - -/* Updates the SHA1 context using OpenSSL EVP +/* Updates the SHA1 context * Returns 1 if successful or -1 on error */ int libhmac_sha1_update( @@ -798,52 +88,13 @@ size_t size, libcerror_error_t **error ) { - libhmac_internal_sha1_context_t *internal_context = NULL; - static char *function = "libhmac_sha1_update"; + static char *function = "libhmac_sha1_update"; - if( context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid context.", - function ); - - return( -1 ); - } - internal_context = (libhmac_internal_sha1_context_t *) context; - - if( buffer == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid buffer.", - function ); - - return( -1 ); - } - if( size > (size_t) SSIZE_MAX ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, - "%s: invalid size value exceeds maximum.", - function ); - - return( -1 ); - } - if( size == 0 ) - { - return( 1 ); - } - if( EVP_DigestUpdate( - internal_context->evp_md_context, - (const void *) buffer, - size ) != 1 ) + if( libhmac_sha1_context_update( + context, + buffer, + size, + error ) != 1 ) { libcerror_error_set( error, @@ -857,174 +108,7 @@ return( 1 ); } -#else - -/* Updates the SHA1 context using fallback implementation - * Returns 1 if successful or -1 on error - */ -int libhmac_sha1_update( - libhmac_sha1_context_t *context, - const uint8_t *buffer, - size_t size, - libcerror_error_t **error ) -{ - libhmac_internal_sha1_context_t *internal_context = NULL; - static char *function = "libhmac_sha1_update"; - size_t buffer_offset = 0; - size_t remaining_block_size = 0; - ssize_t process_count = 0; - - if( context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid context.", - function ); - - return( -1 ); - } - internal_context = (libhmac_internal_sha1_context_t *) context; - - if( buffer == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid buffer.", - function ); - - return( -1 ); - } - if( size > (size_t) SSIZE_MAX ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, - "%s: invalid size value exceeds maximum.", - function ); - - return( -1 ); - } - if( size == 0 ) - { - return( 1 ); - } - if( internal_context->block_offset > 0 ) - { - remaining_block_size = LIBHMAC_SHA1_BLOCK_SIZE - internal_context->block_offset; - - if( remaining_block_size > size ) - { - remaining_block_size = size; - } - if( memory_copy( - &( internal_context->block[ internal_context->block_offset ] ), - buffer, - remaining_block_size ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_COPY_FAILED, - "%s: unable to copy data to context block.", - function ); - - return( -1 ); - } - internal_context->block_offset += remaining_block_size; - - if( internal_context->block_offset < LIBHMAC_SHA1_BLOCK_SIZE ) - { - return( 1 ); - } - buffer_offset += remaining_block_size; - size -= remaining_block_size; - - process_count = libhmac_sha1_transform( - internal_context, - internal_context->block, - LIBHMAC_SHA1_BLOCK_SIZE, - error ); - - if( process_count == -1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to transform context block.", - function ); - - return( -1 ); - } - internal_context->hash_count += process_count; - internal_context->block_offset = 0; - } - if( size > 0 ) - { - process_count = libhmac_sha1_transform( - internal_context, - &( buffer[ buffer_offset ] ), - size, - error ); - - if( process_count == -1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to transform buffer.", - function ); - - return( -1 ); - } - internal_context->hash_count += process_count; - - buffer_offset += process_count; - size -= process_count; - } - if( size > 0 ) - { - if( size >= LIBHMAC_SHA1_BLOCK_SIZE ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, - "%s: invalid size value out of bounds.", - function ); - - return( -1 ); - } - if( memory_copy( - internal_context->block, - &( buffer[ buffer_offset ] ), - size ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_COPY_FAILED, - "%s: unable to copy remaining data to context block.", - function ); - - return( -1 ); - } - internal_context->block_offset = size; - } - return( 1 ); -} - -#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA_DIGEST_LENGTH ) */ - -#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA_DIGEST_LENGTH ) - -/* Finalizes the SHA1 context using OpenSSL +/* Finalizes the SHA1 context * Returns 1 if successful or -1 on error */ int libhmac_sha1_finalize( @@ -1033,138 +117,13 @@ size_t hash_size, libcerror_error_t **error ) { - libhmac_internal_sha1_context_t *internal_context = NULL; - static char *function = "libhmac_sha1_finalize"; - - if( context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid context.", - function ); - - return( -1 ); - } - internal_context = (libhmac_internal_sha1_context_t *) context; - - if( hash == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid hash.", - function ); + static char *function = "libhmac_sha1_finalize"; - return( -1 ); - } - if( hash_size > (size_t) SSIZE_MAX ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, - "%s: invalid hash size value exceeds maximum.", - function ); - - return( -1 ); - } - if( hash_size < (size_t) LIBHMAC_SHA1_HASH_SIZE ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, - "%s: invalid hash size value too small.", - function ); - - return( -1 ); - } - if( SHA1_Final( + if( libhmac_sha1_context_finalize( + context, hash, - &( internal_context->sha1_context ) ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, - "%s: unable to finalize context.", - function ); - - return( -1 ); - } - return( 1 ); -} - -#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA1 ) - -/* Finalizes the SHA1 context using OpenSSL EVP - * Returns 1 if successful or -1 on error - */ -int libhmac_sha1_finalize( - libhmac_sha1_context_t *context, - uint8_t *hash, - size_t hash_size, - libcerror_error_t **error ) -{ - libhmac_internal_sha1_context_t *internal_context = NULL; - static char *function = "libhmac_sha1_finalize"; - unsigned int safe_hash_size = 0; - - if( context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid context.", - function ); - - return( -1 ); - } - internal_context = (libhmac_internal_sha1_context_t *) context; - - if( hash == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid hash.", - function ); - - return( -1 ); - } - if( hash_size > (size_t) UINT_MAX ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, - "%s: invalid hash size value exceeds maximum.", - function ); - - return( -1 ); - } - if( hash_size < (size_t) LIBHMAC_SHA1_HASH_SIZE ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, - "%s: invalid hash size value too small.", - function ); - - return( -1 ); - } - safe_hash_size = (unsigned int) hash_size; - - if( EVP_DigestFinal_ex( - internal_context->evp_md_context, - (unsigned char *) hash, - &safe_hash_size ) != 1 ) + hash_size, + error ) != 1 ) { libcerror_error_set( error, @@ -1178,192 +137,6 @@ return( 1 ); } -#else - -/* Finalizes the SHA1 context using fallback implementation - * Returns 1 if successful or -1 on error - */ -int libhmac_sha1_finalize( - libhmac_sha1_context_t *context, - uint8_t *hash, - size_t hash_size, - libcerror_error_t **error ) -{ - libhmac_internal_sha1_context_t *internal_context = NULL; - static char *function = "libhmac_sha1_finalize"; - size_t block_size = 0; - size_t number_of_blocks = 0; - ssize_t process_count = 0; - uint64_t bit_size = 0; - -#if !defined( LIBHMAC_UNFOLLED_LOOPS ) - size_t hash_index = 0; - int hash_values_index = 0; -#endif - - if( context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid context.", - function ); - - return( -1 ); - } - internal_context = (libhmac_internal_sha1_context_t *) context; - - if( hash == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid hash.", - function ); - - return( -1 ); - } - if( hash_size < (size_t) LIBHMAC_SHA1_HASH_SIZE ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, - "%s: invalid hash value too small.", - function ); - - return( -1 ); - } - if( hash_size > (size_t) SSIZE_MAX ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, - "%s: invalid hash size value exceeds maximum.", - function ); - - return( -1 ); - } - if( hash_size < (size_t) LIBHMAC_SHA1_HASH_SIZE ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, - "%s: invalid hash size value too small.", - function ); - - return( -1 ); - } - /* Add padding with a size of 56 mod 64 - */ - number_of_blocks = 1; - - if( internal_context->block_offset > 55 ) - { - number_of_blocks += 1; - } - block_size = number_of_blocks * LIBHMAC_SHA1_BLOCK_SIZE; - - if( memory_set( - &( internal_context->block[ internal_context->block_offset ] ), - 0, - block_size - internal_context->block_offset ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_SET_FAILED, - "%s: unable to clear context block.", - function ); - - return( -1 ); - } - /* The first byte of the padding contains 0x80 - */ - internal_context->block[ internal_context->block_offset ] = 0x80; - - bit_size = ( internal_context->hash_count + internal_context->block_offset ) * 8; - - byte_stream_copy_from_uint64_big_endian( - &( internal_context->block[ block_size - 8 ] ), - bit_size ); - - process_count = libhmac_sha1_transform( - internal_context, - internal_context->block, - block_size, - error ); - - if( process_count == -1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to transform context block.", - function ); - - return( -1 ); - } -#if !defined( LIBHMAC_UNFOLLED_LOOPS ) - for( hash_values_index = 0; - hash_values_index < 5; - hash_values_index++ ) - { - byte_stream_copy_from_uint32_big_endian( - &( hash[ hash_index ] ), - internal_context->hash_values[ hash_values_index ] ); - - hash_index += sizeof( uint32_t ); - } -#else - byte_stream_copy_from_uint32_big_endian( - &( hash[ 0 ] ), - internal_context->hash_values[ 0 ] ); - - byte_stream_copy_from_uint32_big_endian( - &( hash[ 4 ] ), - internal_context->hash_values[ 1 ] ); - - byte_stream_copy_from_uint32_big_endian( - &( hash[ 8 ] ), - internal_context->hash_values[ 2 ] ); - - byte_stream_copy_from_uint32_big_endian( - &( hash[ 12 ] ), - internal_context->hash_values[ 3 ] ); - - byte_stream_copy_from_uint32_big_endian( - &( hash[ 16 ] ), - internal_context->hash_values[ 4 ] ); - -#endif /* !defined( LIBHMAC_UNFOLLED_LOOPS ) */ - - /* Prevent sensitive data from leaking - */ - if( memory_set( - internal_context, - 0, - sizeof( libhmac_internal_sha1_context_t ) ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_SET_FAILED, - "%s: unable to clear context.", - function ); - - return( -1 ); - } - return( 1 ); -} - -#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA_DIGEST_LENGTH ) */ - /* Calculates the SHA1 of the buffer * Returns 1 if successful or -1 on error */ @@ -1377,7 +150,7 @@ libhmac_sha1_context_t *context = NULL; static char *function = "libhmac_sha1_calculate"; - if( libhmac_sha1_initialize( + if( libhmac_sha1_context_initialize( &context, error ) != 1 ) { @@ -1390,7 +163,7 @@ goto on_error; } - if( libhmac_sha1_update( + if( libhmac_sha1_context_update( context, buffer, size, @@ -1405,7 +178,7 @@ goto on_error; } - if( libhmac_sha1_finalize( + if( libhmac_sha1_context_finalize( context, hash, hash_size, @@ -1420,7 +193,7 @@ goto on_error; } - if( libhmac_sha1_free( + if( libhmac_sha1_context_free( &context, error ) != 1 ) { @@ -1438,7 +211,7 @@ on_error: if( context != NULL ) { - libhmac_sha1_free( + libhmac_sha1_context_free( &context, NULL ); } @@ -1548,7 +321,7 @@ } else { - if( libhmac_sha1_initialize( + if( libhmac_sha1_context_initialize( &context, error ) != 1 ) { @@ -1561,7 +334,7 @@ goto on_error; } - if( libhmac_sha1_update( + if( libhmac_sha1_context_update( context, key, key_size, @@ -1576,7 +349,7 @@ goto on_error; } - if( libhmac_sha1_finalize( + if( libhmac_sha1_context_finalize( context, key_hash, LIBHMAC_SHA1_HASH_SIZE, @@ -1591,7 +364,7 @@ goto on_error; } - if( libhmac_sha1_free( + if( libhmac_sha1_context_free( &context, error ) != 1 ) { @@ -1699,7 +472,7 @@ inner_padding[ block_index ] ^= key_data[ block_index ]; outer_padding[ block_index ] ^= key_data[ block_index ]; } - if( libhmac_sha1_initialize( + if( libhmac_sha1_context_initialize( &context, error ) != 1 ) { @@ -1712,7 +485,7 @@ goto on_error; } - if( libhmac_sha1_update( + if( libhmac_sha1_context_update( context, inner_padding, block_size, @@ -1727,7 +500,7 @@ goto on_error; } - if( libhmac_sha1_update( + if( libhmac_sha1_context_update( context, buffer, size, @@ -1742,7 +515,7 @@ goto on_error; } - if( libhmac_sha1_finalize( + if( libhmac_sha1_context_finalize( context, hmac, hmac_size, @@ -1757,7 +530,7 @@ goto on_error; } - if( libhmac_sha1_free( + if( libhmac_sha1_context_free( &context, error ) != 1 ) { @@ -1770,7 +543,7 @@ goto on_error; } - if( libhmac_sha1_initialize( + if( libhmac_sha1_context_initialize( &context, error ) != 1 ) { @@ -1783,7 +556,7 @@ goto on_error; } - if( libhmac_sha1_update( + if( libhmac_sha1_context_update( context, outer_padding, block_size, @@ -1798,7 +571,7 @@ goto on_error; } - if( libhmac_sha1_update( + if( libhmac_sha1_context_update( context, hmac, LIBHMAC_SHA1_HASH_SIZE, @@ -1813,7 +586,7 @@ goto on_error; } - if( libhmac_sha1_finalize( + if( libhmac_sha1_context_finalize( context, hmac, hmac_size, @@ -1828,7 +601,7 @@ goto on_error; } - if( libhmac_sha1_free( + if( libhmac_sha1_context_free( &context, error ) != 1 ) { @@ -1903,7 +676,7 @@ on_error: if( context != NULL ) { - libhmac_sha1_free( + libhmac_sha1_context_free( &context, NULL ); } diff -Nru libfshfs-20201104/libhmac/libhmac_sha1.h libfshfs-20240221/libhmac/libhmac_sha1.h --- libfshfs-20201104/libhmac/libhmac_sha1.h 2020-11-04 11:56:11.000000000 +0000 +++ libfshfs-20240221/libhmac/libhmac_sha1.h 2024-02-21 06:04:12.000000000 +0000 @@ -1,7 +1,7 @@ /* * SHA1 functions * - * Copyright (C) 2011-2020, Joachim Metz + * Copyright (C) 2011-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -25,14 +25,6 @@ #include #include -#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) -#include - -#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) -#include - -#endif - #include "libhmac_extern.h" #include "libhmac_libcerror.h" #include "libhmac_types.h" @@ -41,66 +33,6 @@ extern "C" { #endif -#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA_DIGEST_LENGTH ) -#define LIBHMAC_HAVE_SHA1_SUPPORT - -#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA1 ) -#define LIBHMAC_HAVE_SHA1_SUPPORT - -#endif - -#if !defined( LIBHMAC_HAVE_SHA1_SUPPORT ) -#define LIBHMAC_SHA1_BLOCK_SIZE 64 -#endif - -typedef struct libhmac_internal_sha1_context libhmac_internal_sha1_context_t; - -struct libhmac_internal_sha1_context -{ -#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA_DIGEST_LENGTH ) - /* The SHA1 context - */ - SHA_CTX sha1_context; - -#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA1 ) - /* The EVP message digest context - */ -#if defined( HAVE_EVP_MD_CTX_INIT ) - EVP_MD_CTX internal_evp_md_context; -#endif - - EVP_MD_CTX *evp_md_context; - -#else - /* The number of bytes hashed - */ - uint64_t hash_count; - - /* The hash values - */ - uint32_t hash_values[ 5 ]; - - /* The block offset - */ - size_t block_offset; - - /* The (data) block - */ - uint8_t block[ 128 ]; - -#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA_DIGEST_LENGTH ) */ -}; - -#if !defined( LIBHMAC_HAVE_SHA1_SUPPORT ) - -ssize_t libhmac_sha1_transform( - libhmac_internal_sha1_context_t *internal_context, - const uint8_t *buffer, - size_t size, - libcerror_error_t **error ); - -#endif /* !defined( LIBHMAC_HAVE_SHA1_SUPPORT ) */ - LIBHMAC_EXTERN \ int libhmac_sha1_initialize( libhmac_sha1_context_t **context, diff -Nru libfshfs-20201104/libhmac/libhmac_sha1_context.c libfshfs-20240221/libhmac/libhmac_sha1_context.c --- libfshfs-20201104/libhmac/libhmac_sha1_context.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libhmac/libhmac_sha1_context.c 2024-02-21 06:04:12.000000000 +0000 @@ -0,0 +1,1380 @@ +/* + * SHA1 context functions + * + * Copyright (C) 2011-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include +#include +#include + +#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) +#include + +#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) +#include +#include +#endif + +#include "libhmac_byte_stream.h" +#include "libhmac_definitions.h" +#include "libhmac_libcerror.h" +#include "libhmac_sha1_context.h" + +#if !defined( LIBHMAC_HAVE_SHA1_SUPPORT ) + +/* RFC 3174/FIPS 180-1 based SHA-1 functions + */ + +/* TODO decription what these values are based on + */ +uint32_t libhmac_sha1_context_fixed_constants[ 5 ] = { + 0x67452301UL, 0xefcdab89UL, 0x98badcfeUL, 0x10325476UL, 0xc3d2e1f0UL +}; + +#define libhmac_sha1_context_transform_extend_32bit_value( values_32bit, value_32bit_index ) \ + values_32bit[ value_32bit_index ] = values_32bit[ value_32bit_index - 3 ] \ + ^ values_32bit[ value_32bit_index - 8 ] \ + ^ values_32bit[ value_32bit_index - 14 ] \ + ^ values_32bit[ value_32bit_index - 16 ]; \ + values_32bit[ value_32bit_index ] = byte_stream_bit_rotate_left_32bit( \ + values_32bit[ value_32bit_index ], \ + 1 ); + +#define libhmac_sha1_context_transform_unfolded_extend_32bit_values( values_32bit ) \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 16 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 17 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 18 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 19 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 20 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 21 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 22 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 23 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 24 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 25 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 26 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 27 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 28 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 29 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 30 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 31 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 32 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 33 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 34 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 35 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 36 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 37 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 38 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 39 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 40 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 41 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 42 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 43 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 44 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 45 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 46 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 47 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 48 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 49 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 50 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 51 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 52 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 53 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 54 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 55 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 56 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 57 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 58 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 59 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 60 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 61 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 62 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 63 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 64 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 65 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 66 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 67 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 68 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 69 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 70 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 71 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 72 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 73 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 74 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 75 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 76 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 77 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 78 ); \ + libhmac_sha1_context_transform_extend_32bit_value( values_32bit, 79 ); + +#define libhmac_sha1_context_transform_unfolded_calculate_hash_value_round1( values_32bit, value_32bit_index, hash_values, hash_value_index0, hash_value_index1, hash_value_index2, hash_value_index3, hash_value_index4 ) \ + hash_values[ hash_value_index4 ] += ( hash_values[ hash_value_index1 ] & hash_values[ hash_value_index2 ] ) \ + | ( ~( hash_values[ hash_value_index1 ] ) & hash_values[ hash_value_index3 ] ); \ + hash_values[ hash_value_index4 ] += 0x5a827999UL; \ + hash_values[ hash_value_index4 ] += byte_stream_bit_rotate_left_32bit( \ + hash_values[ hash_value_index0 ], \ + 5 ); \ + hash_values[ hash_value_index4 ] += values_32bit[ value_32bit_index ]; \ +\ + hash_values[ hash_value_index1 ] = byte_stream_bit_rotate_left_32bit( \ + hash_values[ hash_value_index1 ], \ + 30 ); + +#define libhmac_sha1_context_transform_unfolded_calculate_hash_value_round2( values_32bit, value_32bit_index, hash_values, hash_value_index0, hash_value_index1, hash_value_index2, hash_value_index3, hash_value_index4 ) \ + hash_values[ hash_value_index4 ] += hash_values[ hash_value_index1 ] \ + ^ hash_values[ hash_value_index2 ] \ + ^ hash_values[ hash_value_index3 ]; \ + hash_values[ hash_value_index4 ] += 0x6ed9eba1UL; \ + hash_values[ hash_value_index4 ] += byte_stream_bit_rotate_left_32bit( \ + hash_values[ hash_value_index0 ], \ + 5 ); \ + hash_values[ hash_value_index4 ] += values_32bit[ value_32bit_index ]; \ +\ + hash_values[ hash_value_index1 ] = byte_stream_bit_rotate_left_32bit( \ + hash_values[ hash_value_index1 ], \ + 30 ); + +#define libhmac_sha1_context_transform_unfolded_calculate_hash_value_round3( values_32bit, value_32bit_index, hash_values, hash_value_index0, hash_value_index1, hash_value_index2, hash_value_index3, hash_value_index4 ) \ + hash_values[ hash_value_index4 ] += ( hash_values[ hash_value_index1 ] & hash_values[ hash_value_index2 ] ) \ + | ( hash_values[ hash_value_index1 ] & hash_values[ hash_value_index3 ] ) \ + | ( hash_values[ hash_value_index2 ] & hash_values[ hash_value_index3 ] ); \ + hash_values[ hash_value_index4 ] += 0x8f1bbcdcUL; \ + hash_values[ hash_value_index4 ] += byte_stream_bit_rotate_left_32bit( \ + hash_values[ hash_value_index0 ], \ + 5 ); \ + hash_values[ hash_value_index4 ] += values_32bit[ value_32bit_index ]; \ +\ + hash_values[ hash_value_index1 ] = byte_stream_bit_rotate_left_32bit( \ + hash_values[ hash_value_index1 ], \ + 30 ); + +#define libhmac_sha1_context_transform_unfolded_calculate_hash_value_round4( values_32bit, value_32bit_index, hash_values, hash_value_index0, hash_value_index1, hash_value_index2, hash_value_index3, hash_value_index4 ) \ + hash_values[ hash_value_index4 ] += hash_values[ hash_value_index1 ] \ + ^ hash_values[ hash_value_index2 ] \ + ^ hash_values[ hash_value_index3 ]; \ + hash_values[ hash_value_index4 ] += 0xca62c1d6UL; \ + hash_values[ hash_value_index4 ] += byte_stream_bit_rotate_left_32bit( \ + hash_values[ hash_value_index0 ], \ + 5 ); \ + hash_values[ hash_value_index4 ] += values_32bit[ value_32bit_index ]; \ +\ + hash_values[ hash_value_index1 ] = byte_stream_bit_rotate_left_32bit( \ + hash_values[ hash_value_index1 ], \ + 30 ); + +#define libhmac_sha1_context_transform_unfolded_calculate_hash_values( values_32bit, hash_values ) \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round1( values_32bit, 0, hash_values, 0, 1, 2, 3, 4 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round1( values_32bit, 1, hash_values, 4, 0, 1, 2, 3 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round1( values_32bit, 2, hash_values, 3 ,4, 0, 1, 2 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round1( values_32bit, 3, hash_values, 2, 3, 4, 0, 1 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round1( values_32bit, 4, hash_values, 1, 2, 3, 4, 0 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round1( values_32bit, 5, hash_values, 0, 1, 2, 3, 4 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round1( values_32bit, 6, hash_values, 4, 0, 1, 2, 3 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round1( values_32bit, 7, hash_values, 3 ,4, 0, 1, 2 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round1( values_32bit, 8, hash_values, 2, 3, 4, 0, 1 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round1( values_32bit, 9, hash_values, 1, 2, 3, 4, 0 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round1( values_32bit, 10, hash_values, 0, 1, 2, 3, 4 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round1( values_32bit, 11, hash_values, 4, 0, 1, 2, 3 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round1( values_32bit, 12, hash_values, 3 ,4, 0, 1, 2 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round1( values_32bit, 13, hash_values, 2, 3, 4, 0, 1 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round1( values_32bit, 14, hash_values, 1, 2, 3, 4, 0 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round1( values_32bit, 15, hash_values, 0, 1, 2, 3, 4 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round1( values_32bit, 16, hash_values, 4, 0, 1, 2, 3 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round1( values_32bit, 17, hash_values, 3 ,4, 0, 1, 2 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round1( values_32bit, 18, hash_values, 2, 3, 4, 0, 1 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round1( values_32bit, 19, hash_values, 1, 2, 3, 4, 0 ); \ +\ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round2( values_32bit, 20, hash_values, 0, 1, 2, 3, 4 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round2( values_32bit, 21, hash_values, 4, 0, 1, 2, 3 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round2( values_32bit, 22, hash_values, 3 ,4, 0, 1, 2 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round2( values_32bit, 23, hash_values, 2, 3, 4, 0, 1 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round2( values_32bit, 24, hash_values, 1, 2, 3, 4, 0 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round2( values_32bit, 25, hash_values, 0, 1, 2, 3, 4 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round2( values_32bit, 26, hash_values, 4, 0, 1, 2, 3 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round2( values_32bit, 27, hash_values, 3 ,4, 0, 1, 2 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round2( values_32bit, 28, hash_values, 2, 3, 4, 0, 1 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round2( values_32bit, 29, hash_values, 1, 2, 3, 4, 0 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round2( values_32bit, 30, hash_values, 0, 1, 2, 3, 4 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round2( values_32bit, 31, hash_values, 4, 0, 1, 2, 3 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round2( values_32bit, 32, hash_values, 3 ,4, 0, 1, 2 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round2( values_32bit, 33, hash_values, 2, 3, 4, 0, 1 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round2( values_32bit, 34, hash_values, 1, 2, 3, 4, 0 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round2( values_32bit, 35, hash_values, 0, 1, 2, 3, 4 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round2( values_32bit, 36, hash_values, 4, 0, 1, 2, 3 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round2( values_32bit, 37, hash_values, 3 ,4, 0, 1, 2 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round2( values_32bit, 38, hash_values, 2, 3, 4, 0, 1 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round2( values_32bit, 39, hash_values, 1, 2, 3, 4, 0 ); \ +\ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round3( values_32bit, 40, hash_values, 0, 1, 2, 3, 4 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round3( values_32bit, 41, hash_values, 4, 0, 1, 2, 3 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round3( values_32bit, 42, hash_values, 3 ,4, 0, 1, 2 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round3( values_32bit, 43, hash_values, 2, 3, 4, 0, 1 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round3( values_32bit, 44, hash_values, 1, 2, 3, 4, 0 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round3( values_32bit, 45, hash_values, 0, 1, 2, 3, 4 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round3( values_32bit, 46, hash_values, 4, 0, 1, 2, 3 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round3( values_32bit, 47, hash_values, 3 ,4, 0, 1, 2 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round3( values_32bit, 48, hash_values, 2, 3, 4, 0, 1 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round3( values_32bit, 49, hash_values, 1, 2, 3, 4, 0 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round3( values_32bit, 50, hash_values, 0, 1, 2, 3, 4 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round3( values_32bit, 51, hash_values, 4, 0, 1, 2, 3 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round3( values_32bit, 52, hash_values, 3 ,4, 0, 1, 2 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round3( values_32bit, 53, hash_values, 2, 3, 4, 0, 1 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round3( values_32bit, 54, hash_values, 1, 2, 3, 4, 0 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round3( values_32bit, 55, hash_values, 0, 1, 2, 3, 4 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round3( values_32bit, 56, hash_values, 4, 0, 1, 2, 3 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round3( values_32bit, 57, hash_values, 3 ,4, 0, 1, 2 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round3( values_32bit, 58, hash_values, 2, 3, 4, 0, 1 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round3( values_32bit, 59, hash_values, 1, 2, 3, 4, 0 ); \ +\ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round4( values_32bit, 60, hash_values, 0, 1, 2, 3, 4 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round4( values_32bit, 61, hash_values, 4, 0, 1, 2, 3 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round4( values_32bit, 62, hash_values, 3 ,4, 0, 1, 2 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round4( values_32bit, 63, hash_values, 2, 3, 4, 0, 1 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round4( values_32bit, 64, hash_values, 1, 2, 3, 4, 0 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round4( values_32bit, 65, hash_values, 0, 1, 2, 3, 4 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round4( values_32bit, 66, hash_values, 4, 0, 1, 2, 3 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round4( values_32bit, 67, hash_values, 3 ,4, 0, 1, 2 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round4( values_32bit, 68, hash_values, 2, 3, 4, 0, 1 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round4( values_32bit, 69, hash_values, 1, 2, 3, 4, 0 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round4( values_32bit, 70, hash_values, 0, 1, 2, 3, 4 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round4( values_32bit, 71, hash_values, 4, 0, 1, 2, 3 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round4( values_32bit, 72, hash_values, 3 ,4, 0, 1, 2 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round4( values_32bit, 73, hash_values, 2, 3, 4, 0, 1 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round4( values_32bit, 74, hash_values, 1, 2, 3, 4, 0 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round4( values_32bit, 75, hash_values, 0, 1, 2, 3, 4 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round4( values_32bit, 76, hash_values, 4, 0, 1, 2, 3 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round4( values_32bit, 77, hash_values, 3 ,4, 0, 1, 2 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round4( values_32bit, 78, hash_values, 2, 3, 4, 0, 1 ); \ + libhmac_sha1_context_transform_unfolded_calculate_hash_value_round4( values_32bit, 79, hash_values, 1, 2, 3, 4, 0 ); + +/* Calculates the SHA1 of 64 byte sized blocks of data in a buffer + * Returns the number of bytes used if successful or -1 on error + */ +ssize_t libhmac_sha1_context_transform( + libhmac_internal_sha1_context_t *internal_context, + const uint8_t *buffer, + size_t size, + libcerror_error_t **error ) +{ + uint32_t hash_values[ 5 ]; + uint32_t values_32bit[ 80 ]; + + static char *function = "libhmac_sha1_context_transform"; + size_t buffer_offset = 0; + +#if !defined( LIBHMAC_UNFOLLED_LOOPS ) + uint32_t hash_value = 0; + uint8_t hash_values_index = 0; + uint8_t value_32bit_index = 0; +#endif + + if( internal_context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid internal context.", + function ); + + return( -1 ); + } + if( buffer == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid buffer.", + function ); + + return( -1 ); + } + if( size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid size value exceeds maximum.", + function ); + + return( -1 ); + } + while( size >= LIBHMAC_SHA1_BLOCK_SIZE ) + { + if( memory_copy( + hash_values, + internal_context->hash_values, + sizeof( uint32_t ) * 5 ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_COPY_FAILED, + "%s: unable to copy hash values.", + function ); + + goto on_error; + } +#if defined( LIBHMAC_UNFOLLED_LOOPS ) + /* Break the block into 16 x 32-bit values + */ + libhmac_byte_stream_copy_to_16x_uint32_big_endian( + &( buffer[ buffer_offset ] ), + values_32bit ); + + buffer_offset += LIBHMAC_SHA1_BLOCK_SIZE; + + /* Extend to 80 x 32-bit values + */ + libhmac_sha1_context_transform_unfolded_extend_32bit_values( + values_32bit ); + + /* Calculate the hash values for the 32-bit values + */ + libhmac_sha1_context_transform_unfolded_calculate_hash_values( + values_32bit, + hash_values ); + + /* Update the hash values in the context + */ + internal_context->hash_values[ 0 ] += hash_values[ 0 ]; + internal_context->hash_values[ 1 ] += hash_values[ 1 ]; + internal_context->hash_values[ 2 ] += hash_values[ 2 ]; + internal_context->hash_values[ 3 ] += hash_values[ 3 ]; + internal_context->hash_values[ 4 ] += hash_values[ 4 ]; +#else + /* Break the block into 16 x 32-bit values + */ + for( value_32bit_index = 0; + value_32bit_index < 16; + value_32bit_index++ ) + { + byte_stream_copy_to_uint32_big_endian( + &( buffer[ buffer_offset ] ), + values_32bit[ value_32bit_index ] ); + + buffer_offset += sizeof( uint32_t ); + } + /* Extend to 80 x 32-bit values + */ + for( value_32bit_index = 16; + value_32bit_index < 80; + value_32bit_index++ ) + { + libhmac_sha1_context_transform_extend_32bit_value( + values_32bit, + value_32bit_index ); + } + /* Calculate the hash values for the 32-bit values + */ + for( value_32bit_index = 0; + value_32bit_index < 80; + value_32bit_index++ ) + { + if( value_32bit_index < 20 ) + { + hash_values[ 4 ] += ( hash_values[ 1 ] & hash_values[ 2 ] ) + | ( ~( hash_values[ 1 ] ) & hash_values[ 3 ] ); + hash_values[ 4 ] += 0x5a827999UL; + } + else if( value_32bit_index < 40 ) + { + hash_values[ 4 ] += hash_values[ 1 ] + ^ hash_values[ 2 ] + ^ hash_values[ 3 ]; + hash_values[ 4 ] += 0x6ed9eba1UL; + } + else if( value_32bit_index < 60 ) + { + hash_values[ 4 ] += ( hash_values[ 1 ] & hash_values[ 2 ] ) + | ( hash_values[ 1 ] & hash_values[ 3 ] ) + | ( hash_values[ 2 ] & hash_values[ 3 ] ); + hash_values[ 4 ] += 0x8f1bbcdcUL; + } + else + { + hash_values[ 4 ] += hash_values[ 1 ] + ^ hash_values[ 2 ] + ^ hash_values[ 3 ]; + hash_values[ 4 ] += 0xca62c1d6UL; + } + hash_values[ 4 ] += byte_stream_bit_rotate_left_32bit( + hash_values[ 0 ], + 5 ); + hash_values[ 4 ] += values_32bit[ value_32bit_index ]; + + hash_value = hash_values[ 4 ]; + hash_values[ 4 ] = hash_values[ 3 ]; + hash_values[ 3 ] = hash_values[ 2 ]; + hash_values[ 2 ] = byte_stream_bit_rotate_left_32bit( + hash_values[ 1 ], + 30 ); + hash_values[ 1 ] = hash_values[ 0 ]; + hash_values[ 0 ] = hash_value; + } + /* Update the hash values in the context + */ + for( hash_values_index = 0; + hash_values_index < 5; + hash_values_index++ ) + { + internal_context->hash_values[ hash_values_index ] += hash_values[ hash_values_index ]; + } +#endif /* defined( LIBHMAC_UNFOLLED_LOOPS ) */ + + size -= LIBHMAC_SHA1_BLOCK_SIZE; + } + /* Prevent sensitive data from leaking + */ + if( memory_set( + hash_values, + 0, + sizeof( uint32_t ) * 5 ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_SET_FAILED, + "%s: unable to clear hash values.", + function ); + + goto on_error; + } + if( memory_set( + values_32bit, + 0, + sizeof( uint32_t ) * 16 ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_SET_FAILED, + "%s: unable to clear 32-bit values.", + function ); + + goto on_error; + } + return( (ssize_t) buffer_offset ); + +on_error: + memory_set( + values_32bit, + 0, + sizeof( uint32_t ) * 64 ); + + memory_set( + hash_values, + 0, + sizeof( uint32_t ) * 5 ); + + return( -1 ); +} + +#endif /* !defined( LIBHMAC_HAVE_SHA1_SUPPORT ) */ + +/* Creates a SHA1 context + * Make sure the value context is referencing, is set to NULL + * Returns 1 if successful or -1 on error + */ +int libhmac_sha1_context_initialize( + libhmac_sha1_context_t **context, + libcerror_error_t **error ) +{ + libhmac_internal_sha1_context_t *internal_context = NULL; + static char *function = "libhmac_sha1_context_initialize"; + +#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA1 ) + const EVP_MD *evp_md_type = NULL; +#endif + + if( context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid context.", + function ); + + return( -1 ); + } + if( *context != NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, + "%s: invalid context value already set.", + function ); + + return( -1 ); + } + internal_context = memory_allocate_structure( + libhmac_internal_sha1_context_t ); + + if( internal_context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_INSUFFICIENT, + "%s: unable to create context.", + function ); + + goto on_error; + } + if( memory_set( + internal_context, + 0, + sizeof( libhmac_internal_sha1_context_t ) ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_SET_FAILED, + "%s: unable to clear context.", + function ); + + memory_free( + internal_context ); + + return( -1 ); + } +#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA_DIGEST_LENGTH ) + if( SHA1_Init( + &( internal_context->sha1_context ) ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to initialize context.", + function ); + + goto on_error; + } + +#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA1 ) +#if defined( HAVE_EVP_MD_CTX_INIT ) + EVP_MD_CTX_init( + &( internal_context->internal_evp_md_context ) ); + + internal_context->evp_md_context = &( internal_context->internal_evp_md_context ); +#else + internal_context->evp_md_context = EVP_MD_CTX_new(); + + if( internal_context->evp_md_context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to create EVP message digest context.", + function ); + + goto on_error; + } +#endif /* defined( HAVE_EVP_MD_CTX_INIT ) */ + +/* TODO use EVP_MD_fetch for EVP_DigestInit_ex2 */ + evp_md_type = EVP_sha1(); + +#if defined( HAVE_EVP_DIGESTINIT_EX2 ) + if( EVP_DigestInit_ex2( + internal_context->evp_md_context, + evp_md_type, + NULL ) != 1 ) +#else + if( EVP_DigestInit_ex( + internal_context->evp_md_context, + evp_md_type, + NULL ) != 1 ) +#endif + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to initialize context.", + function ); + +#if defined( HAVE_EVP_MD_CTX_CLEANUP ) + EVP_MD_CTX_cleanup( + &( internal_context->internal_evp_md_context ) ); + ERR_remove_thread_state( + NULL ); +#else + EVP_MD_CTX_free( + internal_context->evp_md_context ); +#endif + internal_context->evp_md_context = NULL; + + goto on_error; + } +#else + if( memory_copy( + internal_context->hash_values, + libhmac_sha1_context_fixed_constants, + sizeof( uint32_t ) * 5 ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_COPY_FAILED, + "%s: unable to copy fixed constants to hash values.", + function ); + + goto on_error; + } +#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA_DIGEST_LENGTH ) */ + + *context = (libhmac_sha1_context_t *) internal_context; + + return( 1 ); + +on_error: + if( internal_context != NULL ) + { + memory_free( + internal_context ); + } + return( -1 ); +} + +/* Frees a SHA1 context + * Returns 1 if successful or -1 on error + */ +int libhmac_sha1_context_free( + libhmac_sha1_context_t **context, + libcerror_error_t **error ) +{ + libhmac_internal_sha1_context_t *internal_context = NULL; + static char *function = "libhmac_sha1_context_free"; + + if( context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid context.", + function ); + + return( -1 ); + } + if( *context != NULL ) + { + internal_context = (libhmac_internal_sha1_context_t *) *context; + *context = NULL; + +#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA_DIGEST_LENGTH ) + /* No additional clean up necessary + */ + +#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA1 ) +#if defined( HAVE_EVP_MD_CTX_CLEANUP ) + if( EVP_MD_CTX_cleanup( + &( internal_context->internal_evp_md_context ) ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to clean up EVP message digest context.", + function ); + } + /* Make sure the error state is removed otherwise OpenSSL will leak memory + */ + ERR_remove_thread_state( + NULL ); +#else + EVP_MD_CTX_free( + internal_context->evp_md_context ); + +#endif /* defined( HAVE_EVP_MD_CTX_CLEANUP ) */ + + internal_context->evp_md_context = NULL; +#else + /* No additional clean up necessary + */ + +#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA_DIGEST_LENGTH ) */ + memory_free( + internal_context ); + } + return( 1 ); +} + +#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA_DIGEST_LENGTH ) + +/* Updates the SHA1 context using OpenSSL + * Returns 1 if successful or -1 on error + */ +int libhmac_sha1_context_update( + libhmac_sha1_context_t *context, + const uint8_t *buffer, + size_t size, + libcerror_error_t **error ) +{ + libhmac_internal_sha1_context_t *internal_context = NULL; + static char *function = "libhmac_sha1_context_update"; + unsigned long safe_hash_size = 0; + + if( context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid context.", + function ); + + return( -1 ); + } + internal_context = (libhmac_internal_sha1_context_t *) context; + + if( buffer == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid buffer.", + function ); + + return( -1 ); + } +#if ( SIZEOF_LONG < SIZEOF_SIZE_T ) + if( size > (size_t) ULONG_MAX ) +#else + if( size > (size_t) SSIZE_MAX ) +#endif + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid size value exceeds maximum.", + function ); + + return( -1 ); + } + if( size == 0 ) + { + return( 1 ); + } + safe_hash_size = (unsigned long) size; + + if( SHA1_Update( + &( internal_context->sha1_context ), + (const void *) buffer, + size ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to update context.", + function ); + + return( -1 ); + } + return( 1 ); +} + +#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA1 ) + +/* Updates the SHA1 context using OpenSSL EVP + * Returns 1 if successful or -1 on error + */ +int libhmac_sha1_context_update( + libhmac_sha1_context_t *context, + const uint8_t *buffer, + size_t size, + libcerror_error_t **error ) +{ + libhmac_internal_sha1_context_t *internal_context = NULL; + static char *function = "libhmac_sha1_context_update"; + + if( context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid context.", + function ); + + return( -1 ); + } + internal_context = (libhmac_internal_sha1_context_t *) context; + + if( buffer == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid buffer.", + function ); + + return( -1 ); + } + if( size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid size value exceeds maximum.", + function ); + + return( -1 ); + } + if( size == 0 ) + { + return( 1 ); + } + if( EVP_DigestUpdate( + internal_context->evp_md_context, + (const void *) buffer, + size ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to update context.", + function ); + + return( -1 ); + } + return( 1 ); +} + +#else + +/* Updates the SHA1 context using fallback implementation + * Returns 1 if successful or -1 on error + */ +int libhmac_sha1_context_update( + libhmac_sha1_context_t *context, + const uint8_t *buffer, + size_t size, + libcerror_error_t **error ) +{ + libhmac_internal_sha1_context_t *internal_context = NULL; + static char *function = "libhmac_sha1_context_update"; + size_t buffer_offset = 0; + size_t remaining_block_size = 0; + ssize_t process_count = 0; + + if( context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid context.", + function ); + + return( -1 ); + } + internal_context = (libhmac_internal_sha1_context_t *) context; + + if( buffer == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid buffer.", + function ); + + return( -1 ); + } + if( size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid size value exceeds maximum.", + function ); + + return( -1 ); + } + if( size == 0 ) + { + return( 1 ); + } + if( internal_context->block_offset > 0 ) + { + if( internal_context->block_offset >= LIBHMAC_SHA1_BLOCK_SIZE ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid context - block offset value out of bounds.", + function ); + + return( -1 ); + } + remaining_block_size = LIBHMAC_SHA1_BLOCK_SIZE - internal_context->block_offset; + + if( remaining_block_size > size ) + { + remaining_block_size = size; + } + if( memory_copy( + &( internal_context->block[ internal_context->block_offset ] ), + buffer, + remaining_block_size ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_COPY_FAILED, + "%s: unable to copy data to context block.", + function ); + + return( -1 ); + } + internal_context->block_offset += remaining_block_size; + + if( internal_context->block_offset < LIBHMAC_SHA1_BLOCK_SIZE ) + { + return( 1 ); + } + buffer_offset += remaining_block_size; + size -= remaining_block_size; + + process_count = libhmac_sha1_context_transform( + internal_context, + internal_context->block, + LIBHMAC_SHA1_BLOCK_SIZE, + error ); + + if( process_count == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to transform context block.", + function ); + + return( -1 ); + } + internal_context->hash_count += process_count; + internal_context->block_offset = 0; + } + if( size > 0 ) + { + process_count = libhmac_sha1_context_transform( + internal_context, + &( buffer[ buffer_offset ] ), + size, + error ); + + if( process_count == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to transform buffer.", + function ); + + return( -1 ); + } + internal_context->hash_count += process_count; + + buffer_offset += process_count; + size -= process_count; + } + if( size > 0 ) + { + if( size >= LIBHMAC_SHA1_BLOCK_SIZE ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid size value out of bounds.", + function ); + + return( -1 ); + } + if( memory_copy( + internal_context->block, + &( buffer[ buffer_offset ] ), + size ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_COPY_FAILED, + "%s: unable to copy remaining data to context block.", + function ); + + return( -1 ); + } + internal_context->block_offset = size; + } + return( 1 ); +} + +#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA_DIGEST_LENGTH ) */ + +#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA_DIGEST_LENGTH ) + +/* Finalizes the SHA1 context using OpenSSL + * Returns 1 if successful or -1 on error + */ +int libhmac_sha1_context_finalize( + libhmac_sha1_context_t *context, + uint8_t *hash, + size_t hash_size, + libcerror_error_t **error ) +{ + libhmac_internal_sha1_context_t *internal_context = NULL; + static char *function = "libhmac_sha1_context_finalize"; + + if( context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid context.", + function ); + + return( -1 ); + } + internal_context = (libhmac_internal_sha1_context_t *) context; + + if( hash == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid hash.", + function ); + + return( -1 ); + } + if( hash_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid hash size value exceeds maximum.", + function ); + + return( -1 ); + } + if( hash_size < (size_t) LIBHMAC_SHA1_HASH_SIZE ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: invalid hash size value too small.", + function ); + + return( -1 ); + } + if( SHA1_Final( + hash, + &( internal_context->sha1_context ) ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to finalize context.", + function ); + + return( -1 ); + } + return( 1 ); +} + +#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA1 ) + +/* Finalizes the SHA1 context using OpenSSL EVP + * Returns 1 if successful or -1 on error + */ +int libhmac_sha1_context_finalize( + libhmac_sha1_context_t *context, + uint8_t *hash, + size_t hash_size, + libcerror_error_t **error ) +{ + libhmac_internal_sha1_context_t *internal_context = NULL; + static char *function = "libhmac_sha1_context_finalize"; + unsigned int safe_hash_size = 0; + + if( context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid context.", + function ); + + return( -1 ); + } + internal_context = (libhmac_internal_sha1_context_t *) context; + + if( hash == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid hash.", + function ); + + return( -1 ); + } + if( ( hash_size < (size_t) LIBHMAC_SHA1_HASH_SIZE ) + || ( hash_size > (size_t) UINT_MAX ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid hash size value out of bounds.", + function ); + + return( -1 ); + } + safe_hash_size = (unsigned int) hash_size; + + if( EVP_DigestFinal_ex( + internal_context->evp_md_context, + (unsigned char *) hash, + &safe_hash_size ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to finalize context.", + function ); + + return( -1 ); + } + return( 1 ); +} + +#else + +/* Finalizes the SHA1 context using fallback implementation + * Returns 1 if successful or -1 on error + */ +int libhmac_sha1_context_finalize( + libhmac_sha1_context_t *context, + uint8_t *hash, + size_t hash_size, + libcerror_error_t **error ) +{ + libhmac_internal_sha1_context_t *internal_context = NULL; + static char *function = "libhmac_sha1_context_finalize"; + size_t block_size = 0; + size_t number_of_blocks = 0; + ssize_t process_count = 0; + uint64_t bit_size = 0; + +#if !defined( LIBHMAC_UNFOLLED_LOOPS ) + size_t hash_index = 0; + int hash_values_index = 0; +#endif + + if( context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid context.", + function ); + + return( -1 ); + } + internal_context = (libhmac_internal_sha1_context_t *) context; + + if( hash == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid hash.", + function ); + + return( -1 ); + } + if( hash_size < (size_t) LIBHMAC_SHA1_HASH_SIZE ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: invalid hash value too small.", + function ); + + return( -1 ); + } + if( hash_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid hash size value exceeds maximum.", + function ); + + return( -1 ); + } + if( hash_size < (size_t) LIBHMAC_SHA1_HASH_SIZE ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: invalid hash size value too small.", + function ); + + return( -1 ); + } + /* Add padding with a size of 56 mod 64 + */ + number_of_blocks = 1; + + if( internal_context->block_offset > 55 ) + { + number_of_blocks += 1; + } + block_size = number_of_blocks * LIBHMAC_SHA1_BLOCK_SIZE; + + if( memory_set( + &( internal_context->block[ internal_context->block_offset ] ), + 0, + block_size - internal_context->block_offset ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_SET_FAILED, + "%s: unable to clear context block.", + function ); + + return( -1 ); + } + /* The first byte of the padding contains 0x80 + */ + internal_context->block[ internal_context->block_offset ] = 0x80; + + bit_size = ( internal_context->hash_count + internal_context->block_offset ) * 8; + + byte_stream_copy_from_uint64_big_endian( + &( internal_context->block[ block_size - 8 ] ), + bit_size ); + + process_count = libhmac_sha1_context_transform( + internal_context, + internal_context->block, + block_size, + error ); + + if( process_count == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to transform context block.", + function ); + + return( -1 ); + } +#if !defined( LIBHMAC_UNFOLLED_LOOPS ) + for( hash_values_index = 0; + hash_values_index < 5; + hash_values_index++ ) + { + byte_stream_copy_from_uint32_big_endian( + &( hash[ hash_index ] ), + internal_context->hash_values[ hash_values_index ] ); + + hash_index += sizeof( uint32_t ); + } +#else + byte_stream_copy_from_uint32_big_endian( + &( hash[ 0 ] ), + internal_context->hash_values[ 0 ] ); + + byte_stream_copy_from_uint32_big_endian( + &( hash[ 4 ] ), + internal_context->hash_values[ 1 ] ); + + byte_stream_copy_from_uint32_big_endian( + &( hash[ 8 ] ), + internal_context->hash_values[ 2 ] ); + + byte_stream_copy_from_uint32_big_endian( + &( hash[ 12 ] ), + internal_context->hash_values[ 3 ] ); + + byte_stream_copy_from_uint32_big_endian( + &( hash[ 16 ] ), + internal_context->hash_values[ 4 ] ); + +#endif /* !defined( LIBHMAC_UNFOLLED_LOOPS ) */ + + /* Prevent sensitive data from leaking + */ + if( memory_set( + internal_context, + 0, + sizeof( libhmac_internal_sha1_context_t ) ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_SET_FAILED, + "%s: unable to clear context.", + function ); + + return( -1 ); + } + return( 1 ); +} + +#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA_DIGEST_LENGTH ) */ + diff -Nru libfshfs-20201104/libhmac/libhmac_sha1_context.h libfshfs-20240221/libhmac/libhmac_sha1_context.h --- libfshfs-20201104/libhmac/libhmac_sha1_context.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libhmac/libhmac_sha1_context.h 2024-02-21 06:04:12.000000000 +0000 @@ -0,0 +1,130 @@ +/* + * SHA1 context functions + * + * Copyright (C) 2011-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _LIBHMAC_SHA1_CONTEXT_H ) +#define _LIBHMAC_SHA1_CONTEXT_H + +#include +#include + +#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) +#include + +#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) +#include +#endif + +#include "libhmac_extern.h" +#include "libhmac_libcerror.h" +#include "libhmac_types.h" + +#if defined( __cplusplus ) +extern "C" { +#endif + +#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA_DIGEST_LENGTH ) +#define LIBHMAC_HAVE_SHA1_SUPPORT + +#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA1 ) +#define LIBHMAC_HAVE_SHA1_SUPPORT + +#endif + +#define LIBHMAC_SHA1_BLOCK_SIZE 64 + +typedef struct libhmac_internal_sha1_context libhmac_internal_sha1_context_t; + +struct libhmac_internal_sha1_context +{ +#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA_DIGEST_LENGTH ) + /* The SHA1 context + */ + SHA_CTX sha1_context; + +#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA1 ) + /* The EVP message digest context + */ +#if defined( HAVE_EVP_MD_CTX_INIT ) + EVP_MD_CTX internal_evp_md_context; +#endif + + EVP_MD_CTX *evp_md_context; + +#else + /* The number of bytes hashed + */ + uint64_t hash_count; + + /* The hash values + */ + uint32_t hash_values[ 5 ]; + + /* The block offset + */ + size_t block_offset; + + /* The (data) block + */ + uint8_t block[ 2 * LIBHMAC_SHA1_BLOCK_SIZE ]; + +#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA_DIGEST_LENGTH ) */ +}; + +#if !defined( LIBHMAC_HAVE_SHA1_SUPPORT ) + +ssize_t libhmac_sha1_context_transform( + libhmac_internal_sha1_context_t *internal_context, + const uint8_t *buffer, + size_t size, + libcerror_error_t **error ); + +#endif /* !defined( LIBHMAC_HAVE_SHA1_SUPPORT ) */ + +LIBHMAC_EXTERN \ +int libhmac_sha1_context_initialize( + libhmac_sha1_context_t **context, + libcerror_error_t **error ); + +LIBHMAC_EXTERN \ +int libhmac_sha1_context_free( + libhmac_sha1_context_t **context, + libcerror_error_t **error ); + +LIBHMAC_EXTERN \ +int libhmac_sha1_context_update( + libhmac_sha1_context_t *context, + const uint8_t *buffer, + size_t size, + libcerror_error_t **error ); + +LIBHMAC_EXTERN \ +int libhmac_sha1_context_finalize( + libhmac_sha1_context_t *context, + uint8_t *hash, + size_t hash_size, + libcerror_error_t **error ); + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _LIBHMAC_SHA1_CONTEXT_H ) */ + diff -Nru libfshfs-20201104/libhmac/libhmac_sha224.c libfshfs-20240221/libhmac/libhmac_sha224.c --- libfshfs-20201104/libhmac/libhmac_sha224.c 2020-11-04 11:56:11.000000000 +0000 +++ libfshfs-20240221/libhmac/libhmac_sha224.c 2024-02-21 06:04:12.000000000 +0000 @@ -1,7 +1,7 @@ /* * SHA-224 functions * - * Copyright (C) 2011-2020, Joachim Metz + * Copyright (C) 2011-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -20,437 +20,15 @@ */ #include -#include #include #include -#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) -#include - -#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) -#include -#include - -#endif - -#include "libhmac_byte_stream.h" #include "libhmac_definitions.h" #include "libhmac_libcerror.h" #include "libhmac_sha224.h" +#include "libhmac_sha224_context.h" -#if !defined( LIBHMAC_HAVE_SHA224_SUPPORT ) - -/* FIPS 180-2 based SHA-224 functions - */ - -/* The first 32-bits of the fractional parts of the square roots of the first 8 primes [ 2, 19 ] - */ -uint32_t libhmac_sha224_prime_square_roots[ 8 ] = { - 0xc1059ed8UL, 0x367cd507UL, 0x3070dd17UL, 0xf70e5939UL, - 0xffc00b31UL, 0x68581511UL, 0x64f98fa7UL, 0xbefa4fa4UL -}; - -/* The first 32-bits of the fractional parts of the cube roots of the first 64 primes [ 2, 311 ] - */ -uint32_t libhmac_sha224_prime_cube_roots[ 64 ] = { - 0x428a2f98UL, 0x71374491UL, 0xb5c0fbcfUL, 0xe9b5dba5UL, - 0x3956c25bUL, 0x59f111f1UL, 0x923f82a4UL, 0xab1c5ed5UL, - 0xd807aa98UL, 0x12835b01UL, 0x243185beUL, 0x550c7dc3UL, - 0x72be5d74UL, 0x80deb1feUL, 0x9bdc06a7UL, 0xc19bf174UL, - 0xe49b69c1UL, 0xefbe4786UL, 0x0fc19dc6UL, 0x240ca1ccUL, - 0x2de92c6fUL, 0x4a7484aaUL, 0x5cb0a9dcUL, 0x76f988daUL, - 0x983e5152UL, 0xa831c66dUL, 0xb00327c8UL, 0xbf597fc7UL, - 0xc6e00bf3UL, 0xd5a79147UL, 0x06ca6351UL, 0x14292967UL, - 0x27b70a85UL, 0x2e1b2138UL, 0x4d2c6dfcUL, 0x53380d13UL, - 0x650a7354UL, 0x766a0abbUL, 0x81c2c92eUL, 0x92722c85UL, - 0xa2bfe8a1UL, 0xa81a664bUL, 0xc24b8b70UL, 0xc76c51a3UL, - 0xd192e819UL, 0xd6990624UL, 0xf40e3585UL, 0x106aa070UL, - 0x19a4c116UL, 0x1e376c08UL, 0x2748774cUL, 0x34b0bcb5UL, - 0x391c0cb3UL, 0x4ed8aa4aUL, 0x5b9cca4fUL, 0x682e6ff3UL, - 0x748f82eeUL, 0x78a5636fUL, 0x84c87814UL, 0x8cc70208UL, - 0x90befffaUL, 0xa4506cebUL, 0xbef9a3f7UL, 0xc67178f2UL -}; - -#define libhmac_sha224_transform_extend_32bit_value( values_32bit, value_32bit_index, s0, s1 ) \ - s0 = byte_stream_bit_rotate_right_32bit( values_32bit[ value_32bit_index - 15 ], 7 ) \ - ^ byte_stream_bit_rotate_right_32bit( values_32bit[ value_32bit_index - 15 ], 18 ) \ - ^ ( values_32bit[ value_32bit_index - 15 ] >> 3 ); \ - s1 = byte_stream_bit_rotate_right_32bit( values_32bit[ value_32bit_index - 2 ], 17 ) \ - ^ byte_stream_bit_rotate_right_32bit( values_32bit[ value_32bit_index - 2 ], 19 ) \ - ^ ( values_32bit[ value_32bit_index - 2 ] >> 10 ); \ -\ - values_32bit[ value_32bit_index ] = values_32bit[ value_32bit_index - 16 ] \ - + s0 \ - + values_32bit[ value_32bit_index - 7 ] \ - + s1 - -#define libhmac_sha224_transform_unfolded_extend_32bit_values( values_32bit, s0, s1 ) \ - libhmac_sha224_transform_extend_32bit_value( values_32bit, 16, s0, s1 ); \ - libhmac_sha224_transform_extend_32bit_value( values_32bit, 17, s0, s1 ); \ - libhmac_sha224_transform_extend_32bit_value( values_32bit, 18, s0, s1 ); \ - libhmac_sha224_transform_extend_32bit_value( values_32bit, 19, s0, s1 ); \ - libhmac_sha224_transform_extend_32bit_value( values_32bit, 20, s0, s1 ); \ - libhmac_sha224_transform_extend_32bit_value( values_32bit, 21, s0, s1 ); \ - libhmac_sha224_transform_extend_32bit_value( values_32bit, 22, s0, s1 ); \ - libhmac_sha224_transform_extend_32bit_value( values_32bit, 23, s0, s1 ); \ - libhmac_sha224_transform_extend_32bit_value( values_32bit, 24, s0, s1 ); \ - libhmac_sha224_transform_extend_32bit_value( values_32bit, 25, s0, s1 ); \ - libhmac_sha224_transform_extend_32bit_value( values_32bit, 26, s0, s1 ); \ - libhmac_sha224_transform_extend_32bit_value( values_32bit, 27, s0, s1 ); \ - libhmac_sha224_transform_extend_32bit_value( values_32bit, 28, s0, s1 ); \ - libhmac_sha224_transform_extend_32bit_value( values_32bit, 29, s0, s1 ); \ - libhmac_sha224_transform_extend_32bit_value( values_32bit, 30, s0, s1 ); \ - libhmac_sha224_transform_extend_32bit_value( values_32bit, 31, s0, s1 ); \ - libhmac_sha224_transform_extend_32bit_value( values_32bit, 32, s0, s1 ); \ - libhmac_sha224_transform_extend_32bit_value( values_32bit, 33, s0, s1 ); \ - libhmac_sha224_transform_extend_32bit_value( values_32bit, 34, s0, s1 ); \ - libhmac_sha224_transform_extend_32bit_value( values_32bit, 35, s0, s1 ); \ - libhmac_sha224_transform_extend_32bit_value( values_32bit, 36, s0, s1 ); \ - libhmac_sha224_transform_extend_32bit_value( values_32bit, 37, s0, s1 ); \ - libhmac_sha224_transform_extend_32bit_value( values_32bit, 38, s0, s1 ); \ - libhmac_sha224_transform_extend_32bit_value( values_32bit, 39, s0, s1 ); \ - libhmac_sha224_transform_extend_32bit_value( values_32bit, 40, s0, s1 ); \ - libhmac_sha224_transform_extend_32bit_value( values_32bit, 41, s0, s1 ); \ - libhmac_sha224_transform_extend_32bit_value( values_32bit, 42, s0, s1 ); \ - libhmac_sha224_transform_extend_32bit_value( values_32bit, 43, s0, s1 ); \ - libhmac_sha224_transform_extend_32bit_value( values_32bit, 44, s0, s1 ); \ - libhmac_sha224_transform_extend_32bit_value( values_32bit, 45, s0, s1 ); \ - libhmac_sha224_transform_extend_32bit_value( values_32bit, 46, s0, s1 ); \ - libhmac_sha224_transform_extend_32bit_value( values_32bit, 47, s0, s1 ); \ - libhmac_sha224_transform_extend_32bit_value( values_32bit, 48, s0, s1 ); \ - libhmac_sha224_transform_extend_32bit_value( values_32bit, 49, s0, s1 ); \ - libhmac_sha224_transform_extend_32bit_value( values_32bit, 50, s0, s1 ); \ - libhmac_sha224_transform_extend_32bit_value( values_32bit, 51, s0, s1 ); \ - libhmac_sha224_transform_extend_32bit_value( values_32bit, 52, s0, s1 ); \ - libhmac_sha224_transform_extend_32bit_value( values_32bit, 53, s0, s1 ); \ - libhmac_sha224_transform_extend_32bit_value( values_32bit, 54, s0, s1 ); \ - libhmac_sha224_transform_extend_32bit_value( values_32bit, 55, s0, s1 ); \ - libhmac_sha224_transform_extend_32bit_value( values_32bit, 56, s0, s1 ); \ - libhmac_sha224_transform_extend_32bit_value( values_32bit, 57, s0, s1 ); \ - libhmac_sha224_transform_extend_32bit_value( values_32bit, 58, s0, s1 ); \ - libhmac_sha224_transform_extend_32bit_value( values_32bit, 59, s0, s1 ); \ - libhmac_sha224_transform_extend_32bit_value( values_32bit, 60, s0, s1 ); \ - libhmac_sha224_transform_extend_32bit_value( values_32bit, 61, s0, s1 ); \ - libhmac_sha224_transform_extend_32bit_value( values_32bit, 62, s0, s1 ); \ - libhmac_sha224_transform_extend_32bit_value( values_32bit, 63, s0, s1 ); - -#define libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, value_32bit_index, hash_values, hash_value_index0, hash_value_index1, hash_value_index2, hash_value_index3, hash_value_index4, hash_value_index5, hash_value_index6, hash_value_index7, s0, s1, t1, t2 ) \ - s0 = byte_stream_bit_rotate_right_32bit( hash_values[ hash_value_index0 ], 2 ) \ - ^ byte_stream_bit_rotate_right_32bit( hash_values[ hash_value_index0 ], 13 ) \ - ^ byte_stream_bit_rotate_right_32bit( hash_values[ hash_value_index0 ], 22 ); \ - s1 = byte_stream_bit_rotate_right_32bit( hash_values[ hash_value_index4 ], 6 ) \ - ^ byte_stream_bit_rotate_right_32bit( hash_values[ hash_value_index4 ], 11 ) \ - ^ byte_stream_bit_rotate_right_32bit( hash_values[ hash_value_index4 ], 25 ); \ -\ - t1 = hash_values[ hash_value_index7 ]; \ - t1 += s1; \ - t1 += ( hash_values[ hash_value_index4 ] & hash_values[ hash_value_index5 ] ) \ - ^ ( ~( hash_values[ hash_value_index4 ] ) & hash_values[ hash_value_index6 ] ); \ - t1 += libhmac_sha224_prime_cube_roots[ value_32bit_index ]; \ - t1 += values_32bit[ value_32bit_index ]; \ - t2 = s0; \ - t2 += ( hash_values[ hash_value_index0 ] & hash_values[ hash_value_index1 ] ) \ - ^ ( hash_values[ hash_value_index0 ] & hash_values[ hash_value_index2 ] ) \ - ^ ( hash_values[ hash_value_index1 ] & hash_values[ hash_value_index2 ] ); \ -\ - hash_values[ hash_value_index3 ] += t1; \ - hash_values[ hash_value_index7 ] = t1 + t2; - -#define libhmac_sha224_transform_unfolded_calculate_hash_values( values_32bit, hash_values, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 0, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 1, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 2, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 3, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 4, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 5, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 6, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 7, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 8, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 9, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 10, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 11, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 12, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 13, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 14, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 15, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 16, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 17, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 18, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 19, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 20, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 21, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 22, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 23, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 24, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 25, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 26, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 27, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 28, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 29, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 30, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 31, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 32, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 33, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 34, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 35, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 36, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 37, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 38, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 39, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 40, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 41, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 42, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 43, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 44, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 45, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 46, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 47, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 48, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 49, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 50, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 51, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 52, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 53, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 54, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 55, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 56, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 57, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 58, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 59, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 60, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 61, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 62, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ - libhmac_sha224_transform_unfolded_calculate_hash_value( values_32bit, 63, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) - -/* Calculates the SHA-224 of 64 byte sized blocks of data in a buffer - * Returns the number of bytes used if successful or -1 on error - */ -ssize_t libhmac_sha224_transform( - libhmac_internal_sha224_context_t *internal_context, - const uint8_t *buffer, - size_t size, - libcerror_error_t **error ) -{ - uint32_t hash_values[ 8 ]; - uint32_t values_32bit[ 64 ]; - - static char *function = "libhmac_sha224_transform"; - uint32_t s0 = 0; - uint32_t s1 = 0; - uint32_t t1 = 0; - uint32_t t2 = 0; - size_t buffer_offset = 0; - -#if !defined( LIBHMAC_UNFOLLED_LOOPS ) - uint8_t hash_values_index = 0; - uint8_t value_32bit_index = 0; -#endif - - if( internal_context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid internal context.", - function ); - - return( -1 ); - } - if( buffer == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid buffer.", - function ); - - return( -1 ); - } - if( size > (size_t) SSIZE_MAX ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, - "%s: invalid size value exceeds maximum.", - function ); - - return( -1 ); - } - while( size >= LIBHMAC_SHA224_BLOCK_SIZE ) - { - if( memory_copy( - hash_values, - internal_context->hash_values, - sizeof( uint32_t ) * 8 ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_COPY_FAILED, - "%s: unable to copy hash values.", - function ); - - goto on_error; - } -#if defined( LIBHMAC_UNFOLLED_LOOPS ) - /* Break the block into 16 x 32-bit values - */ - libhmac_byte_stream_copy_to_16x_uint32_big_endian( - &( buffer[ buffer_offset ] ), - values_32bit ); - - buffer_offset += LIBHMAC_SHA224_BLOCK_SIZE; - - /* Extend to 64 x 32-bit values - */ - libhmac_sha224_transform_unfolded_extend_32bit_values( - values_32bit, - s0, - s1 ); - - /* Calculate the hash values for the 32-bit values - */ - libhmac_sha224_transform_unfolded_calculate_hash_values( - values_32bit, - hash_values, - s0, - s1, - t1, - t2 ); - - /* Update the hash values in the context - */ - internal_context->hash_values[ 0 ] += hash_values[ 0 ]; - internal_context->hash_values[ 1 ] += hash_values[ 1 ]; - internal_context->hash_values[ 2 ] += hash_values[ 2 ]; - internal_context->hash_values[ 3 ] += hash_values[ 3 ]; - internal_context->hash_values[ 4 ] += hash_values[ 4 ]; - internal_context->hash_values[ 5 ] += hash_values[ 5 ]; - internal_context->hash_values[ 6 ] += hash_values[ 6 ]; - internal_context->hash_values[ 7 ] += hash_values[ 7 ]; - -#else - /* Break the block into 16 x 32-bit values - */ - for( value_32bit_index = 0; - value_32bit_index < 16; - value_32bit_index++ ) - { - byte_stream_copy_to_uint32_big_endian( - &( buffer[ buffer_offset ] ), - values_32bit[ value_32bit_index ] ); - - buffer_offset += sizeof( uint32_t ); - } - /* Extend to 64 x 32-bit values - */ - for( value_32bit_index = 16; - value_32bit_index < 64; - value_32bit_index++ ) - { - libhmac_sha224_transform_extend_32bit_value( - values_32bit, - value_32bit_index, - s0, - s1 ); - } - /* Calculate the hash values for the 32-bit values - */ - for( value_32bit_index = 0; - value_32bit_index < 64; - value_32bit_index++ ) - { - s0 = byte_stream_bit_rotate_right_32bit( hash_values[ 0 ], 2 ) - ^ byte_stream_bit_rotate_right_32bit( hash_values[ 0 ], 13 ) - ^ byte_stream_bit_rotate_right_32bit( hash_values[ 0 ], 22 ); - s1 = byte_stream_bit_rotate_right_32bit( hash_values[ 4 ], 6 ) - ^ byte_stream_bit_rotate_right_32bit( hash_values[ 4 ], 11 ) - ^ byte_stream_bit_rotate_right_32bit( hash_values[ 4 ], 25 ); - - t1 = hash_values[ 7 ]; - t1 += s1; - t1 += ( hash_values[ 4 ] & hash_values[ 5 ] ) - ^ ( ~( hash_values[ 4 ] ) & hash_values[ 6 ] ); - t1 += libhmac_sha224_prime_cube_roots[ value_32bit_index ]; - t1 += values_32bit[ value_32bit_index ]; - t2 = s0; - t2 += ( hash_values[ 0 ] & hash_values[ 1 ] ) - ^ ( hash_values[ 0 ] & hash_values[ 2 ] ) - ^ ( hash_values[ 1 ] & hash_values[ 2 ] ); - - hash_values[ 7 ] = hash_values[ 6 ]; - hash_values[ 6 ] = hash_values[ 5 ]; - hash_values[ 5 ] = hash_values[ 4 ]; - hash_values[ 4 ] = hash_values[ 3 ] + t1; - hash_values[ 3 ] = hash_values[ 2 ]; - hash_values[ 2 ] = hash_values[ 1 ]; - hash_values[ 1 ] = hash_values[ 0 ]; - hash_values[ 0 ] = t1 + t2; - } - /* Update the hash values in the context - */ - for( hash_values_index = 0; - hash_values_index < 8; - hash_values_index++ ) - { - internal_context->hash_values[ hash_values_index ] += hash_values[ hash_values_index ]; - } -#endif /* defined( LIBHMAC_UNFOLLED_LOOPS ) */ - - size -= LIBHMAC_SHA224_BLOCK_SIZE; - } - /* Prevent sensitive data from leaking - */ - if( memory_set( - hash_values, - 0, - sizeof( uint32_t ) * 8 ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_SET_FAILED, - "%s: unable to clear hash values.", - function ); - - goto on_error; - } - if( memory_set( - values_32bit, - 0, - sizeof( uint32_t ) * 64 ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_SET_FAILED, - "%s: unable to clear 32-bit values.", - function ); - - goto on_error; - } - return( (ssize_t) buffer_offset ); - -on_error: - memory_set( - values_32bit, - 0, - sizeof( uint32_t ) * 64 ); - - memory_set( - hash_values, - 0, - sizeof( uint32_t ) * 8 ); - - return( -1 ); -} - -#endif /* !defined( LIBHMAC_HAVE_SHA224_SUPPORT ) */ - -/* Creates a SHA-224 context +/* Creates a SHA224 context * Make sure the value context is referencing, is set to NULL * Returns 1 if successful or -1 on error */ @@ -458,102 +36,11 @@ libhmac_sha224_context_t **context, libcerror_error_t **error ) { - libhmac_internal_sha224_context_t *internal_context = NULL; - static char *function = "libhmac_sha224_initialize"; - - if( context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid context.", - function ); - - return( -1 ); - } - if( *context != NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, - "%s: invalid context value already set.", - function ); - - return( -1 ); - } - internal_context = memory_allocate_structure( - libhmac_internal_sha224_context_t ); - - if( internal_context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_INSUFFICIENT, - "%s: unable to create context.", - function ); - - goto on_error; - } - if( memory_set( - internal_context, - 0, - sizeof( libhmac_internal_sha224_context_t ) ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_SET_FAILED, - "%s: unable to clear context.", - function ); - - memory_free( - internal_context ); - - return( -1 ); - } -#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA224_DIGEST_LENGTH ) - if( SHA224_Init( - &( internal_context->sha224_context ) ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, - "%s: unable to initialize context.", - function ); - - goto on_error; - } - -#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA224 ) -#if defined( HAVE_EVP_MD_CTX_INIT ) - EVP_MD_CTX_init( - &( internal_context->internal_evp_md_context ) ); - - internal_context->evp_md_context = &( internal_context->internal_evp_md_context ); -#else - internal_context->evp_md_context = EVP_MD_CTX_new(); - - if( internal_context->evp_md_context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, - "%s: unable to create EVP message digest context.", - function ); + static char *function = "libhmac_sha224_initialize"; - goto on_error; - } -#endif /* defined( HAVE_EVP_MD_CTX_INIT ) */ - - if( EVP_DigestInit_ex( - internal_context->evp_md_context, - EVP_sha224(), - NULL ) != 1 ) + if( libhmac_sha224_context_initialize( + context, + error ) != 1 ) { libcerror_error_set( error, @@ -562,183 +49,29 @@ "%s: unable to initialize context.", function ); -#if defined( HAVE_EVP_MD_CTX_CLEANUP ) - EVP_MD_CTX_cleanup( - &( internal_context->internal_evp_md_context ) ); - ERR_remove_thread_state( - NULL ); -#else - EVP_MD_CTX_free( - internal_context->evp_md_context ); -#endif - internal_context->evp_md_context = NULL; - - goto on_error; - } -#else - if( memory_copy( - internal_context->hash_values, - libhmac_sha224_prime_square_roots, - sizeof( uint32_t ) * 8 ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_COPY_FAILED, - "%s: unable to copy initial hash values.", - function ); - return( -1 ); } -#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA224_DIGEST_LENGTH ) */ - - *context = (libhmac_sha224_context_t *) internal_context; - return( 1 ); - -on_error: - if( internal_context != NULL ) - { - memory_free( - internal_context ); - } - return( -1 ); } -/* Frees a SHA-224 context +/* Frees a SHA224 context * Returns 1 if successful or -1 on error */ int libhmac_sha224_free( libhmac_sha224_context_t **context, libcerror_error_t **error ) { - libhmac_internal_sha224_context_t *internal_context = NULL; - static char *function = "libhmac_sha224_free"; - - if( context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid context.", - function ); + static char *function = "libhmac_sha224_free"; - return( -1 ); - } - if( *context != NULL ) - { - internal_context = (libhmac_internal_sha224_context_t *) *context; - *context = NULL; - -#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA224_DIGEST_LENGTH ) - /* No additional clean up necessary - */ - -#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA224 ) -#if defined( HAVE_EVP_MD_CTX_CLEANUP ) - if( EVP_MD_CTX_cleanup( - &( internal_context->internal_evp_md_context ) ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, - "%s: unable to clean up EVP message digest context.", - function ); - } - /* Make sure the error state is removed otherwise OpenSSL will leak memory - */ - ERR_remove_thread_state( - NULL ); -#else - EVP_MD_CTX_free( - internal_context->evp_md_context ); - -#endif /* defined( HAVE_EVP_MD_CTX_CLEANUP ) */ - - internal_context->evp_md_context = NULL; -#else - /* No additional clean up necessary - */ -#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA224_DIGEST_LENGTH ) */ - - memory_free( - internal_context ); - } - return( 1 ); -} - -#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA224_DIGEST_LENGTH ) - -/* Updates the SHA-224 context using OpenSSL - * Returns 1 if successful or -1 on error - */ -int libhmac_sha224_update( - libhmac_sha224_context_t *context, - const uint8_t *buffer, - size_t size, - libcerror_error_t **error ) -{ - libhmac_internal_sha224_context_t *internal_context = NULL; - static char *function = "libhmac_sha224_update"; - unsigned long safe_hash_size = 0; - - if( context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid context.", - function ); - - return( -1 ); - } - internal_context = (libhmac_internal_sha224_context_t *) context; - - if( buffer == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid buffer.", - function ); - - return( -1 ); - } -#if ( SIZEOF_LONG < SIZEOF_SIZE_T ) - if( size > (size_t) ULONG_MAX ) -#else - if( size > (size_t) SSIZE_MAX ) -#endif - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, - "%s: invalid size value exceeds maximum.", - function ); - - return( -1 ); - } - if( size == 0 ) - { - return( 1 ); - } - safe_hash_size = (unsigned long) size; - - if( SHA256_Update( - &( internal_context->sha224_context ), - (const void *) buffer, - size ) != 1 ) + if( libhmac_sha224_context_free( + context, + error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to update context.", + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free context.", function ); return( -1 ); @@ -746,9 +79,7 @@ return( 1 ); } -#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA224 ) - -/* Updates the SHA-224 context using OpenSSL EVP +/* Updates the SHA224 context * Returns 1 if successful or -1 on error */ int libhmac_sha224_update( @@ -757,52 +88,13 @@ size_t size, libcerror_error_t **error ) { - libhmac_internal_sha224_context_t *internal_context = NULL; - static char *function = "libhmac_sha224_update"; - - if( context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid context.", - function ); - - return( -1 ); - } - internal_context = (libhmac_internal_sha224_context_t *) context; + static char *function = "libhmac_sha224_update"; - if( buffer == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid buffer.", - function ); - - return( -1 ); - } - if( size > (size_t) SSIZE_MAX ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, - "%s: invalid size value exceeds maximum.", - function ); - - return( -1 ); - } - if( size == 0 ) - { - return( 1 ); - } - if( EVP_DigestUpdate( - internal_context->evp_md_context, - (const void *) buffer, - size ) != 1 ) + if( libhmac_sha224_context_update( + context, + buffer, + size, + error ) != 1 ) { libcerror_error_set( error, @@ -816,174 +108,7 @@ return( 1 ); } -#else - -/* Updates the SHA-224 context using fallback implementation - * Returns 1 if successful or -1 on error - */ -int libhmac_sha224_update( - libhmac_sha224_context_t *context, - const uint8_t *buffer, - size_t size, - libcerror_error_t **error ) -{ - libhmac_internal_sha224_context_t *internal_context = NULL; - static char *function = "libhmac_sha224_update"; - size_t buffer_offset = 0; - size_t remaining_block_size = 0; - ssize_t process_count = 0; - - if( context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid context.", - function ); - - return( -1 ); - } - internal_context = (libhmac_internal_sha224_context_t *) context; - - if( buffer == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid buffer.", - function ); - - return( -1 ); - } - if( size > (size_t) SSIZE_MAX ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, - "%s: invalid size value exceeds maximum.", - function ); - - return( -1 ); - } - if( size == 0 ) - { - return( 1 ); - } - if( internal_context->block_offset > 0 ) - { - remaining_block_size = LIBHMAC_SHA224_BLOCK_SIZE - internal_context->block_offset; - - if( remaining_block_size > size ) - { - remaining_block_size = size; - } - if( memory_copy( - &( internal_context->block[ internal_context->block_offset ] ), - buffer, - remaining_block_size ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_COPY_FAILED, - "%s: unable to copy data to context block.", - function ); - - return( -1 ); - } - internal_context->block_offset += remaining_block_size; - - if( internal_context->block_offset < LIBHMAC_SHA224_BLOCK_SIZE ) - { - return( 1 ); - } - buffer_offset += remaining_block_size; - size -= remaining_block_size; - - process_count = libhmac_sha224_transform( - internal_context, - internal_context->block, - LIBHMAC_SHA224_BLOCK_SIZE, - error ); - - if( process_count == -1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to transform context block.", - function ); - - return( -1 ); - } - internal_context->hash_count += process_count; - internal_context->block_offset = 0; - } - if( size > 0 ) - { - process_count = libhmac_sha224_transform( - internal_context, - &( buffer[ buffer_offset ] ), - size, - error ); - - if( process_count == -1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to transform buffer.", - function ); - - return( -1 ); - } - internal_context->hash_count += process_count; - - buffer_offset += process_count; - size -= process_count; - } - if( size > 0 ) - { - if( size >= LIBHMAC_SHA224_BLOCK_SIZE ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, - "%s: invalid size value out of bounds.", - function ); - - return( -1 ); - } - if( memory_copy( - internal_context->block, - &( buffer[ buffer_offset ] ), - size ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_COPY_FAILED, - "%s: unable to copy remaining data to context block.", - function ); - - return( -1 ); - } - internal_context->block_offset = size; - } - return( 1 ); -} - -#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA224_DIGEST_LENGTH ) */ - -#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA224_DIGEST_LENGTH ) - -/* Finalizes the SHA-224 context using OpenSSL +/* Finalizes the SHA224 context * Returns 1 if successful or -1 on error */ int libhmac_sha224_finalize( @@ -992,138 +117,13 @@ size_t hash_size, libcerror_error_t **error ) { - libhmac_internal_sha224_context_t *internal_context = NULL; - static char *function = "libhmac_sha224_finalize"; - - if( context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid context.", - function ); - - return( -1 ); - } - internal_context = (libhmac_internal_sha224_context_t *) context; - - if( hash == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid hash.", - function ); - - return( -1 ); - } - if( hash_size > (size_t) SSIZE_MAX ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, - "%s: invalid hash size value exceeds maximum.", - function ); - - return( -1 ); - } - if( hash_size < (size_t) LIBHMAC_SHA224_HASH_SIZE ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, - "%s: invalid hash size value too small.", - function ); + static char *function = "libhmac_sha224_finalize"; - return( -1 ); - } - if( SHA256_Final( + if( libhmac_sha224_context_finalize( + context, hash, - &( internal_context->sha224_context ) ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, - "%s: unable to finalize context.", - function ); - - return( -1 ); - } - return( 1 ); -} - -#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA224 ) - -/* Finalizes the SHA-224 context using OpenSSL EVP - * Returns 1 if successful or -1 on error - */ -int libhmac_sha224_finalize( - libhmac_sha224_context_t *context, - uint8_t *hash, - size_t hash_size, - libcerror_error_t **error ) -{ - libhmac_internal_sha224_context_t *internal_context = NULL; - static char *function = "libhmac_sha224_finalize"; - unsigned int safe_hash_size = 0; - - if( context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid context.", - function ); - - return( -1 ); - } - internal_context = (libhmac_internal_sha224_context_t *) context; - - if( hash == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid hash.", - function ); - - return( -1 ); - } - if( hash_size > (size_t) UINT_MAX ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, - "%s: invalid hash size value exceeds maximum.", - function ); - - return( -1 ); - } - if( hash_size < (size_t) LIBHMAC_SHA224_HASH_SIZE ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, - "%s: invalid hash size value too small.", - function ); - - return( -1 ); - } - safe_hash_size = (unsigned int) hash_size; - - if( EVP_DigestFinal_ex( - internal_context->evp_md_context, - (unsigned char *) hash, - &safe_hash_size ) != 1 ) + hash_size, + error ) != 1 ) { libcerror_error_set( error, @@ -1137,201 +137,6 @@ return( 1 ); } -#else - -/* Finalizes the SHA-224 context using fallback implementation - * Returns 1 if successful or -1 on error - */ -int libhmac_sha224_finalize( - libhmac_sha224_context_t *context, - uint8_t *hash, - size_t hash_size, - libcerror_error_t **error ) -{ - libhmac_internal_sha224_context_t *internal_context = NULL; - static char *function = "libhmac_sha224_finalize"; - size_t block_size = 0; - size_t number_of_blocks = 0; - ssize_t process_count = 0; - uint64_t bit_size = 0; - -#if !defined( LIBHMAC_UNFOLLED_LOOPS ) - size_t hash_index = 0; - int hash_values_index = 0; -#endif - - if( context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid context.", - function ); - - return( -1 ); - } - internal_context = (libhmac_internal_sha224_context_t *) context; - - if( hash == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid hash.", - function ); - - return( -1 ); - } - if( hash_size < (size_t) LIBHMAC_SHA224_HASH_SIZE ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, - "%s: invalid hash value too small.", - function ); - - return( -1 ); - } - if( hash_size > (size_t) SSIZE_MAX ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, - "%s: invalid hash size value exceeds maximum.", - function ); - - return( -1 ); - } - if( hash_size < (size_t) LIBHMAC_SHA224_HASH_SIZE ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, - "%s: invalid hash size value too small.", - function ); - - return( -1 ); - } - /* Add padding with a size of 56 mod 64 - */ - number_of_blocks = 1; - - if( internal_context->block_offset > 55 ) - { - number_of_blocks += 1; - } - block_size = number_of_blocks * LIBHMAC_SHA224_BLOCK_SIZE; - - if( memory_set( - &( internal_context->block[ internal_context->block_offset ] ), - 0, - block_size - internal_context->block_offset ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_SET_FAILED, - "%s: unable to clear context block.", - function ); - - return( -1 ); - } - /* The first byte of the padding contains 0x80 - */ - internal_context->block[ internal_context->block_offset ] = 0x80; - - bit_size = ( internal_context->hash_count + internal_context->block_offset ) * 8; - - byte_stream_copy_from_uint64_big_endian( - &( internal_context->block[ block_size - 8 ] ), - bit_size ); - - process_count = libhmac_sha224_transform( - internal_context, - internal_context->block, - block_size, - error ); - - if( process_count == -1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to transform context block.", - function ); - - return( -1 ); - } - /* Note that hash_values[ 7 ] is omitted from the hash */ -#if !defined( LIBHMAC_UNFOLLED_LOOPS ) - for( hash_values_index = 0; - hash_values_index < 7; - hash_values_index++ ) - { - byte_stream_copy_from_uint32_big_endian( - &( hash[ hash_index ] ), - internal_context->hash_values[ hash_values_index ] ); - - hash_index += sizeof( uint32_t ); - } -#else - byte_stream_copy_from_uint32_big_endian( - &( hash[ 0 ] ), - internal_context->hash_values[ 0 ] ); - - byte_stream_copy_from_uint32_big_endian( - &( hash[ 4 ] ), - internal_context->hash_values[ 1 ] ); - - byte_stream_copy_from_uint32_big_endian( - &( hash[ 8 ] ), - internal_context->hash_values[ 2 ] ); - - byte_stream_copy_from_uint32_big_endian( - &( hash[ 12 ] ), - internal_context->hash_values[ 3 ] ); - - byte_stream_copy_from_uint32_big_endian( - &( hash[ 16 ] ), - internal_context->hash_values[ 4 ] ); - - byte_stream_copy_from_uint32_big_endian( - &( hash[ 20 ] ), - internal_context->hash_values[ 5 ] ); - - byte_stream_copy_from_uint32_big_endian( - &( hash[ 24 ] ), - internal_context->hash_values[ 6 ] ); - -#endif /* !defined( LIBHMAC_UNFOLLED_LOOPS ) */ - - /* Prevent sensitive data from leaking - */ - if( memory_set( - internal_context, - 0, - sizeof( libhmac_internal_sha224_context_t ) ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_SET_FAILED, - "%s: unable to clear context.", - function ); - - return( -1 ); - } - return( 1 ); -} - -#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA224_DIGEST_LENGTH ) */ - /* Calculates the SHA-224 of the buffer * Returns 1 if successful or -1 on error */ @@ -1345,7 +150,7 @@ libhmac_sha224_context_t *context = NULL; static char *function = "libhmac_sha224_calculate"; - if( libhmac_sha224_initialize( + if( libhmac_sha224_context_initialize( &context, error ) != 1 ) { @@ -1358,7 +163,7 @@ goto on_error; } - if( libhmac_sha224_update( + if( libhmac_sha224_context_update( context, buffer, size, @@ -1373,7 +178,7 @@ goto on_error; } - if( libhmac_sha224_finalize( + if( libhmac_sha224_context_finalize( context, hash, hash_size, @@ -1388,7 +193,7 @@ goto on_error; } - if( libhmac_sha224_free( + if( libhmac_sha224_context_free( &context, error ) != 1 ) { @@ -1406,7 +211,7 @@ on_error: if( context != NULL ) { - libhmac_sha224_free( + libhmac_sha224_context_free( &context, NULL ); } @@ -1516,7 +321,7 @@ } else { - if( libhmac_sha224_initialize( + if( libhmac_sha224_context_initialize( &context, error ) != 1 ) { @@ -1529,7 +334,7 @@ goto on_error; } - if( libhmac_sha224_update( + if( libhmac_sha224_context_update( context, key, key_size, @@ -1544,7 +349,7 @@ goto on_error; } - if( libhmac_sha224_finalize( + if( libhmac_sha224_context_finalize( context, key_hash, LIBHMAC_SHA224_HASH_SIZE, @@ -1559,7 +364,7 @@ goto on_error; } - if( libhmac_sha224_free( + if( libhmac_sha224_context_free( &context, error ) != 1 ) { @@ -1667,7 +472,7 @@ inner_padding[ block_index ] ^= key_data[ block_index ]; outer_padding[ block_index ] ^= key_data[ block_index ]; } - if( libhmac_sha224_initialize( + if( libhmac_sha224_context_initialize( &context, error ) != 1 ) { @@ -1680,7 +485,7 @@ goto on_error; } - if( libhmac_sha224_update( + if( libhmac_sha224_context_update( context, inner_padding, block_size, @@ -1695,7 +500,7 @@ goto on_error; } - if( libhmac_sha224_update( + if( libhmac_sha224_context_update( context, buffer, size, @@ -1710,7 +515,7 @@ goto on_error; } - if( libhmac_sha224_finalize( + if( libhmac_sha224_context_finalize( context, hmac, hmac_size, @@ -1725,7 +530,7 @@ goto on_error; } - if( libhmac_sha224_free( + if( libhmac_sha224_context_free( &context, error ) != 1 ) { @@ -1738,7 +543,7 @@ goto on_error; } - if( libhmac_sha224_initialize( + if( libhmac_sha224_context_initialize( &context, error ) != 1 ) { @@ -1751,7 +556,7 @@ goto on_error; } - if( libhmac_sha224_update( + if( libhmac_sha224_context_update( context, outer_padding, block_size, @@ -1766,7 +571,7 @@ goto on_error; } - if( libhmac_sha224_update( + if( libhmac_sha224_context_update( context, hmac, LIBHMAC_SHA224_HASH_SIZE, @@ -1781,7 +586,7 @@ goto on_error; } - if( libhmac_sha224_finalize( + if( libhmac_sha224_context_finalize( context, hmac, hmac_size, @@ -1796,7 +601,7 @@ goto on_error; } - if( libhmac_sha224_free( + if( libhmac_sha224_context_free( &context, error ) != 1 ) { @@ -1871,7 +676,7 @@ on_error: if( context != NULL ) { - libhmac_sha224_free( + libhmac_sha224_context_free( &context, NULL ); } diff -Nru libfshfs-20201104/libhmac/libhmac_sha224.h libfshfs-20240221/libhmac/libhmac_sha224.h --- libfshfs-20201104/libhmac/libhmac_sha224.h 2020-11-04 11:56:11.000000000 +0000 +++ libfshfs-20240221/libhmac/libhmac_sha224.h 2024-02-21 06:04:12.000000000 +0000 @@ -1,7 +1,7 @@ /* * SHA-224 functions * - * Copyright (C) 2011-2020, Joachim Metz + * Copyright (C) 2011-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -25,14 +25,6 @@ #include #include -#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) -#include - -#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) -#include - -#endif - #include "libhmac_extern.h" #include "libhmac_libcerror.h" #include "libhmac_types.h" @@ -41,66 +33,6 @@ extern "C" { #endif -#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA224_DIGEST_LENGTH ) -#define LIBHMAC_HAVE_SHA224_SUPPORT - -#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA224 ) -#define LIBHMAC_HAVE_SHA224_SUPPORT - -#endif - -#if !defined( LIBHMAC_HAVE_SHA224_SUPPORT ) -#define LIBHMAC_SHA224_BLOCK_SIZE 64 -#endif - -typedef struct libhmac_internal_sha224_context libhmac_internal_sha224_context_t; - -struct libhmac_internal_sha224_context -{ -#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA224_DIGEST_LENGTH ) - /* The SHA-224 functions use the SHA-256 context - */ - SHA256_CTX sha224_context; - -#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA224 ) - /* The EVP message digest context - */ -#if defined( HAVE_EVP_MD_CTX_INIT ) - EVP_MD_CTX internal_evp_md_context; -#endif - - EVP_MD_CTX *evp_md_context; - -#else - /* The number of bytes hashed - */ - uint64_t hash_count; - - /* The 32-bit hash values - */ - uint32_t hash_values[ 8 ]; - - /* The block offset - */ - size_t block_offset; - - /* The (data) block - */ - uint8_t block[ 128 ]; - -#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA224_DIGEST_LENGTH ) */ -}; - -#if !defined( LIBHMAC_HAVE_SHA224_SUPPORT ) - -ssize_t libhmac_sha224_transform( - libhmac_internal_sha224_context_t *internal_context, - const uint8_t *buffer, - size_t size, - libcerror_error_t **error ); - -#endif /* !defined( LIBHMAC_HAVE_SHA224_SUPPORT ) */ - LIBHMAC_EXTERN \ int libhmac_sha224_initialize( libhmac_sha224_context_t **context, diff -Nru libfshfs-20201104/libhmac/libhmac_sha224_context.c libfshfs-20240221/libhmac/libhmac_sha224_context.c --- libfshfs-20201104/libhmac/libhmac_sha224_context.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libhmac/libhmac_sha224_context.c 2024-02-21 06:04:12.000000000 +0000 @@ -0,0 +1,1348 @@ +/* + * SHA-224 functions + * + * Copyright (C) 2011-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include +#include +#include + +#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) +#include + +#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) +#include +#include +#endif + +#include "libhmac_byte_stream.h" +#include "libhmac_definitions.h" +#include "libhmac_libcerror.h" +#include "libhmac_sha224_context.h" + +#if !defined( LIBHMAC_HAVE_SHA224_SUPPORT ) + +/* FIPS 180-2 based SHA-224 functions + */ + +/* The first 32-bits of the fractional parts of the square roots of the first 8 primes [ 2, 19 ] + */ +uint32_t libhmac_sha224_context_prime_square_roots[ 8 ] = { + 0xc1059ed8UL, 0x367cd507UL, 0x3070dd17UL, 0xf70e5939UL, + 0xffc00b31UL, 0x68581511UL, 0x64f98fa7UL, 0xbefa4fa4UL +}; + +/* The first 32-bits of the fractional parts of the cube roots of the first 64 primes [ 2, 311 ] + */ +uint32_t libhmac_sha224_context_prime_cube_roots[ 64 ] = { + 0x428a2f98UL, 0x71374491UL, 0xb5c0fbcfUL, 0xe9b5dba5UL, + 0x3956c25bUL, 0x59f111f1UL, 0x923f82a4UL, 0xab1c5ed5UL, + 0xd807aa98UL, 0x12835b01UL, 0x243185beUL, 0x550c7dc3UL, + 0x72be5d74UL, 0x80deb1feUL, 0x9bdc06a7UL, 0xc19bf174UL, + 0xe49b69c1UL, 0xefbe4786UL, 0x0fc19dc6UL, 0x240ca1ccUL, + 0x2de92c6fUL, 0x4a7484aaUL, 0x5cb0a9dcUL, 0x76f988daUL, + 0x983e5152UL, 0xa831c66dUL, 0xb00327c8UL, 0xbf597fc7UL, + 0xc6e00bf3UL, 0xd5a79147UL, 0x06ca6351UL, 0x14292967UL, + 0x27b70a85UL, 0x2e1b2138UL, 0x4d2c6dfcUL, 0x53380d13UL, + 0x650a7354UL, 0x766a0abbUL, 0x81c2c92eUL, 0x92722c85UL, + 0xa2bfe8a1UL, 0xa81a664bUL, 0xc24b8b70UL, 0xc76c51a3UL, + 0xd192e819UL, 0xd6990624UL, 0xf40e3585UL, 0x106aa070UL, + 0x19a4c116UL, 0x1e376c08UL, 0x2748774cUL, 0x34b0bcb5UL, + 0x391c0cb3UL, 0x4ed8aa4aUL, 0x5b9cca4fUL, 0x682e6ff3UL, + 0x748f82eeUL, 0x78a5636fUL, 0x84c87814UL, 0x8cc70208UL, + 0x90befffaUL, 0xa4506cebUL, 0xbef9a3f7UL, 0xc67178f2UL +}; + +#define libhmac_sha224_context_transform_extend_32bit_value( values_32bit, value_32bit_index, s0, s1 ) \ + s0 = byte_stream_bit_rotate_right_32bit( values_32bit[ value_32bit_index - 15 ], 7 ) \ + ^ byte_stream_bit_rotate_right_32bit( values_32bit[ value_32bit_index - 15 ], 18 ) \ + ^ ( values_32bit[ value_32bit_index - 15 ] >> 3 ); \ + s1 = byte_stream_bit_rotate_right_32bit( values_32bit[ value_32bit_index - 2 ], 17 ) \ + ^ byte_stream_bit_rotate_right_32bit( values_32bit[ value_32bit_index - 2 ], 19 ) \ + ^ ( values_32bit[ value_32bit_index - 2 ] >> 10 ); \ +\ + values_32bit[ value_32bit_index ] = values_32bit[ value_32bit_index - 16 ] \ + + s0 \ + + values_32bit[ value_32bit_index - 7 ] \ + + s1 + +#define libhmac_sha224_context_transform_unfolded_extend_32bit_values( values_32bit, s0, s1 ) \ + libhmac_sha224_context_transform_extend_32bit_value( values_32bit, 16, s0, s1 ); \ + libhmac_sha224_context_transform_extend_32bit_value( values_32bit, 17, s0, s1 ); \ + libhmac_sha224_context_transform_extend_32bit_value( values_32bit, 18, s0, s1 ); \ + libhmac_sha224_context_transform_extend_32bit_value( values_32bit, 19, s0, s1 ); \ + libhmac_sha224_context_transform_extend_32bit_value( values_32bit, 20, s0, s1 ); \ + libhmac_sha224_context_transform_extend_32bit_value( values_32bit, 21, s0, s1 ); \ + libhmac_sha224_context_transform_extend_32bit_value( values_32bit, 22, s0, s1 ); \ + libhmac_sha224_context_transform_extend_32bit_value( values_32bit, 23, s0, s1 ); \ + libhmac_sha224_context_transform_extend_32bit_value( values_32bit, 24, s0, s1 ); \ + libhmac_sha224_context_transform_extend_32bit_value( values_32bit, 25, s0, s1 ); \ + libhmac_sha224_context_transform_extend_32bit_value( values_32bit, 26, s0, s1 ); \ + libhmac_sha224_context_transform_extend_32bit_value( values_32bit, 27, s0, s1 ); \ + libhmac_sha224_context_transform_extend_32bit_value( values_32bit, 28, s0, s1 ); \ + libhmac_sha224_context_transform_extend_32bit_value( values_32bit, 29, s0, s1 ); \ + libhmac_sha224_context_transform_extend_32bit_value( values_32bit, 30, s0, s1 ); \ + libhmac_sha224_context_transform_extend_32bit_value( values_32bit, 31, s0, s1 ); \ + libhmac_sha224_context_transform_extend_32bit_value( values_32bit, 32, s0, s1 ); \ + libhmac_sha224_context_transform_extend_32bit_value( values_32bit, 33, s0, s1 ); \ + libhmac_sha224_context_transform_extend_32bit_value( values_32bit, 34, s0, s1 ); \ + libhmac_sha224_context_transform_extend_32bit_value( values_32bit, 35, s0, s1 ); \ + libhmac_sha224_context_transform_extend_32bit_value( values_32bit, 36, s0, s1 ); \ + libhmac_sha224_context_transform_extend_32bit_value( values_32bit, 37, s0, s1 ); \ + libhmac_sha224_context_transform_extend_32bit_value( values_32bit, 38, s0, s1 ); \ + libhmac_sha224_context_transform_extend_32bit_value( values_32bit, 39, s0, s1 ); \ + libhmac_sha224_context_transform_extend_32bit_value( values_32bit, 40, s0, s1 ); \ + libhmac_sha224_context_transform_extend_32bit_value( values_32bit, 41, s0, s1 ); \ + libhmac_sha224_context_transform_extend_32bit_value( values_32bit, 42, s0, s1 ); \ + libhmac_sha224_context_transform_extend_32bit_value( values_32bit, 43, s0, s1 ); \ + libhmac_sha224_context_transform_extend_32bit_value( values_32bit, 44, s0, s1 ); \ + libhmac_sha224_context_transform_extend_32bit_value( values_32bit, 45, s0, s1 ); \ + libhmac_sha224_context_transform_extend_32bit_value( values_32bit, 46, s0, s1 ); \ + libhmac_sha224_context_transform_extend_32bit_value( values_32bit, 47, s0, s1 ); \ + libhmac_sha224_context_transform_extend_32bit_value( values_32bit, 48, s0, s1 ); \ + libhmac_sha224_context_transform_extend_32bit_value( values_32bit, 49, s0, s1 ); \ + libhmac_sha224_context_transform_extend_32bit_value( values_32bit, 50, s0, s1 ); \ + libhmac_sha224_context_transform_extend_32bit_value( values_32bit, 51, s0, s1 ); \ + libhmac_sha224_context_transform_extend_32bit_value( values_32bit, 52, s0, s1 ); \ + libhmac_sha224_context_transform_extend_32bit_value( values_32bit, 53, s0, s1 ); \ + libhmac_sha224_context_transform_extend_32bit_value( values_32bit, 54, s0, s1 ); \ + libhmac_sha224_context_transform_extend_32bit_value( values_32bit, 55, s0, s1 ); \ + libhmac_sha224_context_transform_extend_32bit_value( values_32bit, 56, s0, s1 ); \ + libhmac_sha224_context_transform_extend_32bit_value( values_32bit, 57, s0, s1 ); \ + libhmac_sha224_context_transform_extend_32bit_value( values_32bit, 58, s0, s1 ); \ + libhmac_sha224_context_transform_extend_32bit_value( values_32bit, 59, s0, s1 ); \ + libhmac_sha224_context_transform_extend_32bit_value( values_32bit, 60, s0, s1 ); \ + libhmac_sha224_context_transform_extend_32bit_value( values_32bit, 61, s0, s1 ); \ + libhmac_sha224_context_transform_extend_32bit_value( values_32bit, 62, s0, s1 ); \ + libhmac_sha224_context_transform_extend_32bit_value( values_32bit, 63, s0, s1 ); + +#define libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, value_32bit_index, hash_values, hash_value_index0, hash_value_index1, hash_value_index2, hash_value_index3, hash_value_index4, hash_value_index5, hash_value_index6, hash_value_index7, s0, s1, t1, t2 ) \ + s0 = byte_stream_bit_rotate_right_32bit( hash_values[ hash_value_index0 ], 2 ) \ + ^ byte_stream_bit_rotate_right_32bit( hash_values[ hash_value_index0 ], 13 ) \ + ^ byte_stream_bit_rotate_right_32bit( hash_values[ hash_value_index0 ], 22 ); \ + s1 = byte_stream_bit_rotate_right_32bit( hash_values[ hash_value_index4 ], 6 ) \ + ^ byte_stream_bit_rotate_right_32bit( hash_values[ hash_value_index4 ], 11 ) \ + ^ byte_stream_bit_rotate_right_32bit( hash_values[ hash_value_index4 ], 25 ); \ +\ + t1 = hash_values[ hash_value_index7 ]; \ + t1 += s1; \ + t1 += ( hash_values[ hash_value_index4 ] & hash_values[ hash_value_index5 ] ) \ + ^ ( ~( hash_values[ hash_value_index4 ] ) & hash_values[ hash_value_index6 ] ); \ + t1 += libhmac_sha224_context_prime_cube_roots[ value_32bit_index ]; \ + t1 += values_32bit[ value_32bit_index ]; \ + t2 = s0; \ + t2 += ( hash_values[ hash_value_index0 ] & hash_values[ hash_value_index1 ] ) \ + ^ ( hash_values[ hash_value_index0 ] & hash_values[ hash_value_index2 ] ) \ + ^ ( hash_values[ hash_value_index1 ] & hash_values[ hash_value_index2 ] ); \ +\ + hash_values[ hash_value_index3 ] += t1; \ + hash_values[ hash_value_index7 ] = t1 + t2; + +#define libhmac_sha224_context_transform_unfolded_calculate_hash_values( values_32bit, hash_values, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 0, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 1, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 2, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 3, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 4, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 5, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 6, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 7, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 8, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 9, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 10, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 11, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 12, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 13, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 14, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 15, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 16, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 17, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 18, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 19, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 20, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 21, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 22, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 23, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 24, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 25, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 26, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 27, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 28, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 29, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 30, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 31, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 32, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 33, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 34, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 35, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 36, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 37, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 38, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 39, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 40, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 41, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 42, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 43, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 44, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 45, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 46, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 47, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 48, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 49, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 50, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 51, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 52, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 53, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 54, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 55, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 56, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 57, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 58, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 59, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 60, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 61, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 62, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ + libhmac_sha224_context_transform_unfolded_calculate_hash_value( values_32bit, 63, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) + +/* Calculates the SHA-224 of 64 byte sized blocks of data in a buffer + * Returns the number of bytes used if successful or -1 on error + */ +ssize_t libhmac_sha224_context_transform( + libhmac_internal_sha224_context_t *internal_context, + const uint8_t *buffer, + size_t size, + libcerror_error_t **error ) +{ + uint32_t hash_values[ 8 ]; + uint32_t values_32bit[ 64 ]; + + static char *function = "libhmac_sha224_context_transform"; + uint32_t s0 = 0; + uint32_t s1 = 0; + uint32_t t1 = 0; + uint32_t t2 = 0; + size_t buffer_offset = 0; + +#if !defined( LIBHMAC_UNFOLLED_LOOPS ) + uint8_t hash_values_index = 0; + uint8_t value_32bit_index = 0; +#endif + + if( internal_context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid internal context.", + function ); + + return( -1 ); + } + if( buffer == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid buffer.", + function ); + + return( -1 ); + } + if( size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid size value exceeds maximum.", + function ); + + return( -1 ); + } + while( size >= LIBHMAC_SHA224_BLOCK_SIZE ) + { + if( memory_copy( + hash_values, + internal_context->hash_values, + sizeof( uint32_t ) * 8 ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_COPY_FAILED, + "%s: unable to copy hash values.", + function ); + + goto on_error; + } +#if defined( LIBHMAC_UNFOLLED_LOOPS ) + /* Break the block into 16 x 32-bit values + */ + libhmac_byte_stream_copy_to_16x_uint32_big_endian( + &( buffer[ buffer_offset ] ), + values_32bit ); + + buffer_offset += LIBHMAC_SHA224_BLOCK_SIZE; + + /* Extend to 64 x 32-bit values + */ + libhmac_sha224_context_transform_unfolded_extend_32bit_values( + values_32bit, + s0, + s1 ); + + /* Calculate the hash values for the 32-bit values + */ + libhmac_sha224_context_transform_unfolded_calculate_hash_values( + values_32bit, + hash_values, + s0, + s1, + t1, + t2 ); + + /* Update the hash values in the context + */ + internal_context->hash_values[ 0 ] += hash_values[ 0 ]; + internal_context->hash_values[ 1 ] += hash_values[ 1 ]; + internal_context->hash_values[ 2 ] += hash_values[ 2 ]; + internal_context->hash_values[ 3 ] += hash_values[ 3 ]; + internal_context->hash_values[ 4 ] += hash_values[ 4 ]; + internal_context->hash_values[ 5 ] += hash_values[ 5 ]; + internal_context->hash_values[ 6 ] += hash_values[ 6 ]; + internal_context->hash_values[ 7 ] += hash_values[ 7 ]; + +#else + /* Break the block into 16 x 32-bit values + */ + for( value_32bit_index = 0; + value_32bit_index < 16; + value_32bit_index++ ) + { + byte_stream_copy_to_uint32_big_endian( + &( buffer[ buffer_offset ] ), + values_32bit[ value_32bit_index ] ); + + buffer_offset += sizeof( uint32_t ); + } + /* Extend to 64 x 32-bit values + */ + for( value_32bit_index = 16; + value_32bit_index < 64; + value_32bit_index++ ) + { + libhmac_sha224_context_transform_extend_32bit_value( + values_32bit, + value_32bit_index, + s0, + s1 ); + } + /* Calculate the hash values for the 32-bit values + */ + for( value_32bit_index = 0; + value_32bit_index < 64; + value_32bit_index++ ) + { + s0 = byte_stream_bit_rotate_right_32bit( hash_values[ 0 ], 2 ) + ^ byte_stream_bit_rotate_right_32bit( hash_values[ 0 ], 13 ) + ^ byte_stream_bit_rotate_right_32bit( hash_values[ 0 ], 22 ); + s1 = byte_stream_bit_rotate_right_32bit( hash_values[ 4 ], 6 ) + ^ byte_stream_bit_rotate_right_32bit( hash_values[ 4 ], 11 ) + ^ byte_stream_bit_rotate_right_32bit( hash_values[ 4 ], 25 ); + + t1 = hash_values[ 7 ]; + t1 += s1; + t1 += ( hash_values[ 4 ] & hash_values[ 5 ] ) + ^ ( ~( hash_values[ 4 ] ) & hash_values[ 6 ] ); + t1 += libhmac_sha224_context_prime_cube_roots[ value_32bit_index ]; + t1 += values_32bit[ value_32bit_index ]; + t2 = s0; + t2 += ( hash_values[ 0 ] & hash_values[ 1 ] ) + ^ ( hash_values[ 0 ] & hash_values[ 2 ] ) + ^ ( hash_values[ 1 ] & hash_values[ 2 ] ); + + hash_values[ 7 ] = hash_values[ 6 ]; + hash_values[ 6 ] = hash_values[ 5 ]; + hash_values[ 5 ] = hash_values[ 4 ]; + hash_values[ 4 ] = hash_values[ 3 ] + t1; + hash_values[ 3 ] = hash_values[ 2 ]; + hash_values[ 2 ] = hash_values[ 1 ]; + hash_values[ 1 ] = hash_values[ 0 ]; + hash_values[ 0 ] = t1 + t2; + } + /* Update the hash values in the context + */ + for( hash_values_index = 0; + hash_values_index < 8; + hash_values_index++ ) + { + internal_context->hash_values[ hash_values_index ] += hash_values[ hash_values_index ]; + } +#endif /* defined( LIBHMAC_UNFOLLED_LOOPS ) */ + + size -= LIBHMAC_SHA224_BLOCK_SIZE; + } + /* Prevent sensitive data from leaking + */ + if( memory_set( + hash_values, + 0, + sizeof( uint32_t ) * 8 ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_SET_FAILED, + "%s: unable to clear hash values.", + function ); + + goto on_error; + } + if( memory_set( + values_32bit, + 0, + sizeof( uint32_t ) * 64 ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_SET_FAILED, + "%s: unable to clear 32-bit values.", + function ); + + goto on_error; + } + return( (ssize_t) buffer_offset ); + +on_error: + memory_set( + values_32bit, + 0, + sizeof( uint32_t ) * 64 ); + + memory_set( + hash_values, + 0, + sizeof( uint32_t ) * 8 ); + + return( -1 ); +} + +#endif /* !defined( LIBHMAC_HAVE_SHA224_SUPPORT ) */ + +/* Creates a SHA-224 context + * Make sure the value context is referencing, is set to NULL + * Returns 1 if successful or -1 on error + */ +int libhmac_sha224_context_initialize( + libhmac_sha224_context_t **context, + libcerror_error_t **error ) +{ + libhmac_internal_sha224_context_t *internal_context = NULL; + static char *function = "libhmac_sha224_context_initialize"; + +#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA224 ) + const EVP_MD *evp_md_type = NULL; +#endif + + if( context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid context.", + function ); + + return( -1 ); + } + if( *context != NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, + "%s: invalid context value already set.", + function ); + + return( -1 ); + } + internal_context = memory_allocate_structure( + libhmac_internal_sha224_context_t ); + + if( internal_context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_INSUFFICIENT, + "%s: unable to create context.", + function ); + + goto on_error; + } + if( memory_set( + internal_context, + 0, + sizeof( libhmac_internal_sha224_context_t ) ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_SET_FAILED, + "%s: unable to clear context.", + function ); + + memory_free( + internal_context ); + + return( -1 ); + } +#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA224_DIGEST_LENGTH ) + if( SHA224_Init( + &( internal_context->sha224_context ) ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to initialize context.", + function ); + + goto on_error; + } + +#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA224 ) +#if defined( HAVE_EVP_MD_CTX_INIT ) + EVP_MD_CTX_init( + &( internal_context->internal_evp_md_context ) ); + + internal_context->evp_md_context = &( internal_context->internal_evp_md_context ); +#else + internal_context->evp_md_context = EVP_MD_CTX_new(); + + if( internal_context->evp_md_context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to create EVP message digest context.", + function ); + + goto on_error; + } +#endif /* defined( HAVE_EVP_MD_CTX_INIT ) */ + +/* TODO use EVP_MD_fetch for EVP_DigestInit_ex2 */ + evp_md_type = EVP_sha224(); + +#if defined( HAVE_EVP_DIGESTINIT_EX2 ) + if( EVP_DigestInit_ex2( + internal_context->evp_md_context, + evp_md_type, + NULL ) != 1 ) +#else + if( EVP_DigestInit_ex( + internal_context->evp_md_context, + evp_md_type, + NULL ) != 1 ) +#endif + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to initialize context.", + function ); + +#if defined( HAVE_EVP_MD_CTX_CLEANUP ) + EVP_MD_CTX_cleanup( + &( internal_context->internal_evp_md_context ) ); + ERR_remove_thread_state( + NULL ); +#else + EVP_MD_CTX_free( + internal_context->evp_md_context ); +#endif + internal_context->evp_md_context = NULL; + + goto on_error; + } +#else + if( memory_copy( + internal_context->hash_values, + libhmac_sha224_context_prime_square_roots, + sizeof( uint32_t ) * 8 ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_COPY_FAILED, + "%s: unable to copy initial hash values.", + function ); + + return( -1 ); + } +#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA224_DIGEST_LENGTH ) */ + + *context = (libhmac_sha224_context_t *) internal_context; + + return( 1 ); + +on_error: + if( internal_context != NULL ) + { + memory_free( + internal_context ); + } + return( -1 ); +} + +/* Frees a SHA-224 context + * Returns 1 if successful or -1 on error + */ +int libhmac_sha224_context_free( + libhmac_sha224_context_t **context, + libcerror_error_t **error ) +{ + libhmac_internal_sha224_context_t *internal_context = NULL; + static char *function = "libhmac_sha224_context_free"; + + if( context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid context.", + function ); + + return( -1 ); + } + if( *context != NULL ) + { + internal_context = (libhmac_internal_sha224_context_t *) *context; + *context = NULL; + +#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA224_DIGEST_LENGTH ) + /* No additional clean up necessary + */ + +#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA224 ) +#if defined( HAVE_EVP_MD_CTX_CLEANUP ) + if( EVP_MD_CTX_cleanup( + &( internal_context->internal_evp_md_context ) ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to clean up EVP message digest context.", + function ); + } + /* Make sure the error state is removed otherwise OpenSSL will leak memory + */ + ERR_remove_thread_state( + NULL ); +#else + EVP_MD_CTX_free( + internal_context->evp_md_context ); + +#endif /* defined( HAVE_EVP_MD_CTX_CLEANUP ) */ + + internal_context->evp_md_context = NULL; +#else + /* No additional clean up necessary + */ +#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA224_DIGEST_LENGTH ) */ + + memory_free( + internal_context ); + } + return( 1 ); +} + +#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA224_DIGEST_LENGTH ) + +/* Updates the SHA-224 context using OpenSSL + * Returns 1 if successful or -1 on error + */ +int libhmac_sha224_context_update( + libhmac_sha224_context_t *context, + const uint8_t *buffer, + size_t size, + libcerror_error_t **error ) +{ + libhmac_internal_sha224_context_t *internal_context = NULL; + static char *function = "libhmac_sha224_context_update"; + unsigned long safe_hash_size = 0; + + if( context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid context.", + function ); + + return( -1 ); + } + internal_context = (libhmac_internal_sha224_context_t *) context; + + if( buffer == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid buffer.", + function ); + + return( -1 ); + } +#if ( SIZEOF_LONG < SIZEOF_SIZE_T ) + if( size > (size_t) ULONG_MAX ) +#else + if( size > (size_t) SSIZE_MAX ) +#endif + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid size value exceeds maximum.", + function ); + + return( -1 ); + } + if( size == 0 ) + { + return( 1 ); + } + safe_hash_size = (unsigned long) size; + + if( SHA256_Update( + &( internal_context->sha224_context ), + (const void *) buffer, + size ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to update context.", + function ); + + return( -1 ); + } + return( 1 ); +} + +#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA224 ) + +/* Updates the SHA-224 context using OpenSSL EVP + * Returns 1 if successful or -1 on error + */ +int libhmac_sha224_context_update( + libhmac_sha224_context_t *context, + const uint8_t *buffer, + size_t size, + libcerror_error_t **error ) +{ + libhmac_internal_sha224_context_t *internal_context = NULL; + static char *function = "libhmac_sha224_context_update"; + + if( context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid context.", + function ); + + return( -1 ); + } + internal_context = (libhmac_internal_sha224_context_t *) context; + + if( buffer == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid buffer.", + function ); + + return( -1 ); + } + if( size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid size value exceeds maximum.", + function ); + + return( -1 ); + } + if( size == 0 ) + { + return( 1 ); + } + if( EVP_DigestUpdate( + internal_context->evp_md_context, + (const void *) buffer, + size ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to update context.", + function ); + + return( -1 ); + } + return( 1 ); +} + +#else + +/* Updates the SHA-224 context using fallback implementation + * Returns 1 if successful or -1 on error + */ +int libhmac_sha224_context_update( + libhmac_sha224_context_t *context, + const uint8_t *buffer, + size_t size, + libcerror_error_t **error ) +{ + libhmac_internal_sha224_context_t *internal_context = NULL; + static char *function = "libhmac_sha224_context_update"; + size_t buffer_offset = 0; + size_t remaining_block_size = 0; + ssize_t process_count = 0; + + if( context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid context.", + function ); + + return( -1 ); + } + internal_context = (libhmac_internal_sha224_context_t *) context; + + if( buffer == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid buffer.", + function ); + + return( -1 ); + } + if( size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid size value exceeds maximum.", + function ); + + return( -1 ); + } + if( size == 0 ) + { + return( 1 ); + } + if( internal_context->block_offset > 0 ) + { + if( internal_context->block_offset >= LIBHMAC_SHA224_BLOCK_SIZE ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid context - block offset value out of bounds.", + function ); + + return( -1 ); + } + remaining_block_size = LIBHMAC_SHA224_BLOCK_SIZE - internal_context->block_offset; + + if( remaining_block_size > size ) + { + remaining_block_size = size; + } + if( memory_copy( + &( internal_context->block[ internal_context->block_offset ] ), + buffer, + remaining_block_size ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_COPY_FAILED, + "%s: unable to copy data to context block.", + function ); + + return( -1 ); + } + internal_context->block_offset += remaining_block_size; + + if( internal_context->block_offset < LIBHMAC_SHA224_BLOCK_SIZE ) + { + return( 1 ); + } + buffer_offset += remaining_block_size; + size -= remaining_block_size; + + process_count = libhmac_sha224_context_transform( + internal_context, + internal_context->block, + LIBHMAC_SHA224_BLOCK_SIZE, + error ); + + if( process_count == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to transform context block.", + function ); + + return( -1 ); + } + internal_context->hash_count += process_count; + internal_context->block_offset = 0; + } + if( size > 0 ) + { + process_count = libhmac_sha224_context_transform( + internal_context, + &( buffer[ buffer_offset ] ), + size, + error ); + + if( process_count == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to transform buffer.", + function ); + + return( -1 ); + } + internal_context->hash_count += process_count; + + buffer_offset += process_count; + size -= process_count; + } + if( size > 0 ) + { + if( size >= LIBHMAC_SHA224_BLOCK_SIZE ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid size value out of bounds.", + function ); + + return( -1 ); + } + if( memory_copy( + internal_context->block, + &( buffer[ buffer_offset ] ), + size ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_COPY_FAILED, + "%s: unable to copy remaining data to context block.", + function ); + + return( -1 ); + } + internal_context->block_offset = size; + } + return( 1 ); +} + +#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA224_DIGEST_LENGTH ) */ + +#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA224_DIGEST_LENGTH ) + +/* Finalizes the SHA-224 context using OpenSSL + * Returns 1 if successful or -1 on error + */ +int libhmac_sha224_context_finalize( + libhmac_sha224_context_t *context, + uint8_t *hash, + size_t hash_size, + libcerror_error_t **error ) +{ + libhmac_internal_sha224_context_t *internal_context = NULL; + static char *function = "libhmac_sha224_context_finalize"; + + if( context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid context.", + function ); + + return( -1 ); + } + internal_context = (libhmac_internal_sha224_context_t *) context; + + if( hash == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid hash.", + function ); + + return( -1 ); + } + if( hash_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid hash size value exceeds maximum.", + function ); + + return( -1 ); + } + if( hash_size < (size_t) LIBHMAC_SHA224_HASH_SIZE ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: invalid hash size value too small.", + function ); + + return( -1 ); + } + if( SHA256_Final( + hash, + &( internal_context->sha224_context ) ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to finalize context.", + function ); + + return( -1 ); + } + return( 1 ); +} + +#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA224 ) + +/* Finalizes the SHA-224 context using OpenSSL EVP + * Returns 1 if successful or -1 on error + */ +int libhmac_sha224_context_finalize( + libhmac_sha224_context_t *context, + uint8_t *hash, + size_t hash_size, + libcerror_error_t **error ) +{ + libhmac_internal_sha224_context_t *internal_context = NULL; + static char *function = "libhmac_sha224_context_finalize"; + unsigned int safe_hash_size = 0; + + if( context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid context.", + function ); + + return( -1 ); + } + internal_context = (libhmac_internal_sha224_context_t *) context; + + if( hash == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid hash.", + function ); + + return( -1 ); + } + if( ( hash_size < (size_t) LIBHMAC_SHA224_HASH_SIZE ) + || ( hash_size > (size_t) UINT_MAX ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid hash size value out of bounds.", + function ); + + return( -1 ); + } + safe_hash_size = (unsigned int) hash_size; + + if( EVP_DigestFinal_ex( + internal_context->evp_md_context, + (unsigned char *) hash, + &safe_hash_size ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to finalize context.", + function ); + + return( -1 ); + } + return( 1 ); +} + +#else + +/* Finalizes the SHA-224 context using fallback implementation + * Returns 1 if successful or -1 on error + */ +int libhmac_sha224_context_finalize( + libhmac_sha224_context_t *context, + uint8_t *hash, + size_t hash_size, + libcerror_error_t **error ) +{ + libhmac_internal_sha224_context_t *internal_context = NULL; + static char *function = "libhmac_sha224_context_finalize"; + size_t block_size = 0; + size_t number_of_blocks = 0; + ssize_t process_count = 0; + uint64_t bit_size = 0; + +#if !defined( LIBHMAC_UNFOLLED_LOOPS ) + size_t hash_index = 0; + int hash_values_index = 0; +#endif + + if( context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid context.", + function ); + + return( -1 ); + } + internal_context = (libhmac_internal_sha224_context_t *) context; + + if( hash == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid hash.", + function ); + + return( -1 ); + } + if( hash_size < (size_t) LIBHMAC_SHA224_HASH_SIZE ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: invalid hash value too small.", + function ); + + return( -1 ); + } + if( hash_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid hash size value exceeds maximum.", + function ); + + return( -1 ); + } + if( hash_size < (size_t) LIBHMAC_SHA224_HASH_SIZE ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: invalid hash size value too small.", + function ); + + return( -1 ); + } + /* Add padding with a size of 56 mod 64 + */ + number_of_blocks = 1; + + if( internal_context->block_offset > 55 ) + { + number_of_blocks += 1; + } + block_size = number_of_blocks * LIBHMAC_SHA224_BLOCK_SIZE; + + if( memory_set( + &( internal_context->block[ internal_context->block_offset ] ), + 0, + block_size - internal_context->block_offset ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_SET_FAILED, + "%s: unable to clear context block.", + function ); + + return( -1 ); + } + /* The first byte of the padding contains 0x80 + */ + internal_context->block[ internal_context->block_offset ] = 0x80; + + bit_size = ( internal_context->hash_count + internal_context->block_offset ) * 8; + + byte_stream_copy_from_uint64_big_endian( + &( internal_context->block[ block_size - 8 ] ), + bit_size ); + + process_count = libhmac_sha224_context_transform( + internal_context, + internal_context->block, + block_size, + error ); + + if( process_count == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to transform context block.", + function ); + + return( -1 ); + } + /* Note that hash_values[ 7 ] is omitted from the hash */ +#if !defined( LIBHMAC_UNFOLLED_LOOPS ) + for( hash_values_index = 0; + hash_values_index < 7; + hash_values_index++ ) + { + byte_stream_copy_from_uint32_big_endian( + &( hash[ hash_index ] ), + internal_context->hash_values[ hash_values_index ] ); + + hash_index += sizeof( uint32_t ); + } +#else + byte_stream_copy_from_uint32_big_endian( + &( hash[ 0 ] ), + internal_context->hash_values[ 0 ] ); + + byte_stream_copy_from_uint32_big_endian( + &( hash[ 4 ] ), + internal_context->hash_values[ 1 ] ); + + byte_stream_copy_from_uint32_big_endian( + &( hash[ 8 ] ), + internal_context->hash_values[ 2 ] ); + + byte_stream_copy_from_uint32_big_endian( + &( hash[ 12 ] ), + internal_context->hash_values[ 3 ] ); + + byte_stream_copy_from_uint32_big_endian( + &( hash[ 16 ] ), + internal_context->hash_values[ 4 ] ); + + byte_stream_copy_from_uint32_big_endian( + &( hash[ 20 ] ), + internal_context->hash_values[ 5 ] ); + + byte_stream_copy_from_uint32_big_endian( + &( hash[ 24 ] ), + internal_context->hash_values[ 6 ] ); + +#endif /* !defined( LIBHMAC_UNFOLLED_LOOPS ) */ + + /* Prevent sensitive data from leaking + */ + if( memory_set( + internal_context, + 0, + sizeof( libhmac_internal_sha224_context_t ) ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_SET_FAILED, + "%s: unable to clear context.", + function ); + + return( -1 ); + } + return( 1 ); +} + +#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA224_DIGEST_LENGTH ) */ + diff -Nru libfshfs-20201104/libhmac/libhmac_sha224_context.h libfshfs-20240221/libhmac/libhmac_sha224_context.h --- libfshfs-20201104/libhmac/libhmac_sha224_context.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libhmac/libhmac_sha224_context.h 2024-02-21 06:04:12.000000000 +0000 @@ -0,0 +1,130 @@ +/* + * SHA-224 functions + * + * Copyright (C) 2011-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _LIBHMAC_SHA224_CONTEXT_H ) +#define _LIBHMAC_SHA224_CONTEXT_H + +#include +#include + +#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) +#include + +#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) +#include +#endif + +#include "libhmac_extern.h" +#include "libhmac_libcerror.h" +#include "libhmac_types.h" + +#if defined( __cplusplus ) +extern "C" { +#endif + +#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA224_DIGEST_LENGTH ) +#define LIBHMAC_HAVE_SHA224_SUPPORT + +#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA224 ) +#define LIBHMAC_HAVE_SHA224_SUPPORT + +#endif + +#define LIBHMAC_SHA224_BLOCK_SIZE 64 + +typedef struct libhmac_internal_sha224_context libhmac_internal_sha224_context_t; + +struct libhmac_internal_sha224_context +{ +#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA224_DIGEST_LENGTH ) + /* The SHA-224 functions use the SHA-256 context + */ + SHA256_CTX sha224_context; + +#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA224 ) + /* The EVP message digest context + */ +#if defined( HAVE_EVP_MD_CTX_INIT ) + EVP_MD_CTX internal_evp_md_context; +#endif + + EVP_MD_CTX *evp_md_context; + +#else + /* The number of bytes hashed + */ + uint64_t hash_count; + + /* The 32-bit hash values + */ + uint32_t hash_values[ 8 ]; + + /* The block offset + */ + size_t block_offset; + + /* The (data) block + */ + uint8_t block[ 2 * LIBHMAC_SHA224_BLOCK_SIZE ]; + +#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA224_DIGEST_LENGTH ) */ +}; + +#if !defined( LIBHMAC_HAVE_SHA224_SUPPORT ) + +ssize_t libhmac_sha224_context_transform( + libhmac_internal_sha224_context_t *internal_context, + const uint8_t *buffer, + size_t size, + libcerror_error_t **error ); + +#endif /* !defined( LIBHMAC_HAVE_SHA224_SUPPORT ) */ + +LIBHMAC_EXTERN \ +int libhmac_sha224_context_initialize( + libhmac_sha224_context_t **context, + libcerror_error_t **error ); + +LIBHMAC_EXTERN \ +int libhmac_sha224_context_free( + libhmac_sha224_context_t **context, + libcerror_error_t **error ); + +LIBHMAC_EXTERN \ +int libhmac_sha224_context_update( + libhmac_sha224_context_t *context, + const uint8_t *buffer, + size_t size, + libcerror_error_t **error ); + +LIBHMAC_EXTERN \ +int libhmac_sha224_context_finalize( + libhmac_sha224_context_t *context, + uint8_t *hash, + size_t hash_size, + libcerror_error_t **error ); + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _LIBHMAC_SHA224_CONTEXT_H ) */ + diff -Nru libfshfs-20201104/libhmac/libhmac_sha256.c libfshfs-20240221/libhmac/libhmac_sha256.c --- libfshfs-20201104/libhmac/libhmac_sha256.c 2020-11-04 11:56:11.000000000 +0000 +++ libfshfs-20240221/libhmac/libhmac_sha256.c 2024-02-21 06:04:12.000000000 +0000 @@ -1,7 +1,7 @@ /* * SHA-256 functions * - * Copyright (C) 2011-2020, Joachim Metz + * Copyright (C) 2011-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -20,437 +20,15 @@ */ #include -#include #include #include -#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) -#include - -#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) -#include -#include - -#endif - -#include "libhmac_byte_stream.h" #include "libhmac_definitions.h" #include "libhmac_libcerror.h" #include "libhmac_sha256.h" +#include "libhmac_sha256_context.h" -#if !defined( LIBHMAC_HAVE_SHA256_SUPPORT ) - -/* FIPS 180-2 based SHA-256 functions - */ - -/* The first 32-bits of the fractional parts of the square roots of the first 8 primes [ 2, 19 ] - */ -uint32_t libhmac_sha256_prime_square_roots[ 8 ] = { - 0x6a09e667UL, 0xbb67ae85UL, 0x3c6ef372UL, 0xa54ff53aUL, - 0x510e527fUL, 0x9b05688cUL, 0x1f83d9abUL, 0x5be0cd19UL -}; - -/* The first 32-bits of the fractional parts of the cube roots of the first 64 primes [ 2, 311 ] - */ -uint32_t libhmac_sha256_prime_cube_roots[ 64 ] = { - 0x428a2f98UL, 0x71374491UL, 0xb5c0fbcfUL, 0xe9b5dba5UL, - 0x3956c25bUL, 0x59f111f1UL, 0x923f82a4UL, 0xab1c5ed5UL, - 0xd807aa98UL, 0x12835b01UL, 0x243185beUL, 0x550c7dc3UL, - 0x72be5d74UL, 0x80deb1feUL, 0x9bdc06a7UL, 0xc19bf174UL, - 0xe49b69c1UL, 0xefbe4786UL, 0x0fc19dc6UL, 0x240ca1ccUL, - 0x2de92c6fUL, 0x4a7484aaUL, 0x5cb0a9dcUL, 0x76f988daUL, - 0x983e5152UL, 0xa831c66dUL, 0xb00327c8UL, 0xbf597fc7UL, - 0xc6e00bf3UL, 0xd5a79147UL, 0x06ca6351UL, 0x14292967UL, - 0x27b70a85UL, 0x2e1b2138UL, 0x4d2c6dfcUL, 0x53380d13UL, - 0x650a7354UL, 0x766a0abbUL, 0x81c2c92eUL, 0x92722c85UL, - 0xa2bfe8a1UL, 0xa81a664bUL, 0xc24b8b70UL, 0xc76c51a3UL, - 0xd192e819UL, 0xd6990624UL, 0xf40e3585UL, 0x106aa070UL, - 0x19a4c116UL, 0x1e376c08UL, 0x2748774cUL, 0x34b0bcb5UL, - 0x391c0cb3UL, 0x4ed8aa4aUL, 0x5b9cca4fUL, 0x682e6ff3UL, - 0x748f82eeUL, 0x78a5636fUL, 0x84c87814UL, 0x8cc70208UL, - 0x90befffaUL, 0xa4506cebUL, 0xbef9a3f7UL, 0xc67178f2UL -}; - -#define libhmac_sha256_transform_extend_32bit_value( values_32bit, value_32bit_index, s0, s1 ) \ - s0 = byte_stream_bit_rotate_right_32bit( values_32bit[ value_32bit_index - 15 ], 7 ) \ - ^ byte_stream_bit_rotate_right_32bit( values_32bit[ value_32bit_index - 15 ], 18 ) \ - ^ ( values_32bit[ value_32bit_index - 15 ] >> 3 ); \ - s1 = byte_stream_bit_rotate_right_32bit( values_32bit[ value_32bit_index - 2 ], 17 ) \ - ^ byte_stream_bit_rotate_right_32bit( values_32bit[ value_32bit_index - 2 ], 19 ) \ - ^ ( values_32bit[ value_32bit_index - 2 ] >> 10 ); \ -\ - values_32bit[ value_32bit_index ] = values_32bit[ value_32bit_index - 16 ] \ - + s0 \ - + values_32bit[ value_32bit_index - 7 ] \ - + s1 - -#define libhmac_sha256_transform_unfolded_extend_32bit_values( values_32bit, s0, s1 ) \ - libhmac_sha256_transform_extend_32bit_value( values_32bit, 16, s0, s1 ); \ - libhmac_sha256_transform_extend_32bit_value( values_32bit, 17, s0, s1 ); \ - libhmac_sha256_transform_extend_32bit_value( values_32bit, 18, s0, s1 ); \ - libhmac_sha256_transform_extend_32bit_value( values_32bit, 19, s0, s1 ); \ - libhmac_sha256_transform_extend_32bit_value( values_32bit, 20, s0, s1 ); \ - libhmac_sha256_transform_extend_32bit_value( values_32bit, 21, s0, s1 ); \ - libhmac_sha256_transform_extend_32bit_value( values_32bit, 22, s0, s1 ); \ - libhmac_sha256_transform_extend_32bit_value( values_32bit, 23, s0, s1 ); \ - libhmac_sha256_transform_extend_32bit_value( values_32bit, 24, s0, s1 ); \ - libhmac_sha256_transform_extend_32bit_value( values_32bit, 25, s0, s1 ); \ - libhmac_sha256_transform_extend_32bit_value( values_32bit, 26, s0, s1 ); \ - libhmac_sha256_transform_extend_32bit_value( values_32bit, 27, s0, s1 ); \ - libhmac_sha256_transform_extend_32bit_value( values_32bit, 28, s0, s1 ); \ - libhmac_sha256_transform_extend_32bit_value( values_32bit, 29, s0, s1 ); \ - libhmac_sha256_transform_extend_32bit_value( values_32bit, 30, s0, s1 ); \ - libhmac_sha256_transform_extend_32bit_value( values_32bit, 31, s0, s1 ); \ - libhmac_sha256_transform_extend_32bit_value( values_32bit, 32, s0, s1 ); \ - libhmac_sha256_transform_extend_32bit_value( values_32bit, 33, s0, s1 ); \ - libhmac_sha256_transform_extend_32bit_value( values_32bit, 34, s0, s1 ); \ - libhmac_sha256_transform_extend_32bit_value( values_32bit, 35, s0, s1 ); \ - libhmac_sha256_transform_extend_32bit_value( values_32bit, 36, s0, s1 ); \ - libhmac_sha256_transform_extend_32bit_value( values_32bit, 37, s0, s1 ); \ - libhmac_sha256_transform_extend_32bit_value( values_32bit, 38, s0, s1 ); \ - libhmac_sha256_transform_extend_32bit_value( values_32bit, 39, s0, s1 ); \ - libhmac_sha256_transform_extend_32bit_value( values_32bit, 40, s0, s1 ); \ - libhmac_sha256_transform_extend_32bit_value( values_32bit, 41, s0, s1 ); \ - libhmac_sha256_transform_extend_32bit_value( values_32bit, 42, s0, s1 ); \ - libhmac_sha256_transform_extend_32bit_value( values_32bit, 43, s0, s1 ); \ - libhmac_sha256_transform_extend_32bit_value( values_32bit, 44, s0, s1 ); \ - libhmac_sha256_transform_extend_32bit_value( values_32bit, 45, s0, s1 ); \ - libhmac_sha256_transform_extend_32bit_value( values_32bit, 46, s0, s1 ); \ - libhmac_sha256_transform_extend_32bit_value( values_32bit, 47, s0, s1 ); \ - libhmac_sha256_transform_extend_32bit_value( values_32bit, 48, s0, s1 ); \ - libhmac_sha256_transform_extend_32bit_value( values_32bit, 49, s0, s1 ); \ - libhmac_sha256_transform_extend_32bit_value( values_32bit, 50, s0, s1 ); \ - libhmac_sha256_transform_extend_32bit_value( values_32bit, 51, s0, s1 ); \ - libhmac_sha256_transform_extend_32bit_value( values_32bit, 52, s0, s1 ); \ - libhmac_sha256_transform_extend_32bit_value( values_32bit, 53, s0, s1 ); \ - libhmac_sha256_transform_extend_32bit_value( values_32bit, 54, s0, s1 ); \ - libhmac_sha256_transform_extend_32bit_value( values_32bit, 55, s0, s1 ); \ - libhmac_sha256_transform_extend_32bit_value( values_32bit, 56, s0, s1 ); \ - libhmac_sha256_transform_extend_32bit_value( values_32bit, 57, s0, s1 ); \ - libhmac_sha256_transform_extend_32bit_value( values_32bit, 58, s0, s1 ); \ - libhmac_sha256_transform_extend_32bit_value( values_32bit, 59, s0, s1 ); \ - libhmac_sha256_transform_extend_32bit_value( values_32bit, 60, s0, s1 ); \ - libhmac_sha256_transform_extend_32bit_value( values_32bit, 61, s0, s1 ); \ - libhmac_sha256_transform_extend_32bit_value( values_32bit, 62, s0, s1 ); \ - libhmac_sha256_transform_extend_32bit_value( values_32bit, 63, s0, s1 ); - -#define libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, value_32bit_index, hash_values, hash_value_index0, hash_value_index1, hash_value_index2, hash_value_index3, hash_value_index4, hash_value_index5, hash_value_index6, hash_value_index7, s0, s1, t1, t2 ) \ - s0 = byte_stream_bit_rotate_right_32bit( hash_values[ hash_value_index0 ], 2 ) \ - ^ byte_stream_bit_rotate_right_32bit( hash_values[ hash_value_index0 ], 13 ) \ - ^ byte_stream_bit_rotate_right_32bit( hash_values[ hash_value_index0 ], 22 ); \ - s1 = byte_stream_bit_rotate_right_32bit( hash_values[ hash_value_index4 ], 6 ) \ - ^ byte_stream_bit_rotate_right_32bit( hash_values[ hash_value_index4 ], 11 ) \ - ^ byte_stream_bit_rotate_right_32bit( hash_values[ hash_value_index4 ], 25 ); \ -\ - t1 = hash_values[ hash_value_index7 ]; \ - t1 += s1; \ - t1 += ( hash_values[ hash_value_index4 ] & hash_values[ hash_value_index5 ] ) \ - ^ ( ~( hash_values[ hash_value_index4 ] ) & hash_values[ hash_value_index6 ] ); \ - t1 += libhmac_sha256_prime_cube_roots[ value_32bit_index ]; \ - t1 += values_32bit[ value_32bit_index ]; \ - t2 = s0; \ - t2 += ( hash_values[ hash_value_index0 ] & hash_values[ hash_value_index1 ] ) \ - ^ ( hash_values[ hash_value_index0 ] & hash_values[ hash_value_index2 ] ) \ - ^ ( hash_values[ hash_value_index1 ] & hash_values[ hash_value_index2 ] ); \ -\ - hash_values[ hash_value_index3 ] += t1; \ - hash_values[ hash_value_index7 ] = t1 + t2; - -#define libhmac_sha256_transform_unfolded_calculate_hash_values( values_32bit, hash_values, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 0, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 1, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 2, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 3, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 4, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 5, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 6, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 7, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 8, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 9, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 10, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 11, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 12, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 13, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 14, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 15, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 16, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 17, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 18, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 19, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 20, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 21, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 22, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 23, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 24, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 25, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 26, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 27, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 28, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 29, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 30, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 31, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 32, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 33, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 34, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 35, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 36, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 37, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 38, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 39, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 40, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 41, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 42, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 43, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 44, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 45, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 46, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 47, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 48, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 49, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 50, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 51, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 52, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 53, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 54, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 55, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 56, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 57, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 58, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 59, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 60, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 61, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 62, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ - libhmac_sha256_transform_unfolded_calculate_hash_value( values_32bit, 63, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) - -/* Calculates the SHA-256 of 64 byte sized blocks of data in a buffer - * Returns the number of bytes used if successful or -1 on error - */ -ssize_t libhmac_sha256_transform( - libhmac_internal_sha256_context_t *internal_context, - const uint8_t *buffer, - size_t size, - libcerror_error_t **error ) -{ - uint32_t hash_values[ 8 ]; - uint32_t values_32bit[ 64 ]; - - static char *function = "libhmac_sha256_transform"; - size_t buffer_offset = 0; - uint32_t s0 = 0; - uint32_t s1 = 0; - uint32_t t1 = 0; - uint32_t t2 = 0; - -#if !defined( LIBHMAC_UNFOLLED_LOOPS ) - uint8_t hash_values_index = 0; - uint8_t value_32bit_index = 0; -#endif - - if( internal_context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid internal context.", - function ); - - return( -1 ); - } - if( buffer == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid buffer.", - function ); - - return( -1 ); - } - if( size > (size_t) SSIZE_MAX ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, - "%s: invalid size value exceeds maximum.", - function ); - - return( -1 ); - } - while( size >= LIBHMAC_SHA256_BLOCK_SIZE ) - { - if( memory_copy( - hash_values, - internal_context->hash_values, - sizeof( uint32_t ) * 8 ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_COPY_FAILED, - "%s: unable to copy hash values.", - function ); - - goto on_error; - } -#if defined( LIBHMAC_UNFOLLED_LOOPS ) - /* Break the block into 16 x 32-bit values - */ - libhmac_byte_stream_copy_to_16x_uint32_big_endian( - &( buffer[ buffer_offset ] ), - values_32bit ); - - buffer_offset += LIBHMAC_SHA256_BLOCK_SIZE; - - /* Extend to 64 x 32-bit values - */ - libhmac_sha256_transform_unfolded_extend_32bit_values( - values_32bit, - s0, - s1 ); - - /* Calculate the hash values for the 32-bit values - */ - libhmac_sha256_transform_unfolded_calculate_hash_values( - values_32bit, - hash_values, - s0, - s1, - t1, - t2 ); - - /* Update the hash values in the context - */ - internal_context->hash_values[ 0 ] += hash_values[ 0 ]; - internal_context->hash_values[ 1 ] += hash_values[ 1 ]; - internal_context->hash_values[ 2 ] += hash_values[ 2 ]; - internal_context->hash_values[ 3 ] += hash_values[ 3 ]; - internal_context->hash_values[ 4 ] += hash_values[ 4 ]; - internal_context->hash_values[ 5 ] += hash_values[ 5 ]; - internal_context->hash_values[ 6 ] += hash_values[ 6 ]; - internal_context->hash_values[ 7 ] += hash_values[ 7 ]; - -#else - /* Break the block into 16 x 32-bit values - */ - for( value_32bit_index = 0; - value_32bit_index < 16; - value_32bit_index++ ) - { - byte_stream_copy_to_uint32_big_endian( - &( buffer[ buffer_offset ] ), - values_32bit[ value_32bit_index ] ); - - buffer_offset += sizeof( uint32_t ); - } - /* Extend to 64 x 32-bit values - */ - for( value_32bit_index = 16; - value_32bit_index < 64; - value_32bit_index++ ) - { - libhmac_sha256_transform_extend_32bit_value( - values_32bit, - value_32bit_index, - s0, - s1 ); - } - /* Calculate the hash values for the 32-bit values - */ - for( value_32bit_index = 0; - value_32bit_index < 64; - value_32bit_index++ ) - { - s0 = byte_stream_bit_rotate_right_32bit( hash_values[ 0 ], 2 ) - ^ byte_stream_bit_rotate_right_32bit( hash_values[ 0 ], 13 ) - ^ byte_stream_bit_rotate_right_32bit( hash_values[ 0 ], 22 ); - s1 = byte_stream_bit_rotate_right_32bit( hash_values[ 4 ], 6 ) - ^ byte_stream_bit_rotate_right_32bit( hash_values[ 4 ], 11 ) - ^ byte_stream_bit_rotate_right_32bit( hash_values[ 4 ], 25 ); - - t1 = hash_values[ 7 ]; - t1 += s1; - t1 += ( hash_values[ 4 ] & hash_values[ 5 ] ) - ^ ( ~( hash_values[ 4 ] ) & hash_values[ 6 ] ); - t1 += libhmac_sha256_prime_cube_roots[ value_32bit_index ]; - t1 += values_32bit[ value_32bit_index ]; - t2 = s0; - t2 += ( hash_values[ 0 ] & hash_values[ 1 ] ) - ^ ( hash_values[ 0 ] & hash_values[ 2 ] ) - ^ ( hash_values[ 1 ] & hash_values[ 2 ] ); - - hash_values[ 7 ] = hash_values[ 6 ]; - hash_values[ 6 ] = hash_values[ 5 ]; - hash_values[ 5 ] = hash_values[ 4 ]; - hash_values[ 4 ] = hash_values[ 3 ] + t1; - hash_values[ 3 ] = hash_values[ 2 ]; - hash_values[ 2 ] = hash_values[ 1 ]; - hash_values[ 1 ] = hash_values[ 0 ]; - hash_values[ 0 ] = t1 + t2; - } - /* Update the hash values in the context - */ - for( hash_values_index = 0; - hash_values_index < 8; - hash_values_index++ ) - { - internal_context->hash_values[ hash_values_index ] += hash_values[ hash_values_index ]; - } -#endif /* defined( LIBHMAC_UNFOLLED_LOOPS ) */ - - size -= LIBHMAC_SHA256_BLOCK_SIZE; - } - /* Prevent sensitive data from leaking - */ - if( memory_set( - hash_values, - 0, - sizeof( uint32_t ) * 8 ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_SET_FAILED, - "%s: unable to clear hash values.", - function ); - - goto on_error; - } - if( memory_set( - values_32bit, - 0, - sizeof( uint32_t ) * 64 ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_SET_FAILED, - "%s: unable to clear 32-bit values.", - function ); - - goto on_error; - } - return( (ssize_t) buffer_offset ); - -on_error: - memory_set( - values_32bit, - 0, - sizeof( uint32_t ) * 64 ); - - memory_set( - hash_values, - 0, - sizeof( uint32_t ) * 8 ); - - return( -1 ); -} - -#endif /* !defined( LIBHMAC_HAVE_SHA256_SUPPORT ) */ - -/* Creates a SHA-256 context +/* Creates a SHA256 context * Make sure the value context is referencing, is set to NULL * Returns 1 if successful or -1 on error */ @@ -458,102 +36,11 @@ libhmac_sha256_context_t **context, libcerror_error_t **error ) { - libhmac_internal_sha256_context_t *internal_context = NULL; - static char *function = "libhmac_sha256_initialize"; - - if( context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid context.", - function ); - - return( -1 ); - } - if( *context != NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, - "%s: invalid context value already set.", - function ); - - return( -1 ); - } - internal_context = memory_allocate_structure( - libhmac_internal_sha256_context_t ); - - if( internal_context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_INSUFFICIENT, - "%s: unable to create context.", - function ); - - goto on_error; - } - if( memory_set( - internal_context, - 0, - sizeof( libhmac_internal_sha256_context_t ) ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_SET_FAILED, - "%s: unable to clear context.", - function ); - - memory_free( - internal_context ); - - return( -1 ); - } -#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA256_DIGEST_LENGTH ) - if( SHA256_Init( - &( internal_context->sha256_context ) ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, - "%s: unable to initialize context.", - function ); - - goto on_error; - } - -#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA256 ) -#if defined( HAVE_EVP_MD_CTX_INIT ) - EVP_MD_CTX_init( - &( internal_context->internal_evp_md_context ) ); - - internal_context->evp_md_context = &( internal_context->internal_evp_md_context ); -#else - internal_context->evp_md_context = EVP_MD_CTX_new(); - - if( internal_context->evp_md_context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, - "%s: unable to create EVP message digest context.", - function ); + static char *function = "libhmac_sha256_initialize"; - goto on_error; - } -#endif /* defined( HAVE_EVP_MD_CTX_INIT ) */ - - if( EVP_DigestInit_ex( - internal_context->evp_md_context, - EVP_sha256(), - NULL ) != 1 ) + if( libhmac_sha256_context_initialize( + context, + error ) != 1 ) { libcerror_error_set( error, @@ -562,183 +49,29 @@ "%s: unable to initialize context.", function ); -#if defined( HAVE_EVP_MD_CTX_CLEANUP ) - EVP_MD_CTX_cleanup( - &( internal_context->internal_evp_md_context ) ); - ERR_remove_thread_state( - NULL ); -#else - EVP_MD_CTX_free( - internal_context->evp_md_context ); -#endif - internal_context->evp_md_context = NULL; - - goto on_error; - } -#else - if( memory_copy( - internal_context->hash_values, - libhmac_sha256_prime_square_roots, - sizeof( uint32_t ) * 8 ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_COPY_FAILED, - "%s: unable to copy initial hash values.", - function ); - return( -1 ); } -#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA256_DIGEST_LENGTH ) */ - - *context = (libhmac_sha256_context_t *) internal_context; - return( 1 ); - -on_error: - if( internal_context != NULL ) - { - memory_free( - internal_context ); - } - return( -1 ); } -/* Frees a SHA-256 context +/* Frees a SHA256 context * Returns 1 if successful or -1 on error */ int libhmac_sha256_free( libhmac_sha256_context_t **context, libcerror_error_t **error ) { - libhmac_internal_sha256_context_t *internal_context = NULL; - static char *function = "libhmac_sha256_free"; - - if( context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid context.", - function ); + static char *function = "libhmac_sha256_free"; - return( -1 ); - } - if( *context != NULL ) - { - internal_context = (libhmac_internal_sha256_context_t *) *context; - *context = NULL; - -#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA256_DIGEST_LENGTH ) - /* No additional clean up necessary - */ - -#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA256 ) -#if defined( HAVE_EVP_MD_CTX_CLEANUP ) - if( EVP_MD_CTX_cleanup( - &( internal_context->internal_evp_md_context ) ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, - "%s: unable to clean up EVP message digest context.", - function ); - } - /* Make sure the error state is removed otherwise OpenSSL will leak memory - */ - ERR_remove_thread_state( - NULL ); -#else - EVP_MD_CTX_free( - internal_context->evp_md_context ); - -#endif /* defined( HAVE_EVP_MD_CTX_CLEANUP ) */ - - internal_context->evp_md_context = NULL; -#else - /* No additional clean up necessary - */ -#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA256_DIGEST_LENGTH ) */ - - memory_free( - internal_context ); - } - return( 1 ); -} - -#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA256_DIGEST_LENGTH ) - -/* Updates the SHA-256 context using OpenSSL - * Returns 1 if successful or -1 on error - */ -int libhmac_sha256_update( - libhmac_sha256_context_t *context, - const uint8_t *buffer, - size_t size, - libcerror_error_t **error ) -{ - libhmac_internal_sha256_context_t *internal_context = NULL; - static char *function = "libhmac_sha256_update"; - unsigned long safe_hash_size = 0; - - if( context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid context.", - function ); - - return( -1 ); - } - internal_context = (libhmac_internal_sha256_context_t *) context; - - if( buffer == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid buffer.", - function ); - - return( -1 ); - } -#if ( SIZEOF_LONG < SIZEOF_SIZE_T ) - if( size > (size_t) ULONG_MAX ) -#else - if( size > (size_t) SSIZE_MAX ) -#endif - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, - "%s: invalid size value exceeds maximum.", - function ); - - return( -1 ); - } - if( size == 0 ) - { - return( 1 ); - } - safe_hash_size = (unsigned long) size; - - if( SHA256_Update( - &( internal_context->sha256_context ), - (const void *) buffer, - size ) != 1 ) + if( libhmac_sha256_context_free( + context, + error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to update context.", + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free context.", function ); return( -1 ); @@ -746,9 +79,7 @@ return( 1 ); } -#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA256 ) - -/* Updates the SHA-256 context using OpenSSL EVP +/* Updates the SHA256 context * Returns 1 if successful or -1 on error */ int libhmac_sha256_update( @@ -757,52 +88,13 @@ size_t size, libcerror_error_t **error ) { - libhmac_internal_sha256_context_t *internal_context = NULL; - static char *function = "libhmac_sha256_update"; - - if( context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid context.", - function ); - - return( -1 ); - } - internal_context = (libhmac_internal_sha256_context_t *) context; + static char *function = "libhmac_sha256_update"; - if( buffer == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid buffer.", - function ); - - return( -1 ); - } - if( size > (size_t) SSIZE_MAX ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, - "%s: invalid size value exceeds maximum.", - function ); - - return( -1 ); - } - if( size == 0 ) - { - return( 1 ); - } - if( EVP_DigestUpdate( - internal_context->evp_md_context, - (const void *) buffer, - size ) != 1 ) + if( libhmac_sha256_context_update( + context, + buffer, + size, + error ) != 1 ) { libcerror_error_set( error, @@ -816,174 +108,7 @@ return( 1 ); } -#else - -/* Updates the SHA-256 context using fallback implementation - * Returns 1 if successful or -1 on error - */ -int libhmac_sha256_update( - libhmac_sha256_context_t *context, - const uint8_t *buffer, - size_t size, - libcerror_error_t **error ) -{ - libhmac_internal_sha256_context_t *internal_context = NULL; - static char *function = "libhmac_sha256_update"; - size_t buffer_offset = 0; - size_t remaining_block_size = 0; - ssize_t process_count = 0; - - if( context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid context.", - function ); - - return( -1 ); - } - internal_context = (libhmac_internal_sha256_context_t *) context; - - if( buffer == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid buffer.", - function ); - - return( -1 ); - } - if( size > (size_t) SSIZE_MAX ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, - "%s: invalid size value exceeds maximum.", - function ); - - return( -1 ); - } - if( size == 0 ) - { - return( 1 ); - } - if( internal_context->block_offset > 0 ) - { - remaining_block_size = LIBHMAC_SHA256_BLOCK_SIZE - internal_context->block_offset; - - if( remaining_block_size > size ) - { - remaining_block_size = size; - } - if( memory_copy( - &( internal_context->block[ internal_context->block_offset ] ), - buffer, - remaining_block_size ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_COPY_FAILED, - "%s: unable to copy data to context block.", - function ); - - return( -1 ); - } - internal_context->block_offset += remaining_block_size; - - if( internal_context->block_offset < LIBHMAC_SHA256_BLOCK_SIZE ) - { - return( 1 ); - } - buffer_offset += remaining_block_size; - size -= remaining_block_size; - - process_count = libhmac_sha256_transform( - internal_context, - internal_context->block, - LIBHMAC_SHA256_BLOCK_SIZE, - error ); - - if( process_count == -1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to transform context block.", - function ); - - return( -1 ); - } - internal_context->hash_count += process_count; - internal_context->block_offset = 0; - } - if( size > 0 ) - { - process_count = libhmac_sha256_transform( - internal_context, - &( buffer[ buffer_offset ] ), - size, - error ); - - if( process_count == -1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to transform buffer.", - function ); - - return( -1 ); - } - internal_context->hash_count += process_count; - - buffer_offset += process_count; - size -= process_count; - } - if( size > 0 ) - { - if( size >= LIBHMAC_SHA256_BLOCK_SIZE ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, - "%s: invalid size value out of bounds.", - function ); - - return( -1 ); - } - if( memory_copy( - internal_context->block, - &( buffer[ buffer_offset ] ), - size ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_COPY_FAILED, - "%s: unable to copy remaining data to context block.", - function ); - - return( -1 ); - } - internal_context->block_offset = size; - } - return( 1 ); -} - -#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA256_DIGEST_LENGTH ) */ - -#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA256_DIGEST_LENGTH ) - -/* Finalizes the SHA-256 context using OpenSSL +/* Finalizes the SHA256 context * Returns 1 if successful or -1 on error */ int libhmac_sha256_finalize( @@ -992,138 +117,13 @@ size_t hash_size, libcerror_error_t **error ) { - libhmac_internal_sha256_context_t *internal_context = NULL; - static char *function = "libhmac_sha256_finalize"; - - if( context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid context.", - function ); - - return( -1 ); - } - internal_context = (libhmac_internal_sha256_context_t *) context; - - if( hash == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid hash.", - function ); - - return( -1 ); - } - if( hash_size > (size_t) SSIZE_MAX ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, - "%s: invalid hash size value exceeds maximum.", - function ); - - return( -1 ); - } - if( hash_size < (size_t) LIBHMAC_SHA256_HASH_SIZE ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, - "%s: invalid hash size value too small.", - function ); + static char *function = "libhmac_sha256_finalize"; - return( -1 ); - } - if( SHA256_Final( + if( libhmac_sha256_context_finalize( + context, hash, - &( internal_context->sha256_context ) ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, - "%s: unable to finalize context.", - function ); - - return( -1 ); - } - return( 1 ); -} - -#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA256 ) - -/* Finalizes the SHA-256 context using OpenSSL EVP - * Returns 1 if successful or -1 on error - */ -int libhmac_sha256_finalize( - libhmac_sha256_context_t *context, - uint8_t *hash, - size_t hash_size, - libcerror_error_t **error ) -{ - libhmac_internal_sha256_context_t *internal_context = NULL; - static char *function = "libhmac_sha256_finalize"; - unsigned int safe_hash_size = 0; - - if( context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid context.", - function ); - - return( -1 ); - } - internal_context = (libhmac_internal_sha256_context_t *) context; - - if( hash == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid hash.", - function ); - - return( -1 ); - } - if( hash_size > (size_t) UINT_MAX ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, - "%s: invalid hash size value exceeds maximum.", - function ); - - return( -1 ); - } - if( hash_size < (size_t) LIBHMAC_SHA256_HASH_SIZE ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, - "%s: invalid hash size value too small.", - function ); - - return( -1 ); - } - safe_hash_size = (unsigned int) hash_size; - - if( EVP_DigestFinal_ex( - internal_context->evp_md_context, - (unsigned char *) hash, - &safe_hash_size ) != 1 ) + hash_size, + error ) != 1 ) { libcerror_error_set( error, @@ -1137,204 +137,6 @@ return( 1 ); } -#else - -/* Finalizes the SHA-256 context using fallback implementation - * Returns 1 if successful or -1 on error - */ -int libhmac_sha256_finalize( - libhmac_sha256_context_t *context, - uint8_t *hash, - size_t hash_size, - libcerror_error_t **error ) -{ - libhmac_internal_sha256_context_t *internal_context = NULL; - static char *function = "libhmac_sha256_finalize"; - size_t block_size = 0; - size_t number_of_blocks = 0; - ssize_t process_count = 0; - uint64_t bit_size = 0; - -#if !defined( LIBHMAC_UNFOLLED_LOOPS ) - size_t hash_index = 0; - int hash_values_index = 0; -#endif - - if( context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid context.", - function ); - - return( -1 ); - } - internal_context = (libhmac_internal_sha256_context_t *) context; - - if( hash == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid hash.", - function ); - - return( -1 ); - } - if( hash_size < (size_t) LIBHMAC_SHA256_HASH_SIZE ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, - "%s: invalid hash value too small.", - function ); - - return( -1 ); - } - if( hash_size > (size_t) SSIZE_MAX ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, - "%s: invalid hash size value exceeds maximum.", - function ); - - return( -1 ); - } - if( hash_size < (size_t) LIBHMAC_SHA256_HASH_SIZE ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, - "%s: invalid hash size value too small.", - function ); - - return( -1 ); - } - /* Add padding with a size of 56 mod 64 - */ - number_of_blocks = 1; - - if( internal_context->block_offset > 55 ) - { - number_of_blocks += 1; - } - block_size = number_of_blocks * LIBHMAC_SHA256_BLOCK_SIZE; - - if( memory_set( - &( internal_context->block[ internal_context->block_offset ] ), - 0, - block_size - internal_context->block_offset ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_SET_FAILED, - "%s: unable to clear context block.", - function ); - - return( -1 ); - } - /* The first byte of the padding contains 0x80 - */ - internal_context->block[ internal_context->block_offset ] = 0x80; - - bit_size = ( internal_context->hash_count + internal_context->block_offset ) * 8; - - byte_stream_copy_from_uint64_big_endian( - &( internal_context->block[ block_size - 8 ] ), - bit_size ); - - process_count = libhmac_sha256_transform( - internal_context, - internal_context->block, - block_size, - error ); - - if( process_count == -1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to transform context block.", - function ); - - return( -1 ); - } -#if !defined( LIBHMAC_UNFOLLED_LOOPS ) - for( hash_values_index = 0; - hash_values_index < 8; - hash_values_index++ ) - { - byte_stream_copy_from_uint32_big_endian( - &( hash[ hash_index ] ), - internal_context->hash_values[ hash_values_index ] ); - - hash_index += sizeof( uint32_t ); - } -#else - byte_stream_copy_from_uint32_big_endian( - &( hash[ 0 ] ), - internal_context->hash_values[ 0 ] ); - - byte_stream_copy_from_uint32_big_endian( - &( hash[ 4 ] ), - internal_context->hash_values[ 1 ] ); - - byte_stream_copy_from_uint32_big_endian( - &( hash[ 8 ] ), - internal_context->hash_values[ 2 ] ); - - byte_stream_copy_from_uint32_big_endian( - &( hash[ 12 ] ), - internal_context->hash_values[ 3 ] ); - - byte_stream_copy_from_uint32_big_endian( - &( hash[ 16 ] ), - internal_context->hash_values[ 4 ] ); - - byte_stream_copy_from_uint32_big_endian( - &( hash[ 20 ] ), - internal_context->hash_values[ 5 ] ); - - byte_stream_copy_from_uint32_big_endian( - &( hash[ 24 ] ), - internal_context->hash_values[ 6 ] ); - - byte_stream_copy_from_uint32_big_endian( - &( hash[ 28 ] ), - internal_context->hash_values[ 7 ] ); - -#endif /* !defined( LIBHMAC_UNFOLLED_LOOPS ) */ - - /* Prevent sensitive data from leaking - */ - if( memory_set( - internal_context, - 0, - sizeof( libhmac_internal_sha256_context_t ) ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_SET_FAILED, - "%s: unable to clear context.", - function ); - - return( -1 ); - } - return( 1 ); -} - -#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA256_DIGEST_LENGTH ) */ - /* Calculates the SHA-256 of the buffer * Returns 1 if successful or -1 on error */ @@ -1348,7 +150,7 @@ libhmac_sha256_context_t *context = NULL; static char *function = "libhmac_sha256_calculate"; - if( libhmac_sha256_initialize( + if( libhmac_sha256_context_initialize( &context, error ) != 1 ) { @@ -1361,7 +163,7 @@ goto on_error; } - if( libhmac_sha256_update( + if( libhmac_sha256_context_update( context, buffer, size, @@ -1376,7 +178,7 @@ goto on_error; } - if( libhmac_sha256_finalize( + if( libhmac_sha256_context_finalize( context, hash, hash_size, @@ -1391,7 +193,7 @@ goto on_error; } - if( libhmac_sha256_free( + if( libhmac_sha256_context_free( &context, error ) != 1 ) { @@ -1409,7 +211,7 @@ on_error: if( context != NULL ) { - libhmac_sha256_free( + libhmac_sha256_context_free( &context, NULL ); } @@ -1519,7 +321,7 @@ } else { - if( libhmac_sha256_initialize( + if( libhmac_sha256_context_initialize( &context, error ) != 1 ) { @@ -1532,7 +334,7 @@ goto on_error; } - if( libhmac_sha256_update( + if( libhmac_sha256_context_update( context, key, key_size, @@ -1547,7 +349,7 @@ goto on_error; } - if( libhmac_sha256_finalize( + if( libhmac_sha256_context_finalize( context, key_hash, LIBHMAC_SHA256_HASH_SIZE, @@ -1562,7 +364,7 @@ goto on_error; } - if( libhmac_sha256_free( + if( libhmac_sha256_context_free( &context, error ) != 1 ) { @@ -1670,7 +472,7 @@ inner_padding[ block_index ] ^= key_data[ block_index ]; outer_padding[ block_index ] ^= key_data[ block_index ]; } - if( libhmac_sha256_initialize( + if( libhmac_sha256_context_initialize( &context, error ) != 1 ) { @@ -1683,7 +485,7 @@ goto on_error; } - if( libhmac_sha256_update( + if( libhmac_sha256_context_update( context, inner_padding, block_size, @@ -1698,7 +500,7 @@ goto on_error; } - if( libhmac_sha256_update( + if( libhmac_sha256_context_update( context, buffer, size, @@ -1713,7 +515,7 @@ goto on_error; } - if( libhmac_sha256_finalize( + if( libhmac_sha256_context_finalize( context, hmac, hmac_size, @@ -1728,7 +530,7 @@ goto on_error; } - if( libhmac_sha256_free( + if( libhmac_sha256_context_free( &context, error ) != 1 ) { @@ -1741,7 +543,7 @@ goto on_error; } - if( libhmac_sha256_initialize( + if( libhmac_sha256_context_initialize( &context, error ) != 1 ) { @@ -1754,7 +556,7 @@ goto on_error; } - if( libhmac_sha256_update( + if( libhmac_sha256_context_update( context, outer_padding, block_size, @@ -1769,7 +571,7 @@ goto on_error; } - if( libhmac_sha256_update( + if( libhmac_sha256_context_update( context, hmac, LIBHMAC_SHA256_HASH_SIZE, @@ -1784,7 +586,7 @@ goto on_error; } - if( libhmac_sha256_finalize( + if( libhmac_sha256_context_finalize( context, hmac, hmac_size, @@ -1799,7 +601,7 @@ goto on_error; } - if( libhmac_sha256_free( + if( libhmac_sha256_context_free( &context, error ) != 1 ) { @@ -1874,7 +676,7 @@ on_error: if( context != NULL ) { - libhmac_sha256_free( + libhmac_sha256_context_free( &context, NULL ); } diff -Nru libfshfs-20201104/libhmac/libhmac_sha256.h libfshfs-20240221/libhmac/libhmac_sha256.h --- libfshfs-20201104/libhmac/libhmac_sha256.h 2020-11-04 11:56:11.000000000 +0000 +++ libfshfs-20240221/libhmac/libhmac_sha256.h 2024-02-21 06:04:12.000000000 +0000 @@ -1,7 +1,7 @@ /* * SHA-256 functions * - * Copyright (C) 2011-2020, Joachim Metz + * Copyright (C) 2011-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -25,14 +25,6 @@ #include #include -#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) -#include - -#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) -#include - -#endif - #include "libhmac_extern.h" #include "libhmac_libcerror.h" #include "libhmac_types.h" @@ -41,66 +33,6 @@ extern "C" { #endif -#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA256_DIGEST_LENGTH ) -#define LIBHMAC_HAVE_SHA256_SUPPORT - -#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA256 ) -#define LIBHMAC_HAVE_SHA256_SUPPORT - -#endif - -#if !defined( LIBHMAC_HAVE_SHA256_SUPPORT ) -#define LIBHMAC_SHA256_BLOCK_SIZE 64 -#endif - -typedef struct libhmac_internal_sha256_context libhmac_internal_sha256_context_t; - -struct libhmac_internal_sha256_context -{ -#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA256_DIGEST_LENGTH ) - /* The SHA-256 context - */ - SHA256_CTX sha256_context; - -#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA256 ) - /* The EVP message digest context - */ -#if defined( HAVE_EVP_MD_CTX_INIT ) - EVP_MD_CTX internal_evp_md_context; -#endif - - EVP_MD_CTX *evp_md_context; - -#else - /* The number of bytes hashed - */ - uint64_t hash_count; - - /* The 32-bit hash values - */ - uint32_t hash_values[ 8 ]; - - /* The block offset - */ - size_t block_offset; - - /* The (data) block - */ - uint8_t block[ 128 ]; - -#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA256_DIGEST_LENGTH ) */ -}; - -#if !defined( LIBHMAC_HAVE_SHA256_SUPPORT ) - -ssize_t libhmac_sha256_transform( - libhmac_internal_sha256_context_t *internal_context, - const uint8_t *buffer, - size_t size, - libcerror_error_t **error ); - -#endif /* !defined( LIBHMAC_HAVE_SHA256_SUPPORT ) */ - LIBHMAC_EXTERN \ int libhmac_sha256_initialize( libhmac_sha256_context_t **context, diff -Nru libfshfs-20201104/libhmac/libhmac_sha256_context.c libfshfs-20240221/libhmac/libhmac_sha256_context.c --- libfshfs-20201104/libhmac/libhmac_sha256_context.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libhmac/libhmac_sha256_context.c 2024-02-21 06:04:12.000000000 +0000 @@ -0,0 +1,1351 @@ +/* + * SHA-256 functions + * + * Copyright (C) 2011-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include +#include +#include + +#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) +#include + +#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) +#include +#include +#endif + +#include "libhmac_byte_stream.h" +#include "libhmac_definitions.h" +#include "libhmac_libcerror.h" +#include "libhmac_sha256_context.h" + +#if !defined( LIBHMAC_HAVE_SHA256_SUPPORT ) + +/* FIPS 180-2 based SHA-256 functions + */ + +/* The first 32-bits of the fractional parts of the square roots of the first 8 primes [ 2, 19 ] + */ +uint32_t libhmac_sha256_context_prime_square_roots[ 8 ] = { + 0x6a09e667UL, 0xbb67ae85UL, 0x3c6ef372UL, 0xa54ff53aUL, + 0x510e527fUL, 0x9b05688cUL, 0x1f83d9abUL, 0x5be0cd19UL +}; + +/* The first 32-bits of the fractional parts of the cube roots of the first 64 primes [ 2, 311 ] + */ +uint32_t libhmac_sha256_context_prime_cube_roots[ 64 ] = { + 0x428a2f98UL, 0x71374491UL, 0xb5c0fbcfUL, 0xe9b5dba5UL, + 0x3956c25bUL, 0x59f111f1UL, 0x923f82a4UL, 0xab1c5ed5UL, + 0xd807aa98UL, 0x12835b01UL, 0x243185beUL, 0x550c7dc3UL, + 0x72be5d74UL, 0x80deb1feUL, 0x9bdc06a7UL, 0xc19bf174UL, + 0xe49b69c1UL, 0xefbe4786UL, 0x0fc19dc6UL, 0x240ca1ccUL, + 0x2de92c6fUL, 0x4a7484aaUL, 0x5cb0a9dcUL, 0x76f988daUL, + 0x983e5152UL, 0xa831c66dUL, 0xb00327c8UL, 0xbf597fc7UL, + 0xc6e00bf3UL, 0xd5a79147UL, 0x06ca6351UL, 0x14292967UL, + 0x27b70a85UL, 0x2e1b2138UL, 0x4d2c6dfcUL, 0x53380d13UL, + 0x650a7354UL, 0x766a0abbUL, 0x81c2c92eUL, 0x92722c85UL, + 0xa2bfe8a1UL, 0xa81a664bUL, 0xc24b8b70UL, 0xc76c51a3UL, + 0xd192e819UL, 0xd6990624UL, 0xf40e3585UL, 0x106aa070UL, + 0x19a4c116UL, 0x1e376c08UL, 0x2748774cUL, 0x34b0bcb5UL, + 0x391c0cb3UL, 0x4ed8aa4aUL, 0x5b9cca4fUL, 0x682e6ff3UL, + 0x748f82eeUL, 0x78a5636fUL, 0x84c87814UL, 0x8cc70208UL, + 0x90befffaUL, 0xa4506cebUL, 0xbef9a3f7UL, 0xc67178f2UL +}; + +#define libhmac_sha256_context_transform_extend_32bit_value( values_32bit, value_32bit_index, s0, s1 ) \ + s0 = byte_stream_bit_rotate_right_32bit( values_32bit[ value_32bit_index - 15 ], 7 ) \ + ^ byte_stream_bit_rotate_right_32bit( values_32bit[ value_32bit_index - 15 ], 18 ) \ + ^ ( values_32bit[ value_32bit_index - 15 ] >> 3 ); \ + s1 = byte_stream_bit_rotate_right_32bit( values_32bit[ value_32bit_index - 2 ], 17 ) \ + ^ byte_stream_bit_rotate_right_32bit( values_32bit[ value_32bit_index - 2 ], 19 ) \ + ^ ( values_32bit[ value_32bit_index - 2 ] >> 10 ); \ +\ + values_32bit[ value_32bit_index ] = values_32bit[ value_32bit_index - 16 ] \ + + s0 \ + + values_32bit[ value_32bit_index - 7 ] \ + + s1 + +#define libhmac_sha256_context_transform_unfolded_extend_32bit_values( values_32bit, s0, s1 ) \ + libhmac_sha256_context_transform_extend_32bit_value( values_32bit, 16, s0, s1 ); \ + libhmac_sha256_context_transform_extend_32bit_value( values_32bit, 17, s0, s1 ); \ + libhmac_sha256_context_transform_extend_32bit_value( values_32bit, 18, s0, s1 ); \ + libhmac_sha256_context_transform_extend_32bit_value( values_32bit, 19, s0, s1 ); \ + libhmac_sha256_context_transform_extend_32bit_value( values_32bit, 20, s0, s1 ); \ + libhmac_sha256_context_transform_extend_32bit_value( values_32bit, 21, s0, s1 ); \ + libhmac_sha256_context_transform_extend_32bit_value( values_32bit, 22, s0, s1 ); \ + libhmac_sha256_context_transform_extend_32bit_value( values_32bit, 23, s0, s1 ); \ + libhmac_sha256_context_transform_extend_32bit_value( values_32bit, 24, s0, s1 ); \ + libhmac_sha256_context_transform_extend_32bit_value( values_32bit, 25, s0, s1 ); \ + libhmac_sha256_context_transform_extend_32bit_value( values_32bit, 26, s0, s1 ); \ + libhmac_sha256_context_transform_extend_32bit_value( values_32bit, 27, s0, s1 ); \ + libhmac_sha256_context_transform_extend_32bit_value( values_32bit, 28, s0, s1 ); \ + libhmac_sha256_context_transform_extend_32bit_value( values_32bit, 29, s0, s1 ); \ + libhmac_sha256_context_transform_extend_32bit_value( values_32bit, 30, s0, s1 ); \ + libhmac_sha256_context_transform_extend_32bit_value( values_32bit, 31, s0, s1 ); \ + libhmac_sha256_context_transform_extend_32bit_value( values_32bit, 32, s0, s1 ); \ + libhmac_sha256_context_transform_extend_32bit_value( values_32bit, 33, s0, s1 ); \ + libhmac_sha256_context_transform_extend_32bit_value( values_32bit, 34, s0, s1 ); \ + libhmac_sha256_context_transform_extend_32bit_value( values_32bit, 35, s0, s1 ); \ + libhmac_sha256_context_transform_extend_32bit_value( values_32bit, 36, s0, s1 ); \ + libhmac_sha256_context_transform_extend_32bit_value( values_32bit, 37, s0, s1 ); \ + libhmac_sha256_context_transform_extend_32bit_value( values_32bit, 38, s0, s1 ); \ + libhmac_sha256_context_transform_extend_32bit_value( values_32bit, 39, s0, s1 ); \ + libhmac_sha256_context_transform_extend_32bit_value( values_32bit, 40, s0, s1 ); \ + libhmac_sha256_context_transform_extend_32bit_value( values_32bit, 41, s0, s1 ); \ + libhmac_sha256_context_transform_extend_32bit_value( values_32bit, 42, s0, s1 ); \ + libhmac_sha256_context_transform_extend_32bit_value( values_32bit, 43, s0, s1 ); \ + libhmac_sha256_context_transform_extend_32bit_value( values_32bit, 44, s0, s1 ); \ + libhmac_sha256_context_transform_extend_32bit_value( values_32bit, 45, s0, s1 ); \ + libhmac_sha256_context_transform_extend_32bit_value( values_32bit, 46, s0, s1 ); \ + libhmac_sha256_context_transform_extend_32bit_value( values_32bit, 47, s0, s1 ); \ + libhmac_sha256_context_transform_extend_32bit_value( values_32bit, 48, s0, s1 ); \ + libhmac_sha256_context_transform_extend_32bit_value( values_32bit, 49, s0, s1 ); \ + libhmac_sha256_context_transform_extend_32bit_value( values_32bit, 50, s0, s1 ); \ + libhmac_sha256_context_transform_extend_32bit_value( values_32bit, 51, s0, s1 ); \ + libhmac_sha256_context_transform_extend_32bit_value( values_32bit, 52, s0, s1 ); \ + libhmac_sha256_context_transform_extend_32bit_value( values_32bit, 53, s0, s1 ); \ + libhmac_sha256_context_transform_extend_32bit_value( values_32bit, 54, s0, s1 ); \ + libhmac_sha256_context_transform_extend_32bit_value( values_32bit, 55, s0, s1 ); \ + libhmac_sha256_context_transform_extend_32bit_value( values_32bit, 56, s0, s1 ); \ + libhmac_sha256_context_transform_extend_32bit_value( values_32bit, 57, s0, s1 ); \ + libhmac_sha256_context_transform_extend_32bit_value( values_32bit, 58, s0, s1 ); \ + libhmac_sha256_context_transform_extend_32bit_value( values_32bit, 59, s0, s1 ); \ + libhmac_sha256_context_transform_extend_32bit_value( values_32bit, 60, s0, s1 ); \ + libhmac_sha256_context_transform_extend_32bit_value( values_32bit, 61, s0, s1 ); \ + libhmac_sha256_context_transform_extend_32bit_value( values_32bit, 62, s0, s1 ); \ + libhmac_sha256_context_transform_extend_32bit_value( values_32bit, 63, s0, s1 ); + +#define libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, value_32bit_index, hash_values, hash_value_index0, hash_value_index1, hash_value_index2, hash_value_index3, hash_value_index4, hash_value_index5, hash_value_index6, hash_value_index7, s0, s1, t1, t2 ) \ + s0 = byte_stream_bit_rotate_right_32bit( hash_values[ hash_value_index0 ], 2 ) \ + ^ byte_stream_bit_rotate_right_32bit( hash_values[ hash_value_index0 ], 13 ) \ + ^ byte_stream_bit_rotate_right_32bit( hash_values[ hash_value_index0 ], 22 ); \ + s1 = byte_stream_bit_rotate_right_32bit( hash_values[ hash_value_index4 ], 6 ) \ + ^ byte_stream_bit_rotate_right_32bit( hash_values[ hash_value_index4 ], 11 ) \ + ^ byte_stream_bit_rotate_right_32bit( hash_values[ hash_value_index4 ], 25 ); \ +\ + t1 = hash_values[ hash_value_index7 ]; \ + t1 += s1; \ + t1 += ( hash_values[ hash_value_index4 ] & hash_values[ hash_value_index5 ] ) \ + ^ ( ~( hash_values[ hash_value_index4 ] ) & hash_values[ hash_value_index6 ] ); \ + t1 += libhmac_sha256_context_prime_cube_roots[ value_32bit_index ]; \ + t1 += values_32bit[ value_32bit_index ]; \ + t2 = s0; \ + t2 += ( hash_values[ hash_value_index0 ] & hash_values[ hash_value_index1 ] ) \ + ^ ( hash_values[ hash_value_index0 ] & hash_values[ hash_value_index2 ] ) \ + ^ ( hash_values[ hash_value_index1 ] & hash_values[ hash_value_index2 ] ); \ +\ + hash_values[ hash_value_index3 ] += t1; \ + hash_values[ hash_value_index7 ] = t1 + t2; + +#define libhmac_sha256_context_transform_unfolded_calculate_hash_values( values_32bit, hash_values, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 0, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 1, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 2, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 3, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 4, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 5, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 6, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 7, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 8, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 9, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 10, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 11, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 12, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 13, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 14, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 15, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 16, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 17, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 18, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 19, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 20, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 21, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 22, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 23, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 24, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 25, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 26, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 27, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 28, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 29, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 30, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 31, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 32, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 33, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 34, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 35, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 36, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 37, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 38, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 39, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 40, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 41, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 42, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 43, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 44, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 45, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 46, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 47, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 48, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 49, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 50, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 51, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 52, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 53, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 54, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 55, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 56, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 57, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 58, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 59, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 60, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 61, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 62, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ + libhmac_sha256_context_transform_unfolded_calculate_hash_value( values_32bit, 63, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) + +/* Calculates the SHA-256 of 64 byte sized blocks of data in a buffer + * Returns the number of bytes used if successful or -1 on error + */ +ssize_t libhmac_sha256_context_transform( + libhmac_internal_sha256_context_t *internal_context, + const uint8_t *buffer, + size_t size, + libcerror_error_t **error ) +{ + uint32_t hash_values[ 8 ]; + uint32_t values_32bit[ 64 ]; + + static char *function = "libhmac_sha256_context_transform"; + size_t buffer_offset = 0; + uint32_t s0 = 0; + uint32_t s1 = 0; + uint32_t t1 = 0; + uint32_t t2 = 0; + +#if !defined( LIBHMAC_UNFOLLED_LOOPS ) + uint8_t hash_values_index = 0; + uint8_t value_32bit_index = 0; +#endif + + if( internal_context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid internal context.", + function ); + + return( -1 ); + } + if( buffer == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid buffer.", + function ); + + return( -1 ); + } + if( size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid size value exceeds maximum.", + function ); + + return( -1 ); + } + while( size >= LIBHMAC_SHA256_BLOCK_SIZE ) + { + if( memory_copy( + hash_values, + internal_context->hash_values, + sizeof( uint32_t ) * 8 ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_COPY_FAILED, + "%s: unable to copy hash values.", + function ); + + goto on_error; + } +#if defined( LIBHMAC_UNFOLLED_LOOPS ) + /* Break the block into 16 x 32-bit values + */ + libhmac_byte_stream_copy_to_16x_uint32_big_endian( + &( buffer[ buffer_offset ] ), + values_32bit ); + + buffer_offset += LIBHMAC_SHA256_BLOCK_SIZE; + + /* Extend to 64 x 32-bit values + */ + libhmac_sha256_context_transform_unfolded_extend_32bit_values( + values_32bit, + s0, + s1 ); + + /* Calculate the hash values for the 32-bit values + */ + libhmac_sha256_context_transform_unfolded_calculate_hash_values( + values_32bit, + hash_values, + s0, + s1, + t1, + t2 ); + + /* Update the hash values in the context + */ + internal_context->hash_values[ 0 ] += hash_values[ 0 ]; + internal_context->hash_values[ 1 ] += hash_values[ 1 ]; + internal_context->hash_values[ 2 ] += hash_values[ 2 ]; + internal_context->hash_values[ 3 ] += hash_values[ 3 ]; + internal_context->hash_values[ 4 ] += hash_values[ 4 ]; + internal_context->hash_values[ 5 ] += hash_values[ 5 ]; + internal_context->hash_values[ 6 ] += hash_values[ 6 ]; + internal_context->hash_values[ 7 ] += hash_values[ 7 ]; + +#else + /* Break the block into 16 x 32-bit values + */ + for( value_32bit_index = 0; + value_32bit_index < 16; + value_32bit_index++ ) + { + byte_stream_copy_to_uint32_big_endian( + &( buffer[ buffer_offset ] ), + values_32bit[ value_32bit_index ] ); + + buffer_offset += sizeof( uint32_t ); + } + /* Extend to 64 x 32-bit values + */ + for( value_32bit_index = 16; + value_32bit_index < 64; + value_32bit_index++ ) + { + libhmac_sha256_context_transform_extend_32bit_value( + values_32bit, + value_32bit_index, + s0, + s1 ); + } + /* Calculate the hash values for the 32-bit values + */ + for( value_32bit_index = 0; + value_32bit_index < 64; + value_32bit_index++ ) + { + s0 = byte_stream_bit_rotate_right_32bit( hash_values[ 0 ], 2 ) + ^ byte_stream_bit_rotate_right_32bit( hash_values[ 0 ], 13 ) + ^ byte_stream_bit_rotate_right_32bit( hash_values[ 0 ], 22 ); + s1 = byte_stream_bit_rotate_right_32bit( hash_values[ 4 ], 6 ) + ^ byte_stream_bit_rotate_right_32bit( hash_values[ 4 ], 11 ) + ^ byte_stream_bit_rotate_right_32bit( hash_values[ 4 ], 25 ); + + t1 = hash_values[ 7 ]; + t1 += s1; + t1 += ( hash_values[ 4 ] & hash_values[ 5 ] ) + ^ ( ~( hash_values[ 4 ] ) & hash_values[ 6 ] ); + t1 += libhmac_sha256_context_prime_cube_roots[ value_32bit_index ]; + t1 += values_32bit[ value_32bit_index ]; + t2 = s0; + t2 += ( hash_values[ 0 ] & hash_values[ 1 ] ) + ^ ( hash_values[ 0 ] & hash_values[ 2 ] ) + ^ ( hash_values[ 1 ] & hash_values[ 2 ] ); + + hash_values[ 7 ] = hash_values[ 6 ]; + hash_values[ 6 ] = hash_values[ 5 ]; + hash_values[ 5 ] = hash_values[ 4 ]; + hash_values[ 4 ] = hash_values[ 3 ] + t1; + hash_values[ 3 ] = hash_values[ 2 ]; + hash_values[ 2 ] = hash_values[ 1 ]; + hash_values[ 1 ] = hash_values[ 0 ]; + hash_values[ 0 ] = t1 + t2; + } + /* Update the hash values in the context + */ + for( hash_values_index = 0; + hash_values_index < 8; + hash_values_index++ ) + { + internal_context->hash_values[ hash_values_index ] += hash_values[ hash_values_index ]; + } +#endif /* defined( LIBHMAC_UNFOLLED_LOOPS ) */ + + size -= LIBHMAC_SHA256_BLOCK_SIZE; + } + /* Prevent sensitive data from leaking + */ + if( memory_set( + hash_values, + 0, + sizeof( uint32_t ) * 8 ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_SET_FAILED, + "%s: unable to clear hash values.", + function ); + + goto on_error; + } + if( memory_set( + values_32bit, + 0, + sizeof( uint32_t ) * 64 ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_SET_FAILED, + "%s: unable to clear 32-bit values.", + function ); + + goto on_error; + } + return( (ssize_t) buffer_offset ); + +on_error: + memory_set( + values_32bit, + 0, + sizeof( uint32_t ) * 64 ); + + memory_set( + hash_values, + 0, + sizeof( uint32_t ) * 8 ); + + return( -1 ); +} + +#endif /* !defined( LIBHMAC_HAVE_SHA256_SUPPORT ) */ + +/* Creates a SHA-256 context + * Make sure the value context is referencing, is set to NULL + * Returns 1 if successful or -1 on error + */ +int libhmac_sha256_context_initialize( + libhmac_sha256_context_t **context, + libcerror_error_t **error ) +{ + libhmac_internal_sha256_context_t *internal_context = NULL; + static char *function = "libhmac_sha256_context_initialize"; + +#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA256 ) + const EVP_MD *evp_md_type = NULL; +#endif + + if( context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid context.", + function ); + + return( -1 ); + } + if( *context != NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, + "%s: invalid context value already set.", + function ); + + return( -1 ); + } + internal_context = memory_allocate_structure( + libhmac_internal_sha256_context_t ); + + if( internal_context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_INSUFFICIENT, + "%s: unable to create context.", + function ); + + goto on_error; + } + if( memory_set( + internal_context, + 0, + sizeof( libhmac_internal_sha256_context_t ) ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_SET_FAILED, + "%s: unable to clear context.", + function ); + + memory_free( + internal_context ); + + return( -1 ); + } +#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA256_DIGEST_LENGTH ) + if( SHA256_Init( + &( internal_context->sha256_context ) ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to initialize context.", + function ); + + goto on_error; + } + +#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA256 ) +#if defined( HAVE_EVP_MD_CTX_INIT ) + EVP_MD_CTX_init( + &( internal_context->internal_evp_md_context ) ); + + internal_context->evp_md_context = &( internal_context->internal_evp_md_context ); +#else + internal_context->evp_md_context = EVP_MD_CTX_new(); + + if( internal_context->evp_md_context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to create EVP message digest context.", + function ); + + goto on_error; + } +#endif /* defined( HAVE_EVP_MD_CTX_INIT ) */ + +/* TODO use EVP_MD_fetch for EVP_DigestInit_ex2 */ + evp_md_type = EVP_sha256(); + +#if defined( HAVE_EVP_DIGESTINIT_EX2 ) + if( EVP_DigestInit_ex2( + internal_context->evp_md_context, + evp_md_type, + NULL ) != 1 ) +#else + if( EVP_DigestInit_ex( + internal_context->evp_md_context, + evp_md_type, + NULL ) != 1 ) +#endif + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to initialize context.", + function ); + +#if defined( HAVE_EVP_MD_CTX_CLEANUP ) + EVP_MD_CTX_cleanup( + &( internal_context->internal_evp_md_context ) ); + ERR_remove_thread_state( + NULL ); +#else + EVP_MD_CTX_free( + internal_context->evp_md_context ); +#endif + internal_context->evp_md_context = NULL; + + goto on_error; + } +#else + if( memory_copy( + internal_context->hash_values, + libhmac_sha256_context_prime_square_roots, + sizeof( uint32_t ) * 8 ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_COPY_FAILED, + "%s: unable to copy initial hash values.", + function ); + + return( -1 ); + } +#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA256_DIGEST_LENGTH ) */ + + *context = (libhmac_sha256_context_t *) internal_context; + + return( 1 ); + +on_error: + if( internal_context != NULL ) + { + memory_free( + internal_context ); + } + return( -1 ); +} + +/* Frees a SHA-256 context + * Returns 1 if successful or -1 on error + */ +int libhmac_sha256_context_free( + libhmac_sha256_context_t **context, + libcerror_error_t **error ) +{ + libhmac_internal_sha256_context_t *internal_context = NULL; + static char *function = "libhmac_sha256_context_free"; + + if( context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid context.", + function ); + + return( -1 ); + } + if( *context != NULL ) + { + internal_context = (libhmac_internal_sha256_context_t *) *context; + *context = NULL; + +#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA256_DIGEST_LENGTH ) + /* No additional clean up necessary + */ + +#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA256 ) +#if defined( HAVE_EVP_MD_CTX_CLEANUP ) + if( EVP_MD_CTX_cleanup( + &( internal_context->internal_evp_md_context ) ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to clean up EVP message digest context.", + function ); + } + /* Make sure the error state is removed otherwise OpenSSL will leak memory + */ + ERR_remove_thread_state( + NULL ); +#else + EVP_MD_CTX_free( + internal_context->evp_md_context ); + +#endif /* defined( HAVE_EVP_MD_CTX_CLEANUP ) */ + + internal_context->evp_md_context = NULL; +#else + /* No additional clean up necessary + */ +#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA256_DIGEST_LENGTH ) */ + + memory_free( + internal_context ); + } + return( 1 ); +} + +#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA256_DIGEST_LENGTH ) + +/* Updates the SHA-256 context using OpenSSL + * Returns 1 if successful or -1 on error + */ +int libhmac_sha256_context_update( + libhmac_sha256_context_t *context, + const uint8_t *buffer, + size_t size, + libcerror_error_t **error ) +{ + libhmac_internal_sha256_context_t *internal_context = NULL; + static char *function = "libhmac_sha256_context_update"; + unsigned long safe_hash_size = 0; + + if( context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid context.", + function ); + + return( -1 ); + } + internal_context = (libhmac_internal_sha256_context_t *) context; + + if( buffer == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid buffer.", + function ); + + return( -1 ); + } +#if ( SIZEOF_LONG < SIZEOF_SIZE_T ) + if( size > (size_t) ULONG_MAX ) +#else + if( size > (size_t) SSIZE_MAX ) +#endif + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid size value exceeds maximum.", + function ); + + return( -1 ); + } + if( size == 0 ) + { + return( 1 ); + } + safe_hash_size = (unsigned long) size; + + if( SHA256_Update( + &( internal_context->sha256_context ), + (const void *) buffer, + size ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to update context.", + function ); + + return( -1 ); + } + return( 1 ); +} + +#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA256 ) + +/* Updates the SHA-256 context using OpenSSL EVP + * Returns 1 if successful or -1 on error + */ +int libhmac_sha256_context_update( + libhmac_sha256_context_t *context, + const uint8_t *buffer, + size_t size, + libcerror_error_t **error ) +{ + libhmac_internal_sha256_context_t *internal_context = NULL; + static char *function = "libhmac_sha256_context_update"; + + if( context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid context.", + function ); + + return( -1 ); + } + internal_context = (libhmac_internal_sha256_context_t *) context; + + if( buffer == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid buffer.", + function ); + + return( -1 ); + } + if( size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid size value exceeds maximum.", + function ); + + return( -1 ); + } + if( size == 0 ) + { + return( 1 ); + } + if( EVP_DigestUpdate( + internal_context->evp_md_context, + (const void *) buffer, + size ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to update context.", + function ); + + return( -1 ); + } + return( 1 ); +} + +#else + +/* Updates the SHA-256 context using fallback implementation + * Returns 1 if successful or -1 on error + */ +int libhmac_sha256_context_update( + libhmac_sha256_context_t *context, + const uint8_t *buffer, + size_t size, + libcerror_error_t **error ) +{ + libhmac_internal_sha256_context_t *internal_context = NULL; + static char *function = "libhmac_sha256_context_update"; + size_t buffer_offset = 0; + size_t remaining_block_size = 0; + ssize_t process_count = 0; + + if( context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid context.", + function ); + + return( -1 ); + } + internal_context = (libhmac_internal_sha256_context_t *) context; + + if( buffer == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid buffer.", + function ); + + return( -1 ); + } + if( size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid size value exceeds maximum.", + function ); + + return( -1 ); + } + if( size == 0 ) + { + return( 1 ); + } + if( internal_context->block_offset > 0 ) + { + if( internal_context->block_offset >= LIBHMAC_SHA256_BLOCK_SIZE ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid context - block offset value out of bounds.", + function ); + + return( -1 ); + } + remaining_block_size = LIBHMAC_SHA256_BLOCK_SIZE - internal_context->block_offset; + + if( remaining_block_size > size ) + { + remaining_block_size = size; + } + if( memory_copy( + &( internal_context->block[ internal_context->block_offset ] ), + buffer, + remaining_block_size ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_COPY_FAILED, + "%s: unable to copy data to context block.", + function ); + + return( -1 ); + } + internal_context->block_offset += remaining_block_size; + + if( internal_context->block_offset < LIBHMAC_SHA256_BLOCK_SIZE ) + { + return( 1 ); + } + buffer_offset += remaining_block_size; + size -= remaining_block_size; + + process_count = libhmac_sha256_context_transform( + internal_context, + internal_context->block, + LIBHMAC_SHA256_BLOCK_SIZE, + error ); + + if( process_count == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to transform context block.", + function ); + + return( -1 ); + } + internal_context->hash_count += process_count; + internal_context->block_offset = 0; + } + if( size > 0 ) + { + process_count = libhmac_sha256_context_transform( + internal_context, + &( buffer[ buffer_offset ] ), + size, + error ); + + if( process_count == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to transform buffer.", + function ); + + return( -1 ); + } + internal_context->hash_count += process_count; + + buffer_offset += process_count; + size -= process_count; + } + if( size > 0 ) + { + if( size >= LIBHMAC_SHA256_BLOCK_SIZE ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid size value out of bounds.", + function ); + + return( -1 ); + } + if( memory_copy( + internal_context->block, + &( buffer[ buffer_offset ] ), + size ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_COPY_FAILED, + "%s: unable to copy remaining data to context block.", + function ); + + return( -1 ); + } + internal_context->block_offset = size; + } + return( 1 ); +} + +#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA256_DIGEST_LENGTH ) */ + +#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA256_DIGEST_LENGTH ) + +/* Finalizes the SHA-256 context using OpenSSL + * Returns 1 if successful or -1 on error + */ +int libhmac_sha256_context_finalize( + libhmac_sha256_context_t *context, + uint8_t *hash, + size_t hash_size, + libcerror_error_t **error ) +{ + libhmac_internal_sha256_context_t *internal_context = NULL; + static char *function = "libhmac_sha256_context_finalize"; + + if( context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid context.", + function ); + + return( -1 ); + } + internal_context = (libhmac_internal_sha256_context_t *) context; + + if( hash == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid hash.", + function ); + + return( -1 ); + } + if( hash_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid hash size value exceeds maximum.", + function ); + + return( -1 ); + } + if( hash_size < (size_t) LIBHMAC_SHA256_HASH_SIZE ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: invalid hash size value too small.", + function ); + + return( -1 ); + } + if( SHA256_Final( + hash, + &( internal_context->sha256_context ) ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to finalize context.", + function ); + + return( -1 ); + } + return( 1 ); +} + +#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA256 ) + +/* Finalizes the SHA-256 context using OpenSSL EVP + * Returns 1 if successful or -1 on error + */ +int libhmac_sha256_context_finalize( + libhmac_sha256_context_t *context, + uint8_t *hash, + size_t hash_size, + libcerror_error_t **error ) +{ + libhmac_internal_sha256_context_t *internal_context = NULL; + static char *function = "libhmac_sha256_context_finalize"; + unsigned int safe_hash_size = 0; + + if( context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid context.", + function ); + + return( -1 ); + } + internal_context = (libhmac_internal_sha256_context_t *) context; + + if( hash == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid hash.", + function ); + + return( -1 ); + } + if( ( hash_size < (size_t) LIBHMAC_SHA256_HASH_SIZE ) + || ( hash_size > (size_t) UINT_MAX ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid hash size value out of bounds.", + function ); + + return( -1 ); + } + safe_hash_size = (unsigned int) hash_size; + + if( EVP_DigestFinal_ex( + internal_context->evp_md_context, + (unsigned char *) hash, + &safe_hash_size ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to finalize context.", + function ); + + return( -1 ); + } + return( 1 ); +} + +#else + +/* Finalizes the SHA-256 context using fallback implementation + * Returns 1 if successful or -1 on error + */ +int libhmac_sha256_context_finalize( + libhmac_sha256_context_t *context, + uint8_t *hash, + size_t hash_size, + libcerror_error_t **error ) +{ + libhmac_internal_sha256_context_t *internal_context = NULL; + static char *function = "libhmac_sha256_context_finalize"; + size_t block_size = 0; + size_t number_of_blocks = 0; + ssize_t process_count = 0; + uint64_t bit_size = 0; + +#if !defined( LIBHMAC_UNFOLLED_LOOPS ) + size_t hash_index = 0; + int hash_values_index = 0; +#endif + + if( context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid context.", + function ); + + return( -1 ); + } + internal_context = (libhmac_internal_sha256_context_t *) context; + + if( hash == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid hash.", + function ); + + return( -1 ); + } + if( hash_size < (size_t) LIBHMAC_SHA256_HASH_SIZE ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: invalid hash value too small.", + function ); + + return( -1 ); + } + if( hash_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid hash size value exceeds maximum.", + function ); + + return( -1 ); + } + if( hash_size < (size_t) LIBHMAC_SHA256_HASH_SIZE ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: invalid hash size value too small.", + function ); + + return( -1 ); + } + /* Add padding with a size of 56 mod 64 + */ + number_of_blocks = 1; + + if( internal_context->block_offset > 55 ) + { + number_of_blocks += 1; + } + block_size = number_of_blocks * LIBHMAC_SHA256_BLOCK_SIZE; + + if( memory_set( + &( internal_context->block[ internal_context->block_offset ] ), + 0, + block_size - internal_context->block_offset ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_SET_FAILED, + "%s: unable to clear context block.", + function ); + + return( -1 ); + } + /* The first byte of the padding contains 0x80 + */ + internal_context->block[ internal_context->block_offset ] = 0x80; + + bit_size = ( internal_context->hash_count + internal_context->block_offset ) * 8; + + byte_stream_copy_from_uint64_big_endian( + &( internal_context->block[ block_size - 8 ] ), + bit_size ); + + process_count = libhmac_sha256_context_transform( + internal_context, + internal_context->block, + block_size, + error ); + + if( process_count == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to transform context block.", + function ); + + return( -1 ); + } +#if !defined( LIBHMAC_UNFOLLED_LOOPS ) + for( hash_values_index = 0; + hash_values_index < 8; + hash_values_index++ ) + { + byte_stream_copy_from_uint32_big_endian( + &( hash[ hash_index ] ), + internal_context->hash_values[ hash_values_index ] ); + + hash_index += sizeof( uint32_t ); + } +#else + byte_stream_copy_from_uint32_big_endian( + &( hash[ 0 ] ), + internal_context->hash_values[ 0 ] ); + + byte_stream_copy_from_uint32_big_endian( + &( hash[ 4 ] ), + internal_context->hash_values[ 1 ] ); + + byte_stream_copy_from_uint32_big_endian( + &( hash[ 8 ] ), + internal_context->hash_values[ 2 ] ); + + byte_stream_copy_from_uint32_big_endian( + &( hash[ 12 ] ), + internal_context->hash_values[ 3 ] ); + + byte_stream_copy_from_uint32_big_endian( + &( hash[ 16 ] ), + internal_context->hash_values[ 4 ] ); + + byte_stream_copy_from_uint32_big_endian( + &( hash[ 20 ] ), + internal_context->hash_values[ 5 ] ); + + byte_stream_copy_from_uint32_big_endian( + &( hash[ 24 ] ), + internal_context->hash_values[ 6 ] ); + + byte_stream_copy_from_uint32_big_endian( + &( hash[ 28 ] ), + internal_context->hash_values[ 7 ] ); + +#endif /* !defined( LIBHMAC_UNFOLLED_LOOPS ) */ + + /* Prevent sensitive data from leaking + */ + if( memory_set( + internal_context, + 0, + sizeof( libhmac_internal_sha256_context_t ) ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_SET_FAILED, + "%s: unable to clear context.", + function ); + + return( -1 ); + } + return( 1 ); +} + +#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA256_DIGEST_LENGTH ) */ + diff -Nru libfshfs-20201104/libhmac/libhmac_sha256_context.h libfshfs-20240221/libhmac/libhmac_sha256_context.h --- libfshfs-20201104/libhmac/libhmac_sha256_context.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libhmac/libhmac_sha256_context.h 2024-02-21 06:04:12.000000000 +0000 @@ -0,0 +1,130 @@ +/* + * SHA-256 context functions + * + * Copyright (C) 2011-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _LIBHMAC_SHA256_CONTEXT_H ) +#define _LIBHMAC_SHA256_CONTEXT_H + +#include +#include + +#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) +#include + +#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) +#include +#endif + +#include "libhmac_extern.h" +#include "libhmac_libcerror.h" +#include "libhmac_types.h" + +#if defined( __cplusplus ) +extern "C" { +#endif + +#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA256_DIGEST_LENGTH ) +#define LIBHMAC_HAVE_SHA256_SUPPORT + +#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA256 ) +#define LIBHMAC_HAVE_SHA256_SUPPORT + +#endif + +#define LIBHMAC_SHA256_BLOCK_SIZE 64 + +typedef struct libhmac_internal_sha256_context libhmac_internal_sha256_context_t; + +struct libhmac_internal_sha256_context +{ +#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA256_DIGEST_LENGTH ) + /* The SHA-256 context + */ + SHA256_CTX sha256_context; + +#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA256 ) + /* The EVP message digest context + */ +#if defined( HAVE_EVP_MD_CTX_INIT ) + EVP_MD_CTX internal_evp_md_context; +#endif + + EVP_MD_CTX *evp_md_context; + +#else + /* The number of bytes hashed + */ + uint64_t hash_count; + + /* The 32-bit hash values + */ + uint32_t hash_values[ 8 ]; + + /* The block offset + */ + size_t block_offset; + + /* The (data) block + */ + uint8_t block[ 2 * LIBHMAC_SHA256_BLOCK_SIZE ]; + +#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA256_DIGEST_LENGTH ) */ +}; + +#if !defined( LIBHMAC_HAVE_SHA256_SUPPORT ) + +ssize_t libhmac_sha256_context_transform( + libhmac_internal_sha256_context_t *internal_context, + const uint8_t *buffer, + size_t size, + libcerror_error_t **error ); + +#endif /* !defined( LIBHMAC_HAVE_SHA256_SUPPORT ) */ + +LIBHMAC_EXTERN \ +int libhmac_sha256_context_initialize( + libhmac_sha256_context_t **context, + libcerror_error_t **error ); + +LIBHMAC_EXTERN \ +int libhmac_sha256_context_free( + libhmac_sha256_context_t **context, + libcerror_error_t **error ); + +LIBHMAC_EXTERN \ +int libhmac_sha256_context_update( + libhmac_sha256_context_t *context, + const uint8_t *buffer, + size_t size, + libcerror_error_t **error ); + +LIBHMAC_EXTERN \ +int libhmac_sha256_context_finalize( + libhmac_sha256_context_t *context, + uint8_t *hash, + size_t hash_size, + libcerror_error_t **error ); + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _LIBHMAC_SHA256_CONTEXT_H ) */ + diff -Nru libfshfs-20201104/libhmac/libhmac_sha512.c libfshfs-20240221/libhmac/libhmac_sha512.c --- libfshfs-20201104/libhmac/libhmac_sha512.c 2020-11-04 11:56:11.000000000 +0000 +++ libfshfs-20240221/libhmac/libhmac_sha512.c 2024-02-21 06:04:12.000000000 +0000 @@ -1,7 +1,7 @@ /* * SHA-512 functions * - * Copyright (C) 2011-2020, Joachim Metz + * Copyright (C) 2011-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -20,473 +20,15 @@ */ #include -#include #include #include -#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) -#include - -#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) -#include -#include - -#endif - -#include "libhmac_byte_stream.h" #include "libhmac_definitions.h" #include "libhmac_libcerror.h" #include "libhmac_sha512.h" +#include "libhmac_sha512_context.h" -#if !defined( LIBHMAC_HAVE_SHA512_SUPPORT ) - -/* FIPS 180-2 based SHA-512 functions - */ - -/* The first 64-bits of the fractional parts of the square roots of the first 8 primes [ 2, 19 ] - */ -uint64_t libhmac_sha512_prime_square_roots[ 8 ] = { - 0x6a09e667f3bcc908, 0xbb67ae8584caa73b, 0x3c6ef372fe94f82b, 0xa54ff53a5f1d36f1, - 0x510e527fade682d1, 0x9b05688c2b3e6c1f, 0x1f83d9abfb41bd6b, 0x5be0cd19137e2179 -}; - -/* The first 64-bits of the fractional parts of the cube roots of the first 80 primes [ 2, 409 ] - */ -uint64_t libhmac_sha512_prime_cube_roots[ 80 ] = { - 0x428a2f98d728ae22, 0x7137449123ef65cd, 0xb5c0fbcfec4d3b2f, 0xe9b5dba58189dbbc, - 0x3956c25bf348b538, 0x59f111f1b605d019, 0x923f82a4af194f9b, 0xab1c5ed5da6d8118, - 0xd807aa98a3030242, 0x12835b0145706fbe, 0x243185be4ee4b28c, 0x550c7dc3d5ffb4e2, - 0x72be5d74f27b896f, 0x80deb1fe3b1696b1, 0x9bdc06a725c71235, 0xc19bf174cf692694, - 0xe49b69c19ef14ad2, 0xefbe4786384f25e3, 0x0fc19dc68b8cd5b5, 0x240ca1cc77ac9c65, - 0x2de92c6f592b0275, 0x4a7484aa6ea6e483, 0x5cb0a9dcbd41fbd4, 0x76f988da831153b5, - 0x983e5152ee66dfab, 0xa831c66d2db43210, 0xb00327c898fb213f, 0xbf597fc7beef0ee4, - 0xc6e00bf33da88fc2, 0xd5a79147930aa725, 0x06ca6351e003826f, 0x142929670a0e6e70, - 0x27b70a8546d22ffc, 0x2e1b21385c26c926, 0x4d2c6dfc5ac42aed, 0x53380d139d95b3df, - 0x650a73548baf63de, 0x766a0abb3c77b2a8, 0x81c2c92e47edaee6, 0x92722c851482353b, - 0xa2bfe8a14cf10364, 0xa81a664bbc423001, 0xc24b8b70d0f89791, 0xc76c51a30654be30, - 0xd192e819d6ef5218, 0xd69906245565a910, 0xf40e35855771202a, 0x106aa07032bbd1b8, - 0x19a4c116b8d2d0c8, 0x1e376c085141ab53, 0x2748774cdf8eeb99, 0x34b0bcb5e19b48a8, - 0x391c0cb3c5c95a63, 0x4ed8aa4ae3418acb, 0x5b9cca4f7763e373, 0x682e6ff3d6b2b8a3, - 0x748f82ee5defb2fc, 0x78a5636f43172f60, 0x84c87814a1f0ab72, 0x8cc702081a6439ec, - 0x90befffa23631e28, 0xa4506cebde82bde9, 0xbef9a3f7b2c67915, 0xc67178f2e372532b, - 0xca273eceea26619c, 0xd186b8c721c0c207, 0xeada7dd6cde0eb1e, 0xf57d4f7fee6ed178, - 0x06f067aa72176fba, 0x0a637dc5a2c898a6, 0x113f9804bef90dae, 0x1b710b35131c471b, - 0x28db77f523047d84, 0x32caab7b40c72493, 0x3c9ebe0a15c9bebc, 0x431d67c49c100d4c, - 0x4cc5d4becb3e42b6, 0x597f299cfc657e2a, 0x5fcb6fab3ad6faec, 0x6c44198c4a475817 -}; - -#define libhmac_sha512_transform_extend_64bit_value( values_64bit, value_64bit_index, s0, s1 ) \ - s0 = byte_stream_bit_rotate_right_64bit( values_64bit[ value_64bit_index - 15 ], 1 ) \ - ^ byte_stream_bit_rotate_right_64bit( values_64bit[ value_64bit_index - 15 ], 8 ) \ - ^ ( values_64bit[ value_64bit_index - 15 ] >> 7 ); \ - s1 = byte_stream_bit_rotate_right_64bit( values_64bit[ value_64bit_index - 2 ], 19 ) \ - ^ byte_stream_bit_rotate_right_64bit( values_64bit[ value_64bit_index - 2 ], 61 ) \ - ^ ( values_64bit[ value_64bit_index - 2 ] >> 6 ); \ -\ - values_64bit[ value_64bit_index ] = values_64bit[ value_64bit_index - 16 ] \ - + s0 \ - + values_64bit[ value_64bit_index - 7 ] \ - + s1 - -#define libhmac_sha512_transform_unfolded_extend_64bit_values( values_64bit, s0, s1 ) \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 16, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 17, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 18, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 19, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 20, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 21, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 22, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 23, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 24, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 25, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 26, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 27, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 28, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 29, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 30, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 31, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 32, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 33, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 34, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 35, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 36, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 37, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 38, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 39, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 40, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 41, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 42, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 43, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 44, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 45, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 46, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 47, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 48, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 49, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 50, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 51, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 52, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 53, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 54, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 55, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 56, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 57, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 58, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 59, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 60, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 61, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 62, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 63, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 64, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 65, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 66, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 67, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 68, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 69, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 70, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 71, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 72, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 73, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 74, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 75, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 76, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 77, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 78, s0, s1 ); \ - libhmac_sha512_transform_extend_64bit_value( values_64bit, 79, s0, s1 ); - -#define libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, value_64bit_index, hash_values, hash_value_index0, hash_value_index1, hash_value_index2, hash_value_index3, hash_value_index4, hash_value_index5, hash_value_index6, hash_value_index7, s0, s1, t1, t2 ) \ - s0 = byte_stream_bit_rotate_right_64bit( hash_values[ hash_value_index0 ], 28 ) \ - ^ byte_stream_bit_rotate_right_64bit( hash_values[ hash_value_index0 ], 34 ) \ - ^ byte_stream_bit_rotate_right_64bit( hash_values[ hash_value_index0 ], 39 ); \ - s1 = byte_stream_bit_rotate_right_64bit( hash_values[ hash_value_index4 ], 14 ) \ - ^ byte_stream_bit_rotate_right_64bit( hash_values[ hash_value_index4 ], 18 ) \ - ^ byte_stream_bit_rotate_right_64bit( hash_values[ hash_value_index4 ], 41 ); \ -\ - t1 = hash_values[ hash_value_index7 ]; \ - t1 += s1; \ - t1 += ( hash_values[ hash_value_index4 ] & hash_values[ hash_value_index5 ] ) \ - ^ ( ~( hash_values[ hash_value_index4 ] ) & hash_values[ hash_value_index6 ] ); \ - t1 += libhmac_sha512_prime_cube_roots[ value_64bit_index ]; \ - t1 += values_64bit[ value_64bit_index ]; \ - t2 = s0; \ - t2 += ( hash_values[ hash_value_index0 ] & hash_values[ hash_value_index1 ] ) \ - ^ ( hash_values[ hash_value_index0 ] & hash_values[ hash_value_index2 ] ) \ - ^ ( hash_values[ hash_value_index1 ] & hash_values[ hash_value_index2 ] ); \ -\ - hash_values[ hash_value_index3 ] += t1; \ - hash_values[ hash_value_index7 ] = t1 + t2; - -#define libhmac_sha512_transform_unfolded_calculate_hash_values( values_64bit, hash_values, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 0, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 1, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 2, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 3, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 4, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 5, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 6, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 7, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 8, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 9, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 10, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 11, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 12, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 13, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 14, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 15, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 16, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 17, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 18, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 19, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 20, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 21, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 22, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 23, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 24, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 25, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 26, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 27, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 28, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 29, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 30, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 31, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 32, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 33, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 34, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 35, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 36, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 37, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 38, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 39, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 40, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 41, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 42, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 43, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 44, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 45, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 46, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 47, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 48, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 49, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 50, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 51, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 52, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 53, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 54, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 55, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 56, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 57, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 58, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 59, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 60, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 61, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 62, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 63, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 64, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 65, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 66, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 67, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 68, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 69, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 70, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 71, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 72, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 73, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 74, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 75, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 76, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 77, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 78, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ - libhmac_sha512_transform_unfolded_calculate_hash_value( values_64bit, 79, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) - -/* Calculates the SHA-512 of 128 byte sized blocks of data in a buffer - * Returns the number of bytes used if successful or -1 on error - */ -ssize_t libhmac_sha512_transform( - libhmac_internal_sha512_context_t *internal_context, - const uint8_t *buffer, - size_t size, - libcerror_error_t **error ) -{ - uint64_t hash_values[ 8 ]; - uint64_t values_64bit[ 80 ]; - - static char *function = "libhmac_sha512_transform"; - uint64_t s0 = 0; - uint64_t s1 = 0; - uint64_t t1 = 0; - uint64_t t2 = 0; - size_t buffer_offset = 0; - -#if !defined( LIBHMAC_UNFOLLED_LOOPS ) - uint8_t hash_values_index = 0; - uint8_t value_64bit_index = 0; -#endif - - if( internal_context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid internal context.", - function ); - - return( -1 ); - } - if( buffer == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid buffer.", - function ); - - return( -1 ); - } - if( size > (size_t) SSIZE_MAX ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, - "%s: invalid size value exceeds maximum.", - function ); - - return( -1 ); - } - while( size >= LIBHMAC_SHA512_BLOCK_SIZE ) - { - if( memory_copy( - hash_values, - internal_context->hash_values, - sizeof( uint64_t ) * 8 ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_COPY_FAILED, - "%s: unable to copy hash values.", - function ); - - goto on_error; - } -#if defined( LIBHMAC_UNFOLLED_LOOPS ) - /* Break the block into 16 x 64-bit values - */ - libhmac_byte_stream_copy_to_16x_uint64_big_endian( - &( buffer[ buffer_offset ] ), - values_64bit ); - - buffer_offset += LIBHMAC_SHA512_BLOCK_SIZE; - - /* Extend to 80 x 64-bit values - */ - libhmac_sha512_transform_unfolded_extend_64bit_values( - values_64bit, - s0, - s1 ); - - /* Calculate the hash values for the 64-bit values - */ - libhmac_sha512_transform_unfolded_calculate_hash_values( - values_64bit, - hash_values, - s0, - s1, - t1, - t2 ); - - /* Update the hash values in the context - */ - internal_context->hash_values[ 0 ] += hash_values[ 0 ]; - internal_context->hash_values[ 1 ] += hash_values[ 1 ]; - internal_context->hash_values[ 2 ] += hash_values[ 2 ]; - internal_context->hash_values[ 3 ] += hash_values[ 3 ]; - internal_context->hash_values[ 4 ] += hash_values[ 4 ]; - internal_context->hash_values[ 5 ] += hash_values[ 5 ]; - internal_context->hash_values[ 6 ] += hash_values[ 6 ]; - internal_context->hash_values[ 7 ] += hash_values[ 7 ]; - -#else - /* Break the block into 16 x 64-bit values - */ - for( value_64bit_index = 0; - value_64bit_index < 16; - value_64bit_index++ ) - { - byte_stream_copy_to_uint64_big_endian( - &( buffer[ buffer_offset ] ), - values_64bit[ value_64bit_index ] ); - - buffer_offset += sizeof( uint64_t ); - } - /* Extend to 80 x 64-bit values - */ - for( value_64bit_index = 16; - value_64bit_index < 80; - value_64bit_index++ ) - { - libhmac_sha512_transform_extend_64bit_value( - values_64bit, - value_64bit_index, - s0, - s1 ); - } - /* Calculate the hash values for the 64-bit values - */ - for( value_64bit_index = 0; - value_64bit_index < 80; - value_64bit_index++ ) - { - s0 = byte_stream_bit_rotate_right_64bit( hash_values[ 0 ], 28 ) - ^ byte_stream_bit_rotate_right_64bit( hash_values[ 0 ], 34 ) - ^ byte_stream_bit_rotate_right_64bit( hash_values[ 0 ], 39 ); - s1 = byte_stream_bit_rotate_right_64bit( hash_values[ 4 ], 14 ) - ^ byte_stream_bit_rotate_right_64bit( hash_values[ 4 ], 18 ) - ^ byte_stream_bit_rotate_right_64bit( hash_values[ 4 ], 41 ); - - t1 = hash_values[ 7 ]; - t1 += s1; - t1 += ( hash_values[ 4 ] & hash_values[ 5 ] ) - ^ ( ~( hash_values[ 4 ] ) & hash_values[ 6 ] ); - t1 += libhmac_sha512_prime_cube_roots[ value_64bit_index ]; - t1 += values_64bit[ value_64bit_index ]; - t2 = s0; - t2 += ( hash_values[ 0 ] & hash_values[ 1 ] ) - ^ ( hash_values[ 0 ] & hash_values[ 2 ] ) - ^ ( hash_values[ 1 ] & hash_values[ 2 ] ); - - hash_values[ 7 ] = hash_values[ 6 ]; - hash_values[ 6 ] = hash_values[ 5 ]; - hash_values[ 5 ] = hash_values[ 4 ]; - hash_values[ 4 ] = hash_values[ 3 ] + t1; - hash_values[ 3 ] = hash_values[ 2 ]; - hash_values[ 2 ] = hash_values[ 1 ]; - hash_values[ 1 ] = hash_values[ 0 ]; - hash_values[ 0 ] = t1 + t2; - } - /* Update the hash values in the context - */ - for( hash_values_index = 0; - hash_values_index < 8; - hash_values_index++ ) - { - internal_context->hash_values[ hash_values_index ] += hash_values[ hash_values_index ]; - } -#endif /* defined( LIBHMAC_UNFOLLED_LOOPS ) */ - - size -= LIBHMAC_SHA512_BLOCK_SIZE; - } - /* Prevent sensitive data from leaking - */ - if( memory_set( - hash_values, - 0, - sizeof( uint64_t ) * 8 ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_SET_FAILED, - "%s: unable to clear hash values.", - function ); - - goto on_error; - } - if( memory_set( - values_64bit, - 0, - sizeof( uint64_t ) * 80 ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_SET_FAILED, - "%s: unable to clear 64-bit values.", - function ); - - goto on_error; - } - return( (ssize_t) buffer_offset ); - -on_error: - memory_set( - values_64bit, - 0, - sizeof( uint64_t ) * 80 ); - - memory_set( - hash_values, - 0, - sizeof( uint64_t ) * 8 ); - - return( -1 ); -} - -#endif /* !defined( LIBHMAC_HAVE_SHA512_SUPPORT ) */ - -/* Creates a SHA-512 context +/* Creates a SHA512 context * Make sure the value context is referencing, is set to NULL * Returns 1 if successful or -1 on error */ @@ -494,102 +36,11 @@ libhmac_sha512_context_t **context, libcerror_error_t **error ) { - libhmac_internal_sha512_context_t *internal_context = NULL; - static char *function = "libhmac_sha512_initialize"; - - if( context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid context.", - function ); - - return( -1 ); - } - if( *context != NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, - "%s: invalid context value already set.", - function ); - - return( -1 ); - } - internal_context = memory_allocate_structure( - libhmac_internal_sha512_context_t ); - - if( internal_context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_INSUFFICIENT, - "%s: unable to create context.", - function ); - - goto on_error; - } - if( memory_set( - internal_context, - 0, - sizeof( libhmac_internal_sha512_context_t ) ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_SET_FAILED, - "%s: unable to clear context.", - function ); - - memory_free( - internal_context ); - - return( -1 ); - } -#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA512_DIGEST_LENGTH ) - if( SHA512_Init( - &( internal_context->sha512_context ) ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, - "%s: unable to initialize context.", - function ); - - goto on_error; - } - -#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA512 ) -#if defined( HAVE_EVP_MD_CTX_INIT ) - EVP_MD_CTX_init( - &( internal_context->internal_evp_md_context ) ); - - internal_context->evp_md_context = &( internal_context->internal_evp_md_context ); -#else - internal_context->evp_md_context = EVP_MD_CTX_new(); - - if( internal_context->evp_md_context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, - "%s: unable to create EVP message digest context.", - function ); + static char *function = "libhmac_sha512_initialize"; - goto on_error; - } -#endif /* defined( HAVE_EVP_MD_CTX_INIT ) */ - - if( EVP_DigestInit_ex( - internal_context->evp_md_context, - EVP_sha512(), - NULL ) != 1 ) + if( libhmac_sha512_context_initialize( + context, + error ) != 1 ) { libcerror_error_set( error, @@ -598,183 +49,29 @@ "%s: unable to initialize context.", function ); -#if defined( HAVE_EVP_MD_CTX_CLEANUP ) - EVP_MD_CTX_cleanup( - &( internal_context->internal_evp_md_context ) ); - ERR_remove_thread_state( - NULL ); -#else - EVP_MD_CTX_free( - internal_context->evp_md_context ); -#endif - internal_context->evp_md_context = NULL; - - goto on_error; - } -#else - if( memory_copy( - internal_context->hash_values, - libhmac_sha512_prime_square_roots, - sizeof( uint64_t ) * 8 ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_COPY_FAILED, - "%s: unable to copy initial hash values.", - function ); - return( -1 ); } -#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA512_DIGEST_LENGTH ) */ - - *context = (libhmac_sha512_context_t *) internal_context; - return( 1 ); - -on_error: - if( internal_context != NULL ) - { - memory_free( - internal_context ); - } - return( -1 ); } -/* Frees a SHA-512 context +/* Frees a SHA512 context * Returns 1 if successful or -1 on error */ int libhmac_sha512_free( libhmac_sha512_context_t **context, libcerror_error_t **error ) { - libhmac_internal_sha512_context_t *internal_context = NULL; - static char *function = "libhmac_sha512_free"; - - if( context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid context.", - function ); + static char *function = "libhmac_sha512_free"; - return( -1 ); - } - if( *context != NULL ) - { - internal_context = (libhmac_internal_sha512_context_t *) *context; - *context = NULL; - -#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA512_DIGEST_LENGTH ) - /* No additional clean up necessary - */ - -#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA512 ) -#if defined( HAVE_EVP_MD_CTX_CLEANUP ) - if( EVP_MD_CTX_cleanup( - &( internal_context->internal_evp_md_context ) ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, - "%s: unable to clean up EVP message digest context.", - function ); - } - /* Make sure the error state is removed otherwise OpenSSL will leak memory - */ - ERR_remove_thread_state( - NULL ); -#else - EVP_MD_CTX_free( - internal_context->evp_md_context ); - -#endif /* defined( HAVE_EVP_MD_CTX_CLEANUP ) */ - - internal_context->evp_md_context = NULL; -#else - /* No additional clean up necessary - */ -#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA512_DIGEST_LENGTH ) */ - - memory_free( - internal_context ); - } - return( 1 ); -} - -#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA512_DIGEST_LENGTH ) - -/* Updates the SHA-512 context using OpenSSL - * Returns 1 if successful or -1 on error - */ -int libhmac_sha512_update( - libhmac_sha512_context_t *context, - const uint8_t *buffer, - size_t size, - libcerror_error_t **error ) -{ - libhmac_internal_sha512_context_t *internal_context = NULL; - static char *function = "libhmac_sha512_update"; - unsigned long safe_hash_size = 0; - - if( context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid context.", - function ); - - return( -1 ); - } - internal_context = (libhmac_internal_sha512_context_t *) context; - - if( buffer == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid buffer.", - function ); - - return( -1 ); - } -#if ( SIZEOF_LONG < SIZEOF_SIZE_T ) - if( size > (size_t) ULONG_MAX ) -#else - if( size > (size_t) SSIZE_MAX ) -#endif - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, - "%s: invalid size value exceeds maximum.", - function ); - - return( -1 ); - } - if( size == 0 ) - { - return( 1 ); - } - safe_hash_size = (unsigned long) size; - - if( SHA512_Update( - &( internal_context->sha512_context ), - (const void *) buffer, - size ) != 1 ) + if( libhmac_sha512_context_free( + context, + error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to update context.", + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to free context.", function ); return( -1 ); @@ -782,9 +79,7 @@ return( 1 ); } -#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA512 ) - -/* Updates the SHA-512 context using OpenSSL EVP +/* Updates the SHA512 context * Returns 1 if successful or -1 on error */ int libhmac_sha512_update( @@ -793,52 +88,13 @@ size_t size, libcerror_error_t **error ) { - libhmac_internal_sha512_context_t *internal_context = NULL; - static char *function = "libhmac_sha512_update"; - - if( context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid context.", - function ); - - return( -1 ); - } - internal_context = (libhmac_internal_sha512_context_t *) context; + static char *function = "libhmac_sha512_update"; - if( buffer == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid buffer.", - function ); - - return( -1 ); - } - if( size > (size_t) SSIZE_MAX ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, - "%s: invalid size value exceeds maximum.", - function ); - - return( -1 ); - } - if( size == 0 ) - { - return( 1 ); - } - if( EVP_DigestUpdate( - internal_context->evp_md_context, - (const void *) buffer, - size ) != 1 ) + if( libhmac_sha512_context_update( + context, + buffer, + size, + error ) != 1 ) { libcerror_error_set( error, @@ -852,174 +108,7 @@ return( 1 ); } -#else - -/* Updates the SHA-512 context using fallback implementation - * Returns 1 if successful or -1 on error - */ -int libhmac_sha512_update( - libhmac_sha512_context_t *context, - const uint8_t *buffer, - size_t size, - libcerror_error_t **error ) -{ - libhmac_internal_sha512_context_t *internal_context = NULL; - static char *function = "libhmac_sha512_update"; - size_t buffer_offset = 0; - size_t remaining_block_size = 0; - ssize_t process_count = 0; - - if( context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid context.", - function ); - - return( -1 ); - } - internal_context = (libhmac_internal_sha512_context_t *) context; - - if( buffer == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid buffer.", - function ); - - return( -1 ); - } - if( size > (size_t) SSIZE_MAX ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, - "%s: invalid size value exceeds maximum.", - function ); - - return( -1 ); - } - if( size == 0 ) - { - return( 1 ); - } - if( internal_context->block_offset > 0 ) - { - remaining_block_size = LIBHMAC_SHA512_BLOCK_SIZE - internal_context->block_offset; - - if( remaining_block_size > size ) - { - remaining_block_size = size; - } - if( memory_copy( - &( internal_context->block[ internal_context->block_offset ] ), - buffer, - remaining_block_size ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_COPY_FAILED, - "%s: unable to copy data to context block.", - function ); - - return( -1 ); - } - internal_context->block_offset += remaining_block_size; - - if( internal_context->block_offset < LIBHMAC_SHA512_BLOCK_SIZE ) - { - return( 1 ); - } - buffer_offset += remaining_block_size; - size -= remaining_block_size; - - process_count = libhmac_sha512_transform( - internal_context, - internal_context->block, - LIBHMAC_SHA512_BLOCK_SIZE, - error ); - - if( process_count == -1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to transform context block.", - function ); - - return( -1 ); - } - internal_context->hash_count += process_count; - internal_context->block_offset = 0; - } - if( size > 0 ) - { - process_count = libhmac_sha512_transform( - internal_context, - &( buffer[ buffer_offset ] ), - size, - error ); - - if( process_count == -1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to transform buffer.", - function ); - - return( -1 ); - } - internal_context->hash_count += process_count; - - buffer_offset += process_count; - size -= process_count; - } - if( size > 0 ) - { - if( size >= LIBHMAC_SHA512_BLOCK_SIZE ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, - "%s: invalid size value out of bounds.", - function ); - - return( -1 ); - } - if( memory_copy( - internal_context->block, - &( buffer[ buffer_offset ] ), - size ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_COPY_FAILED, - "%s: unable to copy remaining data to context block.", - function ); - - return( -1 ); - } - internal_context->block_offset = size; - } - return( 1 ); -} - -#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA512_DIGEST_LENGTH ) */ - -#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA512_DIGEST_LENGTH ) - -/* Finalizes the SHA-512 context using OpenSSL +/* Finalizes the SHA512 context * Returns 1 if successful or -1 on error */ int libhmac_sha512_finalize( @@ -1028,138 +117,13 @@ size_t hash_size, libcerror_error_t **error ) { - libhmac_internal_sha512_context_t *internal_context = NULL; - static char *function = "libhmac_sha512_finalize"; - - if( context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid context.", - function ); - - return( -1 ); - } - internal_context = (libhmac_internal_sha512_context_t *) context; - - if( hash == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid hash.", - function ); - - return( -1 ); - } - if( hash_size > (size_t) SSIZE_MAX ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, - "%s: invalid hash size value exceeds maximum.", - function ); - - return( -1 ); - } - if( hash_size < (size_t) LIBHMAC_SHA512_HASH_SIZE ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, - "%s: invalid hash size value too small.", - function ); + static char *function = "libhmac_sha512_finalize"; - return( -1 ); - } - if( SHA512_Final( + if( libhmac_sha512_context_finalize( + context, hash, - &( internal_context->sha512_context ) ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, - "%s: unable to finalize context.", - function ); - - return( -1 ); - } - return( 1 ); -} - -#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA512 ) - -/* Finalizes the SHA-512 context using OpenSSL EVP - * Returns 1 if successful or -1 on error - */ -int libhmac_sha512_finalize( - libhmac_sha512_context_t *context, - uint8_t *hash, - size_t hash_size, - libcerror_error_t **error ) -{ - libhmac_internal_sha512_context_t *internal_context = NULL; - static char *function = "libhmac_sha512_finalize"; - unsigned int safe_hash_size = 0; - - if( context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid context.", - function ); - - return( -1 ); - } - internal_context = (libhmac_internal_sha512_context_t *) context; - - if( hash == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid hash.", - function ); - - return( -1 ); - } - if( hash_size > (size_t) UINT_MAX ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, - "%s: invalid hash size value exceeds maximum.", - function ); - - return( -1 ); - } - if( hash_size < (size_t) LIBHMAC_SHA512_HASH_SIZE ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, - "%s: invalid hash size value too small.", - function ); - - return( -1 ); - } - safe_hash_size = (unsigned int) hash_size; - - if( EVP_DigestFinal_ex( - internal_context->evp_md_context, - (unsigned char *) hash, - &safe_hash_size ) != 1 ) + hash_size, + error ) != 1 ) { libcerror_error_set( error, @@ -1173,204 +137,6 @@ return( 1 ); } -#else - -/* Finalizes the SHA-512 context using fallback implementation - * Returns 1 if successful or -1 on error - */ -int libhmac_sha512_finalize( - libhmac_sha512_context_t *context, - uint8_t *hash, - size_t hash_size, - libcerror_error_t **error ) -{ - libhmac_internal_sha512_context_t *internal_context = NULL; - static char *function = "libhmac_sha512_finalize"; - size_t block_size = 0; - size_t number_of_blocks = 0; - ssize_t process_count = 0; - uint64_t bit_size = 0; - -#if !defined( LIBHMAC_UNFOLLED_LOOPS ) - size_t hash_index = 0; - int hash_values_index = 0; -#endif - - if( context == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid context.", - function ); - - return( -1 ); - } - internal_context = (libhmac_internal_sha512_context_t *) context; - - if( hash == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid hash.", - function ); - - return( -1 ); - } - if( hash_size < (size_t) LIBHMAC_SHA512_HASH_SIZE ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, - "%s: invalid hash value too small.", - function ); - - return( -1 ); - } - if( hash_size > (size_t) SSIZE_MAX ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, - "%s: invalid hash size value exceeds maximum.", - function ); - - return( -1 ); - } - if( hash_size < (size_t) LIBHMAC_SHA512_HASH_SIZE ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, - "%s: invalid hash size value too small.", - function ); - - return( -1 ); - } - /* Add padding with a size of 120 mod 128 - */ - number_of_blocks = 1; - - if( internal_context->block_offset > 119 ) - { - number_of_blocks += 1; - } - block_size = number_of_blocks * LIBHMAC_SHA512_BLOCK_SIZE; - - if( memory_set( - &( internal_context->block[ internal_context->block_offset ] ), - 0, - block_size - internal_context->block_offset ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_SET_FAILED, - "%s: unable to clear context block.", - function ); - - return( -1 ); - } - /* The first byte of the padding contains 0x80 - */ - internal_context->block[ internal_context->block_offset ] = 0x80; - - bit_size = ( internal_context->hash_count + internal_context->block_offset ) * 8; - - byte_stream_copy_from_uint64_big_endian( - &( internal_context->block[ block_size - 8 ] ), - bit_size ); - - process_count = libhmac_sha512_transform( - internal_context, - internal_context->block, - block_size, - error ); - - if( process_count == -1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_SET_FAILED, - "%s: unable to transform context block.", - function ); - - return( -1 ); - } -#if !defined( LIBHMAC_UNFOLLED_LOOPS ) - for( hash_values_index = 0; - hash_values_index < 8; - hash_values_index++ ) - { - byte_stream_copy_from_uint64_big_endian( - &( hash[ hash_index ] ), - internal_context->hash_values[ hash_values_index ] ); - - hash_index += sizeof( uint64_t ); - } -#else - byte_stream_copy_from_uint64_big_endian( - &( hash[ 0 ] ), - internal_context->hash_values[ 0 ] ); - - byte_stream_copy_from_uint64_big_endian( - &( hash[ 8 ] ), - internal_context->hash_values[ 1 ] ); - - byte_stream_copy_from_uint64_big_endian( - &( hash[ 16 ] ), - internal_context->hash_values[ 2 ] ); - - byte_stream_copy_from_uint64_big_endian( - &( hash[ 24 ] ), - internal_context->hash_values[ 3 ] ); - - byte_stream_copy_from_uint64_big_endian( - &( hash[ 32 ] ), - internal_context->hash_values[ 4 ] ); - - byte_stream_copy_from_uint64_big_endian( - &( hash[ 40 ] ), - internal_context->hash_values[ 5 ] ); - - byte_stream_copy_from_uint64_big_endian( - &( hash[ 48 ] ), - internal_context->hash_values[ 6 ] ); - - byte_stream_copy_from_uint64_big_endian( - &( hash[ 56 ] ), - internal_context->hash_values[ 7 ] ); - -#endif /* !defined( LIBHMAC_UNFOLLED_LOOPS ) */ - - /* Prevent sensitive data from leaking - */ - if( memory_set( - internal_context, - 0, - sizeof( libhmac_internal_sha512_context_t ) ) == NULL ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_MEMORY, - LIBCERROR_MEMORY_ERROR_SET_FAILED, - "%s: unable to clear context.", - function ); - - return( -1 ); - } - return( 1 ); -} - -#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA512_DIGEST_LENGTH ) */ - /* Calculates the SHA-512 of the buffer * Returns 1 if successful or -1 on error */ @@ -1384,7 +150,7 @@ libhmac_sha512_context_t *context = NULL; static char *function = "libhmac_sha512_calculate"; - if( libhmac_sha512_initialize( + if( libhmac_sha512_context_initialize( &context, error ) != 1 ) { @@ -1397,7 +163,7 @@ goto on_error; } - if( libhmac_sha512_update( + if( libhmac_sha512_context_update( context, buffer, size, @@ -1412,7 +178,7 @@ goto on_error; } - if( libhmac_sha512_finalize( + if( libhmac_sha512_context_finalize( context, hash, hash_size, @@ -1427,7 +193,7 @@ goto on_error; } - if( libhmac_sha512_free( + if( libhmac_sha512_context_free( &context, error ) != 1 ) { @@ -1445,7 +211,7 @@ on_error: if( context != NULL ) { - libhmac_sha512_free( + libhmac_sha512_context_free( &context, NULL ); } @@ -1555,7 +321,7 @@ } else { - if( libhmac_sha512_initialize( + if( libhmac_sha512_context_initialize( &context, error ) != 1 ) { @@ -1568,7 +334,7 @@ goto on_error; } - if( libhmac_sha512_update( + if( libhmac_sha512_context_update( context, key, key_size, @@ -1583,7 +349,7 @@ goto on_error; } - if( libhmac_sha512_finalize( + if( libhmac_sha512_context_finalize( context, key_hash, LIBHMAC_SHA512_HASH_SIZE, @@ -1598,7 +364,7 @@ goto on_error; } - if( libhmac_sha512_free( + if( libhmac_sha512_context_free( &context, error ) != 1 ) { @@ -1706,7 +472,7 @@ inner_padding[ block_index ] ^= key_data[ block_index ]; outer_padding[ block_index ] ^= key_data[ block_index ]; } - if( libhmac_sha512_initialize( + if( libhmac_sha512_context_initialize( &context, error ) != 1 ) { @@ -1719,7 +485,7 @@ goto on_error; } - if( libhmac_sha512_update( + if( libhmac_sha512_context_update( context, inner_padding, block_size, @@ -1734,7 +500,7 @@ goto on_error; } - if( libhmac_sha512_update( + if( libhmac_sha512_context_update( context, buffer, size, @@ -1749,7 +515,7 @@ goto on_error; } - if( libhmac_sha512_finalize( + if( libhmac_sha512_context_finalize( context, hmac, hmac_size, @@ -1764,7 +530,7 @@ goto on_error; } - if( libhmac_sha512_free( + if( libhmac_sha512_context_free( &context, error ) != 1 ) { @@ -1777,7 +543,7 @@ goto on_error; } - if( libhmac_sha512_initialize( + if( libhmac_sha512_context_initialize( &context, error ) != 1 ) { @@ -1790,7 +556,7 @@ goto on_error; } - if( libhmac_sha512_update( + if( libhmac_sha512_context_update( context, outer_padding, block_size, @@ -1805,7 +571,7 @@ goto on_error; } - if( libhmac_sha512_update( + if( libhmac_sha512_context_update( context, hmac, LIBHMAC_SHA512_HASH_SIZE, @@ -1820,7 +586,7 @@ goto on_error; } - if( libhmac_sha512_finalize( + if( libhmac_sha512_context_finalize( context, hmac, hmac_size, @@ -1835,7 +601,7 @@ goto on_error; } - if( libhmac_sha512_free( + if( libhmac_sha512_context_free( &context, error ) != 1 ) { @@ -1910,7 +676,7 @@ on_error: if( context != NULL ) { - libhmac_sha512_free( + libhmac_sha512_context_free( &context, NULL ); } diff -Nru libfshfs-20201104/libhmac/libhmac_sha512.h libfshfs-20240221/libhmac/libhmac_sha512.h --- libfshfs-20201104/libhmac/libhmac_sha512.h 2020-11-04 11:56:11.000000000 +0000 +++ libfshfs-20240221/libhmac/libhmac_sha512.h 2024-02-21 06:04:12.000000000 +0000 @@ -1,7 +1,7 @@ /* * SHA-512 functions * - * Copyright (C) 2011-2020, Joachim Metz + * Copyright (C) 2011-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -25,14 +25,6 @@ #include #include -#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) -#include - -#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) -#include - -#endif - #include "libhmac_extern.h" #include "libhmac_libcerror.h" #include "libhmac_types.h" @@ -41,66 +33,6 @@ extern "C" { #endif -#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA512_DIGEST_LENGTH ) -#define LIBHMAC_HAVE_SHA512_SUPPORT - -#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA512 ) -#define LIBHMAC_HAVE_SHA512_SUPPORT - -#endif - -#if !defined( LIBHMAC_HAVE_SHA512_SUPPORT ) -#define LIBHMAC_SHA512_BLOCK_SIZE 128 -#endif - -typedef struct libhmac_internal_sha512_context libhmac_internal_sha512_context_t; - -struct libhmac_internal_sha512_context -{ -#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA512_DIGEST_LENGTH ) - /* The SHA-512 context - */ - SHA512_CTX sha512_context; - -#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA512 ) - /* The EVP message digest context - */ -#if defined( HAVE_EVP_MD_CTX_INIT ) - EVP_MD_CTX internal_evp_md_context; -#endif - - EVP_MD_CTX *evp_md_context; - -#else - /* The number of bytes hashed - */ - uint64_t hash_count; - - /* The 64-bit hash values - */ - uint64_t hash_values[ 8 ]; - - /* The block offset - */ - size_t block_offset; - - /* The (data) block - */ - uint8_t block[ 128 ]; - -#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA512_DIGEST_LENGTH ) */ -}; - -#if !defined( LIBHMAC_HAVE_SHA512_SUPPORT ) - -ssize_t libhmac_sha512_transform( - libhmac_internal_sha512_context_t *internal_context, - const uint8_t *buffer, - size_t size, - libcerror_error_t **error ); - -#endif /* !defined( LIBHMAC_HAVE_SHA512_SUPPORT ) */ - LIBHMAC_EXTERN \ int libhmac_sha512_initialize( libhmac_sha512_context_t **context, diff -Nru libfshfs-20201104/libhmac/libhmac_sha512_context.c libfshfs-20240221/libhmac/libhmac_sha512_context.c --- libfshfs-20201104/libhmac/libhmac_sha512_context.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libhmac/libhmac_sha512_context.c 2024-02-21 06:04:12.000000000 +0000 @@ -0,0 +1,1387 @@ +/* + * SHA-512 functions + * + * Copyright (C) 2011-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include +#include +#include + +#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) +#include + +#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) +#include +#include +#endif + +#include "libhmac_byte_stream.h" +#include "libhmac_definitions.h" +#include "libhmac_libcerror.h" +#include "libhmac_sha512_context.h" + +#if !defined( LIBHMAC_HAVE_SHA512_SUPPORT ) + +/* FIPS 180-2 based SHA-512 functions + */ + +/* The first 64-bits of the fractional parts of the square roots of the first 8 primes [ 2, 19 ] + */ +uint64_t libhmac_sha512_context_prime_square_roots[ 8 ] = { + 0x6a09e667f3bcc908, 0xbb67ae8584caa73b, 0x3c6ef372fe94f82b, 0xa54ff53a5f1d36f1, + 0x510e527fade682d1, 0x9b05688c2b3e6c1f, 0x1f83d9abfb41bd6b, 0x5be0cd19137e2179 +}; + +/* The first 64-bits of the fractional parts of the cube roots of the first 80 primes [ 2, 409 ] + */ +uint64_t libhmac_sha512_context_prime_cube_roots[ 80 ] = { + 0x428a2f98d728ae22, 0x7137449123ef65cd, 0xb5c0fbcfec4d3b2f, 0xe9b5dba58189dbbc, + 0x3956c25bf348b538, 0x59f111f1b605d019, 0x923f82a4af194f9b, 0xab1c5ed5da6d8118, + 0xd807aa98a3030242, 0x12835b0145706fbe, 0x243185be4ee4b28c, 0x550c7dc3d5ffb4e2, + 0x72be5d74f27b896f, 0x80deb1fe3b1696b1, 0x9bdc06a725c71235, 0xc19bf174cf692694, + 0xe49b69c19ef14ad2, 0xefbe4786384f25e3, 0x0fc19dc68b8cd5b5, 0x240ca1cc77ac9c65, + 0x2de92c6f592b0275, 0x4a7484aa6ea6e483, 0x5cb0a9dcbd41fbd4, 0x76f988da831153b5, + 0x983e5152ee66dfab, 0xa831c66d2db43210, 0xb00327c898fb213f, 0xbf597fc7beef0ee4, + 0xc6e00bf33da88fc2, 0xd5a79147930aa725, 0x06ca6351e003826f, 0x142929670a0e6e70, + 0x27b70a8546d22ffc, 0x2e1b21385c26c926, 0x4d2c6dfc5ac42aed, 0x53380d139d95b3df, + 0x650a73548baf63de, 0x766a0abb3c77b2a8, 0x81c2c92e47edaee6, 0x92722c851482353b, + 0xa2bfe8a14cf10364, 0xa81a664bbc423001, 0xc24b8b70d0f89791, 0xc76c51a30654be30, + 0xd192e819d6ef5218, 0xd69906245565a910, 0xf40e35855771202a, 0x106aa07032bbd1b8, + 0x19a4c116b8d2d0c8, 0x1e376c085141ab53, 0x2748774cdf8eeb99, 0x34b0bcb5e19b48a8, + 0x391c0cb3c5c95a63, 0x4ed8aa4ae3418acb, 0x5b9cca4f7763e373, 0x682e6ff3d6b2b8a3, + 0x748f82ee5defb2fc, 0x78a5636f43172f60, 0x84c87814a1f0ab72, 0x8cc702081a6439ec, + 0x90befffa23631e28, 0xa4506cebde82bde9, 0xbef9a3f7b2c67915, 0xc67178f2e372532b, + 0xca273eceea26619c, 0xd186b8c721c0c207, 0xeada7dd6cde0eb1e, 0xf57d4f7fee6ed178, + 0x06f067aa72176fba, 0x0a637dc5a2c898a6, 0x113f9804bef90dae, 0x1b710b35131c471b, + 0x28db77f523047d84, 0x32caab7b40c72493, 0x3c9ebe0a15c9bebc, 0x431d67c49c100d4c, + 0x4cc5d4becb3e42b6, 0x597f299cfc657e2a, 0x5fcb6fab3ad6faec, 0x6c44198c4a475817 +}; + +#define libhmac_sha512_context_transform_extend_64bit_value( values_64bit, value_64bit_index, s0, s1 ) \ + s0 = byte_stream_bit_rotate_right_64bit( values_64bit[ value_64bit_index - 15 ], 1 ) \ + ^ byte_stream_bit_rotate_right_64bit( values_64bit[ value_64bit_index - 15 ], 8 ) \ + ^ ( values_64bit[ value_64bit_index - 15 ] >> 7 ); \ + s1 = byte_stream_bit_rotate_right_64bit( values_64bit[ value_64bit_index - 2 ], 19 ) \ + ^ byte_stream_bit_rotate_right_64bit( values_64bit[ value_64bit_index - 2 ], 61 ) \ + ^ ( values_64bit[ value_64bit_index - 2 ] >> 6 ); \ +\ + values_64bit[ value_64bit_index ] = values_64bit[ value_64bit_index - 16 ] \ + + s0 \ + + values_64bit[ value_64bit_index - 7 ] \ + + s1 + +#define libhmac_sha512_context_transform_unfolded_extend_64bit_values( values_64bit, s0, s1 ) \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 16, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 17, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 18, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 19, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 20, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 21, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 22, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 23, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 24, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 25, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 26, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 27, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 28, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 29, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 30, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 31, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 32, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 33, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 34, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 35, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 36, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 37, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 38, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 39, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 40, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 41, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 42, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 43, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 44, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 45, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 46, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 47, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 48, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 49, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 50, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 51, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 52, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 53, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 54, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 55, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 56, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 57, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 58, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 59, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 60, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 61, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 62, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 63, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 64, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 65, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 66, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 67, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 68, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 69, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 70, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 71, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 72, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 73, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 74, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 75, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 76, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 77, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 78, s0, s1 ); \ + libhmac_sha512_context_transform_extend_64bit_value( values_64bit, 79, s0, s1 ); + +#define libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, value_64bit_index, hash_values, hash_value_index0, hash_value_index1, hash_value_index2, hash_value_index3, hash_value_index4, hash_value_index5, hash_value_index6, hash_value_index7, s0, s1, t1, t2 ) \ + s0 = byte_stream_bit_rotate_right_64bit( hash_values[ hash_value_index0 ], 28 ) \ + ^ byte_stream_bit_rotate_right_64bit( hash_values[ hash_value_index0 ], 34 ) \ + ^ byte_stream_bit_rotate_right_64bit( hash_values[ hash_value_index0 ], 39 ); \ + s1 = byte_stream_bit_rotate_right_64bit( hash_values[ hash_value_index4 ], 14 ) \ + ^ byte_stream_bit_rotate_right_64bit( hash_values[ hash_value_index4 ], 18 ) \ + ^ byte_stream_bit_rotate_right_64bit( hash_values[ hash_value_index4 ], 41 ); \ +\ + t1 = hash_values[ hash_value_index7 ]; \ + t1 += s1; \ + t1 += ( hash_values[ hash_value_index4 ] & hash_values[ hash_value_index5 ] ) \ + ^ ( ~( hash_values[ hash_value_index4 ] ) & hash_values[ hash_value_index6 ] ); \ + t1 += libhmac_sha512_context_prime_cube_roots[ value_64bit_index ]; \ + t1 += values_64bit[ value_64bit_index ]; \ + t2 = s0; \ + t2 += ( hash_values[ hash_value_index0 ] & hash_values[ hash_value_index1 ] ) \ + ^ ( hash_values[ hash_value_index0 ] & hash_values[ hash_value_index2 ] ) \ + ^ ( hash_values[ hash_value_index1 ] & hash_values[ hash_value_index2 ] ); \ +\ + hash_values[ hash_value_index3 ] += t1; \ + hash_values[ hash_value_index7 ] = t1 + t2; + +#define libhmac_sha512_context_transform_unfolded_calculate_hash_values( values_64bit, hash_values, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 0, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 1, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 2, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 3, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 4, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 5, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 6, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 7, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 8, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 9, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 10, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 11, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 12, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 13, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 14, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 15, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 16, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 17, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 18, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 19, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 20, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 21, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 22, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 23, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 24, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 25, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 26, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 27, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 28, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 29, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 30, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 31, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 32, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 33, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 34, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 35, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 36, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 37, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 38, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 39, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 40, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 41, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 42, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 43, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 44, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 45, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 46, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 47, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 48, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 49, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 50, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 51, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 52, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 53, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 54, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 55, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 56, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 57, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 58, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 59, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 60, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 61, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 62, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 63, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 64, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 65, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 66, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 67, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 68, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 69, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 70, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 71, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 72, hash_values, 0, 1, 2, 3, 4, 5, 6, 7, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 73, hash_values, 7, 0, 1, 2, 3, 4, 5, 6, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 74, hash_values, 6, 7, 0, 1, 2, 3, 4, 5, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 75, hash_values, 5, 6, 7, 0, 1, 2, 3, 4, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 76, hash_values, 4, 5, 6, 7, 0, 1, 2, 3, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 77, hash_values, 3, 4, 5, 6, 7, 0, 1, 2, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 78, hash_values, 2, 3, 4, 5, 6, 7, 0, 1, s0, s1, t1, t2 ) \ + libhmac_sha512_context_transform_unfolded_calculate_hash_value( values_64bit, 79, hash_values, 1, 2, 3, 4, 5, 6, 7, 0, s0, s1, t1, t2 ) + +/* Calculates the SHA-512 of 128 byte sized blocks of data in a buffer + * Returns the number of bytes used if successful or -1 on error + */ +ssize_t libhmac_sha512_context_transform( + libhmac_internal_sha512_context_t *internal_context, + const uint8_t *buffer, + size_t size, + libcerror_error_t **error ) +{ + uint64_t hash_values[ 8 ]; + uint64_t values_64bit[ 80 ]; + + static char *function = "libhmac_sha512_context_transform"; + uint64_t s0 = 0; + uint64_t s1 = 0; + uint64_t t1 = 0; + uint64_t t2 = 0; + size_t buffer_offset = 0; + +#if !defined( LIBHMAC_UNFOLLED_LOOPS ) + uint8_t hash_values_index = 0; + uint8_t value_64bit_index = 0; +#endif + + if( internal_context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid internal context.", + function ); + + return( -1 ); + } + if( buffer == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid buffer.", + function ); + + return( -1 ); + } + if( size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid size value exceeds maximum.", + function ); + + return( -1 ); + } + while( size >= LIBHMAC_SHA512_BLOCK_SIZE ) + { + if( memory_copy( + hash_values, + internal_context->hash_values, + sizeof( uint64_t ) * 8 ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_COPY_FAILED, + "%s: unable to copy hash values.", + function ); + + goto on_error; + } +#if defined( LIBHMAC_UNFOLLED_LOOPS ) + /* Break the block into 16 x 64-bit values + */ + libhmac_byte_stream_copy_to_16x_uint64_big_endian( + &( buffer[ buffer_offset ] ), + values_64bit ); + + buffer_offset += LIBHMAC_SHA512_BLOCK_SIZE; + + /* Extend to 80 x 64-bit values + */ + libhmac_sha512_context_transform_unfolded_extend_64bit_values( + values_64bit, + s0, + s1 ); + + /* Calculate the hash values for the 64-bit values + */ + libhmac_sha512_context_transform_unfolded_calculate_hash_values( + values_64bit, + hash_values, + s0, + s1, + t1, + t2 ); + + /* Update the hash values in the context + */ + internal_context->hash_values[ 0 ] += hash_values[ 0 ]; + internal_context->hash_values[ 1 ] += hash_values[ 1 ]; + internal_context->hash_values[ 2 ] += hash_values[ 2 ]; + internal_context->hash_values[ 3 ] += hash_values[ 3 ]; + internal_context->hash_values[ 4 ] += hash_values[ 4 ]; + internal_context->hash_values[ 5 ] += hash_values[ 5 ]; + internal_context->hash_values[ 6 ] += hash_values[ 6 ]; + internal_context->hash_values[ 7 ] += hash_values[ 7 ]; + +#else + /* Break the block into 16 x 64-bit values + */ + for( value_64bit_index = 0; + value_64bit_index < 16; + value_64bit_index++ ) + { + byte_stream_copy_to_uint64_big_endian( + &( buffer[ buffer_offset ] ), + values_64bit[ value_64bit_index ] ); + + buffer_offset += sizeof( uint64_t ); + } + /* Extend to 80 x 64-bit values + */ + for( value_64bit_index = 16; + value_64bit_index < 80; + value_64bit_index++ ) + { + libhmac_sha512_context_transform_extend_64bit_value( + values_64bit, + value_64bit_index, + s0, + s1 ); + } + /* Calculate the hash values for the 64-bit values + */ + for( value_64bit_index = 0; + value_64bit_index < 80; + value_64bit_index++ ) + { + s0 = byte_stream_bit_rotate_right_64bit( hash_values[ 0 ], 28 ) + ^ byte_stream_bit_rotate_right_64bit( hash_values[ 0 ], 34 ) + ^ byte_stream_bit_rotate_right_64bit( hash_values[ 0 ], 39 ); + s1 = byte_stream_bit_rotate_right_64bit( hash_values[ 4 ], 14 ) + ^ byte_stream_bit_rotate_right_64bit( hash_values[ 4 ], 18 ) + ^ byte_stream_bit_rotate_right_64bit( hash_values[ 4 ], 41 ); + + t1 = hash_values[ 7 ]; + t1 += s1; + t1 += ( hash_values[ 4 ] & hash_values[ 5 ] ) + ^ ( ~( hash_values[ 4 ] ) & hash_values[ 6 ] ); + t1 += libhmac_sha512_context_prime_cube_roots[ value_64bit_index ]; + t1 += values_64bit[ value_64bit_index ]; + t2 = s0; + t2 += ( hash_values[ 0 ] & hash_values[ 1 ] ) + ^ ( hash_values[ 0 ] & hash_values[ 2 ] ) + ^ ( hash_values[ 1 ] & hash_values[ 2 ] ); + + hash_values[ 7 ] = hash_values[ 6 ]; + hash_values[ 6 ] = hash_values[ 5 ]; + hash_values[ 5 ] = hash_values[ 4 ]; + hash_values[ 4 ] = hash_values[ 3 ] + t1; + hash_values[ 3 ] = hash_values[ 2 ]; + hash_values[ 2 ] = hash_values[ 1 ]; + hash_values[ 1 ] = hash_values[ 0 ]; + hash_values[ 0 ] = t1 + t2; + } + /* Update the hash values in the context + */ + for( hash_values_index = 0; + hash_values_index < 8; + hash_values_index++ ) + { + internal_context->hash_values[ hash_values_index ] += hash_values[ hash_values_index ]; + } +#endif /* defined( LIBHMAC_UNFOLLED_LOOPS ) */ + + size -= LIBHMAC_SHA512_BLOCK_SIZE; + } + /* Prevent sensitive data from leaking + */ + if( memory_set( + hash_values, + 0, + sizeof( uint64_t ) * 8 ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_SET_FAILED, + "%s: unable to clear hash values.", + function ); + + goto on_error; + } + if( memory_set( + values_64bit, + 0, + sizeof( uint64_t ) * 80 ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_SET_FAILED, + "%s: unable to clear 64-bit values.", + function ); + + goto on_error; + } + return( (ssize_t) buffer_offset ); + +on_error: + memory_set( + values_64bit, + 0, + sizeof( uint64_t ) * 80 ); + + memory_set( + hash_values, + 0, + sizeof( uint64_t ) * 8 ); + + return( -1 ); +} + +#endif /* !defined( LIBHMAC_HAVE_SHA512_SUPPORT ) */ + +/* Creates a SHA-512 context + * Make sure the value context is referencing, is set to NULL + * Returns 1 if successful or -1 on error + */ +int libhmac_sha512_context_initialize( + libhmac_sha512_context_t **context, + libcerror_error_t **error ) +{ + libhmac_internal_sha512_context_t *internal_context = NULL; + static char *function = "libhmac_sha512_context_initialize"; + +#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA512 ) + const EVP_MD *evp_md_type = NULL; +#endif + + if( context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid context.", + function ); + + return( -1 ); + } + if( *context != NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, + "%s: invalid context value already set.", + function ); + + return( -1 ); + } + internal_context = memory_allocate_structure( + libhmac_internal_sha512_context_t ); + + if( internal_context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_INSUFFICIENT, + "%s: unable to create context.", + function ); + + goto on_error; + } + if( memory_set( + internal_context, + 0, + sizeof( libhmac_internal_sha512_context_t ) ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_SET_FAILED, + "%s: unable to clear context.", + function ); + + memory_free( + internal_context ); + + return( -1 ); + } +#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA512_DIGEST_LENGTH ) + if( SHA512_Init( + &( internal_context->sha512_context ) ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to initialize context.", + function ); + + goto on_error; + } + +#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA512 ) +#if defined( HAVE_EVP_MD_CTX_INIT ) + EVP_MD_CTX_init( + &( internal_context->internal_evp_md_context ) ); + + internal_context->evp_md_context = &( internal_context->internal_evp_md_context ); +#else + internal_context->evp_md_context = EVP_MD_CTX_new(); + + if( internal_context->evp_md_context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to create EVP message digest context.", + function ); + + goto on_error; + } +#endif /* defined( HAVE_EVP_MD_CTX_INIT ) */ + +/* TODO use EVP_MD_fetch for EVP_DigestInit_ex2 */ + evp_md_type = EVP_sha512(); + +#if defined( HAVE_EVP_DIGESTINIT_EX2 ) + if( EVP_DigestInit_ex2( + internal_context->evp_md_context, + evp_md_type, + NULL ) != 1 ) +#else + if( EVP_DigestInit_ex( + internal_context->evp_md_context, + evp_md_type, + NULL ) != 1 ) +#endif + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, + "%s: unable to initialize context.", + function ); + +#if defined( HAVE_EVP_MD_CTX_CLEANUP ) + EVP_MD_CTX_cleanup( + &( internal_context->internal_evp_md_context ) ); + ERR_remove_thread_state( + NULL ); +#else + EVP_MD_CTX_free( + internal_context->evp_md_context ); +#endif + internal_context->evp_md_context = NULL; + + goto on_error; + } +#else + if( memory_copy( + internal_context->hash_values, + libhmac_sha512_context_prime_square_roots, + sizeof( uint64_t ) * 8 ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_COPY_FAILED, + "%s: unable to copy initial hash values.", + function ); + + return( -1 ); + } +#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA512_DIGEST_LENGTH ) */ + + *context = (libhmac_sha512_context_t *) internal_context; + + return( 1 ); + +on_error: + if( internal_context != NULL ) + { + memory_free( + internal_context ); + } + return( -1 ); +} + +/* Frees a SHA-512 context + * Returns 1 if successful or -1 on error + */ +int libhmac_sha512_context_free( + libhmac_sha512_context_t **context, + libcerror_error_t **error ) +{ + libhmac_internal_sha512_context_t *internal_context = NULL; + static char *function = "libhmac_sha512_context_free"; + + if( context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid context.", + function ); + + return( -1 ); + } + if( *context != NULL ) + { + internal_context = (libhmac_internal_sha512_context_t *) *context; + *context = NULL; + +#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA512_DIGEST_LENGTH ) + /* No additional clean up necessary + */ + +#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA512 ) +#if defined( HAVE_EVP_MD_CTX_CLEANUP ) + if( EVP_MD_CTX_cleanup( + &( internal_context->internal_evp_md_context ) ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to clean up EVP message digest context.", + function ); + } + /* Make sure the error state is removed otherwise OpenSSL will leak memory + */ + ERR_remove_thread_state( + NULL ); +#else + EVP_MD_CTX_free( + internal_context->evp_md_context ); + +#endif /* defined( HAVE_EVP_MD_CTX_CLEANUP ) */ + + internal_context->evp_md_context = NULL; +#else + /* No additional clean up necessary + */ +#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA512_DIGEST_LENGTH ) */ + + memory_free( + internal_context ); + } + return( 1 ); +} + +#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA512_DIGEST_LENGTH ) + +/* Updates the SHA-512 context using OpenSSL + * Returns 1 if successful or -1 on error + */ +int libhmac_sha512_context_update( + libhmac_sha512_context_t *context, + const uint8_t *buffer, + size_t size, + libcerror_error_t **error ) +{ + libhmac_internal_sha512_context_t *internal_context = NULL; + static char *function = "libhmac_sha512_context_update"; + unsigned long safe_hash_size = 0; + + if( context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid context.", + function ); + + return( -1 ); + } + internal_context = (libhmac_internal_sha512_context_t *) context; + + if( buffer == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid buffer.", + function ); + + return( -1 ); + } +#if ( SIZEOF_LONG < SIZEOF_SIZE_T ) + if( size > (size_t) ULONG_MAX ) +#else + if( size > (size_t) SSIZE_MAX ) +#endif + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid size value exceeds maximum.", + function ); + + return( -1 ); + } + if( size == 0 ) + { + return( 1 ); + } + safe_hash_size = (unsigned long) size; + + if( SHA512_Update( + &( internal_context->sha512_context ), + (const void *) buffer, + size ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to update context.", + function ); + + return( -1 ); + } + return( 1 ); +} + +#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA512 ) + +/* Updates the SHA-512 context using OpenSSL EVP + * Returns 1 if successful or -1 on error + */ +int libhmac_sha512_context_update( + libhmac_sha512_context_t *context, + const uint8_t *buffer, + size_t size, + libcerror_error_t **error ) +{ + libhmac_internal_sha512_context_t *internal_context = NULL; + static char *function = "libhmac_sha512_context_update"; + + if( context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid context.", + function ); + + return( -1 ); + } + internal_context = (libhmac_internal_sha512_context_t *) context; + + if( buffer == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid buffer.", + function ); + + return( -1 ); + } + if( size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid size value exceeds maximum.", + function ); + + return( -1 ); + } + if( size == 0 ) + { + return( 1 ); + } + if( EVP_DigestUpdate( + internal_context->evp_md_context, + (const void *) buffer, + size ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to update context.", + function ); + + return( -1 ); + } + return( 1 ); +} + +#else + +/* Updates the SHA-512 context using fallback implementation + * Returns 1 if successful or -1 on error + */ +int libhmac_sha512_context_update( + libhmac_sha512_context_t *context, + const uint8_t *buffer, + size_t size, + libcerror_error_t **error ) +{ + libhmac_internal_sha512_context_t *internal_context = NULL; + static char *function = "libhmac_sha512_context_update"; + size_t buffer_offset = 0; + size_t remaining_block_size = 0; + ssize_t process_count = 0; + + if( context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid context.", + function ); + + return( -1 ); + } + internal_context = (libhmac_internal_sha512_context_t *) context; + + if( buffer == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid buffer.", + function ); + + return( -1 ); + } + if( size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid size value exceeds maximum.", + function ); + + return( -1 ); + } + if( size == 0 ) + { + return( 1 ); + } + if( internal_context->block_offset > 0 ) + { + if( internal_context->block_offset >= LIBHMAC_SHA512_BLOCK_SIZE ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid context - block offset value out of bounds.", + function ); + + return( -1 ); + } + remaining_block_size = LIBHMAC_SHA512_BLOCK_SIZE - internal_context->block_offset; + + if( remaining_block_size > size ) + { + remaining_block_size = size; + } + if( memory_copy( + &( internal_context->block[ internal_context->block_offset ] ), + buffer, + remaining_block_size ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_COPY_FAILED, + "%s: unable to copy data to context block.", + function ); + + return( -1 ); + } + internal_context->block_offset += remaining_block_size; + + if( internal_context->block_offset < LIBHMAC_SHA512_BLOCK_SIZE ) + { + return( 1 ); + } + buffer_offset += remaining_block_size; + size -= remaining_block_size; + + process_count = libhmac_sha512_context_transform( + internal_context, + internal_context->block, + LIBHMAC_SHA512_BLOCK_SIZE, + error ); + + if( process_count == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to transform context block.", + function ); + + return( -1 ); + } + internal_context->hash_count += process_count; + internal_context->block_offset = 0; + } + if( size > 0 ) + { + process_count = libhmac_sha512_context_transform( + internal_context, + &( buffer[ buffer_offset ] ), + size, + error ); + + if( process_count == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to transform buffer.", + function ); + + return( -1 ); + } + internal_context->hash_count += process_count; + + buffer_offset += process_count; + size -= process_count; + } + if( size > 0 ) + { + if( size >= LIBHMAC_SHA512_BLOCK_SIZE ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid size value out of bounds.", + function ); + + return( -1 ); + } + if( memory_copy( + internal_context->block, + &( buffer[ buffer_offset ] ), + size ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_COPY_FAILED, + "%s: unable to copy remaining data to context block.", + function ); + + return( -1 ); + } + internal_context->block_offset = size; + } + return( 1 ); +} + +#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA512_DIGEST_LENGTH ) */ + +#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA512_DIGEST_LENGTH ) + +/* Finalizes the SHA-512 context using OpenSSL + * Returns 1 if successful or -1 on error + */ +int libhmac_sha512_context_finalize( + libhmac_sha512_context_t *context, + uint8_t *hash, + size_t hash_size, + libcerror_error_t **error ) +{ + libhmac_internal_sha512_context_t *internal_context = NULL; + static char *function = "libhmac_sha512_context_finalize"; + + if( context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid context.", + function ); + + return( -1 ); + } + internal_context = (libhmac_internal_sha512_context_t *) context; + + if( hash == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid hash.", + function ); + + return( -1 ); + } + if( hash_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid hash size value exceeds maximum.", + function ); + + return( -1 ); + } + if( hash_size < (size_t) LIBHMAC_SHA512_HASH_SIZE ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: invalid hash size value too small.", + function ); + + return( -1 ); + } + if( SHA512_Final( + hash, + &( internal_context->sha512_context ) ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to finalize context.", + function ); + + return( -1 ); + } + return( 1 ); +} + +#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA512 ) + +/* Finalizes the SHA-512 context using OpenSSL EVP + * Returns 1 if successful or -1 on error + */ +int libhmac_sha512_context_finalize( + libhmac_sha512_context_t *context, + uint8_t *hash, + size_t hash_size, + libcerror_error_t **error ) +{ + libhmac_internal_sha512_context_t *internal_context = NULL; + static char *function = "libhmac_sha512_context_finalize"; + unsigned int safe_hash_size = 0; + + if( context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid context.", + function ); + + return( -1 ); + } + internal_context = (libhmac_internal_sha512_context_t *) context; + + if( hash == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid hash.", + function ); + + return( -1 ); + } + if( ( hash_size < (size_t) LIBHMAC_SHA512_HASH_SIZE ) + || ( hash_size > (size_t) UINT_MAX ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: invalid hash size value out of bounds.", + function ); + + return( -1 ); + } + safe_hash_size = (unsigned int) hash_size; + + if( EVP_DigestFinal_ex( + internal_context->evp_md_context, + (unsigned char *) hash, + &safe_hash_size ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, + "%s: unable to finalize context.", + function ); + + return( -1 ); + } + return( 1 ); +} + +#else + +/* Finalizes the SHA-512 context using fallback implementation + * Returns 1 if successful or -1 on error + */ +int libhmac_sha512_context_finalize( + libhmac_sha512_context_t *context, + uint8_t *hash, + size_t hash_size, + libcerror_error_t **error ) +{ + libhmac_internal_sha512_context_t *internal_context = NULL; + static char *function = "libhmac_sha512_context_finalize"; + size_t block_size = 0; + size_t number_of_blocks = 0; + ssize_t process_count = 0; + uint64_t bit_size = 0; + +#if !defined( LIBHMAC_UNFOLLED_LOOPS ) + size_t hash_index = 0; + int hash_values_index = 0; +#endif + + if( context == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid context.", + function ); + + return( -1 ); + } + internal_context = (libhmac_internal_sha512_context_t *) context; + + if( hash == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid hash.", + function ); + + return( -1 ); + } + if( hash_size < (size_t) LIBHMAC_SHA512_HASH_SIZE ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: invalid hash value too small.", + function ); + + return( -1 ); + } + if( hash_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid hash size value exceeds maximum.", + function ); + + return( -1 ); + } + if( hash_size < (size_t) LIBHMAC_SHA512_HASH_SIZE ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: invalid hash size value too small.", + function ); + + return( -1 ); + } + /* Add padding with a size of 120 mod 128 + */ + number_of_blocks = 1; + + if( internal_context->block_offset > 119 ) + { + number_of_blocks += 1; + } + block_size = number_of_blocks * LIBHMAC_SHA512_BLOCK_SIZE; + + if( memory_set( + &( internal_context->block[ internal_context->block_offset ] ), + 0, + block_size - internal_context->block_offset ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_SET_FAILED, + "%s: unable to clear context block.", + function ); + + return( -1 ); + } + /* The first byte of the padding contains 0x80 + */ + internal_context->block[ internal_context->block_offset ] = 0x80; + + bit_size = ( internal_context->hash_count + internal_context->block_offset ) * 8; + + byte_stream_copy_from_uint64_big_endian( + &( internal_context->block[ block_size - 8 ] ), + bit_size ); + + process_count = libhmac_sha512_context_transform( + internal_context, + internal_context->block, + block_size, + error ); + + if( process_count == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_SET_FAILED, + "%s: unable to transform context block.", + function ); + + return( -1 ); + } +#if !defined( LIBHMAC_UNFOLLED_LOOPS ) + for( hash_values_index = 0; + hash_values_index < 8; + hash_values_index++ ) + { + byte_stream_copy_from_uint64_big_endian( + &( hash[ hash_index ] ), + internal_context->hash_values[ hash_values_index ] ); + + hash_index += sizeof( uint64_t ); + } +#else + byte_stream_copy_from_uint64_big_endian( + &( hash[ 0 ] ), + internal_context->hash_values[ 0 ] ); + + byte_stream_copy_from_uint64_big_endian( + &( hash[ 8 ] ), + internal_context->hash_values[ 1 ] ); + + byte_stream_copy_from_uint64_big_endian( + &( hash[ 16 ] ), + internal_context->hash_values[ 2 ] ); + + byte_stream_copy_from_uint64_big_endian( + &( hash[ 24 ] ), + internal_context->hash_values[ 3 ] ); + + byte_stream_copy_from_uint64_big_endian( + &( hash[ 32 ] ), + internal_context->hash_values[ 4 ] ); + + byte_stream_copy_from_uint64_big_endian( + &( hash[ 40 ] ), + internal_context->hash_values[ 5 ] ); + + byte_stream_copy_from_uint64_big_endian( + &( hash[ 48 ] ), + internal_context->hash_values[ 6 ] ); + + byte_stream_copy_from_uint64_big_endian( + &( hash[ 56 ] ), + internal_context->hash_values[ 7 ] ); + +#endif /* !defined( LIBHMAC_UNFOLLED_LOOPS ) */ + + /* Prevent sensitive data from leaking + */ + if( memory_set( + internal_context, + 0, + sizeof( libhmac_internal_sha512_context_t ) ) == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_MEMORY, + LIBCERROR_MEMORY_ERROR_SET_FAILED, + "%s: unable to clear context.", + function ); + + return( -1 ); + } + return( 1 ); +} + +#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA512_DIGEST_LENGTH ) */ + diff -Nru libfshfs-20201104/libhmac/libhmac_sha512_context.h libfshfs-20240221/libhmac/libhmac_sha512_context.h --- libfshfs-20201104/libhmac/libhmac_sha512_context.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libhmac/libhmac_sha512_context.h 2024-02-21 06:04:12.000000000 +0000 @@ -0,0 +1,130 @@ +/* + * SHA-512 context functions + * + * Copyright (C) 2011-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _LIBHMAC_SHA512_CONTEXT_H ) +#define _LIBHMAC_SHA512_CONTEXT_H + +#include +#include + +#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) +#include + +#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) +#include +#endif + +#include "libhmac_extern.h" +#include "libhmac_libcerror.h" +#include "libhmac_types.h" + +#if defined( __cplusplus ) +extern "C" { +#endif + +#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA512_DIGEST_LENGTH ) +#define LIBHMAC_HAVE_SHA512_SUPPORT + +#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA512 ) +#define LIBHMAC_HAVE_SHA512_SUPPORT + +#endif + +#define LIBHMAC_SHA512_BLOCK_SIZE 128 + +typedef struct libhmac_internal_sha512_context libhmac_internal_sha512_context_t; + +struct libhmac_internal_sha512_context +{ +#if defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA512_DIGEST_LENGTH ) + /* The SHA-512 context + */ + SHA512_CTX sha512_context; + +#elif defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_EVP_H ) && defined( HAVE_EVP_SHA512 ) + /* The EVP message digest context + */ +#if defined( HAVE_EVP_MD_CTX_INIT ) + EVP_MD_CTX internal_evp_md_context; +#endif + + EVP_MD_CTX *evp_md_context; + +#else + /* The number of bytes hashed + */ + uint64_t hash_count; + + /* The 64-bit hash values + */ + uint64_t hash_values[ 8 ]; + + /* The block offset + */ + size_t block_offset; + + /* The (data) block + */ + uint8_t block[ 2 * LIBHMAC_SHA512_BLOCK_SIZE ]; + +#endif /* defined( HAVE_LIBCRYPTO ) && defined( HAVE_OPENSSL_SHA_H ) && defined( SHA512_DIGEST_LENGTH ) */ +}; + +#if !defined( LIBHMAC_HAVE_SHA512_SUPPORT ) + +ssize_t libhmac_sha512_context_transform( + libhmac_internal_sha512_context_t *internal_context, + const uint8_t *buffer, + size_t size, + libcerror_error_t **error ); + +#endif /* !defined( LIBHMAC_HAVE_SHA512_SUPPORT ) */ + +LIBHMAC_EXTERN \ +int libhmac_sha512_context_initialize( + libhmac_sha512_context_t **context, + libcerror_error_t **error ); + +LIBHMAC_EXTERN \ +int libhmac_sha512_context_free( + libhmac_sha512_context_t **context, + libcerror_error_t **error ); + +LIBHMAC_EXTERN \ +int libhmac_sha512_context_update( + libhmac_sha512_context_t *context, + const uint8_t *buffer, + size_t size, + libcerror_error_t **error ); + +LIBHMAC_EXTERN \ +int libhmac_sha512_context_finalize( + libhmac_sha512_context_t *context, + uint8_t *hash, + size_t hash_size, + libcerror_error_t **error ); + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _LIBHMAC_SHA512_CONTEXT_H ) */ + diff -Nru libfshfs-20201104/libhmac/libhmac_support.c libfshfs-20240221/libhmac/libhmac_support.c --- libfshfs-20201104/libhmac/libhmac_support.c 2020-11-04 11:56:11.000000000 +0000 +++ libfshfs-20240221/libhmac/libhmac_support.c 2024-02-21 06:04:12.000000000 +0000 @@ -1,7 +1,7 @@ /* * Support functions * - * Copyright (C) 2011-2020, Joachim Metz + * Copyright (C) 2011-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libhmac/libhmac_support.h libfshfs-20240221/libhmac/libhmac_support.h --- libfshfs-20201104/libhmac/libhmac_support.h 2020-11-04 11:56:11.000000000 +0000 +++ libfshfs-20240221/libhmac/libhmac_support.h 2024-02-21 06:04:12.000000000 +0000 @@ -1,7 +1,7 @@ /* * Support functions * - * Copyright (C) 2011-2020, Joachim Metz + * Copyright (C) 2011-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libhmac/libhmac_types.h libfshfs-20240221/libhmac/libhmac_types.h --- libfshfs-20201104/libhmac/libhmac_types.h 2020-11-04 11:56:11.000000000 +0000 +++ libfshfs-20240221/libhmac/libhmac_types.h 2024-02-21 06:04:12.000000000 +0000 @@ -1,7 +1,7 @@ /* * The internal type definitions * - * Copyright (C) 2011-2020, Joachim Metz + * Copyright (C) 2011-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libhmac/libhmac_unused.h libfshfs-20240221/libhmac/libhmac_unused.h --- libfshfs-20201104/libhmac/libhmac_unused.h 2020-11-04 11:56:11.000000000 +0000 +++ libfshfs-20240221/libhmac/libhmac_unused.h 2024-02-21 06:04:12.000000000 +0000 @@ -1,7 +1,7 @@ /* * Definitions to silence compiler warnings about unused function attributes/parameters. * - * Copyright (C) 2011-2020, Joachim Metz + * Copyright (C) 2011-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/Makefile.am libfshfs-20240221/libuna/Makefile.am --- libfshfs-20201104/libuna/Makefile.am 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/Makefile.am 2024-02-21 06:04:15.000000000 +0000 @@ -26,6 +26,24 @@ libuna_codepage_iso_8859_16.c libuna_codepage_iso_8859_16.h \ libuna_codepage_koi8_r.c libuna_codepage_koi8_r.h \ libuna_codepage_koi8_u.c libuna_codepage_koi8_u.h \ + libuna_codepage_mac_arabic.c libuna_codepage_mac_arabic.h \ + libuna_codepage_mac_celtic.c libuna_codepage_mac_celtic.h \ + libuna_codepage_mac_centraleurroman.c libuna_codepage_mac_centraleurroman.h \ + libuna_codepage_mac_croatian.c libuna_codepage_mac_croatian.h \ + libuna_codepage_mac_cyrillic.c libuna_codepage_mac_cyrillic.h \ + libuna_codepage_mac_dingbats.c libuna_codepage_mac_dingbats.h \ + libuna_codepage_mac_farsi.c libuna_codepage_mac_farsi.h \ + libuna_codepage_mac_gaelic.c libuna_codepage_mac_gaelic.h \ + libuna_codepage_mac_greek.c libuna_codepage_mac_greek.h \ + libuna_codepage_mac_icelandic.c libuna_codepage_mac_icelandic.h \ + libuna_codepage_mac_inuit.c libuna_codepage_mac_inuit.h \ + libuna_codepage_mac_roman.c libuna_codepage_mac_roman.h \ + libuna_codepage_mac_romanian.c libuna_codepage_mac_romanian.h \ + libuna_codepage_mac_russian.c libuna_codepage_mac_russian.h \ + libuna_codepage_mac_symbol.c libuna_codepage_mac_symbol.h \ + libuna_codepage_mac_thai.c libuna_codepage_mac_thai.h \ + libuna_codepage_mac_turkish.c libuna_codepage_mac_turkish.h \ + libuna_codepage_mac_ukrainian.c libuna_codepage_mac_ukrainian.h \ libuna_codepage_windows_874.c libuna_codepage_windows_874.h \ libuna_codepage_windows_932.c libuna_codepage_windows_932.h \ libuna_codepage_windows_936.c libuna_codepage_windows_936.h \ @@ -63,9 +81,11 @@ Makefile.in distclean: clean - /bin/rm -f Makefile + -rm -f Makefile -splint: +sources-local: $(BUILT_SOURCES) + +splint-local: @echo "Running splint on libuna ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libuna_la_SOURCES) diff -Nru libfshfs-20201104/libuna/Makefile.in libfshfs-20240221/libuna/Makefile.in --- libfshfs-20201104/libuna/Makefile.in 2020-11-04 11:56:31.000000000 +0000 +++ libfshfs-20240221/libuna/Makefile.in 2024-02-21 06:04:26.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -91,25 +91,26 @@ subdir = libuna ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcdata.m4 \ - $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \ - $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \ - $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcrypto.m4 \ - $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcthreads.m4 \ - $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ - $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ - $(top_srcdir)/m4/libhmac.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/libuna.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \ - $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \ - $(top_srcdir)/m4/zlib.m4 $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libbfio.m4 \ + $(top_srcdir)/m4/libcdata.m4 $(top_srcdir)/m4/libcerror.m4 \ + $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ + $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ + $(top_srcdir)/m4/libcrypto.m4 $(top_srcdir)/m4/libcsplit.m4 \ + $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \ + $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ + $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmos.m4 \ + $(top_srcdir)/m4/libfuse.m4 $(top_srcdir)/m4/libhmac.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/pthread.m4 \ + $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ + $(top_srcdir)/m4/types.m4 $(top_srcdir)/m4/zlib.m4 \ + $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) @@ -138,7 +139,27 @@ libuna_codepage_iso_8859_15.h libuna_codepage_iso_8859_16.c \ libuna_codepage_iso_8859_16.h libuna_codepage_koi8_r.c \ libuna_codepage_koi8_r.h libuna_codepage_koi8_u.c \ - libuna_codepage_koi8_u.h libuna_codepage_windows_874.c \ + libuna_codepage_koi8_u.h libuna_codepage_mac_arabic.c \ + libuna_codepage_mac_arabic.h libuna_codepage_mac_celtic.c \ + libuna_codepage_mac_celtic.h \ + libuna_codepage_mac_centraleurroman.c \ + libuna_codepage_mac_centraleurroman.h \ + libuna_codepage_mac_croatian.c libuna_codepage_mac_croatian.h \ + libuna_codepage_mac_cyrillic.c libuna_codepage_mac_cyrillic.h \ + libuna_codepage_mac_dingbats.c libuna_codepage_mac_dingbats.h \ + libuna_codepage_mac_farsi.c libuna_codepage_mac_farsi.h \ + libuna_codepage_mac_gaelic.c libuna_codepage_mac_gaelic.h \ + libuna_codepage_mac_greek.c libuna_codepage_mac_greek.h \ + libuna_codepage_mac_icelandic.c \ + libuna_codepage_mac_icelandic.h libuna_codepage_mac_inuit.c \ + libuna_codepage_mac_inuit.h libuna_codepage_mac_roman.c \ + libuna_codepage_mac_roman.h libuna_codepage_mac_romanian.c \ + libuna_codepage_mac_romanian.h libuna_codepage_mac_russian.c \ + libuna_codepage_mac_russian.h libuna_codepage_mac_symbol.c \ + libuna_codepage_mac_symbol.h libuna_codepage_mac_thai.c \ + libuna_codepage_mac_thai.h libuna_codepage_mac_turkish.c \ + libuna_codepage_mac_turkish.h libuna_codepage_mac_ukrainian.c \ + libuna_codepage_mac_ukrainian.h libuna_codepage_windows_874.c \ libuna_codepage_windows_874.h libuna_codepage_windows_932.c \ libuna_codepage_windows_932.h libuna_codepage_windows_936.c \ libuna_codepage_windows_936.h libuna_codepage_windows_949.c \ @@ -184,6 +205,24 @@ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_iso_8859_16.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_koi8_r.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_koi8_u.lo \ +@HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_arabic.lo \ +@HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_celtic.lo \ +@HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_centraleurroman.lo \ +@HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_croatian.lo \ +@HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_cyrillic.lo \ +@HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_dingbats.lo \ +@HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_farsi.lo \ +@HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_gaelic.lo \ +@HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_greek.lo \ +@HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_icelandic.lo \ +@HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_inuit.lo \ +@HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_roman.lo \ +@HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_romanian.lo \ +@HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_russian.lo \ +@HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_symbol.lo \ +@HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_thai.lo \ +@HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_turkish.lo \ +@HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_ukrainian.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_874.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_932.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_936.lo \ @@ -249,6 +288,24 @@ ./$(DEPDIR)/libuna_codepage_iso_8859_9.Plo \ ./$(DEPDIR)/libuna_codepage_koi8_r.Plo \ ./$(DEPDIR)/libuna_codepage_koi8_u.Plo \ + ./$(DEPDIR)/libuna_codepage_mac_arabic.Plo \ + ./$(DEPDIR)/libuna_codepage_mac_celtic.Plo \ + ./$(DEPDIR)/libuna_codepage_mac_centraleurroman.Plo \ + ./$(DEPDIR)/libuna_codepage_mac_croatian.Plo \ + ./$(DEPDIR)/libuna_codepage_mac_cyrillic.Plo \ + ./$(DEPDIR)/libuna_codepage_mac_dingbats.Plo \ + ./$(DEPDIR)/libuna_codepage_mac_farsi.Plo \ + ./$(DEPDIR)/libuna_codepage_mac_gaelic.Plo \ + ./$(DEPDIR)/libuna_codepage_mac_greek.Plo \ + ./$(DEPDIR)/libuna_codepage_mac_icelandic.Plo \ + ./$(DEPDIR)/libuna_codepage_mac_inuit.Plo \ + ./$(DEPDIR)/libuna_codepage_mac_roman.Plo \ + ./$(DEPDIR)/libuna_codepage_mac_romanian.Plo \ + ./$(DEPDIR)/libuna_codepage_mac_russian.Plo \ + ./$(DEPDIR)/libuna_codepage_mac_symbol.Plo \ + ./$(DEPDIR)/libuna_codepage_mac_thai.Plo \ + ./$(DEPDIR)/libuna_codepage_mac_turkish.Plo \ + ./$(DEPDIR)/libuna_codepage_mac_ukrainian.Plo \ ./$(DEPDIR)/libuna_codepage_windows_1250.Plo \ ./$(DEPDIR)/libuna_codepage_windows_1251.Plo \ ./$(DEPDIR)/libuna_codepage_windows_1252.Plo \ @@ -300,6 +357,7 @@ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -317,8 +375,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ @@ -335,6 +391,8 @@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ @@ -350,8 +408,10 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -371,6 +431,8 @@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ +HAVE_LIBFMOS = @HAVE_LIBFMOS@ +HAVE_LIBFUSE = @HAVE_LIBFUSE@ HAVE_LIBHMAC = @HAVE_LIBHMAC@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ @@ -386,6 +448,7 @@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ +HAVE_LOCAL_LIBFMOS = @HAVE_LOCAL_LIBFMOS@ HAVE_LOCAL_LIBHMAC = @HAVE_LOCAL_LIBHMAC@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ @@ -439,8 +502,12 @@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ +LIBFMOS_CPPFLAGS = @LIBFMOS_CPPFLAGS@ +LIBFMOS_LIBADD = @LIBFMOS_LIBADD@ LIBFSHFS_DLL_EXPORT = @LIBFSHFS_DLL_EXPORT@ LIBFSHFS_DLL_IMPORT = @LIBFSHFS_DLL_IMPORT@ +LIBFUSE_CPPFLAGS = @LIBFUSE_CPPFLAGS@ +LIBFUSE_LIBADD = @LIBFUSE_LIBADD@ LIBHMAC_CPPFLAGS = @LIBHMAC_CPPFLAGS@ LIBHMAC_LIBADD = @LIBHMAC_LIBADD@ LIBICONV = @LIBICONV@ @@ -462,8 +529,8 @@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ @@ -486,26 +553,6 @@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ -PYTHON2 = @PYTHON2@ -PYTHON2_CONFIG = @PYTHON2_CONFIG@ -PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ -PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ -PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ -PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ -PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ -PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ -PYTHON2_PREFIX = @PYTHON2_PREFIX@ -PYTHON2_VERSION = @PYTHON2_VERSION@ -PYTHON3 = @PYTHON3@ -PYTHON3_CONFIG = @PYTHON3_CONFIG@ -PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ -PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ -PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ -PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ -PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ -PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ -PYTHON3_PREFIX = @PYTHON3_PREFIX@ -PYTHON3_VERSION = @PYTHON3_VERSION@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ @@ -583,6 +630,12 @@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ +ax_libfmos_pc_libs_private = @ax_libfmos_pc_libs_private@ +ax_libfmos_spec_build_requires = @ax_libfmos_spec_build_requires@ +ax_libfmos_spec_requires = @ax_libfmos_spec_requires@ +ax_libfuse_pc_libs_private = @ax_libfuse_pc_libs_private@ +ax_libfuse_spec_build_requires = @ax_libfuse_spec_build_requires@ +ax_libfuse_spec_requires = @ax_libfuse_spec_requires@ ax_libhmac_pc_libs_private = @ax_libhmac_pc_libs_private@ ax_libhmac_spec_build_requires = @ax_libhmac_spec_build_requires@ ax_libhmac_spec_requires = @ax_libhmac_spec_requires@ @@ -607,6 +660,8 @@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +fuse_CFLAGS = @fuse_CFLAGS@ +fuse_LIBS = @fuse_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -644,6 +699,8 @@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ +libfmos_CFLAGS = @libfmos_CFLAGS@ +libfmos_LIBS = @libfmos_LIBS@ libfshfs_spec_requires = @libfshfs_spec_requires@ libfshfs_spec_tools_build_requires = @libfshfs_spec_tools_build_requires@ libhmac_CFLAGS = @libhmac_CFLAGS@ @@ -662,11 +719,8 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ -pyexecdir2 = @pyexecdir2@ -pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ -pythondir2 = @pythondir2@ -pythondir3 = @pythondir3@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -703,6 +757,24 @@ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_iso_8859_16.c libuna_codepage_iso_8859_16.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_koi8_r.c libuna_codepage_koi8_r.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_koi8_u.c libuna_codepage_koi8_u.h \ +@HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_arabic.c libuna_codepage_mac_arabic.h \ +@HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_celtic.c libuna_codepage_mac_celtic.h \ +@HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_centraleurroman.c libuna_codepage_mac_centraleurroman.h \ +@HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_croatian.c libuna_codepage_mac_croatian.h \ +@HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_cyrillic.c libuna_codepage_mac_cyrillic.h \ +@HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_dingbats.c libuna_codepage_mac_dingbats.h \ +@HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_farsi.c libuna_codepage_mac_farsi.h \ +@HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_gaelic.c libuna_codepage_mac_gaelic.h \ +@HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_greek.c libuna_codepage_mac_greek.h \ +@HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_icelandic.c libuna_codepage_mac_icelandic.h \ +@HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_inuit.c libuna_codepage_mac_inuit.h \ +@HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_roman.c libuna_codepage_mac_roman.h \ +@HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_romanian.c libuna_codepage_mac_romanian.h \ +@HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_russian.c libuna_codepage_mac_russian.h \ +@HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_symbol.c libuna_codepage_mac_symbol.h \ +@HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_thai.c libuna_codepage_mac_thai.h \ +@HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_turkish.c libuna_codepage_mac_turkish.h \ +@HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_ukrainian.c libuna_codepage_mac_ukrainian.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_874.c libuna_codepage_windows_874.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_932.c libuna_codepage_windows_932.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_936.c libuna_codepage_windows_936.h \ @@ -811,6 +883,24 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_iso_8859_9.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_koi8_r.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_koi8_u.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_mac_arabic.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_mac_celtic.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_mac_centraleurroman.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_mac_croatian.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_mac_cyrillic.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_mac_dingbats.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_mac_farsi.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_mac_gaelic.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_mac_greek.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_mac_icelandic.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_mac_inuit.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_mac_roman.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_mac_romanian.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_mac_russian.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_mac_symbol.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_mac_thai.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_mac_turkish.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_mac_ukrainian.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_windows_1250.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_windows_1251.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_windows_1252.Plo@am__quote@ # am--include-marker @@ -870,6 +960,8 @@ clean-libtool: -rm -rf .libs _libs +sources-local: +splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique @@ -922,7 +1014,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am @@ -1059,6 +1150,24 @@ -rm -f ./$(DEPDIR)/libuna_codepage_iso_8859_9.Plo -rm -f ./$(DEPDIR)/libuna_codepage_koi8_r.Plo -rm -f ./$(DEPDIR)/libuna_codepage_koi8_u.Plo + -rm -f ./$(DEPDIR)/libuna_codepage_mac_arabic.Plo + -rm -f ./$(DEPDIR)/libuna_codepage_mac_celtic.Plo + -rm -f ./$(DEPDIR)/libuna_codepage_mac_centraleurroman.Plo + -rm -f ./$(DEPDIR)/libuna_codepage_mac_croatian.Plo + -rm -f ./$(DEPDIR)/libuna_codepage_mac_cyrillic.Plo + -rm -f ./$(DEPDIR)/libuna_codepage_mac_dingbats.Plo + -rm -f ./$(DEPDIR)/libuna_codepage_mac_farsi.Plo + -rm -f ./$(DEPDIR)/libuna_codepage_mac_gaelic.Plo + -rm -f ./$(DEPDIR)/libuna_codepage_mac_greek.Plo + -rm -f ./$(DEPDIR)/libuna_codepage_mac_icelandic.Plo + -rm -f ./$(DEPDIR)/libuna_codepage_mac_inuit.Plo + -rm -f ./$(DEPDIR)/libuna_codepage_mac_roman.Plo + -rm -f ./$(DEPDIR)/libuna_codepage_mac_romanian.Plo + -rm -f ./$(DEPDIR)/libuna_codepage_mac_russian.Plo + -rm -f ./$(DEPDIR)/libuna_codepage_mac_symbol.Plo + -rm -f ./$(DEPDIR)/libuna_codepage_mac_thai.Plo + -rm -f ./$(DEPDIR)/libuna_codepage_mac_turkish.Plo + -rm -f ./$(DEPDIR)/libuna_codepage_mac_ukrainian.Plo -rm -f ./$(DEPDIR)/libuna_codepage_windows_1250.Plo -rm -f ./$(DEPDIR)/libuna_codepage_windows_1251.Plo -rm -f ./$(DEPDIR)/libuna_codepage_windows_1252.Plo @@ -1101,6 +1210,14 @@ ps-am: +sources: sources-am + +sources-am: sources-local + +splint: splint-am + +splint-am: splint-local + uninstall-am: .MAKE: install-am install-strip @@ -1117,15 +1234,18 @@ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am + sources-am sources-local splint-am splint-local tags tags-am \ + uninstall uninstall-am .PRECIOUS: Makefile distclean: clean - /bin/rm -f Makefile + -rm -f Makefile + +sources-local: $(BUILT_SOURCES) -splint: +splint-local: @echo "Running splint on libuna ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libuna_la_SOURCES) diff -Nru libfshfs-20201104/libuna/libuna_base16_stream.c libfshfs-20240221/libuna/libuna_base16_stream.c --- libfshfs-20201104/libuna/libuna_base16_stream.c 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_base16_stream.c 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * Base16 stream functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_base16_stream.h libfshfs-20240221/libuna/libuna_base16_stream.h --- libfshfs-20201104/libuna/libuna_base16_stream.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_base16_stream.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * Base16 stream functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_base32_stream.c libfshfs-20240221/libuna/libuna_base32_stream.c --- libfshfs-20201104/libuna/libuna_base32_stream.c 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_base32_stream.c 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * Base32 stream functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_base32_stream.h libfshfs-20240221/libuna/libuna_base32_stream.h --- libfshfs-20201104/libuna/libuna_base32_stream.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_base32_stream.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * Base32 stream functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_base64_stream.c libfshfs-20240221/libuna/libuna_base64_stream.c --- libfshfs-20201104/libuna/libuna_base64_stream.c 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_base64_stream.c 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * Base64 stream functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_base64_stream.h libfshfs-20240221/libuna/libuna_base64_stream.h --- libfshfs-20201104/libuna/libuna_base64_stream.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_base64_stream.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * Base64 stream functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_byte_stream.c libfshfs-20240221/libuna/libuna_byte_stream.c --- libfshfs-20201104/libuna/libuna_byte_stream.c 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_byte_stream.c 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * Byte stream functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_byte_stream.h libfshfs-20240221/libuna/libuna_byte_stream.h --- libfshfs-20201104/libuna/libuna_byte_stream.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_byte_stream.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * Byte stream functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_codepage_iso_8859_10.c libfshfs-20240221/libuna/libuna_codepage_iso_8859_10.c --- libfshfs-20201104/libuna/libuna_codepage_iso_8859_10.c 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_iso_8859_10.c 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * ISO 8859-10 codepage (Nordic) function * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_codepage_iso_8859_10.h libfshfs-20240221/libuna/libuna_codepage_iso_8859_10.h --- libfshfs-20201104/libuna/libuna_codepage_iso_8859_10.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_iso_8859_10.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * ISO 8859-10 codepage (Nordic) functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_codepage_iso_8859_13.c libfshfs-20240221/libuna/libuna_codepage_iso_8859_13.c --- libfshfs-20201104/libuna/libuna_codepage_iso_8859_13.c 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_iso_8859_13.c 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * ISO 8859-13 codepage (Baltic) function * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_codepage_iso_8859_13.h libfshfs-20240221/libuna/libuna_codepage_iso_8859_13.h --- libfshfs-20201104/libuna/libuna_codepage_iso_8859_13.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_iso_8859_13.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * ISO 8859-13 codepage (Baltic) functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_codepage_iso_8859_14.c libfshfs-20240221/libuna/libuna_codepage_iso_8859_14.c --- libfshfs-20201104/libuna/libuna_codepage_iso_8859_14.c 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_iso_8859_14.c 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * ISO 8859-14 codepage (Celtic) function * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_codepage_iso_8859_14.h libfshfs-20240221/libuna/libuna_codepage_iso_8859_14.h --- libfshfs-20201104/libuna/libuna_codepage_iso_8859_14.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_iso_8859_14.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * ISO 8859-14 codepage (Celtic) functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_codepage_iso_8859_15.c libfshfs-20240221/libuna/libuna_codepage_iso_8859_15.c --- libfshfs-20201104/libuna/libuna_codepage_iso_8859_15.c 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_iso_8859_15.c 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * ISO 8859-15 codepage (Latin 9) function * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_codepage_iso_8859_15.h libfshfs-20240221/libuna/libuna_codepage_iso_8859_15.h --- libfshfs-20201104/libuna/libuna_codepage_iso_8859_15.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_iso_8859_15.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * ISO 8859-15 codepage (Latin 9) functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_codepage_iso_8859_16.c libfshfs-20240221/libuna/libuna_codepage_iso_8859_16.c --- libfshfs-20201104/libuna/libuna_codepage_iso_8859_16.c 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_iso_8859_16.c 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * ISO 8859-16 codepage (Latin 10) function * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_codepage_iso_8859_16.h libfshfs-20240221/libuna/libuna_codepage_iso_8859_16.h --- libfshfs-20201104/libuna/libuna_codepage_iso_8859_16.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_iso_8859_16.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * ISO 8859-16 codepage (Latin 10) functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_codepage_iso_8859_2.c libfshfs-20240221/libuna/libuna_codepage_iso_8859_2.c --- libfshfs-20201104/libuna/libuna_codepage_iso_8859_2.c 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_iso_8859_2.c 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * ISO 8859-2 codepage (Central European) function * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_codepage_iso_8859_2.h libfshfs-20240221/libuna/libuna_codepage_iso_8859_2.h --- libfshfs-20201104/libuna/libuna_codepage_iso_8859_2.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_iso_8859_2.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * ISO 8859-2 codepage (Central European) functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_codepage_iso_8859_3.c libfshfs-20240221/libuna/libuna_codepage_iso_8859_3.c --- libfshfs-20201104/libuna/libuna_codepage_iso_8859_3.c 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_iso_8859_3.c 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * ISO 8859-3 codepage (Latin 3) function * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_codepage_iso_8859_3.h libfshfs-20240221/libuna/libuna_codepage_iso_8859_3.h --- libfshfs-20201104/libuna/libuna_codepage_iso_8859_3.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_iso_8859_3.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * ISO 8859-3 codepage (Latin 3) functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_codepage_iso_8859_4.c libfshfs-20240221/libuna/libuna_codepage_iso_8859_4.c --- libfshfs-20201104/libuna/libuna_codepage_iso_8859_4.c 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_iso_8859_4.c 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * ISO 8859-4 codepage (Baltic) function * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_codepage_iso_8859_4.h libfshfs-20240221/libuna/libuna_codepage_iso_8859_4.h --- libfshfs-20201104/libuna/libuna_codepage_iso_8859_4.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_iso_8859_4.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * ISO 8859-4 codepage (Baltic) functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_codepage_iso_8859_5.c libfshfs-20240221/libuna/libuna_codepage_iso_8859_5.c --- libfshfs-20201104/libuna/libuna_codepage_iso_8859_5.c 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_iso_8859_5.c 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * ISO 8859-5 codepage (Cyrillic) function * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_codepage_iso_8859_5.h libfshfs-20240221/libuna/libuna_codepage_iso_8859_5.h --- libfshfs-20201104/libuna/libuna_codepage_iso_8859_5.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_iso_8859_5.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * ISO 8859-5 codepage (Cyrillic) functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_codepage_iso_8859_6.c libfshfs-20240221/libuna/libuna_codepage_iso_8859_6.c --- libfshfs-20201104/libuna/libuna_codepage_iso_8859_6.c 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_iso_8859_6.c 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * ISO 8859-6 codepage (Arabic) function * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_codepage_iso_8859_6.h libfshfs-20240221/libuna/libuna_codepage_iso_8859_6.h --- libfshfs-20201104/libuna/libuna_codepage_iso_8859_6.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_iso_8859_6.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * ISO 8859-6 codepage (Arabic) functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_codepage_iso_8859_7.c libfshfs-20240221/libuna/libuna_codepage_iso_8859_7.c --- libfshfs-20201104/libuna/libuna_codepage_iso_8859_7.c 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_iso_8859_7.c 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * ISO 8859-7 codepage (Greek) function * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_codepage_iso_8859_7.h libfshfs-20240221/libuna/libuna_codepage_iso_8859_7.h --- libfshfs-20201104/libuna/libuna_codepage_iso_8859_7.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_iso_8859_7.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * ISO 8859-7 codepage (Greek) functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_codepage_iso_8859_8.c libfshfs-20240221/libuna/libuna_codepage_iso_8859_8.c --- libfshfs-20201104/libuna/libuna_codepage_iso_8859_8.c 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_iso_8859_8.c 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * ISO 8859-8 codepage (Hebrew) function * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_codepage_iso_8859_8.h libfshfs-20240221/libuna/libuna_codepage_iso_8859_8.h --- libfshfs-20201104/libuna/libuna_codepage_iso_8859_8.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_iso_8859_8.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * ISO 8859-8 codepage (Hebrew) functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_codepage_iso_8859_9.c libfshfs-20240221/libuna/libuna_codepage_iso_8859_9.c --- libfshfs-20201104/libuna/libuna_codepage_iso_8859_9.c 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_iso_8859_9.c 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * ISO 8859-9 codepage (Turkish) function * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_codepage_iso_8859_9.h libfshfs-20240221/libuna/libuna_codepage_iso_8859_9.h --- libfshfs-20201104/libuna/libuna_codepage_iso_8859_9.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_iso_8859_9.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * ISO 8859-9 codepage (Turkish) functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_codepage_koi8_r.c libfshfs-20240221/libuna/libuna_codepage_koi8_r.c --- libfshfs-20201104/libuna/libuna_codepage_koi8_r.c 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_koi8_r.c 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * KOI8-R codepage (Russian Cyrillic) function * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -23,8 +23,10 @@ #include #include "libuna_codepage_koi8_r.h" +#include "libuna_libcerror.h" +#include "libuna_types.h" -/* Extended ASCII to Unicode character lookup table for KOI8-R codepage +/* Extended ASCII to Unicode character lookup table for the KOI8-R codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_koi8_r_byte_stream_to_unicode_base_0x80[ 128 ] = { @@ -46,7 +48,7 @@ 0x042c, 0x042b, 0x0417, 0x0428, 0x042d, 0x0429, 0x0427, 0x042a }; -/* Unicode to ASCII character lookup table for KOI8-R codepage +/* Unicode to ASCII character lookup tables for the KOI8-R codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_koi8_r_unicode_to_byte_stream_base_0x0410[ 64 ] = { @@ -67,3 +69,324 @@ 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0x1a, 0x1a, 0x1a }; +/* Copies an Unicode character from a KOI8-R encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_koi8_r_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_koi8_r_copy_from_byte_stream"; + libuna_unicode_character_t safe_unicode_character = 0xfffd; + size_t safe_byte_stream_index = 0; + uint8_t byte_stream_character = 0; + + if( unicode_character == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid Unicode character.", + function ); + + return( -1 ); + } + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + byte_stream_character = byte_stream[ safe_byte_stream_index++ ]; + + if( byte_stream_character < 0x80 ) + { + safe_unicode_character = byte_stream_character; + } + else + { + byte_stream_character -= 0x80; + + safe_unicode_character = libuna_codepage_koi8_r_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; + } + *unicode_character = safe_unicode_character; + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + +/* Copies an Unicode character to a KOI8-R encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_koi8_r_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_koi8_r_copy_to_byte_stream"; + size_t safe_byte_stream_index = 0; + uint16_t byte_stream_value = 0x001a; + + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + if( unicode_character < 0x0080 ) + { + byte_stream_value = (uint16_t) unicode_character; + } + else if( ( unicode_character >= 0x0410 ) + && ( unicode_character < 0x0450 ) ) + { + unicode_character -= 0x0410; + + byte_stream_value = libuna_codepage_koi8_r_unicode_to_byte_stream_base_0x0410[ unicode_character ]; + } + else if( ( unicode_character >= 0x2550 ) + && ( unicode_character < 0x2570 ) ) + { + unicode_character -= 0x2550; + + byte_stream_value = libuna_codepage_koi8_r_unicode_to_byte_stream_base_0x2550[ unicode_character ]; + } + else switch( unicode_character ) + { + case 0x00a0: + byte_stream_value = 0x9a; + break; + + case 0x00a9: + byte_stream_value = 0xbf; + break; + + case 0x00b0: + byte_stream_value = 0x9c; + break; + + case 0x00b2: + byte_stream_value = 0x9d; + break; + + case 0x00b7: + byte_stream_value = 0x9e; + break; + + case 0x00f7: + byte_stream_value = 0x9f; + break; + + case 0x0401: + byte_stream_value = 0xb3; + break; + + case 0x0451: + byte_stream_value = 0xa3; + break; + + case 0x2219: + byte_stream_value = 0x95; + break; + + case 0x221a: + byte_stream_value = 0x96; + break; + + case 0x2248: + byte_stream_value = 0x97; + break; + + case 0x2264: + byte_stream_value = 0x98; + break; + + case 0x2265: + byte_stream_value = 0x99; + break; + + case 0x2320: + byte_stream_value = 0x93; + break; + + case 0x2321: + byte_stream_value = 0x9b; + break; + + case 0x2500: + byte_stream_value = 0x80; + break; + + case 0x2502: + byte_stream_value = 0x81; + break; + + case 0x250c: + byte_stream_value = 0x82; + break; + + case 0x2510: + byte_stream_value = 0x83; + break; + + case 0x2514: + byte_stream_value = 0x84; + break; + + case 0x2518: + byte_stream_value = 0x85; + break; + + case 0x251c: + byte_stream_value = 0x86; + break; + + case 0x2524: + byte_stream_value = 0x87; + break; + + case 0x252c: + byte_stream_value = 0x88; + break; + + case 0x2534: + byte_stream_value = 0x89; + break; + + case 0x253c: + byte_stream_value = 0x8a; + break; + + case 0x2580: + byte_stream_value = 0x8b; + break; + + case 0x2584: + byte_stream_value = 0x8c; + break; + + case 0x2588: + byte_stream_value = 0x8d; + break; + + case 0x258c: + byte_stream_value = 0x8e; + break; + + case 0x2590: + byte_stream_value = 0x8f; + break; + + case 0x2591: + byte_stream_value = 0x90; + break; + + case 0x2592: + byte_stream_value = 0x91; + break; + + case 0x2593: + byte_stream_value = 0x92; + break; + + case 0x25a0: + byte_stream_value = 0x94; + break; + + default: + byte_stream_value = 0x1a; + break; + } + byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); + + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + diff -Nru libfshfs-20201104/libuna/libuna_codepage_koi8_r.h libfshfs-20240221/libuna/libuna_codepage_koi8_r.h --- libfshfs-20201104/libuna/libuna_codepage_koi8_r.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_koi8_r.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * KOI8-R codepage (Russian Cyrillic) functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -25,20 +25,26 @@ #include #include -#include "libuna_extern.h" +#include "libuna_libcerror.h" +#include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif -LIBUNA_EXTERN_VARIABLE \ -const uint16_t libuna_codepage_koi8_r_byte_stream_to_unicode_base_0x80[ 128 ]; - -LIBUNA_EXTERN_VARIABLE \ -const uint8_t libuna_codepage_koi8_r_unicode_to_byte_stream_base_0x0410[ 64 ]; - -LIBUNA_EXTERN_VARIABLE \ -const uint8_t libuna_codepage_koi8_r_unicode_to_byte_stream_base_0x2550[ 32 ]; +int libuna_codepage_koi8_r_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); + +int libuna_codepage_koi8_r_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); #if defined( __cplusplus ) } diff -Nru libfshfs-20201104/libuna/libuna_codepage_koi8_u.c libfshfs-20240221/libuna/libuna_codepage_koi8_u.c --- libfshfs-20201104/libuna/libuna_codepage_koi8_u.c 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_koi8_u.c 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * KOI8-U codepage (Ukrainian Cyrillic) function * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -23,8 +23,10 @@ #include #include "libuna_codepage_koi8_u.h" +#include "libuna_libcerror.h" +#include "libuna_types.h" -/* Extended ASCII to Unicode character lookup table for KOI8-U codepage +/* Extended ASCII to Unicode character lookup table for the KOI8-U codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_koi8_u_byte_stream_to_unicode_base_0x80[ 128 ] = { @@ -46,7 +48,7 @@ 0x042c, 0x042b, 0x0417, 0x0428, 0x042d, 0x0429, 0x0427, 0x042a }; -/* Unicode to ASCII character lookup table for KOI8-U codepage +/* Unicode to ASCII character lookup tables for the KOI8-U codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_koi8_u_unicode_to_byte_stream_base_0x0410[ 64 ] = { @@ -67,3 +69,356 @@ 0xba, 0xbb, 0xbc, 0x1a, 0xbe, 0x1a, 0x1a, 0x1a }; +/* Copies an Unicode character from a KOI8-U encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_koi8_u_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_koi8_u_copy_from_byte_stream"; + libuna_unicode_character_t safe_unicode_character = 0xfffd; + size_t safe_byte_stream_index = 0; + uint8_t byte_stream_character = 0; + + if( unicode_character == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid Unicode character.", + function ); + + return( -1 ); + } + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + byte_stream_character = byte_stream[ safe_byte_stream_index++ ]; + + if( byte_stream_character < 0x80 ) + { + safe_unicode_character = byte_stream_character; + } + else + { + byte_stream_character -= 0x80; + + safe_unicode_character = libuna_codepage_koi8_u_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; + } + *unicode_character = safe_unicode_character; + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + +/* Copies an Unicode character to a KOI8-U encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_koi8_u_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_koi8_u_copy_to_byte_stream"; + size_t safe_byte_stream_index = 0; + uint16_t byte_stream_value = 0x001a; + + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + if( unicode_character < 0x0080 ) + { + byte_stream_value = (uint16_t) unicode_character; + } + else if( ( unicode_character >= 0x0410 ) + && ( unicode_character < 0x0450 ) ) + { + unicode_character -= 0x0410; + + byte_stream_value = libuna_codepage_koi8_u_unicode_to_byte_stream_base_0x0410[ unicode_character ]; + } + else if( ( unicode_character >= 0x2550 ) + && ( unicode_character < 0x2570 ) ) + { + unicode_character -= 0x2550; + + byte_stream_value = libuna_codepage_koi8_u_unicode_to_byte_stream_base_0x2550[ unicode_character ]; + } + else switch( unicode_character ) + { + case 0x00a0: + byte_stream_value = 0x9a; + break; + + case 0x00a9: + byte_stream_value = 0xbf; + break; + + case 0x00b0: + byte_stream_value = 0x9c; + break; + + case 0x00b2: + byte_stream_value = 0x9d; + break; + + case 0x00b7: + byte_stream_value = 0x9e; + break; + + case 0x00f7: + byte_stream_value = 0x9f; + break; + + case 0x0401: + byte_stream_value = 0xb3; + break; + + case 0x0404: + byte_stream_value = 0xb4; + break; + + case 0x0406: + byte_stream_value = 0xb6; + break; + + case 0x0407: + byte_stream_value = 0xb7; + break; + + case 0x0451: + byte_stream_value = 0xa3; + break; + + case 0x0454: + byte_stream_value = 0xa4; + break; + + case 0x0456: + byte_stream_value = 0xa6; + break; + + case 0x0457: + byte_stream_value = 0xa7; + break; + + case 0x0490: + byte_stream_value = 0xbd; + break; + + case 0x0491: + byte_stream_value = 0xad; + break; + + case 0x2219: + byte_stream_value = 0x95; + break; + + case 0x221a: + byte_stream_value = 0x96; + break; + + case 0x2248: + byte_stream_value = 0x97; + break; + + case 0x2264: + byte_stream_value = 0x98; + break; + + case 0x2265: + byte_stream_value = 0x99; + break; + + case 0x2320: + byte_stream_value = 0x93; + break; + + case 0x2321: + byte_stream_value = 0x9b; + break; + + case 0x2500: + byte_stream_value = 0x80; + break; + + case 0x2502: + byte_stream_value = 0x81; + break; + + case 0x250c: + byte_stream_value = 0x82; + break; + + case 0x2510: + byte_stream_value = 0x83; + break; + + case 0x2514: + byte_stream_value = 0x84; + break; + + case 0x2518: + byte_stream_value = 0x85; + break; + + case 0x251c: + byte_stream_value = 0x86; + break; + + case 0x2524: + byte_stream_value = 0x87; + break; + + case 0x252c: + byte_stream_value = 0x88; + break; + + case 0x2534: + byte_stream_value = 0x89; + break; + + case 0x253c: + byte_stream_value = 0x8a; + break; + + case 0x2580: + byte_stream_value = 0x8b; + break; + + case 0x2584: + byte_stream_value = 0x8c; + break; + + case 0x2588: + byte_stream_value = 0x8d; + break; + + case 0x258c: + byte_stream_value = 0x8e; + break; + + case 0x2590: + byte_stream_value = 0x8f; + break; + + case 0x2591: + byte_stream_value = 0x90; + break; + + case 0x2592: + byte_stream_value = 0x91; + break; + + case 0x2593: + byte_stream_value = 0x92; + break; + + case 0x25a0: + byte_stream_value = 0x94; + break; + + default: + byte_stream_value = 0x1a; + break; + } + byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); + + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + diff -Nru libfshfs-20201104/libuna/libuna_codepage_koi8_u.h libfshfs-20240221/libuna/libuna_codepage_koi8_u.h --- libfshfs-20201104/libuna/libuna_codepage_koi8_u.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_koi8_u.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * KOI8-U codepage (Ukrainian Cyrillic) functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -25,20 +25,26 @@ #include #include -#include "libuna_extern.h" +#include "libuna_libcerror.h" +#include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif -LIBUNA_EXTERN_VARIABLE \ -const uint16_t libuna_codepage_koi8_u_byte_stream_to_unicode_base_0x80[ 128 ]; - -LIBUNA_EXTERN_VARIABLE \ -const uint8_t libuna_codepage_koi8_u_unicode_to_byte_stream_base_0x0410[ 64 ]; - -LIBUNA_EXTERN_VARIABLE \ -const uint8_t libuna_codepage_koi8_u_unicode_to_byte_stream_base_0x2550[ 32 ]; +int libuna_codepage_koi8_u_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); + +int libuna_codepage_koi8_u_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); #if defined( __cplusplus ) } diff -Nru libfshfs-20201104/libuna/libuna_codepage_mac_arabic.c libfshfs-20240221/libuna/libuna_codepage_mac_arabic.c --- libfshfs-20201104/libuna/libuna_codepage_mac_arabic.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_mac_arabic.c 2024-02-21 06:04:15.000000000 +0000 @@ -0,0 +1,352 @@ +/* + * MacArabic codepage functions + * + * Copyright (C) 2008-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include + +#include "libuna_codepage_mac_arabic.h" +#include "libuna_libcerror.h" +#include "libuna_types.h" + +/* Extended ASCII to Unicode character lookup table for the MacArabic codepage + * Unknown are filled with the Unicode replacement character 0xfffd + */ +const uint16_t libuna_codepage_mac_arabic_byte_stream_to_unicode_base_0x80[ 128 ] = { + 0x00c4, 0x00a0, 0x00c7, 0x00c9, 0x00d1, 0x00d6, 0x00dc, 0x00e1, + 0x00e0, 0x00e2, 0x00e4, 0x06ba, 0x00ab, 0x00e7, 0x00e9, 0x00e8, + 0x00ea, 0x00eb, 0x00ed, 0x2026, 0x00ee, 0x00ef, 0x00f1, 0x00f3, + 0x00bb, 0x00f4, 0x00f6, 0x00f7, 0x00fa, 0x00f9, 0x00fb, 0x00fc, + 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x066a, 0x0026, 0x0027, + 0x0028, 0x0029, 0x002a, 0x002b, 0x060c, 0x002d, 0x002e, 0x002f, + 0x0660, 0x0661, 0x0662, 0x0663, 0x0664, 0x0665, 0x0666, 0x0667, + 0x0668, 0x0669, 0x003a, 0x061b, 0x003c, 0x003d, 0x003e, 0x061f, + 0x274a, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627, + 0x0628, 0x0629, 0x062a, 0x062b, 0x062c, 0x062d, 0x062e, 0x062f, + 0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x0637, + 0x0638, 0x0639, 0x063a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, + 0x0640, 0x0641, 0x0642, 0x0643, 0x0644, 0x0645, 0x0646, 0x0647, + 0x0648, 0x0649, 0x064a, 0x064b, 0x064c, 0x064d, 0x064e, 0x064f, + 0x0650, 0x0651, 0x0652, 0x067e, 0x0679, 0x0686, 0x06d5, 0x06a4, + 0x06af, 0x0688, 0x0691, 0x007b, 0x007c, 0x007d, 0x0698, 0x06d2 +}; + +/* Unicode to ASCII character lookup tables for the MacArabic codepage + * Unknown are filled with the ASCII replacement character 0x1a + */ +const uint8_t libuna_codepage_mac_arabic_unicode_to_byte_stream_base_0x0020[ 32 ] = { + 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0x25, 0xa6, 0xa7, + 0xa8, 0xa9, 0xaa, 0xab, 0x2c, 0xad, 0xae, 0xaf, + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, + 0x38, 0x39, 0xba, 0x3b, 0xbc, 0xbd, 0xbe, 0x3f +}; + +const uint8_t libuna_codepage_mac_arabic_unicode_to_byte_stream_base_0x00a0[ 96 ] = { + 0x81, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0x1a, 0x8c, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0x1a, 0x98, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0x80, 0x1a, 0x1a, 0x82, + 0x1a, 0x83, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x84, 0x1a, 0x1a, 0x1a, 0x1a, 0x85, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0x86, 0x1a, 0x1a, 0x1a, + 0x88, 0x87, 0x89, 0x1a, 0x8a, 0x1a, 0x1a, 0x8d, + 0x8f, 0x8e, 0x90, 0x91, 0x1a, 0x92, 0x94, 0x95, + 0x1a, 0x96, 0x1a, 0x97, 0x99, 0x1a, 0x9a, 0x9b, + 0x1a, 0x9d, 0x9c, 0x9e, 0x9f, 0x1a, 0x1a, 0x1a +}; + +const uint8_t libuna_codepage_mac_arabic_unicode_to_byte_stream_base_0x0608[ 184 ] = { + 0x1a, 0x1a, 0x1a, 0x1a, 0xac, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0x1a, 0xbb, 0x1a, 0x1a, 0x1a, 0xbf, + 0x1a, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, + 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, + 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, + 0xd8, 0xd9, 0xda, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, + 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, + 0xf0, 0xf1, 0xf2, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, + 0xb8, 0xb9, 0xa5, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0xf4, 0x1a, 0x1a, 0x1a, 0x1a, 0xf3, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xf5, 0x1a, + 0xf9, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0xfa, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0xfe, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0xf7, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xf8, + 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0x8b, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a +}; + +/* Copies an Unicode character from a MacArabic encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_mac_arabic_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_mac_arabic_copy_from_byte_stream"; + libuna_unicode_character_t safe_unicode_character = 0xfffd; + size_t safe_byte_stream_index = 0; + uint8_t byte_stream_character = 0; + + if( unicode_character == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid Unicode character.", + function ); + + return( -1 ); + } + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + byte_stream_character = byte_stream[ safe_byte_stream_index++ ]; + + if( byte_stream_character < 0x80 ) + { + safe_unicode_character = byte_stream_character; + } + else + { + byte_stream_character -= 0x80; + + safe_unicode_character = libuna_codepage_mac_arabic_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; + } + *unicode_character = safe_unicode_character; + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + +/* Copies an Unicode character to a MacArabic encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_mac_arabic_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_mac_arabic_copy_to_byte_stream"; + size_t safe_byte_stream_index = 0; + uint16_t byte_stream_value = 0x001a; + + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + if( unicode_character < 0x0020 ) + { + byte_stream_value = (uint16_t) unicode_character; + } + else if( ( unicode_character >= 0x0020 ) + && ( unicode_character < 0x0040 ) ) + { + unicode_character -= 0x0020; + + byte_stream_value = libuna_codepage_mac_arabic_unicode_to_byte_stream_base_0x0020[ unicode_character ]; + } + else if( ( unicode_character >= 0x0040 ) + && ( unicode_character < 0x005b ) ) + { + byte_stream_value = (uint16_t) unicode_character; + } + else if( ( unicode_character >= 0x0060 ) + && ( unicode_character < 0x007b ) ) + { + byte_stream_value = (uint16_t) unicode_character; + } + else if( ( unicode_character >= 0x007e ) + && ( unicode_character < 0x0080 ) ) + { + byte_stream_value = (uint16_t) unicode_character; + } + else if( ( unicode_character >= 0x00a0 ) + && ( unicode_character < 0x0100 ) ) + { + unicode_character -= 0x00a0; + + byte_stream_value = libuna_codepage_mac_arabic_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; + } + else if( ( unicode_character >= 0x0608 ) + && ( unicode_character < 0x06c0 ) ) + { + unicode_character -= 0x0608; + + byte_stream_value = libuna_codepage_mac_arabic_unicode_to_byte_stream_base_0x0608[ unicode_character ]; + } + else switch( unicode_character ) + { + case 0x005b: + byte_stream_value = 0xdb; + break; + + case 0x005c: + byte_stream_value = 0xdc; + break; + + case 0x005d: + byte_stream_value = 0xdd; + break; + + case 0x005e: + byte_stream_value = 0xde; + break; + + case 0x005f: + byte_stream_value = 0xdf; + break; + + case 0x007b: + byte_stream_value = 0xfb; + break; + + case 0x007c: + byte_stream_value = 0xfc; + break; + + case 0x007d: + byte_stream_value = 0xfd; + break; + + case 0x06d2: + byte_stream_value = 0xff; + break; + + case 0x06d5: + byte_stream_value = 0xf6; + break; + + case 0x2026: + byte_stream_value = 0x93; + break; + + case 0x274a: + byte_stream_value = 0xc0; + break; + + default: + byte_stream_value = 0x1a; + break; + } + byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); + + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + diff -Nru libfshfs-20201104/libuna/libuna_codepage_mac_arabic.h libfshfs-20240221/libuna/libuna_codepage_mac_arabic.h --- libfshfs-20201104/libuna/libuna_codepage_mac_arabic.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_mac_arabic.h 2024-02-21 06:04:15.000000000 +0000 @@ -0,0 +1,54 @@ +/* + * MacArabic codepage functions + * + * Copyright (C) 2008-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _LIBUNA_CODEPAGE_MAC_ARABIC_H ) +#define _LIBUNA_CODEPAGE_MAC_ARABIC_H + +#include +#include + +#include "libuna_libcerror.h" +#include "libuna_types.h" + +#if defined( __cplusplus ) +extern "C" { +#endif + +int libuna_codepage_mac_arabic_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); + +int libuna_codepage_mac_arabic_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _LIBUNA_CODEPAGE_MAC_ARABIC_H ) */ + diff -Nru libfshfs-20201104/libuna/libuna_codepage_mac_celtic.c libfshfs-20240221/libuna/libuna_codepage_mac_celtic.c --- libfshfs-20201104/libuna/libuna_codepage_mac_celtic.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_mac_celtic.c 2024-02-21 06:04:15.000000000 +0000 @@ -0,0 +1,395 @@ +/* + * MacCeltic codepage functions + * + * Copyright (C) 2008-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include + +#include "libuna_codepage_mac_celtic.h" +#include "libuna_libcerror.h" +#include "libuna_types.h" + +/* Extended ASCII to Unicode character lookup table for the MacCeltic codepage + * Unknown are filled with the Unicode replacement character 0xfffd + */ +const uint16_t libuna_codepage_mac_celtic_byte_stream_to_unicode_base_0x80[ 128 ] = { + 0x00c4, 0x00c5, 0x00c7, 0x00c9, 0x00d1, 0x00d6, 0x00dc, 0x00e1, + 0x00e0, 0x00e2, 0x00e4, 0x00e3, 0x00e5, 0x00e7, 0x00e9, 0x00e8, + 0x00ea, 0x00eb, 0x00ed, 0x00ec, 0x00ee, 0x00ef, 0x00f1, 0x00f3, + 0x00f2, 0x00f4, 0x00f6, 0x00f5, 0x00fa, 0x00f9, 0x00fb, 0x00fc, + 0x2020, 0x00b0, 0x00a2, 0x00a3, 0x00a7, 0x2022, 0x00b6, 0x00df, + 0x00ae, 0x00a9, 0x2122, 0x00b4, 0x00a8, 0x2260, 0x00c6, 0x00d8, + 0x221e, 0x00b1, 0x2264, 0x2265, 0x00a5, 0x00b5, 0x2202, 0x2211, + 0x220f, 0x03c0, 0x222b, 0x00aa, 0x00ba, 0x03a9, 0x00e6, 0x00f8, + 0x00bf, 0x00a1, 0x00ac, 0x221a, 0x0192, 0x2248, 0x2206, 0x00ab, + 0x00bb, 0x2026, 0x00a0, 0x00c0, 0x00c3, 0x00d5, 0x0152, 0x0153, + 0x2013, 0x2014, 0x201c, 0x201d, 0x2018, 0x2019, 0x00f7, 0x25ca, + 0x00ff, 0x0178, 0x2044, 0x20ac, 0x2039, 0x203a, 0x0176, 0x0177, + 0x2021, 0x00b7, 0x1ef2, 0x1ef3, 0x2030, 0x00c2, 0x00ca, 0x00c1, + 0x00cb, 0x00c8, 0x00cd, 0x00ce, 0x00cf, 0x00cc, 0x00d3, 0x00d4, + 0x2663, 0x00d2, 0x00da, 0x00db, 0x00d9, 0x0131, 0x00dd, 0x00fd, + 0x0174, 0x0175, 0x1e84, 0x1e85, 0x1e80, 0x1e81, 0x1e82, 0x1e83 +}; + +/* Unicode to ASCII character lookup tables for the MacCeltic codepage + * Unknown are filled with the ASCII replacement character 0x1a + */ +const uint8_t libuna_codepage_mac_celtic_unicode_to_byte_stream_base_0x00a0[ 96 ] = { + 0xca, 0xc1, 0xa2, 0xa3, 0x1a, 0xb4, 0x1a, 0xa4, + 0xac, 0xa9, 0xbb, 0xc7, 0xc2, 0x1a, 0xa8, 0x1a, + 0xa1, 0xb1, 0x1a, 0x1a, 0xab, 0xb5, 0xa6, 0xe1, + 0x1a, 0x1a, 0xbc, 0xc8, 0x1a, 0x1a, 0x1a, 0xc0, + 0xcb, 0xe7, 0xe5, 0xcc, 0x80, 0x81, 0xae, 0x82, + 0xe9, 0x83, 0xe6, 0xe8, 0xed, 0xea, 0xeb, 0xec, + 0x1a, 0x84, 0xf1, 0xee, 0xef, 0xcd, 0x85, 0x1a, + 0xaf, 0xf4, 0xf2, 0xf3, 0x86, 0xf6, 0x1a, 0xa7, + 0x88, 0x87, 0x89, 0x8b, 0x8a, 0x8c, 0xbe, 0x8d, + 0x8f, 0x8e, 0x90, 0x91, 0x93, 0x92, 0x94, 0x95, + 0x1a, 0x96, 0x98, 0x97, 0x99, 0x9b, 0x9a, 0xd6, + 0xbf, 0x9d, 0x9c, 0x9e, 0x9f, 0xf7, 0x1a, 0xd8 +}; + +const uint8_t libuna_codepage_mac_celtic_unicode_to_byte_stream_base_0x2010[ 56 ] = { + 0x1a, 0x1a, 0x1a, 0xd0, 0xd1, 0x1a, 0x1a, 0x1a, + 0xd4, 0xd5, 0x1a, 0x1a, 0xd2, 0xd3, 0x1a, 0x1a, + 0xa0, 0xe0, 0xa5, 0x1a, 0x1a, 0x1a, 0xc9, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0xe4, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0xdc, 0xdd, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0xda, 0x1a, 0x1a, 0x1a +}; + +/* Copies an Unicode character from a MacCeltic encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_mac_celtic_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_mac_celtic_copy_from_byte_stream"; + libuna_unicode_character_t safe_unicode_character = 0xfffd; + size_t safe_byte_stream_index = 0; + uint8_t byte_stream_character = 0; + + if( unicode_character == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid Unicode character.", + function ); + + return( -1 ); + } + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + byte_stream_character = byte_stream[ safe_byte_stream_index++ ]; + + if( byte_stream_character < 0x80 ) + { + safe_unicode_character = byte_stream_character; + } + else + { + byte_stream_character -= 0x80; + + safe_unicode_character = libuna_codepage_mac_celtic_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; + } + *unicode_character = safe_unicode_character; + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + +/* Copies an Unicode character to a MacCeltic encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_mac_celtic_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_mac_celtic_copy_to_byte_stream"; + size_t safe_byte_stream_index = 0; + uint16_t byte_stream_value = 0x001a; + + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + if( unicode_character < 0x0080 ) + { + byte_stream_value = (uint16_t) unicode_character; + } + else if( ( unicode_character >= 0x00a0 ) + && ( unicode_character < 0x0100 ) ) + { + unicode_character -= 0x00a0; + + byte_stream_value = libuna_codepage_mac_celtic_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; + } + else if( ( unicode_character >= 0x2010 ) + && ( unicode_character < 0x2048 ) ) + { + unicode_character -= 0x2010; + + byte_stream_value = libuna_codepage_mac_celtic_unicode_to_byte_stream_base_0x2010[ unicode_character ]; + } + else switch( unicode_character ) + { + case 0x0131: + byte_stream_value = 0xf5; + break; + + case 0x0152: + byte_stream_value = 0xce; + break; + + case 0x0153: + byte_stream_value = 0xcf; + break; + + case 0x0174: + byte_stream_value = 0xf8; + break; + + case 0x0175: + byte_stream_value = 0xf9; + break; + + case 0x0176: + byte_stream_value = 0xde; + break; + + case 0x0177: + byte_stream_value = 0xdf; + break; + + case 0x0178: + byte_stream_value = 0xd9; + break; + + case 0x0192: + byte_stream_value = 0xc4; + break; + + case 0x03a9: + byte_stream_value = 0xbd; + break; + + case 0x03c0: + byte_stream_value = 0xb9; + break; + + case 0x1e80: + byte_stream_value = 0xfc; + break; + + case 0x1e81: + byte_stream_value = 0xfd; + break; + + case 0x1e82: + byte_stream_value = 0xfe; + break; + + case 0x1e83: + byte_stream_value = 0xff; + break; + + case 0x1e84: + byte_stream_value = 0xfa; + break; + + case 0x1e85: + byte_stream_value = 0xfb; + break; + + case 0x1ef2: + byte_stream_value = 0xe2; + break; + + case 0x1ef3: + byte_stream_value = 0xe3; + break; + + case 0x20ac: + byte_stream_value = 0xdb; + break; + + case 0x2122: + byte_stream_value = 0xaa; + break; + + case 0x2202: + byte_stream_value = 0xb6; + break; + + case 0x2206: + byte_stream_value = 0xc6; + break; + + case 0x220f: + byte_stream_value = 0xb8; + break; + + case 0x2211: + byte_stream_value = 0xb7; + break; + + case 0x221a: + byte_stream_value = 0xc3; + break; + + case 0x221e: + byte_stream_value = 0xb0; + break; + + case 0x222b: + byte_stream_value = 0xba; + break; + + case 0x2248: + byte_stream_value = 0xc5; + break; + + case 0x2260: + byte_stream_value = 0xad; + break; + + case 0x2264: + byte_stream_value = 0xb2; + break; + + case 0x2265: + byte_stream_value = 0xb3; + break; + + case 0x25ca: + byte_stream_value = 0xd7; + break; + + case 0x2663: + byte_stream_value = 0xf0; + break; + + default: + byte_stream_value = 0x1a; + break; + } + byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); + + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + diff -Nru libfshfs-20201104/libuna/libuna_codepage_mac_celtic.h libfshfs-20240221/libuna/libuna_codepage_mac_celtic.h --- libfshfs-20201104/libuna/libuna_codepage_mac_celtic.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_mac_celtic.h 2024-02-21 06:04:15.000000000 +0000 @@ -0,0 +1,54 @@ +/* + * MacCeltic codepage functions + * + * Copyright (C) 2008-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _LIBUNA_CODEPAGE_MAC_CELTIC_H ) +#define _LIBUNA_CODEPAGE_MAC_CELTIC_H + +#include +#include + +#include "libuna_libcerror.h" +#include "libuna_types.h" + +#if defined( __cplusplus ) +extern "C" { +#endif + +int libuna_codepage_mac_celtic_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); + +int libuna_codepage_mac_celtic_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _LIBUNA_CODEPAGE_MAC_CELTIC_H ) */ + diff -Nru libfshfs-20201104/libuna/libuna_codepage_mac_centraleurroman.c libfshfs-20240221/libuna/libuna_codepage_mac_centraleurroman.c --- libfshfs-20201104/libuna/libuna_codepage_mac_centraleurroman.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_mac_centraleurroman.c 2024-02-21 06:04:15.000000000 +0000 @@ -0,0 +1,319 @@ +/* + * MacCentralEurRoman codepage functions + * + * Copyright (C) 2008-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include + +#include "libuna_codepage_mac_centraleurroman.h" +#include "libuna_libcerror.h" +#include "libuna_types.h" + +/* Extended ASCII to Unicode character lookup table for the MacCentralEurRoman codepage + * Unknown are filled with the Unicode replacement character 0xfffd + */ +const uint16_t libuna_codepage_mac_centraleurroman_byte_stream_to_unicode_base_0x80[ 128 ] = { + 0x00c4, 0x0100, 0x0101, 0x00c9, 0x0104, 0x00d6, 0x00dc, 0x00e1, + 0x0105, 0x010c, 0x00e4, 0x010d, 0x0106, 0x0107, 0x00e9, 0x0179, + 0x017a, 0x010e, 0x00ed, 0x010f, 0x0112, 0x0113, 0x0116, 0x00f3, + 0x0117, 0x00f4, 0x00f6, 0x00f5, 0x00fa, 0x011a, 0x011b, 0x00fc, + 0x2020, 0x00b0, 0x0118, 0x00a3, 0x00a7, 0x2022, 0x00b6, 0x00df, + 0x00ae, 0x00a9, 0x2122, 0x0119, 0x00a8, 0x2260, 0x0123, 0x012e, + 0x012f, 0x012a, 0x2264, 0x2265, 0x012b, 0x0136, 0x2202, 0x2211, + 0x0142, 0x013b, 0x013c, 0x013d, 0x013e, 0x0139, 0x013a, 0x0145, + 0x0146, 0x0143, 0x00ac, 0x221a, 0x0144, 0x0147, 0x2206, 0x00ab, + 0x00bb, 0x2026, 0x00a0, 0x0148, 0x0150, 0x00d5, 0x0151, 0x014c, + 0x2013, 0x2014, 0x201c, 0x201d, 0x2018, 0x2019, 0x00f7, 0x25ca, + 0x014d, 0x0154, 0x0155, 0x0158, 0x2039, 0x203a, 0x0159, 0x0156, + 0x0157, 0x0160, 0x201a, 0x201e, 0x0161, 0x015a, 0x015b, 0x00c1, + 0x0164, 0x0165, 0x00cd, 0x017d, 0x017e, 0x016a, 0x00d3, 0x00d4, + 0x016b, 0x016e, 0x00da, 0x016f, 0x0170, 0x0171, 0x0172, 0x0173, + 0x00dd, 0x00fd, 0x0137, 0x017b, 0x0141, 0x017c, 0x0122, 0x02c7 +}; + +/* Unicode to ASCII character lookup tables for the MacCentralEurRoman codepage + * Unknown are filled with the ASCII replacement character 0x1a + */ +const uint8_t libuna_codepage_mac_centraleurroman_unicode_to_byte_stream_base_0x00a0[ 224 ] = { + 0xca, 0x1a, 0x1a, 0xa3, 0x1a, 0x1a, 0x1a, 0xa4, + 0xac, 0xa9, 0x1a, 0xc7, 0xc2, 0x1a, 0xa8, 0x1a, + 0xa1, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xa6, 0x1a, + 0x1a, 0x1a, 0x1a, 0xc8, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0xe7, 0x1a, 0x1a, 0x80, 0x1a, 0x1a, 0x1a, + 0x1a, 0x83, 0x1a, 0x1a, 0x1a, 0xea, 0x1a, 0x1a, + 0x1a, 0x1a, 0x1a, 0xee, 0xef, 0xcd, 0x85, 0x1a, + 0x1a, 0x1a, 0xf2, 0x1a, 0x86, 0xf8, 0x1a, 0xa7, + 0x1a, 0x87, 0x1a, 0x1a, 0x8a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x8e, 0x1a, 0x1a, 0x1a, 0x92, 0x1a, 0x1a, + 0x1a, 0x1a, 0x1a, 0x97, 0x99, 0x9b, 0x9a, 0xd6, + 0x1a, 0x1a, 0x9c, 0x1a, 0x9f, 0xf9, 0x1a, 0x1a, + 0x81, 0x82, 0x1a, 0x1a, 0x84, 0x88, 0x8c, 0x8d, + 0x1a, 0x1a, 0x1a, 0x1a, 0x89, 0x8b, 0x91, 0x93, + 0x1a, 0x1a, 0x94, 0x95, 0x1a, 0x1a, 0x96, 0x98, + 0xa2, 0xab, 0x9d, 0x9e, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0xfe, 0xae, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0xb1, 0xb4, 0x1a, 0x1a, 0xaf, 0xb0, + 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xb5, 0xfa, + 0x1a, 0xbd, 0xbe, 0xb9, 0xba, 0xbb, 0xbc, 0x1a, + 0x1a, 0xfc, 0xb8, 0xc1, 0xc4, 0xbf, 0xc0, 0xc5, + 0xcb, 0x1a, 0x1a, 0x1a, 0xcf, 0xd8, 0x1a, 0x1a, + 0xcc, 0xce, 0x1a, 0x1a, 0xd9, 0xda, 0xdf, 0xe0, + 0xdb, 0xde, 0xe5, 0xe6, 0x1a, 0x1a, 0x1a, 0x1a, + 0xe1, 0xe4, 0x1a, 0x1a, 0xe8, 0xe9, 0x1a, 0x1a, + 0x1a, 0x1a, 0xed, 0xf0, 0x1a, 0x1a, 0xf1, 0xf3, + 0xf4, 0xf5, 0xf6, 0xf7, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x8f, 0x90, 0xfb, 0xfd, 0xeb, 0xec, 0x1a +}; + +const uint8_t libuna_codepage_mac_centraleurroman_unicode_to_byte_stream_base_0x2010[ 24 ] = { + 0x1a, 0x1a, 0x1a, 0xd0, 0xd1, 0x1a, 0x1a, 0x1a, + 0xd4, 0xd5, 0xe2, 0x1a, 0xd2, 0xd3, 0xe3, 0x1a, + 0xa0, 0x1a, 0xa5, 0x1a, 0x1a, 0x1a, 0xc9, 0x1a +}; + +/* Copies an Unicode character from a MacCentralEurRoman encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_mac_centraleurroman_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_mac_centraleurroman_copy_from_byte_stream"; + libuna_unicode_character_t safe_unicode_character = 0xfffd; + size_t safe_byte_stream_index = 0; + uint8_t byte_stream_character = 0; + + if( unicode_character == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid Unicode character.", + function ); + + return( -1 ); + } + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + byte_stream_character = byte_stream[ safe_byte_stream_index++ ]; + + if( byte_stream_character < 0x80 ) + { + safe_unicode_character = byte_stream_character; + } + else + { + byte_stream_character -= 0x80; + + safe_unicode_character = libuna_codepage_mac_centraleurroman_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; + } + *unicode_character = safe_unicode_character; + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + +/* Copies an Unicode character to a MacCentralEurRoman encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_mac_centraleurroman_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_mac_centraleurroman_copy_to_byte_stream"; + size_t safe_byte_stream_index = 0; + uint16_t byte_stream_value = 0x001a; + + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + if( unicode_character < 0x0080 ) + { + byte_stream_value = (uint16_t) unicode_character; + } + else if( ( unicode_character >= 0x00a0 ) + && ( unicode_character < 0x0180 ) ) + { + unicode_character -= 0x00a0; + + byte_stream_value = libuna_codepage_mac_centraleurroman_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; + } + else if( ( unicode_character >= 0x2010 ) + && ( unicode_character < 0x2028 ) ) + { + unicode_character -= 0x2010; + + byte_stream_value = libuna_codepage_mac_centraleurroman_unicode_to_byte_stream_base_0x2010[ unicode_character ]; + } + else switch( unicode_character ) + { + case 0x02c7: + byte_stream_value = 0xff; + break; + + case 0x2039: + byte_stream_value = 0xdc; + break; + + case 0x203a: + byte_stream_value = 0xdd; + break; + + case 0x2122: + byte_stream_value = 0xaa; + break; + + case 0x2202: + byte_stream_value = 0xb6; + break; + + case 0x2206: + byte_stream_value = 0xc6; + break; + + case 0x2211: + byte_stream_value = 0xb7; + break; + + case 0x221a: + byte_stream_value = 0xc3; + break; + + case 0x2260: + byte_stream_value = 0xad; + break; + + case 0x2264: + byte_stream_value = 0xb2; + break; + + case 0x2265: + byte_stream_value = 0xb3; + break; + + case 0x25ca: + byte_stream_value = 0xd7; + break; + + default: + byte_stream_value = 0x1a; + break; + } + byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); + + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + diff -Nru libfshfs-20201104/libuna/libuna_codepage_mac_centraleurroman.h libfshfs-20240221/libuna/libuna_codepage_mac_centraleurroman.h --- libfshfs-20201104/libuna/libuna_codepage_mac_centraleurroman.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_mac_centraleurroman.h 2024-02-21 06:04:15.000000000 +0000 @@ -0,0 +1,54 @@ +/* + * MacCentralEurRoman codepage functions + * + * Copyright (C) 2008-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _LIBUNA_CODEPAGE_MAC_CENTRALEURROMAN_H ) +#define _LIBUNA_CODEPAGE_MAC_CENTRALEURROMAN_H + +#include +#include + +#include "libuna_libcerror.h" +#include "libuna_types.h" + +#if defined( __cplusplus ) +extern "C" { +#endif + +int libuna_codepage_mac_centraleurroman_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); + +int libuna_codepage_mac_centraleurroman_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _LIBUNA_CODEPAGE_MAC_CENTRALEURROMAN_H ) */ + diff -Nru libfshfs-20201104/libuna/libuna_codepage_mac_croatian.c libfshfs-20240221/libuna/libuna_codepage_mac_croatian.c --- libfshfs-20201104/libuna/libuna_codepage_mac_croatian.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_mac_croatian.c 2024-02-21 06:04:15.000000000 +0000 @@ -0,0 +1,378 @@ +/* + * MacCroatian codepage functions + * + * Copyright (C) 2008-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include + +#include "libuna_codepage_mac_croatian.h" +#include "libuna_libcerror.h" +#include "libuna_types.h" + +/* Extended ASCII to Unicode character lookup table for the MacCroatian codepage + * Unknown are filled with the Unicode replacement character 0xfffd + */ +const uint16_t libuna_codepage_mac_croatian_byte_stream_to_unicode_base_0x80[ 128 ] = { + 0x00c4, 0x00c5, 0x00c7, 0x00c9, 0x00d1, 0x00d6, 0x00dc, 0x00e1, + 0x00e0, 0x00e2, 0x00e4, 0x00e3, 0x00e5, 0x00e7, 0x00e9, 0x00e8, + 0x00ea, 0x00eb, 0x00ed, 0x00ec, 0x00ee, 0x00ef, 0x00f1, 0x00f3, + 0x00f2, 0x00f4, 0x00f6, 0x00f5, 0x00fa, 0x00f9, 0x00fb, 0x00fc, + 0x2020, 0x00b0, 0x00a2, 0x00a3, 0x00a7, 0x2022, 0x00b6, 0x00df, + 0x00ae, 0x0160, 0x2122, 0x00b4, 0x00a8, 0x2260, 0x017d, 0x00d8, + 0x221e, 0x00b1, 0x2264, 0x2265, 0x2206, 0x00b5, 0x2202, 0x2211, + 0x220f, 0x0161, 0x222b, 0x00aa, 0x00ba, 0x03a9, 0x017e, 0x00f8, + 0x00bf, 0x00a1, 0x00ac, 0x221a, 0x0192, 0x2248, 0x0106, 0x00ab, + 0x010c, 0x2026, 0x00a0, 0x00c0, 0x00c3, 0x00d5, 0x0152, 0x0153, + 0x0110, 0x2014, 0x201c, 0x201d, 0x2018, 0x2019, 0x00f7, 0x25ca, + 0xf8ff, 0x00a9, 0x2044, 0x20ac, 0x2039, 0x203a, 0x00c6, 0x00bb, + 0x2013, 0x00b7, 0x201a, 0x201e, 0x2030, 0x00c2, 0x0107, 0x00c1, + 0x010d, 0x00c8, 0x00cd, 0x00ce, 0x00cf, 0x00cc, 0x00d3, 0x00d4, + 0x0111, 0x00d2, 0x00da, 0x00db, 0x00d9, 0x0131, 0x02c6, 0x02dc, + 0x00af, 0x03c0, 0x00cb, 0x02da, 0x00b8, 0x00ca, 0x00e6, 0x02c7 +}; + +/* Unicode to ASCII character lookup tables for the MacCroatian codepage + * Unknown are filled with the ASCII replacement character 0x1a + */ +const uint8_t libuna_codepage_mac_croatian_unicode_to_byte_stream_base_0x00a0[ 120 ] = { + 0xca, 0xc1, 0xa2, 0xa3, 0x1a, 0x1a, 0x1a, 0xa4, + 0xac, 0xd9, 0xbb, 0xc7, 0xc2, 0x1a, 0xa8, 0xf8, + 0xa1, 0xb1, 0x1a, 0x1a, 0xab, 0xb5, 0xa6, 0xe1, + 0xfc, 0x1a, 0xbc, 0xdf, 0x1a, 0x1a, 0x1a, 0xc0, + 0xcb, 0xe7, 0xe5, 0xcc, 0x80, 0x81, 0xde, 0x82, + 0xe9, 0x83, 0xfd, 0xfa, 0xed, 0xea, 0xeb, 0xec, + 0x1a, 0x84, 0xf1, 0xee, 0xef, 0xcd, 0x85, 0x1a, + 0xaf, 0xf4, 0xf2, 0xf3, 0x86, 0x1a, 0x1a, 0xa7, + 0x88, 0x87, 0x89, 0x8b, 0x8a, 0x8c, 0xfe, 0x8d, + 0x8f, 0x8e, 0x90, 0x91, 0x93, 0x92, 0x94, 0x95, + 0x1a, 0x96, 0x98, 0x97, 0x99, 0x9b, 0x9a, 0xd6, + 0xbf, 0x9d, 0x9c, 0x9e, 0x9f, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xc6, 0xe6, + 0x1a, 0x1a, 0x1a, 0x1a, 0xc8, 0xe8, 0x1a, 0x1a, + 0xd0, 0xf0, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a +}; + +const uint8_t libuna_codepage_mac_croatian_unicode_to_byte_stream_base_0x2010[ 56 ] = { + 0x1a, 0x1a, 0x1a, 0xe0, 0xd1, 0x1a, 0x1a, 0x1a, + 0xd4, 0xd5, 0xe2, 0x1a, 0xd2, 0xd3, 0xe3, 0x1a, + 0xa0, 0x1a, 0xa5, 0x1a, 0x1a, 0x1a, 0xc9, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0xe4, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0xdc, 0xdd, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0xda, 0x1a, 0x1a, 0x1a +}; + +/* Copies an Unicode character from a MacCroatian encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_mac_croatian_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_mac_croatian_copy_from_byte_stream"; + libuna_unicode_character_t safe_unicode_character = 0xfffd; + size_t safe_byte_stream_index = 0; + uint8_t byte_stream_character = 0; + + if( unicode_character == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid Unicode character.", + function ); + + return( -1 ); + } + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + byte_stream_character = byte_stream[ safe_byte_stream_index++ ]; + + if( byte_stream_character < 0x80 ) + { + safe_unicode_character = byte_stream_character; + } + else + { + byte_stream_character -= 0x80; + + safe_unicode_character = libuna_codepage_mac_croatian_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; + } + *unicode_character = safe_unicode_character; + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + +/* Copies an Unicode character to a MacCroatian encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_mac_croatian_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_mac_croatian_copy_to_byte_stream"; + size_t safe_byte_stream_index = 0; + uint16_t byte_stream_value = 0x001a; + + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + if( unicode_character < 0x0080 ) + { + byte_stream_value = (uint16_t) unicode_character; + } + else if( ( unicode_character >= 0x00a0 ) + && ( unicode_character < 0x0118 ) ) + { + unicode_character -= 0x00a0; + + byte_stream_value = libuna_codepage_mac_croatian_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; + } + else if( ( unicode_character >= 0x2010 ) + && ( unicode_character < 0x2048 ) ) + { + unicode_character -= 0x2010; + + byte_stream_value = libuna_codepage_mac_croatian_unicode_to_byte_stream_base_0x2010[ unicode_character ]; + } + else switch( unicode_character ) + { + case 0x0131: + byte_stream_value = 0xf5; + break; + + case 0x0152: + byte_stream_value = 0xce; + break; + + case 0x0153: + byte_stream_value = 0xcf; + break; + + case 0x0160: + byte_stream_value = 0xa9; + break; + + case 0x0161: + byte_stream_value = 0xb9; + break; + + case 0x017d: + byte_stream_value = 0xae; + break; + + case 0x017e: + byte_stream_value = 0xbe; + break; + + case 0x0192: + byte_stream_value = 0xc4; + break; + + case 0x02c6: + byte_stream_value = 0xf6; + break; + + case 0x02c7: + byte_stream_value = 0xff; + break; + + case 0x02da: + byte_stream_value = 0xfb; + break; + + case 0x02dc: + byte_stream_value = 0xf7; + break; + + case 0x03a9: + byte_stream_value = 0xbd; + break; + + case 0x03c0: + byte_stream_value = 0xf9; + break; + + case 0x20ac: + byte_stream_value = 0xdb; + break; + + case 0x2122: + byte_stream_value = 0xaa; + break; + + case 0x2202: + byte_stream_value = 0xb6; + break; + + case 0x2206: + byte_stream_value = 0xb4; + break; + + case 0x220f: + byte_stream_value = 0xb8; + break; + + case 0x2211: + byte_stream_value = 0xb7; + break; + + case 0x221a: + byte_stream_value = 0xc3; + break; + + case 0x221e: + byte_stream_value = 0xb0; + break; + + case 0x222b: + byte_stream_value = 0xba; + break; + + case 0x2248: + byte_stream_value = 0xc5; + break; + + case 0x2260: + byte_stream_value = 0xad; + break; + + case 0x2264: + byte_stream_value = 0xb2; + break; + + case 0x2265: + byte_stream_value = 0xb3; + break; + + case 0x25ca: + byte_stream_value = 0xd7; + break; + + case 0xf8ff: + byte_stream_value = 0xd8; + break; + + default: + byte_stream_value = 0x1a; + break; + } + byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); + + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + diff -Nru libfshfs-20201104/libuna/libuna_codepage_mac_croatian.h libfshfs-20240221/libuna/libuna_codepage_mac_croatian.h --- libfshfs-20201104/libuna/libuna_codepage_mac_croatian.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_mac_croatian.h 2024-02-21 06:04:15.000000000 +0000 @@ -0,0 +1,54 @@ +/* + * MacCroatian codepage functions + * + * Copyright (C) 2008-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _LIBUNA_CODEPAGE_MAC_CROATIAN_H ) +#define _LIBUNA_CODEPAGE_MAC_CROATIAN_H + +#include +#include + +#include "libuna_libcerror.h" +#include "libuna_types.h" + +#if defined( __cplusplus ) +extern "C" { +#endif + +int libuna_codepage_mac_croatian_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); + +int libuna_codepage_mac_croatian_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _LIBUNA_CODEPAGE_MAC_CROATIAN_H ) */ + diff -Nru libfshfs-20201104/libuna/libuna_codepage_mac_cyrillic.c libfshfs-20240221/libuna/libuna_codepage_mac_cyrillic.c --- libfshfs-20201104/libuna/libuna_codepage_mac_cyrillic.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_mac_cyrillic.c 2024-02-21 06:04:15.000000000 +0000 @@ -0,0 +1,325 @@ +/* + * MacCyrillic codepage functions + * + * Copyright (C) 2008-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include + +#include "libuna_codepage_mac_cyrillic.h" +#include "libuna_libcerror.h" +#include "libuna_types.h" + +/* Extended ASCII to Unicode character lookup table for the MacCyrillic codepage + * Unknown are filled with the Unicode replacement character 0xfffd + */ +const uint16_t libuna_codepage_mac_cyrillic_byte_stream_to_unicode_base_0x80[ 128 ] = { + 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, + 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f, + 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, + 0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f, + 0x2020, 0x00b0, 0x0490, 0x00a3, 0x00a7, 0x2022, 0x00b6, 0x0406, + 0x00ae, 0x00a9, 0x2122, 0x0402, 0x0452, 0x2260, 0x0403, 0x0453, + 0x221e, 0x00b1, 0x2264, 0x2265, 0x0456, 0x00b5, 0x0491, 0x0408, + 0x0404, 0x0454, 0x0407, 0x0457, 0x0409, 0x0459, 0x040a, 0x045a, + 0x0458, 0x0405, 0x00ac, 0x221a, 0x0192, 0x2248, 0x2206, 0x00ab, + 0x00bb, 0x2026, 0x00a0, 0x040b, 0x045b, 0x040c, 0x045c, 0x0455, + 0x2013, 0x2014, 0x201c, 0x201d, 0x2018, 0x2019, 0x00f7, 0x201e, + 0x040e, 0x045e, 0x040f, 0x045f, 0x2116, 0x0401, 0x0451, 0x044f, + 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, + 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f, + 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, + 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x20ac +}; + +/* Unicode to ASCII character lookup tables for the MacCyrillic codepage + * Unknown are filled with the ASCII replacement character 0x1a + */ +const uint8_t libuna_codepage_mac_cyrillic_unicode_to_byte_stream_base_0x00a0[ 32 ] = { + 0xca, 0x1a, 0x1a, 0xa3, 0x1a, 0x1a, 0x1a, 0xa4, + 0x1a, 0xa9, 0x1a, 0xc7, 0xc2, 0x1a, 0xa8, 0x1a, + 0xa1, 0xb1, 0x1a, 0x1a, 0x1a, 0xb5, 0xa6, 0x1a, + 0x1a, 0x1a, 0x1a, 0xc8, 0x1a, 0x1a, 0x1a, 0x1a +}; + +const uint8_t libuna_codepage_mac_cyrillic_unicode_to_byte_stream_base_0x0400[ 96 ] = { + 0x1a, 0xdd, 0xab, 0xae, 0xb8, 0xc1, 0xa7, 0xba, + 0xb7, 0xbc, 0xbe, 0xcb, 0xcd, 0x1a, 0xd8, 0xda, + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, + 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, + 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, + 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, + 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, + 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, + 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, + 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xdf, + 0x1a, 0xde, 0xac, 0xaf, 0xb9, 0xcf, 0xb4, 0xbb, + 0xc0, 0xbd, 0xbf, 0xcc, 0xce, 0x1a, 0xd9, 0xdb +}; + +const uint8_t libuna_codepage_mac_cyrillic_unicode_to_byte_stream_base_0x2010[ 24 ] = { + 0x1a, 0x1a, 0x1a, 0xd0, 0xd1, 0x1a, 0x1a, 0x1a, + 0xd4, 0xd5, 0x1a, 0x1a, 0xd2, 0xd3, 0xd7, 0x1a, + 0xa0, 0x1a, 0xa5, 0x1a, 0x1a, 0x1a, 0xc9, 0x1a +}; + +/* Copies an Unicode character from a MacCyrillic encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_mac_cyrillic_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_mac_cyrillic_copy_from_byte_stream"; + libuna_unicode_character_t safe_unicode_character = 0xfffd; + size_t safe_byte_stream_index = 0; + uint8_t byte_stream_character = 0; + + if( unicode_character == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid Unicode character.", + function ); + + return( -1 ); + } + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + byte_stream_character = byte_stream[ safe_byte_stream_index++ ]; + + if( byte_stream_character < 0x80 ) + { + safe_unicode_character = byte_stream_character; + } + else + { + byte_stream_character -= 0x80; + + safe_unicode_character = libuna_codepage_mac_cyrillic_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; + } + *unicode_character = safe_unicode_character; + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + +/* Copies an Unicode character to a MacCyrillic encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_mac_cyrillic_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_mac_cyrillic_copy_to_byte_stream"; + size_t safe_byte_stream_index = 0; + uint16_t byte_stream_value = 0x001a; + + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + if( unicode_character < 0x0080 ) + { + byte_stream_value = (uint16_t) unicode_character; + } + else if( ( unicode_character >= 0x00a0 ) + && ( unicode_character < 0x00c0 ) ) + { + unicode_character -= 0x00a0; + + byte_stream_value = libuna_codepage_mac_cyrillic_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; + } + else if( ( unicode_character >= 0x0400 ) + && ( unicode_character < 0x0460 ) ) + { + unicode_character -= 0x0400; + + byte_stream_value = libuna_codepage_mac_cyrillic_unicode_to_byte_stream_base_0x0400[ unicode_character ]; + } + else if( ( unicode_character >= 0x2010 ) + && ( unicode_character < 0x2028 ) ) + { + unicode_character -= 0x2010; + + byte_stream_value = libuna_codepage_mac_cyrillic_unicode_to_byte_stream_base_0x2010[ unicode_character ]; + } + else switch( unicode_character ) + { + case 0x00f7: + byte_stream_value = 0xd6; + break; + + case 0x0192: + byte_stream_value = 0xc4; + break; + + case 0x0490: + byte_stream_value = 0xa2; + break; + + case 0x0491: + byte_stream_value = 0xb6; + break; + + case 0x20ac: + byte_stream_value = 0xff; + break; + + case 0x2116: + byte_stream_value = 0xdc; + break; + + case 0x2122: + byte_stream_value = 0xaa; + break; + + case 0x2206: + byte_stream_value = 0xc6; + break; + + case 0x221a: + byte_stream_value = 0xc3; + break; + + case 0x221e: + byte_stream_value = 0xb0; + break; + + case 0x2248: + byte_stream_value = 0xc5; + break; + + case 0x2260: + byte_stream_value = 0xad; + break; + + case 0x2264: + byte_stream_value = 0xb2; + break; + + case 0x2265: + byte_stream_value = 0xb3; + break; + + default: + byte_stream_value = 0x1a; + break; + } + byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); + + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + diff -Nru libfshfs-20201104/libuna/libuna_codepage_mac_cyrillic.h libfshfs-20240221/libuna/libuna_codepage_mac_cyrillic.h --- libfshfs-20201104/libuna/libuna_codepage_mac_cyrillic.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_mac_cyrillic.h 2024-02-21 06:04:15.000000000 +0000 @@ -0,0 +1,54 @@ +/* + * MacCyrillic codepage functions + * + * Copyright (C) 2008-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _LIBUNA_CODEPAGE_MAC_CYRILLIC_H ) +#define _LIBUNA_CODEPAGE_MAC_CYRILLIC_H + +#include +#include + +#include "libuna_libcerror.h" +#include "libuna_types.h" + +#if defined( __cplusplus ) +extern "C" { +#endif + +int libuna_codepage_mac_cyrillic_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); + +int libuna_codepage_mac_cyrillic_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _LIBUNA_CODEPAGE_MAC_CYRILLIC_H ) */ + diff -Nru libfshfs-20201104/libuna/libuna_codepage_mac_dingbats.c libfshfs-20240221/libuna/libuna_codepage_mac_dingbats.c --- libfshfs-20201104/libuna/libuna_codepage_mac_dingbats.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_mac_dingbats.c 2024-02-21 06:04:15.000000000 +0000 @@ -0,0 +1,347 @@ +/* + * MacDingbats codepage functions + * + * Copyright (C) 2008-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include + +#include "libuna_codepage_mac_dingbats.h" +#include "libuna_libcerror.h" +#include "libuna_types.h" + +/* Extended ASCII to Unicode character lookup table for the MacDingbats codepage + * Unknown are filled with the Unicode replacement character 0xfffd + */ +const uint16_t libuna_codepage_mac_dingbats_byte_stream_to_unicode_base_0x20[ 224 ] = { + 0x0020, 0x2701, 0x2702, 0x2703, 0x2704, 0x260e, 0x2706, 0x2707, + 0x2708, 0x2709, 0x261b, 0x261e, 0x270c, 0x270d, 0x270e, 0x270f, + 0x2710, 0x2711, 0x2712, 0x2713, 0x2714, 0x2715, 0x2716, 0x2717, + 0x2718, 0x2719, 0x271a, 0x271b, 0x271c, 0x271d, 0x271e, 0x271f, + 0x2720, 0x2721, 0x2722, 0x2723, 0x2724, 0x2725, 0x2726, 0x2727, + 0x2605, 0x2729, 0x272a, 0x272b, 0x272c, 0x272d, 0x272e, 0x272f, + 0x2730, 0x2731, 0x2732, 0x2733, 0x2734, 0x2735, 0x2736, 0x2737, + 0x2738, 0x2739, 0x273a, 0x273b, 0x273c, 0x273d, 0x273e, 0x273f, + 0x2740, 0x2741, 0x2742, 0x2743, 0x2744, 0x2745, 0x2746, 0x2747, + 0x2748, 0x2749, 0x274a, 0x274b, 0x25cf, 0x274d, 0x25a0, 0x274f, + 0x2750, 0x2751, 0x2752, 0x25b2, 0x25bc, 0x25c6, 0x2756, 0x25d7, + 0x2758, 0x2759, 0x275a, 0x275b, 0x275c, 0x275d, 0x275e, 0x007f, + 0x2768, 0x2769, 0x276a, 0x276b, 0x276c, 0x276d, 0x276e, 0x276f, + 0x2770, 0x2771, 0x2772, 0x2773, 0x2774, 0x2775, 0xfffd, 0xfffd, + 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, + 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, + 0xfffd, 0x2761, 0x2762, 0x2763, 0x2764, 0x2765, 0x2766, 0x2767, + 0x2663, 0x2666, 0x2665, 0x2660, 0x2460, 0x2461, 0x2462, 0x2463, + 0x2464, 0x2465, 0x2466, 0x2467, 0x2468, 0x2469, 0x2776, 0x2777, + 0x2778, 0x2779, 0x277a, 0x277b, 0x277c, 0x277d, 0x277e, 0x277f, + 0x2780, 0x2781, 0x2782, 0x2783, 0x2784, 0x2785, 0x2786, 0x2787, + 0x2788, 0x2789, 0x278a, 0x278b, 0x278c, 0x278d, 0x278e, 0x278f, + 0x2790, 0x2791, 0x2792, 0x2793, 0x2794, 0x2192, 0x2194, 0x2195, + 0x2798, 0x2799, 0x279a, 0x279b, 0x279c, 0x279d, 0x279e, 0x279f, + 0x27a0, 0x27a1, 0x27a2, 0x27a3, 0x27a4, 0x27a5, 0x27a6, 0x27a7, + 0x27a8, 0x27a9, 0x27aa, 0x27ab, 0x27ac, 0x27ad, 0x27ae, 0x27af, + 0xfffd, 0x27b1, 0x27b2, 0x27b3, 0x27b4, 0x27b5, 0x27b6, 0x27b7, + 0x27b8, 0x27b9, 0x27ba, 0x27bb, 0x27bc, 0x27bd, 0x27be, 0xfffd +}; + +/* Unicode to ASCII character lookup tables for the MacDingbats codepage + * Unknown are filled with the ASCII replacement character 0x1a + */ +const uint8_t libuna_codepage_mac_dingbats_unicode_to_byte_stream_base_0x2460[ 16 ] = { + 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, + 0xb4, 0xb5, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a +}; + +const uint8_t libuna_codepage_mac_dingbats_unicode_to_byte_stream_base_0x2700[ 192 ] = { + 0x1a, 0x21, 0x22, 0x23, 0x24, 0x1a, 0x26, 0x27, + 0x28, 0x29, 0x1a, 0x1a, 0x2c, 0x2d, 0x2e, 0x2f, + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, + 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, + 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, + 0x1a, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, + 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, + 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, + 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, + 0x68, 0x69, 0x6a, 0x6b, 0x1a, 0x6d, 0x1a, 0x6f, + 0x70, 0x71, 0x72, 0x1a, 0x1a, 0x1a, 0x76, 0x1a, + 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x1a, + 0x1a, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, + 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0xb6, 0xb7, + 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, + 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, + 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, + 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0x1a, 0x1a, 0x1a, + 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, + 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, + 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, + 0x1a, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, + 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0x1a +}; + +/* Copies an Unicode character from a MacDingbats encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_mac_dingbats_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_mac_dingbats_copy_from_byte_stream"; + libuna_unicode_character_t safe_unicode_character = 0xfffd; + size_t safe_byte_stream_index = 0; + uint8_t byte_stream_character = 0; + + if( unicode_character == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid Unicode character.", + function ); + + return( -1 ); + } + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + byte_stream_character = byte_stream[ safe_byte_stream_index++ ]; + + if( byte_stream_character < 0x20 ) + { + safe_unicode_character = byte_stream_character; + } + else + { + byte_stream_character -= 0x20; + + safe_unicode_character = libuna_codepage_mac_dingbats_byte_stream_to_unicode_base_0x20[ byte_stream_character ]; + } + *unicode_character = safe_unicode_character; + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + +/* Copies an Unicode character to a MacDingbats encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_mac_dingbats_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_mac_dingbats_copy_to_byte_stream"; + size_t safe_byte_stream_index = 0; + uint16_t byte_stream_value = 0x001a; + + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + if( ( unicode_character <= 0x0020 ) + || ( unicode_character == 0x007f ) ) + { + byte_stream_value = (uint16_t) unicode_character; + } + else if( ( unicode_character >= 0x2460 ) + && ( unicode_character < 0x2470 ) ) + { + unicode_character -= 0x2460; + + byte_stream_value = libuna_codepage_mac_dingbats_unicode_to_byte_stream_base_0x2460[ unicode_character ]; + } + else if( ( unicode_character >= 0x2700 ) + && ( unicode_character < 0x27c0 ) ) + { + unicode_character -= 0x2700; + + byte_stream_value = libuna_codepage_mac_dingbats_unicode_to_byte_stream_base_0x2700[ unicode_character ]; + } + else switch( unicode_character ) + { + case 0x2192: + byte_stream_value = 0xd5; + break; + + case 0x2194: + byte_stream_value = 0xd6; + break; + + case 0x2195: + byte_stream_value = 0xd7; + break; + + case 0x25a0: + byte_stream_value = 0x6e; + break; + + case 0x25b2: + byte_stream_value = 0x73; + break; + + case 0x25bc: + byte_stream_value = 0x74; + break; + + case 0x25c6: + byte_stream_value = 0x75; + break; + + case 0x25cf: + byte_stream_value = 0x6c; + break; + + case 0x25d7: + byte_stream_value = 0x77; + break; + + case 0x2605: + byte_stream_value = 0x48; + break; + + case 0x260e: + byte_stream_value = 0x25; + break; + + case 0x261b: + byte_stream_value = 0x2a; + break; + + case 0x261e: + byte_stream_value = 0x2b; + break; + + case 0x2660: + byte_stream_value = 0xab; + break; + + case 0x2663: + byte_stream_value = 0xa8; + break; + + case 0x2665: + byte_stream_value = 0xaa; + break; + + case 0x2666: + byte_stream_value = 0xa9; + break; + + default: + byte_stream_value = 0x1a; + break; + } + byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); + + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + diff -Nru libfshfs-20201104/libuna/libuna_codepage_mac_dingbats.h libfshfs-20240221/libuna/libuna_codepage_mac_dingbats.h --- libfshfs-20201104/libuna/libuna_codepage_mac_dingbats.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_mac_dingbats.h 2024-02-21 06:04:15.000000000 +0000 @@ -0,0 +1,54 @@ +/* + * MacDingbats codepage functions + * + * Copyright (C) 2008-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _LIBUNA_CODEPAGE_MAC_DINGBATS_H ) +#define _LIBUNA_CODEPAGE_MAC_DINGBATS_H + +#include +#include + +#include "libuna_libcerror.h" +#include "libuna_types.h" + +#if defined( __cplusplus ) +extern "C" { +#endif + +int libuna_codepage_mac_dingbats_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); + +int libuna_codepage_mac_dingbats_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _LIBUNA_CODEPAGE_MAC_DINGBATS_H ) */ + diff -Nru libfshfs-20201104/libuna/libuna_codepage_mac_farsi.c libfshfs-20240221/libuna/libuna_codepage_mac_farsi.c --- libfshfs-20201104/libuna/libuna_codepage_mac_farsi.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_mac_farsi.c 2024-02-21 06:04:15.000000000 +0000 @@ -0,0 +1,372 @@ +/* + * MacFarsi codepage functions + * + * Copyright (C) 2008-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include + +#include "libuna_codepage_mac_farsi.h" +#include "libuna_libcerror.h" +#include "libuna_types.h" + +/* Extended ASCII to Unicode character lookup table for the MacFarsi codepage + * Unknown are filled with the Unicode replacement character 0xfffd + */ +const uint16_t libuna_codepage_mac_farsi_byte_stream_to_unicode_base_0x80[ 128 ] = { + 0x00c4, 0x00a0, 0x00c7, 0x00c9, 0x00d1, 0x00d6, 0x00dc, 0x00e1, + 0x00e0, 0x00e2, 0x00e4, 0x06ba, 0x00ab, 0x00e7, 0x00e9, 0x00e8, + 0x00ea, 0x00eb, 0x00ed, 0x2026, 0x00ee, 0x00ef, 0x00f1, 0x00f3, + 0x00bb, 0x00f4, 0x00f6, 0x00f7, 0x00fa, 0x00f9, 0x00fb, 0x00fc, + 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x066a, 0x0026, 0x0027, + 0x0028, 0x0029, 0x002a, 0x002b, 0x060c, 0x002d, 0x002e, 0x002f, + 0x06f0, 0x06f1, 0x06f2, 0x06f3, 0x06f4, 0x06f5, 0x06f6, 0x06f7, + 0x06f8, 0x06f9, 0x003a, 0x061b, 0x003c, 0x003d, 0x003e, 0x061f, + 0x274a, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627, + 0x0628, 0x0629, 0x062a, 0x062b, 0x062c, 0x062d, 0x062e, 0x062f, + 0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x0637, + 0x0638, 0x0639, 0x063a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, + 0x0640, 0x0641, 0x0642, 0x0643, 0x0644, 0x0645, 0x0646, 0x0647, + 0x0648, 0x0649, 0x064a, 0x064b, 0x064c, 0x064d, 0x064e, 0x064f, + 0x0650, 0x0651, 0x0652, 0x067e, 0x0679, 0x0686, 0x06d5, 0x06a4, + 0x06af, 0x0688, 0x0691, 0x007b, 0x007c, 0x007d, 0x0698, 0x06d2 +}; + +/* Unicode to ASCII character lookup tables for the MacFarsi codepage + * Unknown are filled with the ASCII replacement character 0x1a + */ +const uint8_t libuna_codepage_mac_farsi_unicode_to_byte_stream_base_0x0020[ 32 ] = { + 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0x25, 0xa6, 0xa7, + 0xa8, 0xa9, 0xaa, 0xab, 0x2c, 0xad, 0xae, 0xaf, + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, + 0x38, 0x39, 0xba, 0x3b, 0xbc, 0xbd, 0xbe, 0x3f +}; + +const uint8_t libuna_codepage_mac_farsi_unicode_to_byte_stream_base_0x00a0[ 96 ] = { + 0x81, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0x1a, 0x8c, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0x1a, 0x98, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0x80, 0x1a, 0x1a, 0x82, + 0x1a, 0x83, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x84, 0x1a, 0x1a, 0x1a, 0x1a, 0x85, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0x86, 0x1a, 0x1a, 0x1a, + 0x88, 0x87, 0x89, 0x1a, 0x8a, 0x1a, 0x1a, 0x8d, + 0x8f, 0x8e, 0x90, 0x91, 0x1a, 0x92, 0x94, 0x95, + 0x1a, 0x96, 0x1a, 0x97, 0x99, 0x1a, 0x9a, 0x9b, + 0x1a, 0x9d, 0x9c, 0x9e, 0x9f, 0x1a, 0x1a, 0x1a +}; + +const uint8_t libuna_codepage_mac_farsi_unicode_to_byte_stream_base_0x0608[ 80 ] = { + 0x1a, 0x1a, 0x1a, 0x1a, 0xac, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0x1a, 0xbb, 0x1a, 0x1a, 0x1a, 0xbf, + 0x1a, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, + 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, + 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, + 0xd8, 0xd9, 0xda, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, + 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, + 0xf0, 0xf1, 0xf2, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a +}; + +const uint8_t libuna_codepage_mac_farsi_unicode_to_byte_stream_base_0x0668[ 88 ] = { + 0x1a, 0x1a, 0xa5, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0xf4, 0x1a, 0x1a, 0x1a, 0x1a, 0xf3, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xf5, 0x1a, + 0xf9, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0xfa, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0xfe, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0xf7, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xf8, + 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0x8b, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a +}; + +const uint8_t libuna_codepage_mac_farsi_unicode_to_byte_stream_base_0x06f0[ 16 ] = { + 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, + 0xb8, 0xb9, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a +}; + +/* Copies an Unicode character from a MacFarsi encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_mac_farsi_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_mac_farsi_copy_from_byte_stream"; + libuna_unicode_character_t safe_unicode_character = 0xfffd; + size_t safe_byte_stream_index = 0; + uint8_t byte_stream_character = 0; + + if( unicode_character == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid Unicode character.", + function ); + + return( -1 ); + } + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + byte_stream_character = byte_stream[ safe_byte_stream_index++ ]; + + if( byte_stream_character < 0x80 ) + { + safe_unicode_character = byte_stream_character; + } + else + { + byte_stream_character -= 0x80; + + safe_unicode_character = libuna_codepage_mac_farsi_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; + } + *unicode_character = safe_unicode_character; + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + +/* Copies an Unicode character to a MacFarsi encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_mac_farsi_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_mac_farsi_copy_to_byte_stream"; + size_t safe_byte_stream_index = 0; + uint16_t byte_stream_value = 0x001a; + + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + if( unicode_character < 0x0020 ) + { + byte_stream_value = (uint16_t) unicode_character; + } + else if( ( unicode_character >= 0x0020 ) + && ( unicode_character < 0x0040 ) ) + { + unicode_character -= 0x0020; + + byte_stream_value = libuna_codepage_mac_farsi_unicode_to_byte_stream_base_0x0020[ unicode_character ]; + } + else if( ( unicode_character >= 0x0040 ) + && ( unicode_character < 0x005b ) ) + { + byte_stream_value = (uint16_t) unicode_character; + } + else if( ( unicode_character >= 0x0060 ) + && ( unicode_character < 0x007b ) ) + { + byte_stream_value = (uint16_t) unicode_character; + } + else if( ( unicode_character >= 0x007e ) + && ( unicode_character < 0x0080 ) ) + { + byte_stream_value = (uint16_t) unicode_character; + } + else if( ( unicode_character >= 0x00a0 ) + && ( unicode_character < 0x0100 ) ) + { + unicode_character -= 0x00a0; + + byte_stream_value = libuna_codepage_mac_farsi_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; + } + else if( ( unicode_character >= 0x0608 ) + && ( unicode_character < 0x0658 ) ) + { + unicode_character -= 0x0608; + + byte_stream_value = libuna_codepage_mac_farsi_unicode_to_byte_stream_base_0x0608[ unicode_character ]; + } + else if( ( unicode_character >= 0x0668 ) + && ( unicode_character < 0x06c0 ) ) + { + unicode_character -= 0x0668; + + byte_stream_value = libuna_codepage_mac_farsi_unicode_to_byte_stream_base_0x0668[ unicode_character ]; + } + else if( ( unicode_character >= 0x06f0 ) + && ( unicode_character < 0x0700 ) ) + { + unicode_character -= 0x06f0; + + byte_stream_value = libuna_codepage_mac_farsi_unicode_to_byte_stream_base_0x06f0[ unicode_character ]; + } + else switch( unicode_character ) + { + case 0x005b: + byte_stream_value = 0xdb; + break; + + case 0x005c: + byte_stream_value = 0xdc; + break; + + case 0x005d: + byte_stream_value = 0xdd; + break; + + case 0x005e: + byte_stream_value = 0xde; + break; + + case 0x005f: + byte_stream_value = 0xdf; + break; + + case 0x007b: + byte_stream_value = 0xfb; + break; + + case 0x007c: + byte_stream_value = 0xfc; + break; + + case 0x007d: + byte_stream_value = 0xfd; + break; + + case 0x06d2: + byte_stream_value = 0xff; + break; + + case 0x06d5: + byte_stream_value = 0xf6; + break; + + case 0x2026: + byte_stream_value = 0x93; + break; + + case 0x274a: + byte_stream_value = 0xc0; + break; + + default: + byte_stream_value = 0x1a; + break; + } + byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); + + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + diff -Nru libfshfs-20201104/libuna/libuna_codepage_mac_farsi.h libfshfs-20240221/libuna/libuna_codepage_mac_farsi.h --- libfshfs-20201104/libuna/libuna_codepage_mac_farsi.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_mac_farsi.h 2024-02-21 06:04:15.000000000 +0000 @@ -0,0 +1,54 @@ +/* + * MacFarsi codepage functions + * + * Copyright (C) 2008-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _LIBUNA_CODEPAGE_MAC_FARSI_H ) +#define _LIBUNA_CODEPAGE_MAC_FARSI_H + +#include +#include + +#include "libuna_libcerror.h" +#include "libuna_types.h" + +#if defined( __cplusplus ) +extern "C" { +#endif + +int libuna_codepage_mac_farsi_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); + +int libuna_codepage_mac_farsi_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _LIBUNA_CODEPAGE_MAC_FARSI_H ) */ + diff -Nru libfshfs-20201104/libuna/libuna_codepage_mac_gaelic.c libfshfs-20240221/libuna/libuna_codepage_mac_gaelic.c --- libfshfs-20201104/libuna/libuna_codepage_mac_gaelic.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_mac_gaelic.c 2024-02-21 06:04:15.000000000 +0000 @@ -0,0 +1,437 @@ +/* + * MacGaelic codepage functions + * + * Copyright (C) 2008-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include + +#include "libuna_codepage_mac_gaelic.h" +#include "libuna_libcerror.h" +#include "libuna_types.h" + +/* Extended ASCII to Unicode character lookup table for the MacGaelic codepage + * Unknown are filled with the Unicode replacement character 0xfffd + */ +const uint16_t libuna_codepage_mac_gaelic_byte_stream_to_unicode_base_0x80[ 128 ] = { + 0x00c4, 0x00c5, 0x00c7, 0x00c9, 0x00d1, 0x00d6, 0x00dc, 0x00e1, + 0x00e0, 0x00e2, 0x00e4, 0x00e3, 0x00e5, 0x00e7, 0x00e9, 0x00e8, + 0x00ea, 0x00eb, 0x00ed, 0x00ec, 0x00ee, 0x00ef, 0x00f1, 0x00f3, + 0x00f2, 0x00f4, 0x00f6, 0x00f5, 0x00fa, 0x00f9, 0x00fb, 0x00fc, + 0x2020, 0x00b0, 0x00a2, 0x00a3, 0x00a7, 0x2022, 0x00b6, 0x00df, + 0x00ae, 0x00a9, 0x2122, 0x00b4, 0x00a8, 0x2260, 0x00c6, 0x00d8, + 0x1e02, 0x00b1, 0x2264, 0x2265, 0x1e03, 0x010a, 0x010b, 0x1e0a, + 0x1e0b, 0x1e1e, 0x1e1f, 0x0120, 0x0121, 0x1e40, 0x00e6, 0x00f8, + 0x1e41, 0x1e56, 0x1e57, 0x027c, 0x0192, 0x017f, 0x1e60, 0x00ab, + 0x00bb, 0x2026, 0x00a0, 0x00c0, 0x00c3, 0x00d5, 0x0152, 0x0153, + 0x2013, 0x2014, 0x201c, 0x201d, 0x2018, 0x2019, 0x1e61, 0x1e9b, + 0x00ff, 0x0178, 0x1e6a, 0x20ac, 0x2039, 0x203a, 0x0176, 0x0177, + 0x1e6b, 0x00b7, 0x1ef2, 0x1ef3, 0x204a, 0x00c2, 0x00ca, 0x00c1, + 0x00cb, 0x00c8, 0x00cd, 0x00ce, 0x00cf, 0x00cc, 0x00d3, 0x00d4, + 0x2663, 0x00d2, 0x00da, 0x00db, 0x00d9, 0x0131, 0x00dd, 0x00fd, + 0x0174, 0x0175, 0x1e84, 0x1e85, 0x1e80, 0x1e81, 0x1e82, 0x1e83 +}; + +/* Unicode to ASCII character lookup tables for the MacGaelic codepage + * Unknown are filled with the ASCII replacement character 0x1a + */ +const uint8_t libuna_codepage_mac_gaelic_unicode_to_byte_stream_base_0x00a0[ 112 ] = { + 0xca, 0x1a, 0xa2, 0xa3, 0x1a, 0x1a, 0x1a, 0xa4, + 0xac, 0xa9, 0x1a, 0xc7, 0x1a, 0x1a, 0xa8, 0x1a, + 0xa1, 0xb1, 0x1a, 0x1a, 0xab, 0x1a, 0xa6, 0xe1, + 0x1a, 0x1a, 0x1a, 0xc8, 0x1a, 0x1a, 0x1a, 0x1a, + 0xcb, 0xe7, 0xe5, 0xcc, 0x80, 0x81, 0xae, 0x82, + 0xe9, 0x83, 0xe6, 0xe8, 0xed, 0xea, 0xeb, 0xec, + 0x1a, 0x84, 0xf1, 0xee, 0xef, 0xcd, 0x85, 0x1a, + 0xaf, 0xf4, 0xf2, 0xf3, 0x86, 0xf6, 0x1a, 0xa7, + 0x88, 0x87, 0x89, 0x8b, 0x8a, 0x8c, 0xbe, 0x8d, + 0x8f, 0x8e, 0x90, 0x91, 0x93, 0x92, 0x94, 0x95, + 0x1a, 0x96, 0x98, 0x97, 0x99, 0x9b, 0x9a, 0x1a, + 0xbf, 0x9d, 0x9c, 0x9e, 0x9f, 0xf7, 0x1a, 0xd8, + 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0xb5, 0xb6, 0x1a, 0x1a, 0x1a, 0x1a +}; + +const uint8_t libuna_codepage_mac_gaelic_unicode_to_byte_stream_base_0x2010[ 24 ] = { + 0x1a, 0x1a, 0x1a, 0xd0, 0xd1, 0x1a, 0x1a, 0x1a, + 0xd4, 0xd5, 0x1a, 0x1a, 0xd2, 0xd3, 0x1a, 0x1a, + 0xa0, 0x1a, 0xa5, 0x1a, 0x1a, 0x1a, 0xc9, 0x1a +}; + +/* Copies an Unicode character from a MacGaelic encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_mac_gaelic_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_mac_gaelic_copy_from_byte_stream"; + libuna_unicode_character_t safe_unicode_character = 0xfffd; + size_t safe_byte_stream_index = 0; + uint8_t byte_stream_character = 0; + + if( unicode_character == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid Unicode character.", + function ); + + return( -1 ); + } + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + byte_stream_character = byte_stream[ safe_byte_stream_index++ ]; + + if( byte_stream_character < 0x80 ) + { + safe_unicode_character = byte_stream_character; + } + else + { + byte_stream_character -= 0x80; + + safe_unicode_character = libuna_codepage_mac_gaelic_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; + } + *unicode_character = safe_unicode_character; + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + +/* Copies an Unicode character to a MacGaelic encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_mac_gaelic_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_mac_gaelic_copy_to_byte_stream"; + size_t safe_byte_stream_index = 0; + uint16_t byte_stream_value = 0x001a; + + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + if( unicode_character < 0x0080 ) + { + byte_stream_value = (uint16_t) unicode_character; + } + else if( ( unicode_character >= 0x00a0 ) + && ( unicode_character < 0x0110 ) ) + { + unicode_character -= 0x00a0; + + byte_stream_value = libuna_codepage_mac_gaelic_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; + } + else if( ( unicode_character >= 0x2010 ) + && ( unicode_character < 0x2028 ) ) + { + unicode_character -= 0x2010; + + byte_stream_value = libuna_codepage_mac_gaelic_unicode_to_byte_stream_base_0x2010[ unicode_character ]; + } + else switch( unicode_character ) + { + case 0x0120: + byte_stream_value = 0xbb; + break; + + case 0x0121: + byte_stream_value = 0xbc; + break; + + case 0x0131: + byte_stream_value = 0xf5; + break; + + case 0x0152: + byte_stream_value = 0xce; + break; + + case 0x0153: + byte_stream_value = 0xcf; + break; + + case 0x0174: + byte_stream_value = 0xf8; + break; + + case 0x0175: + byte_stream_value = 0xf9; + break; + + case 0x0176: + byte_stream_value = 0xde; + break; + + case 0x0177: + byte_stream_value = 0xdf; + break; + + case 0x0178: + byte_stream_value = 0xd9; + break; + + case 0x017f: + byte_stream_value = 0xc5; + break; + + case 0x0192: + byte_stream_value = 0xc4; + break; + + case 0x027c: + byte_stream_value = 0xc3; + break; + + case 0x1e02: + byte_stream_value = 0xb0; + break; + + case 0x1e03: + byte_stream_value = 0xb4; + break; + + case 0x1e0a: + byte_stream_value = 0xb7; + break; + + case 0x1e0b: + byte_stream_value = 0xb8; + break; + + case 0x1e1e: + byte_stream_value = 0xb9; + break; + + case 0x1e1f: + byte_stream_value = 0xba; + break; + + case 0x1e40: + byte_stream_value = 0xbd; + break; + + case 0x1e41: + byte_stream_value = 0xc0; + break; + + case 0x1e56: + byte_stream_value = 0xc1; + break; + + case 0x1e57: + byte_stream_value = 0xc2; + break; + + case 0x1e60: + byte_stream_value = 0xc6; + break; + + case 0x1e61: + byte_stream_value = 0xd6; + break; + + case 0x1e6a: + byte_stream_value = 0xda; + break; + + case 0x1e6b: + byte_stream_value = 0xe0; + break; + + case 0x1e80: + byte_stream_value = 0xfc; + break; + + case 0x1e81: + byte_stream_value = 0xfd; + break; + + case 0x1e82: + byte_stream_value = 0xfe; + break; + + case 0x1e83: + byte_stream_value = 0xff; + break; + + case 0x1e84: + byte_stream_value = 0xfa; + break; + + case 0x1e85: + byte_stream_value = 0xfb; + break; + + case 0x1e9b: + byte_stream_value = 0xd7; + break; + + case 0x1ef2: + byte_stream_value = 0xe2; + break; + + case 0x1ef3: + byte_stream_value = 0xe3; + break; + + case 0x2039: + byte_stream_value = 0xdc; + break; + + case 0x203a: + byte_stream_value = 0xdd; + break; + + case 0x204a: + byte_stream_value = 0xe4; + break; + + case 0x20ac: + byte_stream_value = 0xdb; + break; + + case 0x2122: + byte_stream_value = 0xaa; + break; + + case 0x2260: + byte_stream_value = 0xad; + break; + + case 0x2264: + byte_stream_value = 0xb2; + break; + + case 0x2265: + byte_stream_value = 0xb3; + break; + + case 0x2663: + byte_stream_value = 0xf0; + break; + + default: + byte_stream_value = 0x1a; + break; + } + byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); + + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + diff -Nru libfshfs-20201104/libuna/libuna_codepage_mac_gaelic.h libfshfs-20240221/libuna/libuna_codepage_mac_gaelic.h --- libfshfs-20201104/libuna/libuna_codepage_mac_gaelic.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_mac_gaelic.h 2024-02-21 06:04:15.000000000 +0000 @@ -0,0 +1,54 @@ +/* + * MacGaelic codepage functions + * + * Copyright (C) 2008-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _LIBUNA_CODEPAGE_MAC_GAELIC_H ) +#define _LIBUNA_CODEPAGE_MAC_GAELIC_H + +#include +#include + +#include "libuna_libcerror.h" +#include "libuna_types.h" + +#if defined( __cplusplus ) +extern "C" { +#endif + +int libuna_codepage_mac_gaelic_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); + +int libuna_codepage_mac_gaelic_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _LIBUNA_CODEPAGE_MAC_GAELIC_H ) */ + diff -Nru libfshfs-20201104/libuna/libuna_codepage_mac_greek.c libfshfs-20240221/libuna/libuna_codepage_mac_greek.c --- libfshfs-20201104/libuna/libuna_codepage_mac_greek.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_mac_greek.c 2024-02-21 06:04:15.000000000 +0000 @@ -0,0 +1,305 @@ +/* + * MacGreek codepage functions + * + * Copyright (C) 2008-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include + +#include "libuna_codepage_mac_greek.h" +#include "libuna_libcerror.h" +#include "libuna_types.h" + +/* Extended ASCII to Unicode character lookup table for the MacGreek codepage + * Unknown are filled with the Unicode replacement character 0xfffd + */ +const uint16_t libuna_codepage_mac_greek_byte_stream_to_unicode_base_0x80[ 128 ] = { + 0x00c4, 0x00b9, 0x00b2, 0x00c9, 0x00b3, 0x00d6, 0x00dc, 0x0385, + 0x00e0, 0x00e2, 0x00e4, 0x0384, 0x00a8, 0x00e7, 0x00e9, 0x00e8, + 0x00ea, 0x00eb, 0x00a3, 0x2122, 0x00ee, 0x00ef, 0x2022, 0x00bd, + 0x2030, 0x00f4, 0x00f6, 0x00a6, 0x20ac, 0x00f9, 0x00fb, 0x00fc, + 0x2020, 0x0393, 0x0394, 0x0398, 0x039b, 0x039e, 0x03a0, 0x00df, + 0x00ae, 0x00a9, 0x03a3, 0x03aa, 0x00a7, 0x2260, 0x00b0, 0x00b7, + 0x0391, 0x00b1, 0x2264, 0x2265, 0x00a5, 0x0392, 0x0395, 0x0396, + 0x0397, 0x0399, 0x039a, 0x039c, 0x03a6, 0x03ab, 0x03a8, 0x03a9, + 0x03ac, 0x039d, 0x00ac, 0x039f, 0x03a1, 0x2248, 0x03a4, 0x00ab, + 0x00bb, 0x2026, 0x00a0, 0x03a5, 0x03a7, 0x0386, 0x0388, 0x0153, + 0x2013, 0x2015, 0x201c, 0x201d, 0x2018, 0x2019, 0x00f7, 0x0389, + 0x038a, 0x038c, 0x038e, 0x03ad, 0x03ae, 0x03af, 0x03cc, 0x038f, + 0x03cd, 0x03b1, 0x03b2, 0x03c8, 0x03b4, 0x03b5, 0x03c6, 0x03b3, + 0x03b7, 0x03b9, 0x03be, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03bf, + 0x03c0, 0x03ce, 0x03c1, 0x03c3, 0x03c4, 0x03b8, 0x03c9, 0x03c2, + 0x03c7, 0x03c5, 0x03b6, 0x03ca, 0x03cb, 0x0390, 0x03b0, 0x00ad +}; + +/* Unicode to ASCII character lookup tables for the MacGreek codepage + * Unknown are filled with the ASCII replacement character 0x1a + */ +const uint8_t libuna_codepage_mac_greek_unicode_to_byte_stream_base_0x00a0[ 96 ] = { + 0xca, 0x1a, 0x1a, 0x92, 0x1a, 0xb4, 0x9b, 0xac, + 0x8c, 0xa9, 0x1a, 0xc7, 0xc2, 0xff, 0xa8, 0x1a, + 0xae, 0xb1, 0x82, 0x84, 0x1a, 0x1a, 0x1a, 0xaf, + 0x1a, 0x81, 0x1a, 0xc8, 0x1a, 0x97, 0x1a, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0x80, 0x1a, 0x1a, 0x1a, + 0x1a, 0x83, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x85, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0x86, 0x1a, 0x1a, 0xa7, + 0x88, 0x1a, 0x89, 0x1a, 0x8a, 0x1a, 0x1a, 0x8d, + 0x8f, 0x8e, 0x90, 0x91, 0x1a, 0x1a, 0x94, 0x95, + 0x1a, 0x1a, 0x1a, 0x1a, 0x99, 0x1a, 0x9a, 0xd6, + 0x1a, 0x9d, 0x1a, 0x9e, 0x9f, 0x1a, 0x1a, 0x1a +}; + +const uint8_t libuna_codepage_mac_greek_unicode_to_byte_stream_base_0x0380[ 80 ] = { + 0x1a, 0x1a, 0x1a, 0x1a, 0x8b, 0x87, 0xcd, 0x1a, + 0xce, 0xd7, 0xd8, 0x1a, 0xd9, 0x1a, 0xda, 0xdf, + 0xfd, 0xb0, 0xb5, 0xa1, 0xa2, 0xb6, 0xb7, 0xb8, + 0xa3, 0xb9, 0xba, 0xa4, 0xbb, 0xc1, 0xa5, 0xc3, + 0xa6, 0xc4, 0x1a, 0xaa, 0xc6, 0xcb, 0xbc, 0xcc, + 0xbe, 0xbf, 0xab, 0xbd, 0xc0, 0xdb, 0xdc, 0xdd, + 0xfe, 0xe1, 0xe2, 0xe7, 0xe4, 0xe5, 0xfa, 0xe8, + 0xf5, 0xe9, 0xeb, 0xec, 0xed, 0xee, 0xea, 0xef, + 0xf0, 0xf2, 0xf7, 0xf3, 0xf4, 0xf9, 0xe6, 0xf8, + 0xe3, 0xf6, 0xfb, 0xfc, 0xde, 0xe0, 0xf1, 0x1a +}; + +const uint8_t libuna_codepage_mac_greek_unicode_to_byte_stream_base_0x2010[ 40 ] = { + 0x1a, 0x1a, 0x1a, 0xd0, 0x1a, 0xd1, 0x1a, 0x1a, + 0xd4, 0xd5, 0x1a, 0x1a, 0xd2, 0xd3, 0x1a, 0x1a, + 0xa0, 0x1a, 0x96, 0x1a, 0x1a, 0x1a, 0xc9, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0x98, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a +}; + +/* Copies an Unicode character from a MacGreek encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_mac_greek_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_mac_greek_copy_from_byte_stream"; + libuna_unicode_character_t safe_unicode_character = 0xfffd; + size_t safe_byte_stream_index = 0; + uint8_t byte_stream_character = 0; + + if( unicode_character == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid Unicode character.", + function ); + + return( -1 ); + } + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + byte_stream_character = byte_stream[ safe_byte_stream_index++ ]; + + if( byte_stream_character < 0x80 ) + { + safe_unicode_character = byte_stream_character; + } + else + { + byte_stream_character -= 0x80; + + safe_unicode_character = libuna_codepage_mac_greek_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; + } + *unicode_character = safe_unicode_character; + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + +/* Copies an Unicode character to a MacGreek encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_mac_greek_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_mac_greek_copy_to_byte_stream"; + size_t safe_byte_stream_index = 0; + uint16_t byte_stream_value = 0x001a; + + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + if( unicode_character < 0x0080 ) + { + byte_stream_value = (uint16_t) unicode_character; + } + else if( ( unicode_character >= 0x00a0 ) + && ( unicode_character < 0x0100 ) ) + { + unicode_character -= 0x00a0; + + byte_stream_value = libuna_codepage_mac_greek_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; + } + else if( ( unicode_character >= 0x0380 ) + && ( unicode_character < 0x03d0 ) ) + { + unicode_character -= 0x0380; + + byte_stream_value = libuna_codepage_mac_greek_unicode_to_byte_stream_base_0x0380[ unicode_character ]; + } + else if( ( unicode_character >= 0x2010 ) + && ( unicode_character < 0x2038 ) ) + { + unicode_character -= 0x2010; + + byte_stream_value = libuna_codepage_mac_greek_unicode_to_byte_stream_base_0x2010[ unicode_character ]; + } + else switch( unicode_character ) + { + case 0x0153: + byte_stream_value = 0xcf; + break; + + case 0x20ac: + byte_stream_value = 0x9c; + break; + + case 0x2122: + byte_stream_value = 0x93; + break; + + case 0x2248: + byte_stream_value = 0xc5; + break; + + case 0x2260: + byte_stream_value = 0xad; + break; + + case 0x2264: + byte_stream_value = 0xb2; + break; + + case 0x2265: + byte_stream_value = 0xb3; + break; + + default: + byte_stream_value = 0x1a; + break; + } + byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); + + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + diff -Nru libfshfs-20201104/libuna/libuna_codepage_mac_greek.h libfshfs-20240221/libuna/libuna_codepage_mac_greek.h --- libfshfs-20201104/libuna/libuna_codepage_mac_greek.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_mac_greek.h 2024-02-21 06:04:15.000000000 +0000 @@ -0,0 +1,54 @@ +/* + * MacGreek codepage functions + * + * Copyright (C) 2008-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _LIBUNA_CODEPAGE_MAC_GREEK_H ) +#define _LIBUNA_CODEPAGE_MAC_GREEK_H + +#include +#include + +#include "libuna_libcerror.h" +#include "libuna_types.h" + +#if defined( __cplusplus ) +extern "C" { +#endif + +int libuna_codepage_mac_greek_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); + +int libuna_codepage_mac_greek_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _LIBUNA_CODEPAGE_MAC_GREEK_H ) */ + diff -Nru libfshfs-20201104/libuna/libuna_codepage_mac_icelandic.c libfshfs-20240221/libuna/libuna_codepage_mac_icelandic.c --- libfshfs-20201104/libuna/libuna_codepage_mac_icelandic.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_mac_icelandic.c 2024-02-21 06:04:15.000000000 +0000 @@ -0,0 +1,381 @@ +/* + * MacIcelandic codepage functions + * + * Copyright (C) 2008-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include + +#include "libuna_codepage_mac_icelandic.h" +#include "libuna_libcerror.h" +#include "libuna_types.h" + +/* Extended ASCII to Unicode character lookup table for the MacIcelandic codepage + * Unknown are filled with the Unicode replacement character 0xfffd + */ +const uint16_t libuna_codepage_mac_icelandic_byte_stream_to_unicode_base_0x80[ 128 ] = { + 0x00c4, 0x00c5, 0x00c7, 0x00c9, 0x00d1, 0x00d6, 0x00dc, 0x00e1, + 0x00e0, 0x00e2, 0x00e4, 0x00e3, 0x00e5, 0x00e7, 0x00e9, 0x00e8, + 0x00ea, 0x00eb, 0x00ed, 0x00ec, 0x00ee, 0x00ef, 0x00f1, 0x00f3, + 0x00f2, 0x00f4, 0x00f6, 0x00f5, 0x00fa, 0x00f9, 0x00fb, 0x00fc, + 0x00dd, 0x00b0, 0x00a2, 0x00a3, 0x00a7, 0x2022, 0x00b6, 0x00df, + 0x00ae, 0x00a9, 0x2122, 0x00b4, 0x00a8, 0x2260, 0x00c6, 0x00d8, + 0x221e, 0x00b1, 0x2264, 0x2265, 0x00a5, 0x00b5, 0x2202, 0x2211, + 0x220f, 0x03c0, 0x222b, 0x00aa, 0x00ba, 0x03a9, 0x00e6, 0x00f8, + 0x00bf, 0x00a1, 0x00ac, 0x221a, 0x0192, 0x2248, 0x2206, 0x00ab, + 0x00bb, 0x2026, 0x00a0, 0x00c0, 0x00c3, 0x00d5, 0x0152, 0x0153, + 0x2013, 0x2014, 0x201c, 0x201d, 0x2018, 0x2019, 0x00f7, 0x25ca, + 0x00ff, 0x0178, 0x2044, 0x20ac, 0x00d0, 0x00f0, 0x00de, 0x00fe, + 0x00fd, 0x00b7, 0x201a, 0x201e, 0x2030, 0x00c2, 0x00ca, 0x00c1, + 0x00cb, 0x00c8, 0x00cd, 0x00ce, 0x00cf, 0x00cc, 0x00d3, 0x00d4, + 0xf8ff, 0x00d2, 0x00da, 0x00db, 0x00d9, 0x0131, 0x02c6, 0x02dc, + 0x00af, 0x02d8, 0x02d9, 0x02da, 0x00b8, 0x02dd, 0x02db, 0x02c7 +}; + +/* Unicode to ASCII character lookup tables for the MacIcelandic codepage + * Unknown are filled with the ASCII replacement character 0x1a + */ +const uint8_t libuna_codepage_mac_icelandic_unicode_to_byte_stream_base_0x00a0[ 96 ] = { + 0xca, 0xc1, 0xa2, 0xa3, 0x1a, 0xb4, 0x1a, 0xa4, + 0xac, 0xa9, 0xbb, 0xc7, 0xc2, 0x1a, 0xa8, 0xf8, + 0xa1, 0xb1, 0x1a, 0x1a, 0xab, 0xb5, 0xa6, 0xe1, + 0xfc, 0x1a, 0xbc, 0xc8, 0x1a, 0x1a, 0x1a, 0xc0, + 0xcb, 0xe7, 0xe5, 0xcc, 0x80, 0x81, 0xae, 0x82, + 0xe9, 0x83, 0xe6, 0xe8, 0xed, 0xea, 0xeb, 0xec, + 0xdc, 0x84, 0xf1, 0xee, 0xef, 0xcd, 0x85, 0x1a, + 0xaf, 0xf4, 0xf2, 0xf3, 0x86, 0xa0, 0xde, 0xa7, + 0x88, 0x87, 0x89, 0x8b, 0x8a, 0x8c, 0xbe, 0x8d, + 0x8f, 0x8e, 0x90, 0x91, 0x93, 0x92, 0x94, 0x95, + 0xdd, 0x96, 0x98, 0x97, 0x99, 0x9b, 0x9a, 0xd6, + 0xbf, 0x9d, 0x9c, 0x9e, 0x9f, 0xe0, 0xdf, 0xd8 +}; + +const uint8_t libuna_codepage_mac_icelandic_unicode_to_byte_stream_base_0x2010[ 40 ] = { + 0x1a, 0x1a, 0x1a, 0xd0, 0xd1, 0x1a, 0x1a, 0x1a, + 0xd4, 0xd5, 0xe2, 0x1a, 0xd2, 0xd3, 0xe3, 0x1a, + 0x1a, 0x1a, 0xa5, 0x1a, 0x1a, 0x1a, 0xc9, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0xe4, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a +}; + +/* Copies an Unicode character from a MacIcelandic encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_mac_icelandic_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_mac_icelandic_copy_from_byte_stream"; + libuna_unicode_character_t safe_unicode_character = 0xfffd; + size_t safe_byte_stream_index = 0; + uint8_t byte_stream_character = 0; + + if( unicode_character == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid Unicode character.", + function ); + + return( -1 ); + } + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + byte_stream_character = byte_stream[ safe_byte_stream_index++ ]; + + if( byte_stream_character < 0x80 ) + { + safe_unicode_character = byte_stream_character; + } + else + { + byte_stream_character -= 0x80; + + safe_unicode_character = libuna_codepage_mac_icelandic_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; + } + *unicode_character = safe_unicode_character; + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + +/* Copies an Unicode character to a MacIcelandic encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_mac_icelandic_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_mac_icelandic_copy_to_byte_stream"; + size_t safe_byte_stream_index = 0; + uint16_t byte_stream_value = 0x001a; + + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + if( unicode_character < 0x0080 ) + { + byte_stream_value = (uint16_t) unicode_character; + } + else if( ( unicode_character >= 0x00a0 ) + && ( unicode_character < 0x0100 ) ) + { + unicode_character -= 0x00a0; + + byte_stream_value = libuna_codepage_mac_icelandic_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; + } + else if( ( unicode_character >= 0x2010 ) + && ( unicode_character < 0x2038 ) ) + { + unicode_character -= 0x2010; + + byte_stream_value = libuna_codepage_mac_icelandic_unicode_to_byte_stream_base_0x2010[ unicode_character ]; + } + else switch( unicode_character ) + { + case 0x0131: + byte_stream_value = 0xf5; + break; + + case 0x0152: + byte_stream_value = 0xce; + break; + + case 0x0153: + byte_stream_value = 0xcf; + break; + + case 0x0178: + byte_stream_value = 0xd9; + break; + + case 0x0192: + byte_stream_value = 0xc4; + break; + + case 0x02c6: + byte_stream_value = 0xf6; + break; + + case 0x02c7: + byte_stream_value = 0xff; + break; + + case 0x02d8: + byte_stream_value = 0xf9; + break; + + case 0x02d9: + byte_stream_value = 0xfa; + break; + + case 0x02da: + byte_stream_value = 0xfb; + break; + + case 0x02db: + byte_stream_value = 0xfe; + break; + + case 0x02dc: + byte_stream_value = 0xf7; + break; + + case 0x02dd: + byte_stream_value = 0xfd; + break; + + case 0x03a9: + byte_stream_value = 0xbd; + break; + + case 0x03c0: + byte_stream_value = 0xb9; + break; + + case 0x2044: + byte_stream_value = 0xda; + break; + + case 0x20ac: + byte_stream_value = 0xdb; + break; + + case 0x2122: + byte_stream_value = 0xaa; + break; + + case 0x2202: + byte_stream_value = 0xb6; + break; + + case 0x2206: + byte_stream_value = 0xc6; + break; + + case 0x220f: + byte_stream_value = 0xb8; + break; + + case 0x2211: + byte_stream_value = 0xb7; + break; + + case 0x221a: + byte_stream_value = 0xc3; + break; + + case 0x221e: + byte_stream_value = 0xb0; + break; + + case 0x222b: + byte_stream_value = 0xba; + break; + + case 0x2248: + byte_stream_value = 0xc5; + break; + + case 0x2260: + byte_stream_value = 0xad; + break; + + case 0x2264: + byte_stream_value = 0xb2; + break; + + case 0x2265: + byte_stream_value = 0xb3; + break; + + case 0x25ca: + byte_stream_value = 0xd7; + break; + + case 0xf8ff: + byte_stream_value = 0xf0; + break; + + default: + byte_stream_value = 0x1a; + break; + } + byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); + + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + diff -Nru libfshfs-20201104/libuna/libuna_codepage_mac_icelandic.h libfshfs-20240221/libuna/libuna_codepage_mac_icelandic.h --- libfshfs-20201104/libuna/libuna_codepage_mac_icelandic.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_mac_icelandic.h 2024-02-21 06:04:15.000000000 +0000 @@ -0,0 +1,54 @@ +/* + * MacIcelandic codepage functions + * + * Copyright (C) 2008-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _LIBUNA_CODEPAGE_MAC_ICELANDIC_H ) +#define _LIBUNA_CODEPAGE_MAC_ICELANDIC_H + +#include +#include + +#include "libuna_libcerror.h" +#include "libuna_types.h" + +#if defined( __cplusplus ) +extern "C" { +#endif + +int libuna_codepage_mac_icelandic_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); + +int libuna_codepage_mac_icelandic_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _LIBUNA_CODEPAGE_MAC_ICELANDIC_H ) */ + diff -Nru libfshfs-20201104/libuna/libuna_codepage_mac_inuit.c libfshfs-20240221/libuna/libuna_codepage_mac_inuit.c --- libfshfs-20201104/libuna/libuna_codepage_mac_inuit.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_mac_inuit.c 2024-02-21 06:04:15.000000000 +0000 @@ -0,0 +1,380 @@ +/* + * MacInuit codepage functions + * + * Copyright (C) 2008-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include + +#include "libuna_codepage_mac_inuit.h" +#include "libuna_libcerror.h" +#include "libuna_types.h" + +/* Extended ASCII to Unicode character lookup table for the MacInuit codepage + * Unknown are filled with the Unicode replacement character 0xfffd + */ +const uint16_t libuna_codepage_mac_inuit_byte_stream_to_unicode_base_0x80[ 128 ] = { + 0x1403, 0x1404, 0x1405, 0x1406, 0x140a, 0x140b, 0x1431, 0x1432, + 0x1433, 0x1434, 0x1438, 0x1439, 0x1449, 0x144e, 0x144f, 0x1450, + 0x1451, 0x1455, 0x1456, 0x1466, 0x146d, 0x146e, 0x146f, 0x1470, + 0x1472, 0x1473, 0x1483, 0x148b, 0x148c, 0x148d, 0x148e, 0x1490, + 0x1491, 0x00b0, 0x14a1, 0x14a5, 0x14a6, 0x2022, 0x00b6, 0x14a7, + 0x00ae, 0x00a9, 0x2122, 0x14a8, 0x14aa, 0x14ab, 0x14bb, 0x14c2, + 0x14c3, 0x14c4, 0x14c5, 0x14c7, 0x14c8, 0x14d0, 0x14ef, 0x14f0, + 0x14f1, 0x14f2, 0x14f4, 0x14f5, 0x1505, 0x14d5, 0x14d6, 0x14d7, + 0x14d8, 0x14da, 0x14db, 0x14ea, 0x1528, 0x1529, 0x152a, 0x152b, + 0x152d, 0x2026, 0x00a0, 0x152e, 0x153e, 0x1555, 0x1556, 0x1557, + 0x2013, 0x2014, 0x201c, 0x201d, 0x2018, 0x2019, 0x1558, 0x1559, + 0x155a, 0x155d, 0x1546, 0x1547, 0x1548, 0x1549, 0x154b, 0x154c, + 0x1550, 0x157f, 0x1580, 0x1581, 0x1582, 0x1583, 0x1584, 0x1585, + 0x158f, 0x1590, 0x1591, 0x1592, 0x1593, 0x1594, 0x1595, 0x1671, + 0x1672, 0x1673, 0x1674, 0x1675, 0x1676, 0x1596, 0x15a0, 0x15a1, + 0x15a2, 0x15a3, 0x15a4, 0x15a5, 0x15a6, 0x157c, 0x0141, 0x0142 +}; + +/* Unicode to ASCII character lookup tables for the MacInuit codepage + * Unknown are filled with the ASCII replacement character 0x1a + */ +const uint8_t libuna_codepage_mac_inuit_unicode_to_byte_stream_base_0x1430[ 216 ] = { + 0x1a, 0x86, 0x87, 0x88, 0x89, 0x1a, 0x1a, 0x1a, + 0x8a, 0x8b, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x8c, 0x1a, 0x1a, 0x1a, 0x1a, 0x8d, 0x8e, + 0x8f, 0x90, 0x1a, 0x1a, 0x1a, 0x91, 0x92, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x93, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x94, 0x95, 0x96, + 0x97, 0x1a, 0x98, 0x99, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0x1a, 0x9a, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0x1a, 0x9b, 0x9c, 0x9d, 0x9e, 0x1a, + 0x9f, 0xa0, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0xa2, 0x1a, 0x1a, 0x1a, 0xa3, 0xa4, 0xa7, + 0xab, 0x1a, 0xac, 0xad, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0x1a, 0xae, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0xaf, 0xb0, 0xb1, 0xb2, 0x1a, 0xb3, + 0xb4, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0xb5, 0x1a, 0x1a, 0x1a, 0x1a, 0xbd, 0xbe, 0xbf, + 0xc0, 0x1a, 0xc1, 0xc2, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0xc3, 0x1a, 0x1a, 0x1a, 0x1a, 0xb6, + 0xb7, 0xb8, 0xb9, 0x1a, 0xba, 0xbb, 0x1a, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xbc, 0x1a, 0x1a +}; + +const uint8_t libuna_codepage_mac_inuit_unicode_to_byte_stream_base_0x1528[ 56 ] = { + 0xc4, 0xc5, 0xc6, 0xc7, 0x1a, 0xc8, 0xcb, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xcc, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xda, 0xdb, + 0xdc, 0xdd, 0x1a, 0xde, 0xdf, 0x1a, 0x1a, 0x1a, + 0xe0, 0x1a, 0x1a, 0x1a, 0x1a, 0xcd, 0xce, 0xcf, + 0xd6, 0xd7, 0xd8, 0x1a, 0x1a, 0xd9, 0x1a, 0x1a +}; + +const uint8_t libuna_codepage_mac_inuit_unicode_to_byte_stream_base_0x1578[ 48 ] = { + 0x1a, 0x1a, 0x1a, 0x1a, 0xfd, 0x1a, 0x1a, 0xe1, + 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0x1a, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xe8, + 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xf5, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0x1a +}; + +const uint8_t libuna_codepage_mac_inuit_unicode_to_byte_stream_base_0x2010[ 24 ] = { + 0x1a, 0x1a, 0x1a, 0xd0, 0xd1, 0x1a, 0x1a, 0x1a, + 0xd4, 0xd5, 0x1a, 0x1a, 0xd2, 0xd3, 0x1a, 0x1a, + 0x1a, 0x1a, 0xa5, 0x1a, 0x1a, 0x1a, 0xc9, 0x1a +}; + +/* Copies an Unicode character from a MacInuit encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_mac_inuit_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_mac_inuit_copy_from_byte_stream"; + libuna_unicode_character_t safe_unicode_character = 0xfffd; + size_t safe_byte_stream_index = 0; + uint8_t byte_stream_character = 0; + + if( unicode_character == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid Unicode character.", + function ); + + return( -1 ); + } + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + byte_stream_character = byte_stream[ safe_byte_stream_index++ ]; + + if( byte_stream_character < 0x80 ) + { + safe_unicode_character = byte_stream_character; + } + else + { + byte_stream_character -= 0x80; + + safe_unicode_character = libuna_codepage_mac_inuit_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; + } + *unicode_character = safe_unicode_character; + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + +/* Copies an Unicode character to a MacInuit encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_mac_inuit_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_mac_inuit_copy_to_byte_stream"; + size_t safe_byte_stream_index = 0; + uint16_t byte_stream_value = 0x001a; + + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + if( ( unicode_character < 0x0080 ) + || ( unicode_character == 0x00a9 ) ) + { + byte_stream_value = (uint16_t) unicode_character; + } + else if( ( unicode_character >= 0x1430 ) + && ( unicode_character < 0x1508 ) ) + { + unicode_character -= 0x1430; + + byte_stream_value = libuna_codepage_mac_inuit_unicode_to_byte_stream_base_0x1430[ unicode_character ]; + } + else if( ( unicode_character >= 0x1528 ) + && ( unicode_character < 0x1560 ) ) + { + unicode_character -= 0x1528; + + byte_stream_value = libuna_codepage_mac_inuit_unicode_to_byte_stream_base_0x1528[ unicode_character ]; + } + else if( ( unicode_character >= 0x1578 ) + && ( unicode_character < 0x15a8 ) ) + { + unicode_character -= 0x1578; + + byte_stream_value = libuna_codepage_mac_inuit_unicode_to_byte_stream_base_0x1578[ unicode_character ]; + } + else if( ( unicode_character >= 0x2010 ) + && ( unicode_character < 0x2028 ) ) + { + unicode_character -= 0x2010; + + byte_stream_value = libuna_codepage_mac_inuit_unicode_to_byte_stream_base_0x2010[ unicode_character ]; + } + else switch( unicode_character ) + { + case 0x00a0: + byte_stream_value = 0xca; + break; + + case 0x00ae: + byte_stream_value = 0xa8; + break; + + case 0x00b0: + byte_stream_value = 0xa1; + break; + + case 0x00b6: + byte_stream_value = 0xa6; + break; + + case 0x0141: + byte_stream_value = 0xfe; + break; + + case 0x0142: + byte_stream_value = 0xff; + break; + + case 0x1403: + byte_stream_value = 0x80; + break; + + case 0x1404: + byte_stream_value = 0x81; + break; + + case 0x1405: + byte_stream_value = 0x82; + break; + + case 0x1406: + byte_stream_value = 0x83; + break; + + case 0x140a: + byte_stream_value = 0x84; + break; + + case 0x140b: + byte_stream_value = 0x85; + break; + + case 0x1671: + byte_stream_value = 0xef; + break; + + case 0x1672: + byte_stream_value = 0xf0; + break; + + case 0x1673: + byte_stream_value = 0xf1; + break; + + case 0x1674: + byte_stream_value = 0xf2; + break; + + case 0x1675: + byte_stream_value = 0xf3; + break; + + case 0x1676: + byte_stream_value = 0xf4; + break; + + case 0x2122: + byte_stream_value = 0xaa; + break; + + default: + byte_stream_value = 0x1a; + break; + } + byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); + + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + diff -Nru libfshfs-20201104/libuna/libuna_codepage_mac_inuit.h libfshfs-20240221/libuna/libuna_codepage_mac_inuit.h --- libfshfs-20201104/libuna/libuna_codepage_mac_inuit.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_mac_inuit.h 2024-02-21 06:04:15.000000000 +0000 @@ -0,0 +1,54 @@ +/* + * MacInuit codepage functions + * + * Copyright (C) 2008-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _LIBUNA_CODEPAGE_MAC_INUIT_H ) +#define _LIBUNA_CODEPAGE_MAC_INUIT_H + +#include +#include + +#include "libuna_libcerror.h" +#include "libuna_types.h" + +#if defined( __cplusplus ) +extern "C" { +#endif + +int libuna_codepage_mac_inuit_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); + +int libuna_codepage_mac_inuit_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _LIBUNA_CODEPAGE_MAC_INUIT_H ) */ + diff -Nru libfshfs-20201104/libuna/libuna_codepage_mac_roman.c libfshfs-20240221/libuna/libuna_codepage_mac_roman.c --- libfshfs-20201104/libuna/libuna_codepage_mac_roman.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_mac_roman.c 2024-02-21 06:04:15.000000000 +0000 @@ -0,0 +1,387 @@ +/* + * MacRoman codepage functions + * + * Copyright (C) 2008-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include + +#include "libuna_codepage_mac_roman.h" +#include "libuna_libcerror.h" +#include "libuna_types.h" + +/* Extended ASCII to Unicode character lookup table for the MacRoman codepage + * Unknown are filled with the Unicode replacement character 0xfffd + */ +const uint16_t libuna_codepage_mac_roman_byte_stream_to_unicode_base_0x80[ 128 ] = { + 0x00c4, 0x00c5, 0x00c7, 0x00c9, 0x00d1, 0x00d6, 0x00dc, 0x00e1, + 0x00e0, 0x00e2, 0x00e4, 0x00e3, 0x00e5, 0x00e7, 0x00e9, 0x00e8, + 0x00ea, 0x00eb, 0x00ed, 0x00ec, 0x00ee, 0x00ef, 0x00f1, 0x00f3, + 0x00f2, 0x00f4, 0x00f6, 0x00f5, 0x00fa, 0x00f9, 0x00fb, 0x00fc, + 0x2020, 0x00b0, 0x00a2, 0x00a3, 0x00a7, 0x2022, 0x00b6, 0x00df, + 0x00ae, 0x00a9, 0x2122, 0x00b4, 0x00a8, 0x2260, 0x00c6, 0x00d8, + 0x221e, 0x00b1, 0x2264, 0x2265, 0x00a5, 0x00b5, 0x2202, 0x2211, + 0x220f, 0x03c0, 0x222b, 0x00aa, 0x00ba, 0x03a9, 0x00e6, 0x00f8, + 0x00bf, 0x00a1, 0x00ac, 0x221a, 0x0192, 0x2248, 0x2206, 0x00ab, + 0x00bb, 0x2026, 0x00a0, 0x00c0, 0x00c3, 0x00d5, 0x0152, 0x0153, + 0x2013, 0x2014, 0x201c, 0x201d, 0x2018, 0x2019, 0x00f7, 0x25ca, + 0x00ff, 0x0178, 0x2044, 0x20ac, 0x2039, 0x203a, 0xfb01, 0xfb02, + 0x2021, 0x00b7, 0x201a, 0x201e, 0x2030, 0x00c2, 0x00ca, 0x00c1, + 0x00cb, 0x00c8, 0x00cd, 0x00ce, 0x00cf, 0x00cc, 0x00d3, 0x00d4, + 0xf8ff, 0x00d2, 0x00da, 0x00db, 0x00d9, 0x0131, 0x02c6, 0x02dc, + 0x00af, 0x02d8, 0x02d9, 0x02da, 0x00b8, 0x02dd, 0x02db, 0x02c7 +}; + +/* Unicode to ASCII character lookup tables for the MacRoman codepage + * Unknown are filled with the ASCII replacement character 0x1a + */ +const uint8_t libuna_codepage_mac_roman_unicode_to_byte_stream_base_0x00a0[ 96 ] = { + 0xca, 0xc1, 0xa2, 0xa3, 0x1a, 0xb4, 0x1a, 0xa4, + 0xac, 0xa9, 0xbb, 0xc7, 0xc2, 0x1a, 0xa8, 0xf8, + 0xa1, 0xb1, 0x1a, 0x1a, 0xab, 0xb5, 0xa6, 0xe1, + 0xfc, 0x1a, 0xbc, 0xc8, 0x1a, 0x1a, 0x1a, 0xc0, + 0xcb, 0xe7, 0xe5, 0xcc, 0x80, 0x81, 0xae, 0x82, + 0xe9, 0x83, 0xe6, 0xe8, 0xed, 0xea, 0xeb, 0xec, + 0x1a, 0x84, 0xf1, 0xee, 0xef, 0xcd, 0x85, 0x1a, + 0xaf, 0xf4, 0xf2, 0xf3, 0x86, 0x1a, 0x1a, 0xa7, + 0x88, 0x87, 0x89, 0x8b, 0x8a, 0x8c, 0xbe, 0x8d, + 0x8f, 0x8e, 0x90, 0x91, 0x93, 0x92, 0x94, 0x95, + 0x1a, 0x96, 0x98, 0x97, 0x99, 0x9b, 0x9a, 0xd6, + 0xbf, 0x9d, 0x9c, 0x9e, 0x9f, 0x1a, 0x1a, 0xd8 +}; + +const uint8_t libuna_codepage_mac_roman_unicode_to_byte_stream_base_0x2010[ 56 ] = { + 0x1a, 0x1a, 0x1a, 0xd0, 0xd1, 0x1a, 0x1a, 0x1a, + 0xd4, 0xd5, 0xe2, 0x1a, 0xd2, 0xd3, 0xe3, 0x1a, + 0xa0, 0xe0, 0xa5, 0x1a, 0x1a, 0x1a, 0xc9, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0xe4, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0xdc, 0xdd, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0xda, 0x1a, 0x1a, 0x1a +}; + +/* Copies an Unicode character from a MacRoman encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_mac_roman_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_mac_roman_copy_from_byte_stream"; + libuna_unicode_character_t safe_unicode_character = 0xfffd; + size_t safe_byte_stream_index = 0; + uint8_t byte_stream_character = 0; + + if( unicode_character == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid Unicode character.", + function ); + + return( -1 ); + } + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + byte_stream_character = byte_stream[ safe_byte_stream_index++ ]; + + if( byte_stream_character < 0x80 ) + { + safe_unicode_character = byte_stream_character; + } + else + { + byte_stream_character -= 0x80; + + safe_unicode_character = libuna_codepage_mac_roman_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; + } + *unicode_character = safe_unicode_character; + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + +/* Copies an Unicode character to a MacRoman encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_mac_roman_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_mac_roman_copy_to_byte_stream"; + size_t safe_byte_stream_index = 0; + uint16_t byte_stream_value = 0x001a; + + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + if( unicode_character < 0x0080 ) + { + byte_stream_value = (uint16_t) unicode_character; + } + else if( ( unicode_character >= 0x00a0 ) + && ( unicode_character < 0x0100 ) ) + { + unicode_character -= 0x00a0; + + byte_stream_value = libuna_codepage_mac_roman_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; + } + else if( ( unicode_character >= 0x2010 ) + && ( unicode_character < 0x2048 ) ) + { + unicode_character -= 0x2010; + + byte_stream_value = libuna_codepage_mac_roman_unicode_to_byte_stream_base_0x2010[ unicode_character ]; + } + else switch( unicode_character ) + { + case 0x0131: + byte_stream_value = 0xf5; + break; + + case 0x0152: + byte_stream_value = 0xce; + break; + + case 0x0153: + byte_stream_value = 0xcf; + break; + + case 0x0178: + byte_stream_value = 0xd9; + break; + + case 0x0192: + byte_stream_value = 0xc4; + break; + + case 0x02c6: + byte_stream_value = 0xf6; + break; + + case 0x02c7: + byte_stream_value = 0xff; + break; + + case 0x02d8: + byte_stream_value = 0xf9; + break; + + case 0x02d9: + byte_stream_value = 0xfa; + break; + + case 0x02da: + byte_stream_value = 0xfb; + break; + + case 0x02db: + byte_stream_value = 0xfe; + break; + + case 0x02dc: + byte_stream_value = 0xf7; + break; + + case 0x02dd: + byte_stream_value = 0xfd; + break; + + case 0x03a9: + byte_stream_value = 0xbd; + break; + + case 0x03c0: + byte_stream_value = 0xb9; + break; + + case 0x20ac: + byte_stream_value = 0xdb; + break; + + case 0x2122: + byte_stream_value = 0xaa; + break; + + case 0x2202: + byte_stream_value = 0xb6; + break; + + case 0x2206: + byte_stream_value = 0xc6; + break; + + case 0x220f: + byte_stream_value = 0xb8; + break; + + case 0x2211: + byte_stream_value = 0xb7; + break; + + case 0x221a: + byte_stream_value = 0xc3; + break; + + case 0x221e: + byte_stream_value = 0xb0; + break; + + case 0x222b: + byte_stream_value = 0xba; + break; + + case 0x2248: + byte_stream_value = 0xc5; + break; + + case 0x2260: + byte_stream_value = 0xad; + break; + + case 0x2264: + byte_stream_value = 0xb2; + break; + + case 0x2265: + byte_stream_value = 0xb3; + break; + + case 0x25ca: + byte_stream_value = 0xd7; + break; + + case 0xf8ff: + byte_stream_value = 0xf0; + break; + + case 0xfb01: + byte_stream_value = 0xde; + break; + + case 0xfb02: + byte_stream_value = 0xdf; + break; + + default: + byte_stream_value = 0x1a; + break; + } + byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); + + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + diff -Nru libfshfs-20201104/libuna/libuna_codepage_mac_roman.h libfshfs-20240221/libuna/libuna_codepage_mac_roman.h --- libfshfs-20201104/libuna/libuna_codepage_mac_roman.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_mac_roman.h 2024-02-21 06:04:15.000000000 +0000 @@ -0,0 +1,54 @@ +/* + * MacRoman codepage functions + * + * Copyright (C) 2008-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _LIBUNA_CODEPAGE_MAC_ROMAN_H ) +#define _LIBUNA_CODEPAGE_MAC_ROMAN_H + +#include +#include + +#include "libuna_libcerror.h" +#include "libuna_types.h" + +#if defined( __cplusplus ) +extern "C" { +#endif + +int libuna_codepage_mac_roman_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); + +int libuna_codepage_mac_roman_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _LIBUNA_CODEPAGE_MAC_ROMAN_H ) */ + diff -Nru libfshfs-20201104/libuna/libuna_codepage_mac_romanian.c libfshfs-20240221/libuna/libuna_codepage_mac_romanian.c --- libfshfs-20201104/libuna/libuna_codepage_mac_romanian.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_mac_romanian.c 2024-02-21 06:04:15.000000000 +0000 @@ -0,0 +1,396 @@ +/* + * MacRomanian codepage functions + * + * Copyright (C) 2008-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include + +#include "libuna_codepage_mac_romanian.h" +#include "libuna_libcerror.h" +#include "libuna_types.h" + +/* Extended ASCII to Unicode character lookup table for the MacRomanian codepage + * Unknown are filled with the Unicode replacement character 0xfffd + */ +const uint16_t libuna_codepage_mac_romanian_byte_stream_to_unicode_base_0x80[ 128 ] = { + 0x00c4, 0x00c5, 0x00c7, 0x00c9, 0x00d1, 0x00d6, 0x00dc, 0x00e1, + 0x00e0, 0x00e2, 0x00e4, 0x00e3, 0x00e5, 0x00e7, 0x00e9, 0x00e8, + 0x00ea, 0x00eb, 0x00ed, 0x00ec, 0x00ee, 0x00ef, 0x00f1, 0x00f3, + 0x00f2, 0x00f4, 0x00f6, 0x00f5, 0x00fa, 0x00f9, 0x00fb, 0x00fc, + 0x2020, 0x00b0, 0x00a2, 0x00a3, 0x00a7, 0x2022, 0x00b6, 0x00df, + 0x00ae, 0x00a9, 0x2122, 0x00b4, 0x00a8, 0x2260, 0x0102, 0x0218, + 0x221e, 0x00b1, 0x2264, 0x2265, 0x00a5, 0x00b5, 0x2202, 0x2211, + 0x220f, 0x03c0, 0x222b, 0x00aa, 0x00ba, 0x03a9, 0x0103, 0x0219, + 0x00bf, 0x00a1, 0x00ac, 0x221a, 0x0192, 0x2248, 0x2206, 0x00ab, + 0x00bb, 0x2026, 0x00a0, 0x00c0, 0x00c3, 0x00d5, 0x0152, 0x0153, + 0x2013, 0x2014, 0x201c, 0x201d, 0x2018, 0x2019, 0x00f7, 0x25ca, + 0x00ff, 0x0178, 0x2044, 0x20ac, 0x2039, 0x203a, 0x021a, 0x021b, + 0x2021, 0x00b7, 0x201a, 0x201e, 0x2030, 0x00c2, 0x00ca, 0x00c1, + 0x00cb, 0x00c8, 0x00cd, 0x00ce, 0x00cf, 0x00cc, 0x00d3, 0x00d4, + 0xf8ff, 0x00d2, 0x00da, 0x00db, 0x00d9, 0x0131, 0x02c6, 0x02dc, + 0x00af, 0x02d8, 0x02d9, 0x02da, 0x00b8, 0x02dd, 0x02db, 0x02c7 +}; + +/* Unicode to ASCII character lookup tables for the MacRomanian codepage + * Unknown are filled with the ASCII replacement character 0x1a + */ +const uint8_t libuna_codepage_mac_romanian_unicode_to_byte_stream_base_0x00a0[ 104 ] = { + 0xca, 0xc1, 0xa2, 0xa3, 0x1a, 0xb4, 0x1a, 0xa4, + 0xac, 0xa9, 0xbb, 0xc7, 0xc2, 0x1a, 0xa8, 0xf8, + 0xa1, 0xb1, 0x1a, 0x1a, 0xab, 0xb5, 0xa6, 0xe1, + 0xfc, 0x1a, 0xbc, 0xc8, 0x1a, 0x1a, 0x1a, 0xc0, + 0xcb, 0xe7, 0xe5, 0xcc, 0x80, 0x81, 0x1a, 0x82, + 0xe9, 0x83, 0xe6, 0xe8, 0xed, 0xea, 0xeb, 0xec, + 0x1a, 0x84, 0xf1, 0xee, 0xef, 0xcd, 0x85, 0x1a, + 0x1a, 0xf4, 0xf2, 0xf3, 0x86, 0x1a, 0x1a, 0xa7, + 0x88, 0x87, 0x89, 0x8b, 0x8a, 0x8c, 0x1a, 0x8d, + 0x8f, 0x8e, 0x90, 0x91, 0x93, 0x92, 0x94, 0x95, + 0x1a, 0x96, 0x98, 0x97, 0x99, 0x9b, 0x9a, 0xd6, + 0x1a, 0x9d, 0x9c, 0x9e, 0x9f, 0x1a, 0x1a, 0xd8, + 0x1a, 0x1a, 0xae, 0xbe, 0x1a, 0x1a, 0x1a, 0x1a +}; + +const uint8_t libuna_codepage_mac_romanian_unicode_to_byte_stream_base_0x2010[ 56 ] = { + 0x1a, 0x1a, 0x1a, 0xd0, 0xd1, 0x1a, 0x1a, 0x1a, + 0xd4, 0xd5, 0xe2, 0x1a, 0xd2, 0xd3, 0xe3, 0x1a, + 0xa0, 0xe0, 0xa5, 0x1a, 0x1a, 0x1a, 0xc9, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0xe4, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0xdc, 0xdd, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0xda, 0x1a, 0x1a, 0x1a +}; + +/* Copies an Unicode character from a MacRomanian encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_mac_romanian_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_mac_romanian_copy_from_byte_stream"; + libuna_unicode_character_t safe_unicode_character = 0xfffd; + size_t safe_byte_stream_index = 0; + uint8_t byte_stream_character = 0; + + if( unicode_character == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid Unicode character.", + function ); + + return( -1 ); + } + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + byte_stream_character = byte_stream[ safe_byte_stream_index++ ]; + + if( byte_stream_character < 0x80 ) + { + safe_unicode_character = byte_stream_character; + } + else + { + byte_stream_character -= 0x80; + + safe_unicode_character = libuna_codepage_mac_romanian_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; + } + *unicode_character = safe_unicode_character; + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + +/* Copies an Unicode character to a MacRomanian encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_mac_romanian_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_mac_romanian_copy_to_byte_stream"; + size_t safe_byte_stream_index = 0; + uint16_t byte_stream_value = 0x001a; + + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + if( unicode_character < 0x0080 ) + { + byte_stream_value = (uint16_t) unicode_character; + } + else if( ( unicode_character >= 0x00a0 ) + && ( unicode_character < 0x0108 ) ) + { + unicode_character -= 0x00a0; + + byte_stream_value = libuna_codepage_mac_romanian_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; + } + else if( ( unicode_character >= 0x2010 ) + && ( unicode_character < 0x2048 ) ) + { + unicode_character -= 0x2010; + + byte_stream_value = libuna_codepage_mac_romanian_unicode_to_byte_stream_base_0x2010[ unicode_character ]; + } + else switch( unicode_character ) + { + case 0x0131: + byte_stream_value = 0xf5; + break; + + case 0x0152: + byte_stream_value = 0xce; + break; + + case 0x0153: + byte_stream_value = 0xcf; + break; + + case 0x0178: + byte_stream_value = 0xd9; + break; + + case 0x0192: + byte_stream_value = 0xc4; + break; + + case 0x0218: + byte_stream_value = 0xaf; + break; + + case 0x0219: + byte_stream_value = 0xbf; + break; + + case 0x021a: + byte_stream_value = 0xde; + break; + + case 0x021b: + byte_stream_value = 0xdf; + break; + + case 0x02c6: + byte_stream_value = 0xf6; + break; + + case 0x02c7: + byte_stream_value = 0xff; + break; + + case 0x02d8: + byte_stream_value = 0xf9; + break; + + case 0x02d9: + byte_stream_value = 0xfa; + break; + + case 0x02da: + byte_stream_value = 0xfb; + break; + + case 0x02db: + byte_stream_value = 0xfe; + break; + + case 0x02dc: + byte_stream_value = 0xf7; + break; + + case 0x02dd: + byte_stream_value = 0xfd; + break; + + case 0x03a9: + byte_stream_value = 0xbd; + break; + + case 0x03c0: + byte_stream_value = 0xb9; + break; + + case 0x20ac: + byte_stream_value = 0xdb; + break; + + case 0x2122: + byte_stream_value = 0xaa; + break; + + case 0x2202: + byte_stream_value = 0xb6; + break; + + case 0x2206: + byte_stream_value = 0xc6; + break; + + case 0x220f: + byte_stream_value = 0xb8; + break; + + case 0x2211: + byte_stream_value = 0xb7; + break; + + case 0x221a: + byte_stream_value = 0xc3; + break; + + case 0x221e: + byte_stream_value = 0xb0; + break; + + case 0x222b: + byte_stream_value = 0xba; + break; + + case 0x2248: + byte_stream_value = 0xc5; + break; + + case 0x2260: + byte_stream_value = 0xad; + break; + + case 0x2264: + byte_stream_value = 0xb2; + break; + + case 0x2265: + byte_stream_value = 0xb3; + break; + + case 0x25ca: + byte_stream_value = 0xd7; + break; + + case 0xf8ff: + byte_stream_value = 0xf0; + break; + + default: + byte_stream_value = 0x1a; + break; + } + byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); + + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + diff -Nru libfshfs-20201104/libuna/libuna_codepage_mac_romanian.h libfshfs-20240221/libuna/libuna_codepage_mac_romanian.h --- libfshfs-20201104/libuna/libuna_codepage_mac_romanian.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_mac_romanian.h 2024-02-21 06:04:15.000000000 +0000 @@ -0,0 +1,54 @@ +/* + * MacRomanian codepage functions + * + * Copyright (C) 2008-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _LIBUNA_CODEPAGE_MAC_ROMANIAN_H ) +#define _LIBUNA_CODEPAGE_MAC_ROMANIAN_H + +#include +#include + +#include "libuna_libcerror.h" +#include "libuna_types.h" + +#if defined( __cplusplus ) +extern "C" { +#endif + +int libuna_codepage_mac_romanian_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); + +int libuna_codepage_mac_romanian_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _LIBUNA_CODEPAGE_MAC_ROMANIAN_H ) */ + diff -Nru libfshfs-20201104/libuna/libuna_codepage_mac_russian.c libfshfs-20240221/libuna/libuna_codepage_mac_russian.c --- libfshfs-20201104/libuna/libuna_codepage_mac_russian.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_mac_russian.c 2024-02-21 06:04:15.000000000 +0000 @@ -0,0 +1,317 @@ +/* + * MacRussian codepage functions + * + * Copyright (C) 2008-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include + +#include "libuna_codepage_mac_russian.h" +#include "libuna_libcerror.h" +#include "libuna_types.h" + +/* Extended ASCII to Unicode character lookup table for the MacRussian codepage + * Unknown are filled with the Unicode replacement character 0xfffd + */ +const uint16_t libuna_codepage_mac_russian_byte_stream_to_unicode_base_0x80[ 128 ] = { + 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, + 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f, + 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, + 0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f, + 0x2020, 0x00b0, 0x00a2, 0x00a3, 0x00a7, 0x2022, 0x00b6, 0x0406, + 0x00ae, 0x00a9, 0x2122, 0x0402, 0x0452, 0x2260, 0x0403, 0x0453, + 0x221e, 0x00b1, 0x2264, 0x2265, 0x0456, 0x00b5, 0x2202, 0x0408, + 0x0404, 0x0454, 0x0407, 0x0457, 0x0409, 0x0459, 0x040a, 0x045a, + 0x0458, 0x0405, 0x00ac, 0x221a, 0x0192, 0x2248, 0x2206, 0x00ab, + 0x00bb, 0x2026, 0x00a0, 0x040b, 0x045b, 0x040c, 0x045c, 0x0455, + 0x2013, 0x2014, 0x201c, 0x201d, 0x2018, 0x2019, 0x00f7, 0x201e, + 0x040e, 0x045e, 0x040f, 0x045f, 0x2116, 0x0401, 0x0451, 0x044f, + 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, + 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f, + 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, + 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x00a4 +}; + +/* Unicode to ASCII character lookup tables for the MacRussian codepage + * Unknown are filled with the ASCII replacement character 0x1a + */ +const uint8_t libuna_codepage_mac_russian_unicode_to_byte_stream_base_0x00a0[ 32 ] = { + 0xca, 0x1a, 0xa2, 0xa3, 0xff, 0x1a, 0x1a, 0xa4, + 0x1a, 0xa9, 0x1a, 0xc7, 0xc2, 0x1a, 0xa8, 0x1a, + 0xa1, 0xb1, 0x1a, 0x1a, 0x1a, 0xb5, 0xa6, 0x1a, + 0x1a, 0x1a, 0x1a, 0xc8, 0x1a, 0x1a, 0x1a, 0x1a +}; + +const uint8_t libuna_codepage_mac_russian_unicode_to_byte_stream_base_0x0400[ 96 ] = { + 0x1a, 0xdd, 0xab, 0xae, 0xb8, 0xc1, 0xa7, 0xba, + 0xb7, 0xbc, 0xbe, 0xcb, 0xcd, 0x1a, 0xd8, 0xda, + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, + 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, + 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, + 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, + 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, + 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, + 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, + 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xdf, + 0x1a, 0xde, 0xac, 0xaf, 0xb9, 0xcf, 0xb4, 0xbb, + 0xc0, 0xbd, 0xbf, 0xcc, 0xce, 0x1a, 0xd9, 0xdb +}; + +const uint8_t libuna_codepage_mac_russian_unicode_to_byte_stream_base_0x2010[ 24 ] = { + 0x1a, 0x1a, 0x1a, 0xd0, 0xd1, 0x1a, 0x1a, 0x1a, + 0xd4, 0xd5, 0x1a, 0x1a, 0xd2, 0xd3, 0xd7, 0x1a, + 0xa0, 0x1a, 0xa5, 0x1a, 0x1a, 0x1a, 0xc9, 0x1a +}; + +/* Copies an Unicode character from a MacRussian encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_mac_russian_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_mac_russian_copy_from_byte_stream"; + libuna_unicode_character_t safe_unicode_character = 0xfffd; + size_t safe_byte_stream_index = 0; + uint8_t byte_stream_character = 0; + + if( unicode_character == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid Unicode character.", + function ); + + return( -1 ); + } + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + byte_stream_character = byte_stream[ safe_byte_stream_index++ ]; + + if( byte_stream_character < 0x80 ) + { + safe_unicode_character = byte_stream_character; + } + else + { + byte_stream_character -= 0x80; + + safe_unicode_character = libuna_codepage_mac_russian_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; + } + *unicode_character = safe_unicode_character; + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + +/* Copies an Unicode character to a MacRussian encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_mac_russian_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_mac_russian_copy_to_byte_stream"; + size_t safe_byte_stream_index = 0; + uint16_t byte_stream_value = 0x001a; + + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + if( unicode_character < 0x0080 ) + { + byte_stream_value = (uint16_t) unicode_character; + } + else if( ( unicode_character >= 0x00a0 ) + && ( unicode_character < 0x00c0 ) ) + { + unicode_character -= 0x00a0; + + byte_stream_value = libuna_codepage_mac_russian_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; + } + else if( ( unicode_character >= 0x0400 ) + && ( unicode_character < 0x0460 ) ) + { + unicode_character -= 0x0400; + + byte_stream_value = libuna_codepage_mac_russian_unicode_to_byte_stream_base_0x0400[ unicode_character ]; + } + else if( ( unicode_character >= 0x2010 ) + && ( unicode_character < 0x2028 ) ) + { + unicode_character -= 0x2010; + + byte_stream_value = libuna_codepage_mac_russian_unicode_to_byte_stream_base_0x2010[ unicode_character ]; + } + else switch( unicode_character ) + { + case 0x00f7: + byte_stream_value = 0xd6; + break; + + case 0x0192: + byte_stream_value = 0xc4; + break; + + case 0x2116: + byte_stream_value = 0xdc; + break; + + case 0x2122: + byte_stream_value = 0xaa; + break; + + case 0x2202: + byte_stream_value = 0xb6; + break; + + case 0x2206: + byte_stream_value = 0xc6; + break; + + case 0x221a: + byte_stream_value = 0xc3; + break; + + case 0x221e: + byte_stream_value = 0xb0; + break; + + case 0x2248: + byte_stream_value = 0xc5; + break; + + case 0x2260: + byte_stream_value = 0xad; + break; + + case 0x2264: + byte_stream_value = 0xb2; + break; + + case 0x2265: + byte_stream_value = 0xb3; + break; + + default: + byte_stream_value = 0x1a; + break; + } + byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); + + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + diff -Nru libfshfs-20201104/libuna/libuna_codepage_mac_russian.h libfshfs-20240221/libuna/libuna_codepage_mac_russian.h --- libfshfs-20201104/libuna/libuna_codepage_mac_russian.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_mac_russian.h 2024-02-21 06:04:15.000000000 +0000 @@ -0,0 +1,54 @@ +/* + * MacRussian codepage functions + * + * Copyright (C) 2008-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _LIBUNA_CODEPAGE_MAC_RUSSIAN_H ) +#define _LIBUNA_CODEPAGE_MAC_RUSSIAN_H + +#include +#include + +#include "libuna_libcerror.h" +#include "libuna_types.h" + +#if defined( __cplusplus ) +extern "C" { +#endif + +int libuna_codepage_mac_russian_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); + +int libuna_codepage_mac_russian_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _LIBUNA_CODEPAGE_MAC_RUSSIAN_H ) */ + diff -Nru libfshfs-20201104/libuna/libuna_codepage_mac_symbol.c libfshfs-20240221/libuna/libuna_codepage_mac_symbol.c --- libfshfs-20201104/libuna/libuna_codepage_mac_symbol.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_mac_symbol.c 2024-02-21 06:04:15.000000000 +0000 @@ -0,0 +1,537 @@ +/* + * MacSymbol codepage functions + * + * Copyright (C) 2008-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include + +#include "libuna_codepage_mac_symbol.h" +#include "libuna_libcerror.h" +#include "libuna_types.h" + +/* Extended ASCII to Unicode character lookup table for the MacSymbol codepage + * Unknown are filled with the Unicode replacement character 0xfffd + */ +const uint16_t libuna_codepage_mac_symbol_byte_stream_to_unicode_base_0x20[ 224 ] = { + 0x0020, 0x0021, 0x2200, 0x0023, 0x2203, 0x0025, 0x0026, 0x220d, + 0x0028, 0x0029, 0x2217, 0x002b, 0x002c, 0x2212, 0x002e, 0x002f, + 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, + 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, + 0x2245, 0x0391, 0x0392, 0x03a7, 0x0394, 0x0395, 0x03a6, 0x0393, + 0x0397, 0x0399, 0x03d1, 0x039a, 0x039b, 0x039c, 0x039d, 0x039f, + 0x03a0, 0x0398, 0x03a1, 0x03a3, 0x03a4, 0x03a5, 0x03c2, 0x03a9, + 0x039e, 0x03a8, 0x0396, 0x005b, 0x2234, 0x005d, 0x22a5, 0x005f, + 0xf8e5, 0x03b1, 0x03b2, 0x03c7, 0x03b4, 0x03b5, 0x03c6, 0x03b3, + 0x03b7, 0x03b9, 0x03d5, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03bf, + 0x03c0, 0x03b8, 0x03c1, 0x03c3, 0x03c4, 0x03c5, 0x03d6, 0x03c9, + 0x03be, 0x03c8, 0x03b6, 0x007b, 0x007c, 0x007d, 0x223c, 0x007f, + 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, + 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, + 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, + 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, + 0x20ac, 0x03d2, 0x2032, 0x2264, 0x2044, 0x221e, 0x0192, 0x2663, + 0x2666, 0x2665, 0x2660, 0x2194, 0x2190, 0x2191, 0x2192, 0x2193, + 0x00b0, 0x00b1, 0x2033, 0x2265, 0x00d7, 0x221d, 0x2202, 0x2022, + 0x00f7, 0x2260, 0x2261, 0x2248, 0x2026, 0x23d0, 0x23af, 0x21b5, + 0x2135, 0x2111, 0x211c, 0x2118, 0x2297, 0x2295, 0x2205, 0x2229, + 0x222a, 0x2283, 0x2287, 0x2284, 0x2282, 0x2286, 0x2208, 0x2209, + 0x2220, 0x2207, 0x00ae, 0x00a9, 0x2122, 0x220f, 0x221a, 0x22c5, + 0x00ac, 0x2227, 0x2228, 0x21d4, 0x21d0, 0x21d1, 0x21d2, 0x21d3, + 0x25ca, 0x3008, 0x00ae, 0x00a9, 0x2122, 0x2211, 0x239b, 0x239c, + 0x239d, 0x23a1, 0x23a2, 0x23a3, 0x23a7, 0x23a8, 0x23a9, 0x23aa, + 0xf8ff, 0x3009, 0x222b, 0x2320, 0x23ae, 0x2321, 0x239e, 0x239f, + 0x23a0, 0x23a4, 0x23a5, 0x23a6, 0x23ab, 0x23ac, 0x23ad, 0xfffd +}; + +/* Unicode to ASCII character lookup tables for the MacSymbol codepage + * Unknown are filled with the ASCII replacement character 0x1a + */ +const uint8_t libuna_codepage_mac_symbol_unicode_to_byte_stream_base_0x0390[ 72 ] = { + 0x1a, 0x41, 0x42, 0x47, 0x44, 0x45, 0x5a, 0x48, + 0x51, 0x49, 0x4b, 0x4c, 0x4d, 0x4e, 0x58, 0x4f, + 0x50, 0x52, 0x1a, 0x53, 0x54, 0x55, 0x46, 0x43, + 0x59, 0x57, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x61, 0x62, 0x67, 0x64, 0x65, 0x7a, 0x68, + 0x71, 0x69, 0x6b, 0x6c, 0x6d, 0x6e, 0x78, 0x6f, + 0x70, 0x72, 0x56, 0x73, 0x74, 0x75, 0x66, 0x63, + 0x79, 0x77, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x4a, 0xa1, 0x1a, 0x1a, 0x6a, 0x76, 0x1a +}; + +const uint8_t libuna_codepage_mac_symbol_unicode_to_byte_stream_base_0x2200[ 80 ] = { + 0x22, 0x1a, 0xb6, 0x24, 0x1a, 0xc6, 0x1a, 0xd1, + 0xce, 0xcf, 0x1a, 0x1a, 0x1a, 0x27, 0x1a, 0xd5, + 0x1a, 0xe5, 0x2d, 0x1a, 0x1a, 0x1a, 0x1a, 0x2a, + 0x1a, 0x1a, 0xd6, 0x1a, 0x1a, 0xb5, 0xa5, 0x1a, + 0xd0, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xd9, + 0xda, 0xc7, 0xc8, 0xf2, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0x5c, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0x7e, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x40, 0x1a, 0x1a, + 0xbb, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a +}; + +const uint8_t libuna_codepage_mac_symbol_unicode_to_byte_stream_base_0x2280[ 40 ] = { + 0x1a, 0x1a, 0xcc, 0xc9, 0xcb, 0x1a, 0xcd, 0xca, + 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xc5, 0x1a, 0xc4, + 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x5e, 0x1a, 0x1a +}; + +const uint8_t libuna_codepage_mac_symbol_unicode_to_byte_stream_base_0x2398[ 24 ] = { + 0x1a, 0x1a, 0x1a, 0xe6, 0xe7, 0xe8, 0xf6, 0xf7, + 0xf8, 0xe9, 0xea, 0xeb, 0xf9, 0xfa, 0xfb, 0xec, + 0xed, 0xee, 0xef, 0xfc, 0xfd, 0xfe, 0xf4, 0xbe +}; + +/* Determines the size of a MacSymbol encoded byte stream from an Unicode character + * Adds the size to the byte stream character size value + * Returns 1 if successful, 0 if the byte stream character is valid but not supported since it requires special handling or -1 on error + */ +int libuna_codepage_mac_symbol_unicode_character_size_to_byte_stream( + libuna_unicode_character_t unicode_character, + size_t *byte_stream_character_size, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_mac_symbol_unicode_character_size_to_byte_stream"; + int result = 0; + + if( byte_stream_character_size == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream character size.", + function ); + + return( -1 ); + } + switch( unicode_character ) + { + case 0x000000aeUL: + case 0x000000a9UL: + case 0x00002122UL: + result = 0; + break; + + default: + *byte_stream_character_size += 1; + + result = 1; + break; + } + return( result ); +} + +/* Copies an Unicode character from a MacSymbol encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_mac_symbol_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_mac_symbol_copy_from_byte_stream"; + libuna_unicode_character_t safe_unicode_character = 0xfffd; + size_t safe_byte_stream_index = 0; + uint8_t byte_stream_character = 0; + + if( unicode_character == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid Unicode character.", + function ); + + return( -1 ); + } + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + byte_stream_character = byte_stream[ safe_byte_stream_index++ ]; + + if( byte_stream_character < 0x20 ) + { + safe_unicode_character = byte_stream_character; + } + else + { + byte_stream_character -= 0x20; + + safe_unicode_character = libuna_codepage_mac_symbol_byte_stream_to_unicode_base_0x20[ byte_stream_character ]; + } + *unicode_character = safe_unicode_character; + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + +/* Copies an Unicode character to a MacSymbol encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_mac_symbol_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_mac_symbol_copy_to_byte_stream"; + size_t safe_byte_stream_index = 0; + uint16_t byte_stream_value = 0x001a; + + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + if( ( unicode_character <= 0x0021 ) + || ( unicode_character == 0x0023 ) + || ( unicode_character == 0x0025 ) + || ( unicode_character == 0x0026 ) + || ( unicode_character == 0x0028 ) + || ( unicode_character == 0x0029 ) + || ( unicode_character == 0x002b ) + || ( unicode_character == 0x002c ) + || ( ( unicode_character >= 0x002e ) + && ( unicode_character <= 0x003f ) ) + || ( unicode_character == 0x005b ) + || ( unicode_character == 0x005d ) + || ( unicode_character == 0x005f ) + || ( unicode_character == 0x007b ) + || ( unicode_character == 0x007c ) + || ( unicode_character == 0x007d ) + || ( unicode_character == 0x007f ) + || ( unicode_character == 0x00b0 ) + || ( unicode_character == 0x00b1 ) ) + { + byte_stream_value = (uint16_t) unicode_character; + } + else if( ( unicode_character >= 0x0390 ) + && ( unicode_character < 0x03d8 ) ) + { + unicode_character -= 0x0390; + + byte_stream_value = libuna_codepage_mac_symbol_unicode_to_byte_stream_base_0x0390[ unicode_character ]; + } + else if( ( unicode_character >= 0x2200 ) + && ( unicode_character < 0x2250 ) ) + { + unicode_character -= 0x2200; + + byte_stream_value = libuna_codepage_mac_symbol_unicode_to_byte_stream_base_0x2200[ unicode_character ]; + } + else if( ( unicode_character >= 0x2280 ) + && ( unicode_character < 0x22a8 ) ) + { + unicode_character -= 0x2280; + + byte_stream_value = libuna_codepage_mac_symbol_unicode_to_byte_stream_base_0x2280[ unicode_character ]; + } + else if( ( unicode_character >= 0x2398 ) + && ( unicode_character < 0x23b0 ) ) + { + unicode_character -= 0x2398; + + byte_stream_value = libuna_codepage_mac_symbol_unicode_to_byte_stream_base_0x2398[ unicode_character ]; + } + else switch( unicode_character ) + { + case 0x00a9: + byte_stream_value = 0xd3; + break; + + case 0x00ac: + byte_stream_value = 0xd8; + break; + + case 0x00ae: + byte_stream_value = 0xd2; + break; + + case 0x00d7: + byte_stream_value = 0xb4; + break; + + case 0x00f7: + byte_stream_value = 0xb8; + break; + + case 0x0192: + byte_stream_value = 0xa6; + break; + + case 0x2022: + byte_stream_value = 0xb7; + break; + + case 0x2026: + byte_stream_value = 0xbc; + break; + + case 0x2032: + byte_stream_value = 0xa2; + break; + + case 0x2033: + byte_stream_value = 0xb2; + break; + + case 0x2044: + byte_stream_value = 0xa4; + break; + + case 0x20ac: + byte_stream_value = 0xa0; + break; + + case 0x2111: + byte_stream_value = 0xc1; + break; + + case 0x2118: + byte_stream_value = 0xc3; + break; + + case 0x211c: + byte_stream_value = 0xc2; + break; + + case 0x2122: + byte_stream_value = 0xd4; + break; + + case 0x2135: + byte_stream_value = 0xc0; + break; + + case 0x2190: + byte_stream_value = 0xac; + break; + + case 0x2191: + byte_stream_value = 0xad; + break; + + case 0x2192: + byte_stream_value = 0xae; + break; + + case 0x2193: + byte_stream_value = 0xaf; + break; + + case 0x2194: + byte_stream_value = 0xab; + break; + + case 0x21b5: + byte_stream_value = 0xbf; + break; + + case 0x21d0: + byte_stream_value = 0xdc; + break; + + case 0x21d1: + byte_stream_value = 0xdd; + break; + + case 0x21d2: + byte_stream_value = 0xde; + break; + + case 0x21d3: + byte_stream_value = 0xdf; + break; + + case 0x21d4: + byte_stream_value = 0xdb; + break; + + case 0x2260: + byte_stream_value = 0xb9; + break; + + case 0x2261: + byte_stream_value = 0xba; + break; + + case 0x2264: + byte_stream_value = 0xa3; + break; + + case 0x2265: + byte_stream_value = 0xb3; + break; + + case 0x22c5: + byte_stream_value = 0xd7; + break; + + case 0x2320: + byte_stream_value = 0xf3; + break; + + case 0x2321: + byte_stream_value = 0xf5; + break; + + case 0x23d0: + byte_stream_value = 0xbd; + break; + + case 0x25ca: + byte_stream_value = 0xe0; + break; + + case 0x2660: + byte_stream_value = 0xaa; + break; + + case 0x2663: + byte_stream_value = 0xa7; + break; + + case 0x2665: + byte_stream_value = 0xa9; + break; + + case 0x2666: + byte_stream_value = 0xa8; + break; + + case 0x3008: + byte_stream_value = 0xe1; + break; + + case 0x3009: + byte_stream_value = 0xf1; + break; + + case 0xf8e5: + byte_stream_value = 0x60; + break; + + case 0xf8ff: + byte_stream_value = 0xf0; + break; + + default: + byte_stream_value = 0x1a; + break; + } + byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); + + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + diff -Nru libfshfs-20201104/libuna/libuna_codepage_mac_symbol.h libfshfs-20240221/libuna/libuna_codepage_mac_symbol.h --- libfshfs-20201104/libuna/libuna_codepage_mac_symbol.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_mac_symbol.h 2024-02-21 06:04:15.000000000 +0000 @@ -0,0 +1,59 @@ +/* + * MacSymbol codepage functions + * + * Copyright (C) 2008-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _LIBUNA_CODEPAGE_MAC_SYMBOL_H ) +#define _LIBUNA_CODEPAGE_MAC_SYMBOL_H + +#include +#include + +#include "libuna_libcerror.h" +#include "libuna_types.h" + +#if defined( __cplusplus ) +extern "C" { +#endif + +int libuna_codepage_mac_symbol_unicode_character_size_to_byte_stream( + libuna_unicode_character_t unicode_character, + size_t *byte_stream_character_size, + libcerror_error_t **error ); + +int libuna_codepage_mac_symbol_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); + +int libuna_codepage_mac_symbol_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _LIBUNA_CODEPAGE_MAC_SYMBOL_H ) */ + diff -Nru libfshfs-20201104/libuna/libuna_codepage_mac_thai.c libfshfs-20240221/libuna/libuna_codepage_mac_thai.c --- libfshfs-20201104/libuna/libuna_codepage_mac_thai.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_mac_thai.c 2024-02-21 06:04:15.000000000 +0000 @@ -0,0 +1,330 @@ +/* + * MacThai codepage functions + * + * Copyright (C) 2008-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include + +#include "libuna_codepage_mac_thai.h" +#include "libuna_libcerror.h" +#include "libuna_types.h" + +/* Extended ASCII to Unicode character lookup table for the MacThai codepage + * Unknown are filled with the Unicode replacement character 0xfffd + */ +const uint16_t libuna_codepage_mac_thai_byte_stream_to_unicode_base_0x80[ 128 ] = { + 0x00ab, 0x00bb, 0x2026, 0x0e48, 0x0e49, 0x0e4a, 0x0e4b, 0x0e4c, + 0x0e48, 0x0e49, 0x0e4a, 0x0e4b, 0x0e4c, 0x201c, 0x201d, 0x0e4d, + 0xfffd, 0x2022, 0x0e31, 0x0e47, 0x0e34, 0x0e35, 0x0e36, 0x0e37, + 0x0e48, 0x0e49, 0x0e4a, 0x0e4b, 0x0e4c, 0x2018, 0x2019, 0xfffd, + 0x00a0, 0x0e01, 0x0e02, 0x0e03, 0x0e04, 0x0e05, 0x0e06, 0x0e07, + 0x0e08, 0x0e09, 0x0e0a, 0x0e0b, 0x0e0c, 0x0e0d, 0x0e0e, 0x0e0f, + 0x0e10, 0x0e11, 0x0e12, 0x0e13, 0x0e14, 0x0e15, 0x0e16, 0x0e17, + 0x0e18, 0x0e19, 0x0e1a, 0x0e1b, 0x0e1c, 0x0e1d, 0x0e1e, 0x0e1f, + 0x0e20, 0x0e21, 0x0e22, 0x0e23, 0x0e24, 0x0e25, 0x0e26, 0x0e27, + 0x0e28, 0x0e29, 0x0e2a, 0x0e2b, 0x0e2c, 0x0e2d, 0x0e2e, 0x0e2f, + 0x0e30, 0x0e31, 0x0e32, 0x0e33, 0x0e34, 0x0e35, 0x0e36, 0x0e37, + 0x0e38, 0x0e39, 0x0e3a, 0x2060, 0x200b, 0x2013, 0x2014, 0x0e3f, + 0x0e40, 0x0e41, 0x0e42, 0x0e43, 0x0e44, 0x0e45, 0x0e46, 0x0e47, + 0x0e48, 0x0e49, 0x0e4a, 0x0e4b, 0x0e4c, 0x0e4d, 0x2122, 0x0e4f, + 0x0e50, 0x0e51, 0x0e52, 0x0e53, 0x0e54, 0x0e55, 0x0e56, 0x0e57, + 0x0e58, 0x0e59, 0x00ae, 0x00a9, 0xfffd, 0xfffd, 0xfffd, 0xfffd +}; + +/* Unicode to ASCII character lookup tables for the MacThai codepage + * Unknown are filled with the ASCII replacement character 0x1a + */ +const uint8_t libuna_codepage_mac_thai_unicode_to_byte_stream_base_0x0e00[ 96 ] = { + 0x1a, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, + 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, + 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, + 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, + 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, + 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, + 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, + 0xd8, 0xd9, 0xda, 0x1a, 0x1a, 0x1a, 0x1a, 0xdf, + 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, + 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0x1a, 0xef, + 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, + 0xf8, 0xf9, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a +}; + +const uint8_t libuna_codepage_mac_thai_unicode_to_byte_stream_base_0x2008[ 32 ] = { + 0x1a, 0x1a, 0x1a, 0xdc, 0x1a, 0x1a, 0x1a, 0x1a, + 0x1a, 0x1a, 0x1a, 0xdd, 0xde, 0x1a, 0x1a, 0x1a, + 0x9d, 0x9e, 0x1a, 0x1a, 0x8d, 0x8e, 0x1a, 0x1a, + 0x1a, 0x1a, 0x91, 0x1a, 0x1a, 0x1a, 0x82, 0x1a +}; + +/* Determines the size of a MacThai encoded byte stream from an Unicode character + * Adds the size to the byte stream character size value + * Returns 1 if successful, 0 if the byte stream character is valid but not supported since it requires special handling or -1 on error + */ +int libuna_codepage_mac_thai_unicode_character_size_to_byte_stream( + libuna_unicode_character_t unicode_character, + size_t *byte_stream_character_size, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_mac_thai_unicode_character_size_to_byte_stream"; + int result = 0; + + if( byte_stream_character_size == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream character size.", + function ); + + return( -1 ); + } + switch( unicode_character ) + { + case 0x00000e31UL: + case 0x00000e34UL: + case 0x00000e35UL: + case 0x00000e36UL: + case 0x00000e37UL: + case 0x00000e47UL: + case 0x00000e48UL: + case 0x00000e49UL: + case 0x00000e4aUL: + case 0x00000e4bUL: + case 0x00000e4cUL: + case 0x00000e4dUL: + result = 0; + break; + + default: + *byte_stream_character_size += 1; + + result = 1; + break; + } + return( result ); +} + +/* Copies an Unicode character from a MacThai encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_mac_thai_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_mac_thai_copy_from_byte_stream"; + libuna_unicode_character_t safe_unicode_character = 0xfffd; + size_t safe_byte_stream_index = 0; + uint8_t byte_stream_character = 0; + + if( unicode_character == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid Unicode character.", + function ); + + return( -1 ); + } + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + byte_stream_character = byte_stream[ safe_byte_stream_index++ ]; + + if( byte_stream_character < 0x80 ) + { + safe_unicode_character = byte_stream_character; + } + else + { + byte_stream_character -= 0x80; + + safe_unicode_character = libuna_codepage_mac_thai_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; + } + *unicode_character = safe_unicode_character; + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + +/* Copies an Unicode character to a MacThai encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_mac_thai_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_mac_thai_copy_to_byte_stream"; + size_t safe_byte_stream_index = 0; + uint16_t byte_stream_value = 0x001a; + + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + if( ( unicode_character < 0x0080 ) + || ( unicode_character == 0x00a0 ) ) + { + byte_stream_value = (uint16_t) unicode_character; + } + else if( ( unicode_character >= 0x0e00 ) + && ( unicode_character < 0x0e60 ) ) + { + unicode_character -= 0x0e00; + + byte_stream_value = libuna_codepage_mac_thai_unicode_to_byte_stream_base_0x0e00[ unicode_character ]; + } + else if( ( unicode_character >= 0x2008 ) + && ( unicode_character < 0x2028 ) ) + { + unicode_character -= 0x2008; + + byte_stream_value = libuna_codepage_mac_thai_unicode_to_byte_stream_base_0x2008[ unicode_character ]; + } + else switch( unicode_character ) + { + case 0x00a9: + byte_stream_value = 0xfb; + break; + + case 0x00ab: + byte_stream_value = 0x80; + break; + + case 0x00ae: + byte_stream_value = 0xfa; + break; + + case 0x00bb: + byte_stream_value = 0x81; + break; + + case 0x2060: + byte_stream_value = 0xdb; + break; + + case 0x2122: + byte_stream_value = 0xee; + break; + + default: + byte_stream_value = 0x1a; + break; + } + byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); + + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + diff -Nru libfshfs-20201104/libuna/libuna_codepage_mac_thai.h libfshfs-20240221/libuna/libuna_codepage_mac_thai.h --- libfshfs-20201104/libuna/libuna_codepage_mac_thai.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_mac_thai.h 2024-02-21 06:04:15.000000000 +0000 @@ -0,0 +1,59 @@ +/* + * MacThai codepage functions + * + * Copyright (C) 2008-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _LIBUNA_CODEPAGE_MAC_THAI_H ) +#define _LIBUNA_CODEPAGE_MAC_THAI_H + +#include +#include + +#include "libuna_libcerror.h" +#include "libuna_types.h" + +#if defined( __cplusplus ) +extern "C" { +#endif + +int libuna_codepage_mac_thai_unicode_character_size_to_byte_stream( + libuna_unicode_character_t unicode_character, + size_t *byte_stream_character_size, + libcerror_error_t **error ); + +int libuna_codepage_mac_thai_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); + +int libuna_codepage_mac_thai_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _LIBUNA_CODEPAGE_MAC_THAI_H ) */ + diff -Nru libfshfs-20201104/libuna/libuna_codepage_mac_turkish.c libfshfs-20240221/libuna/libuna_codepage_mac_turkish.c --- libfshfs-20201104/libuna/libuna_codepage_mac_turkish.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_mac_turkish.c 2024-02-21 06:04:15.000000000 +0000 @@ -0,0 +1,397 @@ +/* + * MacTurkish codepage functions + * + * Copyright (C) 2008-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include + +#include "libuna_codepage_mac_turkish.h" +#include "libuna_libcerror.h" +#include "libuna_types.h" + +/* Extended ASCII to Unicode character lookup table for the MacTurkish codepage + * Unknown are filled with the Unicode replacement character 0xfffd + */ +const uint16_t libuna_codepage_mac_turkish_byte_stream_to_unicode_base_0x80[ 128 ] = { + 0x00c4, 0x00c5, 0x00c7, 0x00c9, 0x00d1, 0x00d6, 0x00dc, 0x00e1, + 0x00e0, 0x00e2, 0x00e4, 0x00e3, 0x00e5, 0x00e7, 0x00e9, 0x00e8, + 0x00ea, 0x00eb, 0x00ed, 0x00ec, 0x00ee, 0x00ef, 0x00f1, 0x00f3, + 0x00f2, 0x00f4, 0x00f6, 0x00f5, 0x00fa, 0x00f9, 0x00fb, 0x00fc, + 0x2020, 0x00b0, 0x00a2, 0x00a3, 0x00a7, 0x2022, 0x00b6, 0x00df, + 0x00ae, 0x00a9, 0x2122, 0x00b4, 0x00a8, 0x2260, 0x00c6, 0x00d8, + 0x221e, 0x00b1, 0x2264, 0x2265, 0x00a5, 0x00b5, 0x2202, 0x2211, + 0x220f, 0x03c0, 0x222b, 0x00aa, 0x00ba, 0x03a9, 0x00e6, 0x00f8, + 0x00bf, 0x00a1, 0x00ac, 0x221a, 0x0192, 0x2248, 0x2206, 0x00ab, + 0x00bb, 0x2026, 0x00a0, 0x00c0, 0x00c3, 0x00d5, 0x0152, 0x0153, + 0x2013, 0x2014, 0x201c, 0x201d, 0x2018, 0x2019, 0x00f7, 0x25ca, + 0x00ff, 0x0178, 0x011e, 0x011f, 0x0130, 0x0131, 0x015e, 0x015f, + 0x2021, 0x00b7, 0x201a, 0x201e, 0x2030, 0x00c2, 0x00ca, 0x00c1, + 0x00cb, 0x00c8, 0x00cd, 0x00ce, 0x00cf, 0x00cc, 0x00d3, 0x00d4, + 0xf8ff, 0x00d2, 0x00da, 0x00db, 0x00d9, 0xf8a0, 0x02c6, 0x02dc, + 0x00af, 0x02d8, 0x02d9, 0x02da, 0x00b8, 0x02dd, 0x02db, 0x02c7 +}; + +/* Unicode to ASCII character lookup tables for the MacTurkish codepage + * Unknown are filled with the ASCII replacement character 0x1a + */ +const uint8_t libuna_codepage_mac_turkish_unicode_to_byte_stream_base_0x00a0[ 96 ] = { + 0xca, 0xc1, 0xa2, 0xa3, 0x1a, 0xb4, 0x1a, 0xa4, + 0xac, 0xa9, 0xbb, 0xc7, 0xc2, 0x1a, 0xa8, 0xf8, + 0xa1, 0xb1, 0x1a, 0x1a, 0xab, 0xb5, 0xa6, 0xe1, + 0xfc, 0x1a, 0xbc, 0xc8, 0x1a, 0x1a, 0x1a, 0xc0, + 0xcb, 0xe7, 0xe5, 0xcc, 0x80, 0x81, 0xae, 0x82, + 0xe9, 0x83, 0xe6, 0xe8, 0xed, 0xea, 0xeb, 0xec, + 0x1a, 0x84, 0xf1, 0xee, 0xef, 0xcd, 0x85, 0x1a, + 0xaf, 0xf4, 0xf2, 0xf3, 0x86, 0x1a, 0x1a, 0xa7, + 0x88, 0x87, 0x89, 0x8b, 0x8a, 0x8c, 0xbe, 0x8d, + 0x8f, 0x8e, 0x90, 0x91, 0x93, 0x92, 0x94, 0x95, + 0x1a, 0x96, 0x98, 0x97, 0x99, 0x9b, 0x9a, 0xd6, + 0xbf, 0x9d, 0x9c, 0x9e, 0x9f, 0x1a, 0x1a, 0xd8 +}; + +const uint8_t libuna_codepage_mac_turkish_unicode_to_byte_stream_base_0x2010[ 40 ] = { + 0x1a, 0x1a, 0x1a, 0xd0, 0xd1, 0x1a, 0x1a, 0x1a, + 0xd4, 0xd5, 0xe2, 0x1a, 0xd2, 0xd3, 0xe3, 0x1a, + 0xa0, 0xe0, 0xa5, 0x1a, 0x1a, 0x1a, 0xc9, 0x1a, + 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, + 0xe4, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a +}; + +/* Copies an Unicode character from a MacTurkish encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_mac_turkish_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_mac_turkish_copy_from_byte_stream"; + libuna_unicode_character_t safe_unicode_character = 0xfffd; + size_t safe_byte_stream_index = 0; + uint8_t byte_stream_character = 0; + + if( unicode_character == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid Unicode character.", + function ); + + return( -1 ); + } + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + byte_stream_character = byte_stream[ safe_byte_stream_index++ ]; + + if( byte_stream_character < 0x80 ) + { + safe_unicode_character = byte_stream_character; + } + else + { + byte_stream_character -= 0x80; + + safe_unicode_character = libuna_codepage_mac_turkish_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; + } + *unicode_character = safe_unicode_character; + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + +/* Copies an Unicode character to a MacTurkish encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_mac_turkish_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_mac_turkish_copy_to_byte_stream"; + size_t safe_byte_stream_index = 0; + uint16_t byte_stream_value = 0x001a; + + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + if( unicode_character < 0x0080 ) + { + byte_stream_value = (uint16_t) unicode_character; + } + else if( ( unicode_character >= 0x00a0 ) + && ( unicode_character < 0x0100 ) ) + { + unicode_character -= 0x00a0; + + byte_stream_value = libuna_codepage_mac_turkish_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; + } + else if( ( unicode_character >= 0x2010 ) + && ( unicode_character < 0x2038 ) ) + { + unicode_character -= 0x2010; + + byte_stream_value = libuna_codepage_mac_turkish_unicode_to_byte_stream_base_0x2010[ unicode_character ]; + } + else switch( unicode_character ) + { + case 0x011e: + byte_stream_value = 0xda; + break; + + case 0x011f: + byte_stream_value = 0xdb; + break; + + case 0x0130: + byte_stream_value = 0xdc; + break; + + case 0x0131: + byte_stream_value = 0xdd; + break; + + case 0x0152: + byte_stream_value = 0xce; + break; + + case 0x0153: + byte_stream_value = 0xcf; + break; + + case 0x015e: + byte_stream_value = 0xde; + break; + + case 0x015f: + byte_stream_value = 0xdf; + break; + + case 0x0178: + byte_stream_value = 0xd9; + break; + + case 0x0192: + byte_stream_value = 0xc4; + break; + + case 0x02c6: + byte_stream_value = 0xf6; + break; + + case 0x02c7: + byte_stream_value = 0xff; + break; + + case 0x02d8: + byte_stream_value = 0xf9; + break; + + case 0x02d9: + byte_stream_value = 0xfa; + break; + + case 0x02da: + byte_stream_value = 0xfb; + break; + + case 0x02db: + byte_stream_value = 0xfe; + break; + + case 0x02dc: + byte_stream_value = 0xf7; + break; + + case 0x02dd: + byte_stream_value = 0xfd; + break; + + case 0x03a9: + byte_stream_value = 0xbd; + break; + + case 0x03c0: + byte_stream_value = 0xb9; + break; + + case 0x2122: + byte_stream_value = 0xaa; + break; + + case 0x2202: + byte_stream_value = 0xb6; + break; + + case 0x2206: + byte_stream_value = 0xc6; + break; + + case 0x220f: + byte_stream_value = 0xb8; + break; + + case 0x2211: + byte_stream_value = 0xb7; + break; + + case 0x221a: + byte_stream_value = 0xc3; + break; + + case 0x221e: + byte_stream_value = 0xb0; + break; + + case 0x222b: + byte_stream_value = 0xba; + break; + + case 0x2248: + byte_stream_value = 0xc5; + break; + + case 0x2260: + byte_stream_value = 0xad; + break; + + case 0x2264: + byte_stream_value = 0xb2; + break; + + case 0x2265: + byte_stream_value = 0xb3; + break; + + case 0x25ca: + byte_stream_value = 0xd7; + break; + + case 0xf8a0: + byte_stream_value = 0xf5; + break; + + case 0xf8ff: + byte_stream_value = 0xf0; + break; + + default: + byte_stream_value = 0x1a; + break; + } + byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); + + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + diff -Nru libfshfs-20201104/libuna/libuna_codepage_mac_turkish.h libfshfs-20240221/libuna/libuna_codepage_mac_turkish.h --- libfshfs-20201104/libuna/libuna_codepage_mac_turkish.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_mac_turkish.h 2024-02-21 06:04:15.000000000 +0000 @@ -0,0 +1,54 @@ +/* + * MacTurkish codepage functions + * + * Copyright (C) 2008-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _LIBUNA_CODEPAGE_MAC_TURKISH_H ) +#define _LIBUNA_CODEPAGE_MAC_TURKISH_H + +#include +#include + +#include "libuna_libcerror.h" +#include "libuna_types.h" + +#if defined( __cplusplus ) +extern "C" { +#endif + +int libuna_codepage_mac_turkish_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); + +int libuna_codepage_mac_turkish_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _LIBUNA_CODEPAGE_MAC_TURKISH_H ) */ + diff -Nru libfshfs-20201104/libuna/libuna_codepage_mac_ukrainian.c libfshfs-20240221/libuna/libuna_codepage_mac_ukrainian.c --- libfshfs-20201104/libuna/libuna_codepage_mac_ukrainian.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_mac_ukrainian.c 2024-02-21 06:04:15.000000000 +0000 @@ -0,0 +1,321 @@ +/* + * MacUkrainian codepage functions + * + * Copyright (C) 2008-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include + +#include "libuna_codepage_mac_ukrainian.h" +#include "libuna_libcerror.h" +#include "libuna_types.h" + +/* Extended ASCII to Unicode character lookup table for the MacUkrainian codepage + * Unknown are filled with the Unicode replacement character 0xfffd + */ +const uint16_t libuna_codepage_mac_ukrainian_byte_stream_to_unicode_base_0x80[ 128 ] = { + 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, + 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f, + 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, + 0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f, + 0x2020, 0x00b0, 0x0490, 0x00a3, 0x00a7, 0x2022, 0x00b6, 0x0406, + 0x00ae, 0x00a9, 0x2122, 0x0402, 0x0452, 0x2260, 0x0403, 0x0453, + 0x221e, 0x00b1, 0x2264, 0x2265, 0x0456, 0x00b5, 0x0491, 0x0408, + 0x0404, 0x0454, 0x0407, 0x0457, 0x0409, 0x0459, 0x040a, 0x045a, + 0x0458, 0x0405, 0x00ac, 0x221a, 0x0192, 0x2248, 0x2206, 0x00ab, + 0x00bb, 0x2026, 0x00a0, 0x040b, 0x045b, 0x040c, 0x045c, 0x0455, + 0x2013, 0x2014, 0x201c, 0x201d, 0x2018, 0x2019, 0x00f7, 0x201e, + 0x040e, 0x045e, 0x040f, 0x045f, 0x2116, 0x0401, 0x0451, 0x044f, + 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, + 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f, + 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, + 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x00a4 +}; + +/* Unicode to ASCII character lookup tables for the MacUkrainian codepage + * Unknown are filled with the ASCII replacement character 0x1a + */ +const uint8_t libuna_codepage_mac_ukrainian_unicode_to_byte_stream_base_0x00a0[ 32 ] = { + 0xca, 0x1a, 0x1a, 0xa3, 0xff, 0x1a, 0x1a, 0xa4, + 0x1a, 0xa9, 0x1a, 0xc7, 0xc2, 0x1a, 0xa8, 0x1a, + 0xa1, 0xb1, 0x1a, 0x1a, 0x1a, 0xb5, 0xa6, 0x1a, + 0x1a, 0x1a, 0x1a, 0xc8, 0x1a, 0x1a, 0x1a, 0x1a +}; + +const uint8_t libuna_codepage_mac_ukrainian_unicode_to_byte_stream_base_0x0400[ 96 ] = { + 0x1a, 0xdd, 0xab, 0xae, 0xb8, 0xc1, 0xa7, 0xba, + 0xb7, 0xbc, 0xbe, 0xcb, 0xcd, 0x1a, 0xd8, 0xda, + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, + 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, + 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, + 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, + 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, + 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, + 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, + 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xdf, + 0x1a, 0xde, 0xac, 0xaf, 0xb9, 0xcf, 0xb4, 0xbb, + 0xc0, 0xbd, 0xbf, 0xcc, 0xce, 0x1a, 0xd9, 0xdb +}; + +const uint8_t libuna_codepage_mac_ukrainian_unicode_to_byte_stream_base_0x2010[ 24 ] = { + 0x1a, 0x1a, 0x1a, 0xd0, 0xd1, 0x1a, 0x1a, 0x1a, + 0xd4, 0xd5, 0x1a, 0x1a, 0xd2, 0xd3, 0xd7, 0x1a, + 0xa0, 0x1a, 0xa5, 0x1a, 0x1a, 0x1a, 0xc9, 0x1a +}; + +/* Copies an Unicode character from a MacUkrainian encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_mac_ukrainian_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_mac_ukrainian_copy_from_byte_stream"; + libuna_unicode_character_t safe_unicode_character = 0xfffd; + size_t safe_byte_stream_index = 0; + uint8_t byte_stream_character = 0; + + if( unicode_character == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid Unicode character.", + function ); + + return( -1 ); + } + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + byte_stream_character = byte_stream[ safe_byte_stream_index++ ]; + + if( byte_stream_character < 0x80 ) + { + safe_unicode_character = byte_stream_character; + } + else + { + byte_stream_character -= 0x80; + + safe_unicode_character = libuna_codepage_mac_ukrainian_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; + } + *unicode_character = safe_unicode_character; + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + +/* Copies an Unicode character to a MacUkrainian encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_mac_ukrainian_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_mac_ukrainian_copy_to_byte_stream"; + size_t safe_byte_stream_index = 0; + uint16_t byte_stream_value = 0x001a; + + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + if( unicode_character < 0x0080 ) + { + byte_stream_value = (uint16_t) unicode_character; + } + else if( ( unicode_character >= 0x00a0 ) + && ( unicode_character < 0x00c0 ) ) + { + unicode_character -= 0x00a0; + + byte_stream_value = libuna_codepage_mac_ukrainian_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; + } + else if( ( unicode_character >= 0x0400 ) + && ( unicode_character < 0x0460 ) ) + { + unicode_character -= 0x0400; + + byte_stream_value = libuna_codepage_mac_ukrainian_unicode_to_byte_stream_base_0x0400[ unicode_character ]; + } + else if( ( unicode_character >= 0x2010 ) + && ( unicode_character < 0x2028 ) ) + { + unicode_character -= 0x2010; + + byte_stream_value = libuna_codepage_mac_ukrainian_unicode_to_byte_stream_base_0x2010[ unicode_character ]; + } + else switch( unicode_character ) + { + case 0x00f7: + byte_stream_value = 0xd6; + break; + + case 0x0192: + byte_stream_value = 0xc4; + break; + + case 0x0490: + byte_stream_value = 0xa2; + break; + + case 0x0491: + byte_stream_value = 0xb6; + break; + + case 0x2116: + byte_stream_value = 0xdc; + break; + + case 0x2122: + byte_stream_value = 0xaa; + break; + + case 0x2206: + byte_stream_value = 0xc6; + break; + + case 0x221a: + byte_stream_value = 0xc3; + break; + + case 0x221e: + byte_stream_value = 0xb0; + break; + + case 0x2248: + byte_stream_value = 0xc5; + break; + + case 0x2260: + byte_stream_value = 0xad; + break; + + case 0x2264: + byte_stream_value = 0xb2; + break; + + case 0x2265: + byte_stream_value = 0xb3; + break; + + default: + byte_stream_value = 0x1a; + break; + } + byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); + + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + diff -Nru libfshfs-20201104/libuna/libuna_codepage_mac_ukrainian.h libfshfs-20240221/libuna/libuna_codepage_mac_ukrainian.h --- libfshfs-20201104/libuna/libuna_codepage_mac_ukrainian.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_mac_ukrainian.h 2024-02-21 06:04:15.000000000 +0000 @@ -0,0 +1,54 @@ +/* + * MacUkrainian codepage functions + * + * Copyright (C) 2008-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _LIBUNA_CODEPAGE_MAC_UKRAINIAN_H ) +#define _LIBUNA_CODEPAGE_MAC_UKRAINIAN_H + +#include +#include + +#include "libuna_libcerror.h" +#include "libuna_types.h" + +#if defined( __cplusplus ) +extern "C" { +#endif + +int libuna_codepage_mac_ukrainian_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); + +int libuna_codepage_mac_ukrainian_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _LIBUNA_CODEPAGE_MAC_UKRAINIAN_H ) */ + diff -Nru libfshfs-20201104/libuna/libuna_codepage_windows_1250.c libfshfs-20240221/libuna/libuna_codepage_windows_1250.c --- libfshfs-20201104/libuna/libuna_codepage_windows_1250.c 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_windows_1250.c 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * Windows 1250 codepage (Central European) functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -23,8 +23,10 @@ #include #include "libuna_codepage_windows_1250.h" +#include "libuna_libcerror.h" +#include "libuna_types.h" -/* Extended ASCII to Unicode character lookup table for Windows 1250 codepage +/* Extended ASCII to Unicode character lookup table for the Windows 1250 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_windows_1250_byte_stream_to_unicode_base_0x80[ 128 ] = { @@ -46,7 +48,7 @@ 0x0159, 0x016f, 0x00fa, 0x0171, 0x00fc, 0x00fd, 0x0163, 0x02d9 }; -/* Unicode to ASCII character lookup table for Windows 1250 codepage +/* Unicode to ASCII character lookup tables for the Windows 1250 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_windows_1250_unicode_to_byte_stream_base_0x00a0[ 128 ] = { @@ -95,3 +97,217 @@ 0x1a, 0x8b, 0x9b, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a }; +/* Copies an Unicode character from a Windows 1250 encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_windows_1250_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_windows_1250_copy_from_byte_stream"; + libuna_unicode_character_t safe_unicode_character = 0xfffd; + size_t safe_byte_stream_index = 0; + uint8_t byte_stream_character = 0; + + if( unicode_character == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid Unicode character.", + function ); + + return( -1 ); + } + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + byte_stream_character = byte_stream[ safe_byte_stream_index++ ]; + + if( byte_stream_character < 0x80 ) + { + safe_unicode_character = byte_stream_character; + } + else + { + byte_stream_character -= 0x80; + + safe_unicode_character = libuna_codepage_windows_1250_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; + } + *unicode_character = safe_unicode_character; + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + +/* Copies an Unicode character to a Windows 1250 encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_windows_1250_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_windows_1250_copy_to_byte_stream"; + size_t safe_byte_stream_index = 0; + uint16_t byte_stream_value = 0x001a; + + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + if( unicode_character < 0x0080 ) + { + byte_stream_value = (uint16_t) unicode_character; + } + else if( ( unicode_character >= 0x00a0 ) + && ( unicode_character < 0x0120 ) ) + { + unicode_character -= 0x00a0; + + byte_stream_value = libuna_codepage_windows_1250_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; + } + else if( ( unicode_character >= 0x0138 ) + && ( unicode_character < 0x0180 ) ) + { + unicode_character -= 0x0138; + + byte_stream_value = libuna_codepage_windows_1250_unicode_to_byte_stream_base_0x0138[ unicode_character ]; + } + else if( ( unicode_character >= 0x02d8 ) + && ( unicode_character < 0x02e0 ) ) + { + unicode_character -= 0x02d8; + + byte_stream_value = libuna_codepage_windows_1250_unicode_to_byte_stream_base_0x02d8[ unicode_character ]; + } + else if( ( unicode_character >= 0x2010 ) + && ( unicode_character < 0x2028 ) ) + { + unicode_character -= 0x2010; + + byte_stream_value = libuna_codepage_windows_1250_unicode_to_byte_stream_base_0x2010[ unicode_character ]; + } + else if( ( unicode_character >= 0x2030 ) + && ( unicode_character < 0x2040 ) ) + { + unicode_character -= 0x2030; + + byte_stream_value = libuna_codepage_windows_1250_unicode_to_byte_stream_base_0x2030[ unicode_character ]; + } + else switch( unicode_character ) + { + case 0x02c7: + byte_stream_value = 0xa1; + break; + + case 0x20ac: + byte_stream_value = 0x80; + break; + + case 0x2122: + byte_stream_value = 0x99; + break; + + default: + byte_stream_value = 0x1a; + break; + } + byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); + + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + diff -Nru libfshfs-20201104/libuna/libuna_codepage_windows_1250.h libfshfs-20240221/libuna/libuna_codepage_windows_1250.h --- libfshfs-20201104/libuna/libuna_codepage_windows_1250.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_windows_1250.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * Windows 1250 codepage (Central European) functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -25,29 +25,26 @@ #include #include -#include "libuna_extern.h" +#include "libuna_libcerror.h" +#include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif -LIBUNA_EXTERN_VARIABLE \ -const uint16_t libuna_codepage_windows_1250_byte_stream_to_unicode_base_0x80[ 128 ]; - -LIBUNA_EXTERN_VARIABLE \ -const uint8_t libuna_codepage_windows_1250_unicode_to_byte_stream_base_0x00a0[ 128 ]; - -LIBUNA_EXTERN_VARIABLE \ -const uint8_t libuna_codepage_windows_1250_unicode_to_byte_stream_base_0x0138[ 72 ]; - -LIBUNA_EXTERN_VARIABLE \ -const uint8_t libuna_codepage_windows_1250_unicode_to_byte_stream_base_0x02d8[ 8 ]; - -LIBUNA_EXTERN_VARIABLE \ -const uint8_t libuna_codepage_windows_1250_unicode_to_byte_stream_base_0x2010[ 24 ]; - -LIBUNA_EXTERN_VARIABLE \ -const uint8_t libuna_codepage_windows_1250_unicode_to_byte_stream_base_0x2030[ 16 ]; +int libuna_codepage_windows_1250_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); + +int libuna_codepage_windows_1250_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); #if defined( __cplusplus ) } diff -Nru libfshfs-20201104/libuna/libuna_codepage_windows_1251.c libfshfs-20240221/libuna/libuna_codepage_windows_1251.c --- libfshfs-20201104/libuna/libuna_codepage_windows_1251.c 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_windows_1251.c 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * Windows 1251 codepage (Cyrillic) functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -23,8 +23,10 @@ #include #include "libuna_codepage_windows_1251.h" +#include "libuna_libcerror.h" +#include "libuna_types.h" -/* Extended ASCII to Unicode character lookup table for Windows 1251 codepage +/* Extended ASCII to Unicode character lookup table for the Windows 1251 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_windows_1251_byte_stream_to_unicode_base_0x80[ 128 ] = { @@ -46,7 +48,7 @@ 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f }; -/* Unicode to ASCII character lookup table for Windows 1251 codepage +/* Unicode to ASCII character lookup tables for the Windows 1251 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_windows_1251_unicode_to_byte_stream_base_0x00a0[ 32 ] = { @@ -77,3 +79,223 @@ 0x86, 0x87, 0x95, 0x1a, 0x1a, 0x1a, 0x85, 0x1a }; +/* Copies an Unicode character from a Windows 1251 encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_windows_1251_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_windows_1251_copy_from_byte_stream"; + libuna_unicode_character_t safe_unicode_character = 0xfffd; + size_t safe_byte_stream_index = 0; + uint8_t byte_stream_character = 0; + + if( unicode_character == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid Unicode character.", + function ); + + return( -1 ); + } + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + byte_stream_character = byte_stream[ safe_byte_stream_index++ ]; + + if( byte_stream_character < 0x80 ) + { + safe_unicode_character = byte_stream_character; + } + else + { + byte_stream_character -= 0x80; + + safe_unicode_character = libuna_codepage_windows_1251_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; + } + *unicode_character = safe_unicode_character; + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + +/* Copies an Unicode character to a Windows 1251 encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_windows_1251_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_windows_1251_copy_to_byte_stream"; + size_t safe_byte_stream_index = 0; + uint16_t byte_stream_value = 0x001a; + + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + if( unicode_character < 0x0080 ) + { + byte_stream_value = (uint16_t) unicode_character; + } + else if( ( unicode_character >= 0x00a0 ) + && ( unicode_character < 0x00c0 ) ) + { + unicode_character -= 0x00a0; + + byte_stream_value = libuna_codepage_windows_1251_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; + } + else if( ( unicode_character >= 0x0400 ) + && ( unicode_character < 0x0460 ) ) + { + unicode_character -= 0x0400; + + byte_stream_value = libuna_codepage_windows_1251_unicode_to_byte_stream_base_0x0400[ unicode_character ]; + } + else if( ( unicode_character >= 0x2010 ) + && ( unicode_character < 0x2028 ) ) + { + unicode_character -= 0x2010; + + byte_stream_value = libuna_codepage_windows_1251_unicode_to_byte_stream_base_0x2010[ unicode_character ]; + } + else switch( unicode_character ) + { + case 0x0490: + byte_stream_value = 0xa5; + break; + + case 0x0491: + byte_stream_value = 0xb4; + break; + + case 0x2030: + byte_stream_value = 0x89; + break; + + case 0x2039: + byte_stream_value = 0x8b; + break; + + case 0x203a: + byte_stream_value = 0x9b; + break; + + case 0x20ac: + byte_stream_value = 0x88; + break; + + case 0x2116: + byte_stream_value = 0xb9; + break; + + case 0x2122: + byte_stream_value = 0x99; + break; + + default: + byte_stream_value = 0x1a; + break; + } + byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); + + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + diff -Nru libfshfs-20201104/libuna/libuna_codepage_windows_1251.h libfshfs-20240221/libuna/libuna_codepage_windows_1251.h --- libfshfs-20201104/libuna/libuna_codepage_windows_1251.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_windows_1251.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * Windows 1251 codepage (Cyrillic) functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -25,23 +25,26 @@ #include #include -#include "libuna_extern.h" +#include "libuna_libcerror.h" +#include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif -LIBUNA_EXTERN_VARIABLE \ -const uint16_t libuna_codepage_windows_1251_byte_stream_to_unicode_base_0x80[ 128 ]; - -LIBUNA_EXTERN_VARIABLE \ -const uint8_t libuna_codepage_windows_1251_unicode_to_byte_stream_base_0x00a0[ 32 ]; - -LIBUNA_EXTERN_VARIABLE \ -const uint8_t libuna_codepage_windows_1251_unicode_to_byte_stream_base_0x0400[ 96 ]; - -LIBUNA_EXTERN_VARIABLE \ -const uint8_t libuna_codepage_windows_1251_unicode_to_byte_stream_base_0x2010[ 24 ]; +int libuna_codepage_windows_1251_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); + +int libuna_codepage_windows_1251_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); #if defined( __cplusplus ) } diff -Nru libfshfs-20201104/libuna/libuna_codepage_windows_1252.c libfshfs-20240221/libuna/libuna_codepage_windows_1252.c --- libfshfs-20201104/libuna/libuna_codepage_windows_1252.c 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_windows_1252.c 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * Windows 1252 codepage (Western European/Latin 1) functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -23,8 +23,10 @@ #include #include "libuna_codepage_windows_1252.h" +#include "libuna_libcerror.h" +#include "libuna_types.h" -/* Extended ASCII to Unicode character lookup table for Windows 1252 codepage +/* Extended ASCII to Unicode character lookup table for the Windows 1252 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_windows_1252_byte_stream_to_unicode_base_0x80[ 32 ] = { @@ -34,7 +36,7 @@ 0x02dc, 0x2122, 0x0161, 0x203a, 0x0153, 0xfffd, 0x017e, 0x0178 }; -/* Unicode to ASCII character lookup table for Windows 1252 codepage +/* Unicode to ASCII character lookup tables for the Windows 1252 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_windows_1252_unicode_to_byte_stream_base_0x2010[ 24 ] = { @@ -43,3 +45,243 @@ 0x86, 0x87, 0x95, 0x1a, 0x1a, 0x1a, 0x85, 0x1a }; +/* Copies an Unicode character from a Windows 1252 encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_windows_1252_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_windows_1252_copy_from_byte_stream"; + libuna_unicode_character_t safe_unicode_character = 0xfffd; + size_t safe_byte_stream_index = 0; + uint8_t byte_stream_character = 0; + + if( unicode_character == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid Unicode character.", + function ); + + return( -1 ); + } + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + byte_stream_character = byte_stream[ safe_byte_stream_index++ ]; + + if( ( byte_stream_character < 0x80 ) + || ( byte_stream_character >= 0xa0 ) ) + { + safe_unicode_character = byte_stream_character; + } + else + { + byte_stream_character -= 0x80; + + safe_unicode_character = libuna_codepage_windows_1252_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; + } + *unicode_character = safe_unicode_character; + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + +/* Copies an Unicode character to a Windows 1252 encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_windows_1252_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_windows_1252_copy_to_byte_stream"; + size_t safe_byte_stream_index = 0; + uint16_t byte_stream_value = 0x001a; + + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + if( unicode_character < 0x0080 ) + { + byte_stream_value = (uint16_t) unicode_character; + } + else if( ( unicode_character >= 0x00a0 ) + && ( unicode_character < 0x0100 ) ) + { + byte_stream_value = (uint16_t) unicode_character; + } + else if( ( unicode_character >= 0x2010 ) + && ( unicode_character < 0x2028 ) ) + { + unicode_character -= 0x2010; + + byte_stream_value = libuna_codepage_windows_1252_unicode_to_byte_stream_base_0x2010[ unicode_character ]; + } + else switch( unicode_character ) + { + case 0x0152: + byte_stream_value = 0x8c; + break; + + case 0x0153: + byte_stream_value = 0x9c; + break; + + case 0x0160: + byte_stream_value = 0x8a; + break; + + case 0x0161: + byte_stream_value = 0x9a; + break; + + case 0x0178: + byte_stream_value = 0x9f; + break; + + case 0x017d: + byte_stream_value = 0x8e; + break; + + case 0x017e: + byte_stream_value = 0x9e; + break; + + case 0x0192: + byte_stream_value = 0x83; + break; + + case 0x02c6: + byte_stream_value = 0x88; + break; + + case 0x02dc: + byte_stream_value = 0x98; + break; + + case 0x2030: + byte_stream_value = 0x89; + break; + + case 0x2039: + byte_stream_value = 0x8b; + break; + + case 0x203a: + byte_stream_value = 0x9b; + break; + + case 0x20ac: + byte_stream_value = 0x80; + break; + + case 0x2122: + byte_stream_value = 0x99; + break; + + default: + byte_stream_value = 0x1a; + break; + } + byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); + + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + diff -Nru libfshfs-20201104/libuna/libuna_codepage_windows_1252.h libfshfs-20240221/libuna/libuna_codepage_windows_1252.h --- libfshfs-20201104/libuna/libuna_codepage_windows_1252.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_windows_1252.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * Windows 1252 codepage (Western European/Latin 1) functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -25,17 +25,26 @@ #include #include -#include "libuna_extern.h" +#include "libuna_libcerror.h" +#include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif -LIBUNA_EXTERN_VARIABLE \ -const uint16_t libuna_codepage_windows_1252_byte_stream_to_unicode_base_0x80[ 32 ]; - -LIBUNA_EXTERN_VARIABLE \ -const uint8_t libuna_codepage_windows_1252_unicode_to_byte_stream_base_0x2010[ 24 ]; +int libuna_codepage_windows_1252_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); + +int libuna_codepage_windows_1252_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); #if defined( __cplusplus ) } diff -Nru libfshfs-20201104/libuna/libuna_codepage_windows_1253.c libfshfs-20240221/libuna/libuna_codepage_windows_1253.c --- libfshfs-20201104/libuna/libuna_codepage_windows_1253.c 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_windows_1253.c 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * Windows 1253 codepage (Greek) functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -23,8 +23,10 @@ #include #include "libuna_codepage_windows_1253.h" +#include "libuna_libcerror.h" +#include "libuna_types.h" -/* Extended ASCII to Unicode character lookup table for Windows 1253 codepage +/* Extended ASCII to Unicode character lookup table for the Windows 1253 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_windows_1253_byte_stream_to_unicode_base_0x80[ 128 ] = { @@ -46,7 +48,7 @@ 0x03c8, 0x03c9, 0x03ca, 0x03cb, 0x03cc, 0x03cd, 0x03ce, 0xfffd }; -/* Unicode to ASCII character lookup table for Windows 1253 codepage +/* Unicode to ASCII character lookup tables for the Windows 1253 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_windows_1253_unicode_to_byte_stream_base_0x00a0[ 32 ] = { @@ -75,3 +77,215 @@ 0x86, 0x87, 0x95, 0x1a, 0x1a, 0x1a, 0x85, 0x1a }; +/* Copies an Unicode character from a Windows 1253 encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_windows_1253_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_windows_1253_copy_from_byte_stream"; + libuna_unicode_character_t safe_unicode_character = 0xfffd; + size_t safe_byte_stream_index = 0; + uint8_t byte_stream_character = 0; + + if( unicode_character == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid Unicode character.", + function ); + + return( -1 ); + } + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + byte_stream_character = byte_stream[ safe_byte_stream_index++ ]; + + if( byte_stream_character < 0x80 ) + { + safe_unicode_character = byte_stream_character; + } + else + { + byte_stream_character -= 0x80; + + safe_unicode_character = libuna_codepage_windows_1253_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; + } + *unicode_character = safe_unicode_character; + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + +/* Copies an Unicode character to a Windows 1253 encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_windows_1253_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_windows_1253_copy_to_byte_stream"; + size_t safe_byte_stream_index = 0; + uint16_t byte_stream_value = 0x001a; + + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + if( unicode_character < 0x0080 ) + { + byte_stream_value = (uint16_t) unicode_character; + } + else if( ( unicode_character >= 0x00a0 ) + && ( unicode_character < 0x00c0 ) ) + { + unicode_character -= 0x00a0; + + byte_stream_value = libuna_codepage_windows_1253_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; + } + else if( ( unicode_character >= 0x0380 ) + && ( unicode_character < 0x03d0 ) ) + { + unicode_character -= 0x0380; + + byte_stream_value = libuna_codepage_windows_1253_unicode_to_byte_stream_base_0x0380[ unicode_character ]; + } + else if( ( unicode_character >= 0x2010 ) + && ( unicode_character < 0x2028 ) ) + { + unicode_character -= 0x2010; + + byte_stream_value = libuna_codepage_windows_1253_unicode_to_byte_stream_base_0x2010[ unicode_character ]; + } + else switch( unicode_character ) + { + case 0x0192: + byte_stream_value = 0x83; + break; + + case 0x2030: + byte_stream_value = 0x89; + break; + + case 0x2039: + byte_stream_value = 0x8b; + break; + + case 0x203a: + byte_stream_value = 0x9b; + break; + + case 0x20ac: + byte_stream_value = 0x80; + break; + + case 0x2122: + byte_stream_value = 0x99; + break; + + default: + byte_stream_value = 0x1a; + break; + } + byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); + + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + diff -Nru libfshfs-20201104/libuna/libuna_codepage_windows_1253.h libfshfs-20240221/libuna/libuna_codepage_windows_1253.h --- libfshfs-20201104/libuna/libuna_codepage_windows_1253.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_windows_1253.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * Windows 1253 codepage (Greek) functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -25,23 +25,26 @@ #include #include -#include "libuna_extern.h" +#include "libuna_libcerror.h" +#include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif -LIBUNA_EXTERN_VARIABLE \ -const uint16_t libuna_codepage_windows_1253_byte_stream_to_unicode_base_0x80[ 128 ]; - -LIBUNA_EXTERN_VARIABLE \ -const uint8_t libuna_codepage_windows_1253_unicode_to_byte_stream_base_0x00a0[ 32 ]; - -LIBUNA_EXTERN_VARIABLE \ -const uint8_t libuna_codepage_windows_1253_unicode_to_byte_stream_base_0x0380[ 80 ]; - -LIBUNA_EXTERN_VARIABLE \ -const uint8_t libuna_codepage_windows_1253_unicode_to_byte_stream_base_0x2010[ 24 ]; +int libuna_codepage_windows_1253_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); + +int libuna_codepage_windows_1253_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); #if defined( __cplusplus ) } diff -Nru libfshfs-20201104/libuna/libuna_codepage_windows_1254.c libfshfs-20240221/libuna/libuna_codepage_windows_1254.c --- libfshfs-20201104/libuna/libuna_codepage_windows_1254.c 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_windows_1254.c 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * Windows 1254 codepage (Turkish) functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -23,8 +23,10 @@ #include #include "libuna_codepage_windows_1254.h" +#include "libuna_libcerror.h" +#include "libuna_types.h" -/* Extended ASCII to Unicode character lookup table for Windows 1254 codepage +/* Extended ASCII to Unicode character lookup tables for the Windows 1254 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_windows_1254_byte_stream_to_unicode_base_0x80[ 32 ] = { @@ -44,7 +46,7 @@ 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x0131, 0x015f, 0x00ff, }; -/* Unicode to ASCII character lookup table for Windows 1254 codepage +/* Unicode to ASCII character lookup tables for the Windows 1254 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_windows_1254_unicode_to_byte_stream_base_0x00d0[ 48 ] = { @@ -62,3 +64,285 @@ 0x86, 0x87, 0x95, 0x1a, 0x1a, 0x1a, 0x85, 0x1a, }; +/* Copies an Unicode character from a Windows 1254 encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_windows_1254_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_windows_1254_copy_from_byte_stream"; + libuna_unicode_character_t safe_unicode_character = 0xfffd; + size_t safe_byte_stream_index = 0; + uint8_t byte_stream_character = 0; + + if( unicode_character == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid Unicode character.", + function ); + + return( -1 ); + } + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + byte_stream_character = byte_stream[ safe_byte_stream_index++ ]; + + if( byte_stream_character < 0x80 ) + { + safe_unicode_character = byte_stream_character; + } + else if( byte_stream_character < 0xa0 ) + { + byte_stream_character -= 0x80; + + safe_unicode_character = libuna_codepage_windows_1254_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; + } + else if( byte_stream_character < 0xd0 ) + { + safe_unicode_character = byte_stream_character; + } + else if( byte_stream_character < 0xe0 ) + { + byte_stream_character -= 0xd0; + + safe_unicode_character = libuna_codepage_windows_1254_byte_stream_to_unicode_base_0xd0[ byte_stream_character ]; + } + else if( byte_stream_character < 0xf0 ) + { + safe_unicode_character = byte_stream_character; + } + else + { + byte_stream_character -= 0xf0; + + safe_unicode_character = libuna_codepage_windows_1254_byte_stream_to_unicode_base_0xf0[ byte_stream_character ]; + } + *unicode_character = safe_unicode_character; + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + +/* Copies an Unicode character to a Windows 1254 encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_windows_1254_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_windows_1254_copy_to_byte_stream"; + size_t safe_byte_stream_index = 0; + uint16_t byte_stream_value = 0x001a; + + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + if( unicode_character < 0x0080 ) + { + byte_stream_value = (uint16_t) unicode_character; + } + else if( ( unicode_character >= 0x00a0 ) + && ( unicode_character < 0x00d0 ) ) + { + byte_stream_value = (uint16_t) unicode_character; + } + else if( ( unicode_character >= 0x00d0 ) + && ( unicode_character < 0x0100 ) ) + { + unicode_character -= 0x00d0; + + byte_stream_value = libuna_codepage_windows_1254_unicode_to_byte_stream_base_0x00d0[ unicode_character ]; + } + else if( ( unicode_character >= 0x2010 ) + && ( unicode_character < 0x2028 ) ) + { + unicode_character -= 0x2010; + + byte_stream_value = libuna_codepage_windows_1254_unicode_to_byte_stream_base_0x2010[ unicode_character ]; + } + else switch( unicode_character ) + { + case 0x011e: + byte_stream_value = 0xd0; + break; + + case 0x011f: + byte_stream_value = 0xf0; + break; + + case 0x0130: + byte_stream_value = 0xdd; + break; + + case 0x0131: + byte_stream_value = 0xfd; + break; + + case 0x0152: + byte_stream_value = 0x8c; + break; + + case 0x0153: + byte_stream_value = 0x9c; + break; + + case 0x015e: + byte_stream_value = 0xde; + break; + + case 0x015f: + byte_stream_value = 0xfe; + break; + + case 0x0160: + byte_stream_value = 0x8a; + break; + + case 0x0161: + byte_stream_value = 0x9a; + break; + + case 0x0178: + byte_stream_value = 0x9f; + break; + + case 0x0192: + byte_stream_value = 0x83; + break; + + case 0x02c6: + byte_stream_value = 0x88; + break; + + case 0x02dc: + byte_stream_value = 0x98; + break; + + case 0x2030: + byte_stream_value = 0x89; + break; + + case 0x2039: + byte_stream_value = 0x8b; + break; + + case 0x203a: + byte_stream_value = 0x9b; + break; + + case 0x20ac: + byte_stream_value = 0x80; + break; + + case 0x2122: + byte_stream_value = 0x99; + break; + + default: + byte_stream_value = 0x1a; + break; + } + byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); + + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + diff -Nru libfshfs-20201104/libuna/libuna_codepage_windows_1254.h libfshfs-20240221/libuna/libuna_codepage_windows_1254.h --- libfshfs-20201104/libuna/libuna_codepage_windows_1254.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_windows_1254.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * Windows 1254 codepage (Turkish) functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -25,26 +25,26 @@ #include #include -#include "libuna_extern.h" +#include "libuna_libcerror.h" +#include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif -LIBUNA_EXTERN_VARIABLE \ -const uint16_t libuna_codepage_windows_1254_byte_stream_to_unicode_base_0x80[ 32 ]; - -LIBUNA_EXTERN_VARIABLE \ -const uint16_t libuna_codepage_windows_1254_byte_stream_to_unicode_base_0xd0[ 16 ]; - -LIBUNA_EXTERN_VARIABLE \ -const uint16_t libuna_codepage_windows_1254_byte_stream_to_unicode_base_0xf0[ 16 ]; - -LIBUNA_EXTERN_VARIABLE \ -const uint8_t libuna_codepage_windows_1254_unicode_to_byte_stream_base_0x00d0[ 48 ]; - -LIBUNA_EXTERN_VARIABLE \ -const uint8_t libuna_codepage_windows_1254_unicode_to_byte_stream_base_0x2010[ 24 ]; +int libuna_codepage_windows_1254_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); + +int libuna_codepage_windows_1254_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); #if defined( __cplusplus ) } diff -Nru libfshfs-20201104/libuna/libuna_codepage_windows_1255.c libfshfs-20240221/libuna/libuna_codepage_windows_1255.c --- libfshfs-20201104/libuna/libuna_codepage_windows_1255.c 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_windows_1255.c 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * Windows 1255 codepage (Hebrew) functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -23,8 +23,10 @@ #include #include "libuna_codepage_windows_1255.h" +#include "libuna_libcerror.h" +#include "libuna_types.h" -/* Extended ASCII to Unicode character lookup table for Windows 1255 codepage +/* Extended ASCII to Unicode character lookup table for the Windows 1255 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_windows_1255_byte_stream_to_unicode_base_0x80[ 128 ] = { @@ -46,7 +48,7 @@ 0x05e8, 0x05e9, 0x05ea, 0xfffd, 0xfffd, 0x200e, 0x200f, 0xfffd }; -/* Unicode to ASCII character lookup table for Windows 1255 codepage +/* Unicode to ASCII character lookup tables for the Windows 1255 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_windows_1255_unicode_to_byte_stream_base_0x00a0[ 32 ] = { @@ -76,3 +78,251 @@ 0x86, 0x87, 0x95, 0x1a, 0x1a, 0x1a, 0x85, 0x1a }; +/* Copies an Unicode character from a Windows 1255 encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_windows_1255_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_windows_1255_copy_from_byte_stream"; + libuna_unicode_character_t safe_unicode_character = 0xfffd; + size_t safe_byte_stream_index = 0; + uint8_t byte_stream_character = 0; + + if( unicode_character == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid Unicode character.", + function ); + + return( -1 ); + } + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + byte_stream_character = byte_stream[ safe_byte_stream_index++ ]; + + if( byte_stream_character < 0x80 ) + { + safe_unicode_character = byte_stream_character; + } + else + { + byte_stream_character -= 0x80; + + safe_unicode_character = libuna_codepage_windows_1255_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; + } + *unicode_character = safe_unicode_character; + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + +/* Copies an Unicode character to a Windows 1255 encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_windows_1255_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_windows_1255_copy_to_byte_stream"; + size_t safe_byte_stream_index = 0; + uint16_t byte_stream_value = 0x001a; + + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + if( unicode_character < 0x0080 ) + { + byte_stream_value = (uint16_t) unicode_character; + } + else if( ( unicode_character >= 0x00a0 ) + && ( unicode_character < 0x00c0 ) ) + { + unicode_character -= 0x00a0; + + byte_stream_value = libuna_codepage_windows_1255_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; + } + else if( ( unicode_character >= 0x05b0 ) + && ( unicode_character < 0x05c8 ) ) + { + unicode_character -= 0x05b0; + + byte_stream_value = libuna_codepage_windows_1255_unicode_to_byte_stream_base_0x05b0[ unicode_character ]; + } + else if( ( unicode_character >= 0x05d0 ) + && ( unicode_character < 0x05f8 ) ) + { + unicode_character -= 0x05d0; + + byte_stream_value = libuna_codepage_windows_1255_unicode_to_byte_stream_base_0x05d0[ unicode_character ]; + } + else if( ( unicode_character >= 0x2010 ) + && ( unicode_character < 0x2028 ) ) + { + unicode_character -= 0x2010; + + byte_stream_value = libuna_codepage_windows_1255_unicode_to_byte_stream_base_0x2010[ unicode_character ]; + } + else switch( unicode_character ) + { + case 0x00d7: + byte_stream_value = 0xaa; + break; + + case 0x00f7: + byte_stream_value = 0xba; + break; + + case 0x0192: + byte_stream_value = 0x83; + break; + + case 0x02c6: + byte_stream_value = 0x88; + break; + + case 0x02dc: + byte_stream_value = 0x98; + break; + + case 0x200e: + byte_stream_value = 0xfd; + break; + + case 0x200f: + byte_stream_value = 0xfe; + break; + + case 0x2030: + byte_stream_value = 0x89; + break; + + case 0x2039: + byte_stream_value = 0x8b; + break; + + case 0x203a: + byte_stream_value = 0x9b; + break; + + case 0x20aa: + byte_stream_value = 0xa4; + break; + + case 0x20ac: + byte_stream_value = 0x80; + break; + + case 0x2122: + byte_stream_value = 0x99; + break; + + default: + byte_stream_value = 0x1a; + break; + } + byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); + + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + + diff -Nru libfshfs-20201104/libuna/libuna_codepage_windows_1255.h libfshfs-20240221/libuna/libuna_codepage_windows_1255.h --- libfshfs-20201104/libuna/libuna_codepage_windows_1255.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_windows_1255.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * Windows 1255 codepage (Hebrew) functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -25,26 +25,26 @@ #include #include -#include "libuna_extern.h" +#include "libuna_libcerror.h" +#include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif -LIBUNA_EXTERN_VARIABLE \ -const uint16_t libuna_codepage_windows_1255_byte_stream_to_unicode_base_0x80[ 128 ]; - -LIBUNA_EXTERN_VARIABLE \ -const uint8_t libuna_codepage_windows_1255_unicode_to_byte_stream_base_0x00a0[ 32 ]; - -LIBUNA_EXTERN_VARIABLE \ -const uint8_t libuna_codepage_windows_1255_unicode_to_byte_stream_base_0x05b0[ 24 ]; - -LIBUNA_EXTERN_VARIABLE \ -const uint8_t libuna_codepage_windows_1255_unicode_to_byte_stream_base_0x05d0[ 40 ]; - -LIBUNA_EXTERN_VARIABLE \ -const uint8_t libuna_codepage_windows_1255_unicode_to_byte_stream_base_0x2010[ 24 ]; +int libuna_codepage_windows_1255_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); + +int libuna_codepage_windows_1255_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); #if defined( __cplusplus ) } diff -Nru libfshfs-20201104/libuna/libuna_codepage_windows_1256.c libfshfs-20240221/libuna/libuna_codepage_windows_1256.c --- libfshfs-20201104/libuna/libuna_codepage_windows_1256.c 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_windows_1256.c 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * Windows 1256 codepage (Arabic) functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -23,8 +23,10 @@ #include #include "libuna_codepage_windows_1256.h" +#include "libuna_libcerror.h" +#include "libuna_types.h" -/* Extended ASCII to Unicode character lookup table for Windows 1256 codepage +/* Extended ASCII to Unicode character lookup table for the Windows 1256 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_windows_1256_byte_stream_to_unicode_base_0x80[ 128 ] = { @@ -46,7 +48,7 @@ 0x0651, 0x00f9, 0x0652, 0x00fb, 0x00fc, 0x200e, 0x200f, 0x06d2 }; -/* Unicode to ASCII character lookup table for Windows 1256 codepage +/* Unicode to ASCII character lookup tables for the Windows 1256 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_windows_1256_unicode_to_byte_stream_base_0x00a0[ 32 ] = { @@ -81,3 +83,290 @@ 0x86, 0x87, 0x95, 0x1a, 0x1a, 0x1a, 0x85, 0x1a }; +/* Copies an Unicode character from a Windows 1256 encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_windows_1256_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_windows_1256_copy_from_byte_stream"; + libuna_unicode_character_t safe_unicode_character = 0xfffd; + size_t safe_byte_stream_index = 0; + uint8_t byte_stream_character = 0; + + if( unicode_character == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid Unicode character.", + function ); + + return( -1 ); + } + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + byte_stream_character = byte_stream[ safe_byte_stream_index++ ]; + + if( byte_stream_character < 0x80 ) + { + safe_unicode_character = byte_stream_character; + } + else + { + byte_stream_character -= 0x80; + + safe_unicode_character = libuna_codepage_windows_1256_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; + } + *unicode_character = safe_unicode_character; + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + +/* Copies an Unicode character to a Windows 1256 encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_windows_1256_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_windows_1256_copy_to_byte_stream"; + size_t safe_byte_stream_index = 0; + uint16_t byte_stream_value = 0x001a; + + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + if( unicode_character < 0x0080 ) + { + byte_stream_value = (uint16_t) unicode_character; + } + else if( ( unicode_character >= 0x00a0 ) + && ( unicode_character < 0x00c0 ) ) + { + unicode_character -= 0x00a0; + + byte_stream_value = libuna_codepage_windows_1256_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; + } + else if( ( unicode_character >= 0x00e0 ) + && ( unicode_character < 0x0100 ) ) + { + unicode_character -= 0x00e0; + + byte_stream_value = libuna_codepage_windows_1256_unicode_to_byte_stream_base_0x00e0[ unicode_character ]; + } + else if( ( unicode_character >= 0x0618 ) + && ( unicode_character < 0x0658 ) ) + { + unicode_character -= 0x0618; + + byte_stream_value = libuna_codepage_windows_1256_unicode_to_byte_stream_base_0x0618[ unicode_character ]; + } + else if( ( unicode_character >= 0x2008 ) + && ( unicode_character < 0x2028 ) ) + { + unicode_character -= 0x2008; + + byte_stream_value = libuna_codepage_windows_1256_unicode_to_byte_stream_base_0x2008[ unicode_character ]; + } + else switch( unicode_character ) + { + case 0x00d7: + byte_stream_value = 0xd7; + break; + + case 0x0152: + byte_stream_value = 0x8c; + break; + + case 0x0153: + byte_stream_value = 0x9c; + break; + + case 0x0192: + byte_stream_value = 0x83; + break; + + case 0x02c6: + byte_stream_value = 0x88; + break; + + case 0x060c: + byte_stream_value = 0xa1; + break; + + case 0x0679: + byte_stream_value = 0x8a; + break; + + case 0x067e: + byte_stream_value = 0x81; + break; + + case 0x0686: + byte_stream_value = 0x8d; + break; + + case 0x0688: + byte_stream_value = 0x8f; + break; + + case 0x0691: + byte_stream_value = 0x9a; + break; + + case 0x0698: + byte_stream_value = 0x8e; + break; + + case 0x06a9: + byte_stream_value = 0x98; + break; + + case 0x06af: + byte_stream_value = 0x90; + break; + + case 0x06ba: + byte_stream_value = 0x9f; + break; + + case 0x06be: + byte_stream_value = 0xaa; + break; + + case 0x06c1: + byte_stream_value = 0xc0; + break; + + case 0x06d2: + byte_stream_value = 0xff; + break; + + case 0x2030: + byte_stream_value = 0x89; + break; + + case 0x2039: + byte_stream_value = 0x8b; + break; + + case 0x203a: + byte_stream_value = 0x9b; + break; + + case 0x20ac: + byte_stream_value = 0x80; + break; + + case 0x2122: + byte_stream_value = 0x99; + break; + + default: + byte_stream_value = 0x1a; + break; + } + byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); + + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + diff -Nru libfshfs-20201104/libuna/libuna_codepage_windows_1256.h libfshfs-20240221/libuna/libuna_codepage_windows_1256.h --- libfshfs-20201104/libuna/libuna_codepage_windows_1256.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_windows_1256.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * Windows 1256 codepage (Arabic) functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -25,26 +25,26 @@ #include #include -#include "libuna_extern.h" +#include "libuna_libcerror.h" +#include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif -LIBUNA_EXTERN_VARIABLE \ -const uint16_t libuna_codepage_windows_1256_byte_stream_to_unicode_base_0x80[ 128 ]; - -LIBUNA_EXTERN_VARIABLE \ -const uint8_t libuna_codepage_windows_1256_unicode_to_byte_stream_base_0x00a0[ 32 ]; - -LIBUNA_EXTERN_VARIABLE \ -const uint8_t libuna_codepage_windows_1256_unicode_to_byte_stream_base_0x00e0[ 32 ]; - -LIBUNA_EXTERN_VARIABLE \ -const uint8_t libuna_codepage_windows_1256_unicode_to_byte_stream_base_0x0618[ 64 ]; - -LIBUNA_EXTERN_VARIABLE \ -const uint8_t libuna_codepage_windows_1256_unicode_to_byte_stream_base_0x2008[ 32 ]; +int libuna_codepage_windows_1256_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); + +int libuna_codepage_windows_1256_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); #if defined( __cplusplus ) } diff -Nru libfshfs-20201104/libuna/libuna_codepage_windows_1257.c libfshfs-20240221/libuna/libuna_codepage_windows_1257.c --- libfshfs-20201104/libuna/libuna_codepage_windows_1257.c 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_windows_1257.c 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * Windows 1257 codepage (Baltic) functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -23,8 +23,10 @@ #include #include "libuna_codepage_windows_1257.h" +#include "libuna_libcerror.h" +#include "libuna_types.h" -/* Extended ASCII to Unicode character lookup table for Windows 1257 codepage +/* Extended ASCII to Unicode character lookup table for the Windows 1257 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_windows_1257_byte_stream_to_unicode_base_0x80[ 128 ] = { @@ -46,7 +48,7 @@ 0x0173, 0x0142, 0x015b, 0x016b, 0x00fc, 0x017c, 0x017e, 0x02d9 }; -/* Unicode to ASCII character lookup table for Windows 1257 codepage +/* Unicode to ASCII character lookup tables for the Windows 1257 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_windows_1257_unicode_to_byte_stream_base_0x00a0[ 224 ] = { @@ -86,3 +88,216 @@ 0x86, 0x87, 0x95, 0x1a, 0x1a, 0x1a, 0x85, 0x1a }; +/* Copies an Unicode character from a Windows 1257 encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_windows_1257_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_windows_1257_copy_from_byte_stream"; + libuna_unicode_character_t safe_unicode_character = 0xfffd; + size_t safe_byte_stream_index = 0; + uint8_t byte_stream_character = 0; + + if( unicode_character == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid Unicode character.", + function ); + + return( -1 ); + } + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + byte_stream_character = byte_stream[ safe_byte_stream_index++ ]; + + if( byte_stream_character < 0x80 ) + { + safe_unicode_character = byte_stream_character; + } + else + { + byte_stream_character -= 0x80; + + safe_unicode_character = libuna_codepage_windows_1257_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; + } + *unicode_character = safe_unicode_character; + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + +/* Copies an Unicode character to a Windows 1257 encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_windows_1257_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_windows_1257_copy_to_byte_stream"; + size_t safe_byte_stream_index = 0; + uint16_t byte_stream_value = 0x001a; + + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + if( unicode_character < 0x0080 ) + { + byte_stream_value = (uint16_t) unicode_character; + } + else if( ( unicode_character >= 0x00a0 ) + && ( unicode_character < 0x0180 ) ) + { + unicode_character -= 0x00a0; + + byte_stream_value = libuna_codepage_windows_1257_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; + } + else if( ( unicode_character >= 0x2010 ) + && ( unicode_character < 0x2028 ) ) + { + unicode_character -= 0x2010; + + byte_stream_value = libuna_codepage_windows_1257_unicode_to_byte_stream_base_0x2010[ unicode_character ]; + } + else switch( unicode_character ) + { + case 0x02c7: + byte_stream_value = 0x8e; + break; + + case 0x02d9: + byte_stream_value = 0xff; + break; + + case 0x02db: + byte_stream_value = 0x9e; + break; + + case 0x2030: + byte_stream_value = 0x89; + break; + + case 0x2039: + byte_stream_value = 0x8b; + break; + + case 0x203a: + byte_stream_value = 0x9b; + break; + + case 0x20ac: + byte_stream_value = 0x80; + break; + + case 0x2122: + byte_stream_value = 0x99; + break; + + default: + byte_stream_value = 0x1a; + break; + } + byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); + + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + diff -Nru libfshfs-20201104/libuna/libuna_codepage_windows_1257.h libfshfs-20240221/libuna/libuna_codepage_windows_1257.h --- libfshfs-20201104/libuna/libuna_codepage_windows_1257.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_windows_1257.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * Windows 1257 codepage (Baltic) functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -25,20 +25,26 @@ #include #include -#include "libuna_extern.h" +#include "libuna_libcerror.h" +#include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif -LIBUNA_EXTERN_VARIABLE \ -const uint16_t libuna_codepage_windows_1257_byte_stream_to_unicode_base_0x80[ 128 ]; - -LIBUNA_EXTERN_VARIABLE \ -const uint8_t libuna_codepage_windows_1257_unicode_to_byte_stream_base_0x00a0[ 224 ]; - -LIBUNA_EXTERN_VARIABLE \ -const uint8_t libuna_codepage_windows_1257_unicode_to_byte_stream_base_0x2010[ 24 ]; +int libuna_codepage_windows_1257_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); + +int libuna_codepage_windows_1257_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); #if defined( __cplusplus ) } diff -Nru libfshfs-20201104/libuna/libuna_codepage_windows_1258.c libfshfs-20240221/libuna/libuna_codepage_windows_1258.c --- libfshfs-20201104/libuna/libuna_codepage_windows_1258.c 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_windows_1258.c 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * Windows 1258 codepage (Vietnamese) functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -23,8 +23,10 @@ #include #include "libuna_codepage_windows_1258.h" +#include "libuna_libcerror.h" +#include "libuna_types.h" -/* Extended ASCII to Unicode character lookup table for Windows 1258 codepage +/* Extended ASCII to Unicode character lookup table for the Windows 1258 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_windows_1258_byte_stream_to_unicode_base_0x80[ 128 ] = { @@ -46,7 +48,7 @@ 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x01b0, 0x20ab, 0x00ff }; -/* Unicode to ASCII character lookup table for Windows 1258 codepage +/* Unicode to ASCII character lookup tables for the Windows 1258 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_windows_1258_unicode_to_byte_stream_base_0x00c0[ 72 ] = { @@ -67,3 +69,281 @@ 0x86, 0x87, 0x95, 0x1a, 0x1a, 0x1a, 0x85, 0x1a }; +/* Copies an Unicode character from a Windows 1258 encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_windows_1258_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_windows_1258_copy_from_byte_stream"; + libuna_unicode_character_t safe_unicode_character = 0xfffd; + size_t safe_byte_stream_index = 0; + uint8_t byte_stream_character = 0; + + if( unicode_character == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid Unicode character.", + function ); + + return( -1 ); + } + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + byte_stream_character = byte_stream[ safe_byte_stream_index++ ]; + + if( byte_stream_character < 0x80 ) + { + safe_unicode_character = byte_stream_character; + } + else + { + byte_stream_character -= 0x80; + + safe_unicode_character = libuna_codepage_windows_1258_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; + } + *unicode_character = safe_unicode_character; + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + +/* Copies an Unicode character to a Windows 1258 encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_windows_1258_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_windows_1258_copy_to_byte_stream"; + size_t safe_byte_stream_index = 0; + uint16_t byte_stream_value = 0x001a; + + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + if( unicode_character < 0x0080 ) + { + byte_stream_value = (uint16_t) unicode_character; + } + else if( ( unicode_character >= 0x00a0 ) + && ( unicode_character < 0x00c0 ) ) + { + byte_stream_value = (uint16_t) unicode_character; + } + else if( ( unicode_character >= 0x00c0 ) + && ( unicode_character < 0x0108 ) ) + { + unicode_character -= 0x00c0; + + byte_stream_value = libuna_codepage_windows_1258_unicode_to_byte_stream_base_0x00c0[ unicode_character ]; + } + else if( ( unicode_character >= 0x2010 ) + && ( unicode_character < 0x2028 ) ) + { + unicode_character -= 0x2010; + + byte_stream_value = libuna_codepage_windows_1258_unicode_to_byte_stream_base_0x2010[ unicode_character ]; + } + else switch( unicode_character ) + { + case 0x0110: + byte_stream_value = 0xd0; + break; + + case 0x0111: + byte_stream_value = 0xf0; + break; + + case 0x0152: + byte_stream_value = 0x8c; + break; + + case 0x0153: + byte_stream_value = 0x9c; + break; + + case 0x0178: + byte_stream_value = 0x9f; + break; + + case 0x0192: + byte_stream_value = 0x83; + break; + + case 0x01a0: + byte_stream_value = 0xd5; + break; + + case 0x01a1: + byte_stream_value = 0xf5; + break; + + case 0x01af: + byte_stream_value = 0xdd; + break; + + case 0x01b0: + byte_stream_value = 0xfd; + break; + + case 0x02c6: + byte_stream_value = 0x88; + break; + + case 0x02dc: + byte_stream_value = 0x98; + break; + + case 0x0300: + byte_stream_value = 0xcc; + break; + + case 0x0301: + byte_stream_value = 0xec; + break; + + case 0x0303: + byte_stream_value = 0xde; + break; + + case 0x0309: + byte_stream_value = 0xd2; + break; + + case 0x0323: + byte_stream_value = 0xf2; + break; + + case 0x2030: + byte_stream_value = 0x89; + break; + + case 0x2039: + byte_stream_value = 0x8b; + break; + + case 0x203a: + byte_stream_value = 0x9b; + break; + + case 0x20ab: + byte_stream_value = 0xfe; + break; + + case 0x20ac: + byte_stream_value = 0x80; + break; + + case 0x2122: + byte_stream_value = 0x99; + break; + + default: + byte_stream_value = 0x1a; + break; + } + byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); + + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + diff -Nru libfshfs-20201104/libuna/libuna_codepage_windows_1258.h libfshfs-20240221/libuna/libuna_codepage_windows_1258.h --- libfshfs-20201104/libuna/libuna_codepage_windows_1258.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_windows_1258.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * Windows 1258 codepage (Vietnamese) functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -25,20 +25,26 @@ #include #include -#include "libuna_extern.h" +#include "libuna_libcerror.h" +#include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif -LIBUNA_EXTERN_VARIABLE \ -const uint16_t libuna_codepage_windows_1258_byte_stream_to_unicode_base_0x80[ 128 ]; - -LIBUNA_EXTERN_VARIABLE \ -const uint8_t libuna_codepage_windows_1258_unicode_to_byte_stream_base_0x00c0[ 72 ]; - -LIBUNA_EXTERN_VARIABLE \ -const uint8_t libuna_codepage_windows_1258_unicode_to_byte_stream_base_0x2010[ 24 ]; +int libuna_codepage_windows_1258_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); + +int libuna_codepage_windows_1258_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); #if defined( __cplusplus ) } diff -Nru libfshfs-20201104/libuna/libuna_codepage_windows_874.c libfshfs-20240221/libuna/libuna_codepage_windows_874.c --- libfshfs-20201104/libuna/libuna_codepage_windows_874.c 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_windows_874.c 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * Windows 874 codepage (Thai) functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -23,8 +23,10 @@ #include #include "libuna_codepage_windows_874.h" +#include "libuna_libcerror.h" +#include "libuna_types.h" -/* Extended ASCII to Unicode character lookup table for Windows 874 codepage +/* Extended ASCII to Unicode character lookup table for the Windows 874 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_windows_874_byte_stream_to_unicode_base_0x80[ 128 ] = { @@ -46,7 +48,7 @@ 0x0e58, 0x0e59, 0x0e5a, 0x0e5b, 0xfffd, 0xfffd, 0xfffd, 0xfffd }; -/* Unicode to ASCII character lookup table for Windows 874 codepage +/* Unicode to ASCII character lookup tables for the Windows 874 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_windows_874_unicode_to_byte_stream_base_0x0e00[ 96 ] = { @@ -68,3 +70,205 @@ 0x91, 0x92, 0x1a, 0x1a, 0x93, 0x94, 0x1a, 0x1a }; +/* Copies an Unicode character from a Windows 874 encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_windows_874_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_windows_874_copy_from_byte_stream"; + libuna_unicode_character_t safe_unicode_character = 0xfffd; + size_t safe_byte_stream_index = 0; + uint8_t byte_stream_character = 0; + + if( unicode_character == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid Unicode character.", + function ); + + return( -1 ); + } + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + byte_stream_character = byte_stream[ safe_byte_stream_index++ ]; + + if( byte_stream_character < 0x80 ) + { + safe_unicode_character = byte_stream_character; + } + else + { + byte_stream_character -= 0x80; + + safe_unicode_character = libuna_codepage_windows_874_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; + } + *unicode_character = safe_unicode_character; + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + +/* Copies an Unicode character to a Windows 874 encoded byte stream + * Returns 1 if successful or -1 on error + */ +int libuna_codepage_windows_874_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_codepage_windows_874_copy_to_byte_stream"; + size_t safe_byte_stream_index = 0; + uint16_t byte_stream_value = 0x001a; + + if( byte_stream == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream.", + function ); + + return( -1 ); + } + if( byte_stream_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid byte stream size value exceeds maximum.", + function ); + + return( -1 ); + } + if( byte_stream_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid byte stream index.", + function ); + + return( -1 ); + } + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: byte stream too small.", + function ); + + return( -1 ); + } + if( ( unicode_character < 0x0080 ) + || ( unicode_character == 0x00a0 ) ) + { + byte_stream_value = (uint16_t) unicode_character; + } + else if( ( unicode_character >= 0x0e00 ) + && ( unicode_character < 0x0e60 ) ) + { + unicode_character -= 0x0e00; + + byte_stream_value = libuna_codepage_windows_874_unicode_to_byte_stream_base_0x0e00[ unicode_character ]; + } + else if( ( unicode_character >= 0x2018 ) + && ( unicode_character < 0x2020 ) ) + { + unicode_character -= 0x2018; + + byte_stream_value = libuna_codepage_windows_874_unicode_to_byte_stream_base_0x2018[ unicode_character ]; + } + else switch( unicode_character ) + { + case 0x2013: + byte_stream_value = 0x96; + break; + + case 0x2014: + byte_stream_value = 0x97; + break; + + case 0x2022: + byte_stream_value = 0x95; + break; + + case 0x2026: + byte_stream_value = 0x85; + break; + + case 0x20ac: + byte_stream_value = 0x80; + break; + + default: + byte_stream_value = 0x1a; + break; + } + byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); + + *byte_stream_index = safe_byte_stream_index; + + return( 1 ); +} + diff -Nru libfshfs-20201104/libuna/libuna_codepage_windows_874.h libfshfs-20240221/libuna/libuna_codepage_windows_874.h --- libfshfs-20201104/libuna/libuna_codepage_windows_874.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_windows_874.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * Windows 874 codepage (Thai) functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -25,20 +25,26 @@ #include #include -#include "libuna_extern.h" +#include "libuna_libcerror.h" +#include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif -LIBUNA_EXTERN_VARIABLE \ -const uint16_t libuna_codepage_windows_874_byte_stream_to_unicode_base_0x80[ 128 ]; - -LIBUNA_EXTERN_VARIABLE \ -const uint8_t libuna_codepage_windows_874_unicode_to_byte_stream_base_0x0e00[ 96 ]; - -LIBUNA_EXTERN_VARIABLE \ -const uint8_t libuna_codepage_windows_874_unicode_to_byte_stream_base_0x2018[ 8 ]; +int libuna_codepage_windows_874_copy_from_byte_stream( + libuna_unicode_character_t *unicode_character, + const uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); + +int libuna_codepage_windows_874_copy_to_byte_stream( + libuna_unicode_character_t unicode_character, + uint8_t *byte_stream, + size_t byte_stream_size, + size_t *byte_stream_index, + libcerror_error_t **error ); #if defined( __cplusplus ) } diff -Nru libfshfs-20201104/libuna/libuna_codepage_windows_932.c libfshfs-20240221/libuna/libuna_codepage_windows_932.c --- libfshfs-20201104/libuna/libuna_codepage_windows_932.c 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_windows_932.c 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * Windows 932 codepage (Japanese Shift-JIS) functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -26,7 +26,7 @@ #include "libuna_libcerror.h" #include "libuna_types.h" -/* Extended ASCII to Unicode character lookup table for Windows 932 codepage +/* Extended ASCII to Unicode character lookup tables for the Windows 932 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8140[ 109 ] = { @@ -1134,10 +1134,9 @@ 0x9d6b, 0xfa2d, 0x9e19, 0x9ed1 }; -/* Unicode to ASCII character lookup table for Windows 932 codepage +/* Unicode to ASCII character lookup tables for the Windows 932 codepage * Unknown are filled with the ASCII replacement character 0x1a */ - const uint16_t libuna_codepage_windows_932_unicode_to_byte_stream_base_0x0080[ 128 ] = { 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, @@ -4181,9 +4180,9 @@ 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; -/* Determines the size of a byte stream character from an Unicode character +/* Determines the size of a Windows 932 encoded byte stream from an Unicode character * Adds the size to the byte stream character size value - * Returns 1 if successful or -1 on error + * Returns 1 if successful, 0 if the byte stream character is valid but not supported since it requires special handling or -1 on error */ int libuna_codepage_windows_932_unicode_character_size_to_byte_stream( libuna_unicode_character_t unicode_character, @@ -4285,9 +4284,11 @@ size_t *byte_stream_index, libcerror_error_t **error ) { - static char *function = "libuna_codepage_windows_932_copy_from_byte_stream"; - uint8_t additional_character = 0; - uint8_t byte_stream_character = 0; + static char *function = "libuna_codepage_windows_932_copy_from_byte_stream"; + libuna_unicode_character_t safe_unicode_character = 0xfffd; + size_t safe_byte_stream_index = 0; + uint8_t additional_character = 0; + uint8_t byte_stream_character = 0; if( unicode_character == NULL ) { @@ -4333,7 +4334,9 @@ return( -1 ); } - if( *byte_stream_index >= byte_stream_size ) + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, @@ -4344,22 +4347,22 @@ return( -1 ); } - byte_stream_character = byte_stream[ *byte_stream_index ]; + byte_stream_character = byte_stream[ safe_byte_stream_index ]; if( byte_stream_character < 0x80 ) { - *unicode_character = byte_stream_character; + safe_unicode_character = byte_stream_character; } else if( ( byte_stream_character >= 0xa1 ) && ( byte_stream_character < 0xe0 ) ) { - *unicode_character = 0xff61 + byte_stream_character - 0xa1; + safe_unicode_character = 0xff61 + byte_stream_character - 0xa1; } - else if( ( *byte_stream_index + 1 ) <= byte_stream_size ) + else if( ( safe_byte_stream_index + 1 ) <= byte_stream_size ) { - *byte_stream_index += 1; + safe_byte_stream_index += 1; - additional_character = byte_stream[ *byte_stream_index ]; + additional_character = byte_stream[ safe_byte_stream_index ]; if( byte_stream_character == 0x81 ) { @@ -4368,43 +4371,39 @@ { additional_character -= 0x40; - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8140[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8140[ additional_character ]; } else if( ( additional_character >= 0xb8 ) && ( additional_character < 0xc0 ) ) { additional_character -= 0xb8; - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x81b8[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x81b8[ additional_character ]; } else if( ( additional_character >= 0xc8 ) && ( additional_character < 0xcf ) ) { additional_character -= 0xc8; - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x81c8[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x81c8[ additional_character ]; } else if( ( additional_character >= 0xda ) && ( additional_character < 0xe9 ) ) { additional_character -= 0xda; - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x81da[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x81da[ additional_character ]; } else if( ( additional_character >= 0xf0 ) && ( additional_character < 0xf8 ) ) { additional_character -= 0xf0; - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x81f0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x81f0[ additional_character ]; } else if( additional_character == 0xfc ) { - *unicode_character = 0x25ef; - } - else - { - *unicode_character = 0xfffd; + safe_unicode_character = 0x25ef; } } else if( byte_stream_character == 0x82 ) @@ -4412,26 +4411,22 @@ if( ( additional_character >= 0x4f ) && ( additional_character < 0x59 ) ) { - *unicode_character = 0xff10 - 0x4f + additional_character; + safe_unicode_character = 0xff10 - 0x4f + additional_character; } else if( ( additional_character >= 0x60 ) && ( additional_character < 0x7a ) ) { - *unicode_character = 0xff21 - 0x60 + additional_character; + safe_unicode_character = 0xff21 - 0x60 + additional_character; } else if( ( additional_character >= 0x81 ) && ( additional_character < 0x9b ) ) { - *unicode_character = 0xff41 - 0x81 + additional_character; + safe_unicode_character = 0xff41 - 0x81 + additional_character; } else if( ( additional_character >= 0x9f ) && ( additional_character < 0xf2 ) ) { - *unicode_character = 0x3041 - 0x9f + additional_character; - } - else - { - *unicode_character = 0xfffd; + safe_unicode_character = 0x3041 - 0x9f + additional_character; } } else if( byte_stream_character == 0x83 ) @@ -4439,36 +4434,32 @@ if( ( additional_character >= 0x40 ) && ( additional_character < 0x7f ) ) { - *unicode_character = 0x30a1 - 0x40 + additional_character; + safe_unicode_character = 0x30a1 - 0x40 + additional_character; } else if( ( additional_character >= 0x80 ) && ( additional_character < 0x97 ) ) { - *unicode_character = 0x30e0 - 0x80 + additional_character; + safe_unicode_character = 0x30e0 - 0x80 + additional_character; } else if( ( additional_character >= 0x9f ) && ( additional_character < 0xb0 ) ) { - *unicode_character = 0x0391 - 0x9f + additional_character; + safe_unicode_character = 0x0391 - 0x9f + additional_character; } else if( ( additional_character >= 0xb0 ) && ( additional_character < 0xb7 ) ) { - *unicode_character = 0x03a3 - 0xb0 + additional_character; + safe_unicode_character = 0x03a3 - 0xb0 + additional_character; } else if( ( additional_character >= 0xbf ) && ( additional_character < 0xd0 ) ) { - *unicode_character = 0x03b1 - 0xbf + additional_character; + safe_unicode_character = 0x03b1 - 0xbf + additional_character; } else if( ( additional_character >= 0xd0 ) && ( additional_character < 0xd7 ) ) { - *unicode_character = 0x03c3 - 0xd0 + additional_character; - } - else - { - *unicode_character = 0xfffd; + safe_unicode_character = 0x03c3 - 0xd0 + additional_character; } } else if( byte_stream_character == 0x84 ) @@ -4478,30 +4469,26 @@ { additional_character -= 0x40; - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8440[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8440[ additional_character ]; } else if( ( additional_character >= 0x70 ) && ( additional_character < 0x7f ) ) { additional_character -= 0x70; - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8470[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8470[ additional_character ]; } else if( ( additional_character >= 0x80 ) && ( additional_character < 0x92 ) ) { - *unicode_character = 0x043e - 0x80 + additional_character; + safe_unicode_character = 0x043e - 0x80 + additional_character; } else if( ( additional_character >= 0x9f ) && ( additional_character < 0xbf ) ) { additional_character -= 0x9f; - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x849f[ additional_character ]; - } - else - { - *unicode_character = 0xfffd; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x849f[ additional_character ]; } } else if( byte_stream_character == 0x87 ) @@ -4509,34 +4496,30 @@ if( ( additional_character >= 0x40 ) && ( additional_character < 0x54 ) ) { - *unicode_character = 0x2460 - 0x40 + additional_character; + safe_unicode_character = 0x2460 - 0x40 + additional_character; } else if( ( additional_character >= 0x54 ) && ( additional_character < 0x5e ) ) { - *unicode_character = 0x2160 - 0x54 + additional_character; + safe_unicode_character = 0x2160 - 0x54 + additional_character; } else if( ( additional_character >= 0x5f ) && ( additional_character < 0x76 ) ) { additional_character -= 0x5f; - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x875f[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x875f[ additional_character ]; } else if( additional_character == 0x7e ) { - *unicode_character = 0x337b; + safe_unicode_character = 0x337b; } else if( ( additional_character >= 0x80 ) && ( additional_character < 0x9d ) ) { additional_character -= 0x80; - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8780[ additional_character ]; - } - else - { - *unicode_character = 0xfffd; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8780[ additional_character ]; } } else if( byte_stream_character == 0x88 ) @@ -4546,11 +4529,7 @@ { additional_character -= 0x9f; - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x889f[ additional_character ]; - } - else - { - *unicode_character = 0xfffd; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x889f[ additional_character ]; } } else if( ( byte_stream_character >= 0x89 ) @@ -4564,70 +4543,66 @@ switch( byte_stream_character ) { case 0x89: - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8940[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8940[ additional_character ]; break; case 0x8a: - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8a40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8a40[ additional_character ]; break; case 0x8b: - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8b40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8b40[ additional_character ]; break; case 0x8c: - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8c40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8c40[ additional_character ]; break; case 0x8d: - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8d40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8d40[ additional_character ]; break; case 0x8e: - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8e40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8e40[ additional_character ]; break; case 0x8f: - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8f40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8f40[ additional_character ]; break; case 0x90: - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9040[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9040[ additional_character ]; break; case 0x91: - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9140[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9140[ additional_character ]; break; case 0x92: - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9240[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9240[ additional_character ]; break; case 0x93: - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9340[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9340[ additional_character ]; break; case 0x94: - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9440[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9440[ additional_character ]; break; case 0x95: - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9540[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9540[ additional_character ]; break; case 0x96: - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9640[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9640[ additional_character ]; break; case 0x97: - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9740[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9740[ additional_character ]; break; } } - else - { - *unicode_character = 0xfffd; - } } else if( byte_stream_character == 0x98 ) { @@ -4636,18 +4611,14 @@ { additional_character -= 0x40; - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9840[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9840[ additional_character ]; } else if( ( additional_character >= 0x9f ) && ( additional_character < 0xfd ) ) { additional_character -= 0x9f; - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x989f[ additional_character ]; - } - else - { - *unicode_character = 0xfffd; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x989f[ additional_character ]; } } else if( ( byte_stream_character >= 0x99 ) @@ -4661,38 +4632,34 @@ switch( byte_stream_character ) { case 0x99: - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9940[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9940[ additional_character ]; break; case 0x9a: - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9a40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9a40[ additional_character ]; break; case 0x9b: - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9b40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9b40[ additional_character ]; break; case 0x9c: - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9c40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9c40[ additional_character ]; break; case 0x9d: - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9d40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9d40[ additional_character ]; break; case 0x9e: - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9e40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9e40[ additional_character ]; break; case 0x9f: - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9f40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9f40[ additional_character ]; break; } } - else - { - *unicode_character = 0xfffd; - } } else if( ( byte_stream_character >= 0xe0 ) && ( byte_stream_character <= 0xe9 ) ) @@ -4705,50 +4672,46 @@ switch( byte_stream_character ) { case 0xe0: - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe040[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe040[ additional_character ]; break; case 0xe1: - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe140[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe140[ additional_character ]; break; case 0xe2: - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe240[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe240[ additional_character ]; break; case 0xe3: - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe340[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe340[ additional_character ]; break; case 0xe4: - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe440[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe440[ additional_character ]; break; case 0xe5: - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe540[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe540[ additional_character ]; break; case 0xe6: - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe640[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe640[ additional_character ]; break; case 0xe7: - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe740[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe740[ additional_character ]; break; case 0xe8: - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe840[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe840[ additional_character ]; break; case 0xe9: - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe940[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe940[ additional_character ]; break; } } - else - { - *unicode_character = 0xfffd; - } } else if( byte_stream_character == 0xea ) { @@ -4757,11 +4720,7 @@ { additional_character -= 0x40; - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xea40[ additional_character ]; - } - else - { - *unicode_character = 0xfffd; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xea40[ additional_character ]; } } else if( ( byte_stream_character >= 0xed ) @@ -4775,18 +4734,14 @@ switch( byte_stream_character ) { case 0xed: - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xed40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xed40[ additional_character ]; break; case 0xee: - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xee40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xee40[ additional_character ]; break; } } - else - { - *unicode_character = 0xfffd; - } } else if( ( byte_stream_character >= 0xfa ) && ( byte_stream_character <= 0xfb ) ) @@ -4799,18 +4754,14 @@ switch( byte_stream_character ) { case 0xfa: - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xfa40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xfa40[ additional_character ]; break; case 0xfb: - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xfb40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xfb40[ additional_character ]; break; } } - else - { - *unicode_character = 0xfffd; - } } else if( byte_stream_character == 0xfc ) { @@ -4819,23 +4770,12 @@ { additional_character -= 0x40; - *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xfc40[ additional_character ]; - } - else - { - *unicode_character = 0xfffd; + safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xfc40[ additional_character ]; } } - else - { - *unicode_character = 0xfffd; - } } - else - { - *unicode_character = 0xfffd; - } - *byte_stream_index += 1; + *unicode_character = safe_unicode_character; + *byte_stream_index = safe_byte_stream_index + 1; return( 1 ); } @@ -4850,8 +4790,9 @@ size_t *byte_stream_index, libcerror_error_t **error ) { - static char *function = "libuna_codepage_windows_932_copy_to_byte_stream"; - uint16_t byte_stream_value = 0x001a; + static char *function = "libuna_codepage_windows_932_copy_to_byte_stream"; + size_t safe_byte_stream_index = 0; + uint16_t byte_stream_value = 0x001a; if( byte_stream == NULL ) { @@ -4886,7 +4827,9 @@ return( -1 ); } - if( *byte_stream_index >= byte_stream_size ) + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, @@ -4955,17 +4898,15 @@ unicode_character -= 0xff00; byte_stream_value = libuna_codepage_windows_932_unicode_to_byte_stream_base_0xff00[ unicode_character ]; } - byte_stream[ *byte_stream_index ] = (uint8_t) ( byte_stream_value & 0x00ff ); - - byte_stream_value >>= 8; - - if( byte_stream_value != 0 ) + do { - *byte_stream_index += 1; + byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); - byte_stream[ *byte_stream_index ] = (uint8_t) ( byte_stream_value & 0x00ff ); + byte_stream_value >>= 8; } - *byte_stream_index += 1; + while( byte_stream_value != 0 ); + + *byte_stream_index = safe_byte_stream_index; return( 1 ); } diff -Nru libfshfs-20201104/libuna/libuna_codepage_windows_932.h libfshfs-20240221/libuna/libuna_codepage_windows_932.h --- libfshfs-20201104/libuna/libuna_codepage_windows_932.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_windows_932.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * Windows 932 codepage (Japanese Shift-JIS) functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -25,7 +25,6 @@ #include #include -#include "libuna_extern.h" #include "libuna_libcerror.h" #include "libuna_types.h" @@ -33,13 +32,11 @@ extern "C" { #endif -LIBUNA_EXTERN \ int libuna_codepage_windows_932_unicode_character_size_to_byte_stream( libuna_unicode_character_t unicode_character, size_t *byte_stream_character_size, libcerror_error_t **error ); -LIBUNA_EXTERN \ int libuna_codepage_windows_932_copy_from_byte_stream( libuna_unicode_character_t *unicode_character, const uint8_t *byte_stream, @@ -47,7 +44,6 @@ size_t *byte_stream_index, libcerror_error_t **error ); -LIBUNA_EXTERN \ int libuna_codepage_windows_932_copy_to_byte_stream( libuna_unicode_character_t unicode_character, uint8_t *byte_stream, diff -Nru libfshfs-20201104/libuna/libuna_codepage_windows_936.c libfshfs-20240221/libuna/libuna_codepage_windows_936.c --- libfshfs-20201104/libuna/libuna_codepage_windows_936.c 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_windows_936.c 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * Windows 936 codepage (Chinese Simplified) functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -26,7 +26,7 @@ #include "libuna_libcerror.h" #include "libuna_types.h" -/* Extended ASCII to Unicode character lookup table for Windows 936 codepage +/* Extended ASCII to Unicode character lookup tables for the Windows 936 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8140[ 192 ] = { @@ -3177,10 +3177,9 @@ 0xfa1f, 0xfa20, 0xfa21, 0xfa23, 0xfa24, 0xfa27, 0xfa28, 0xfa29 }; -/* Unicode to ASCII character lookup table for Windows 936 codepage +/* Unicode to ASCII character lookup tables for the Windows 936 codepage * Unknown are filled with the ASCII replacement character 0x1a */ - const uint16_t libuna_codepage_windows_936_unicode_to_byte_stream_base_0x0080[ 1024 ] = { 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, @@ -6351,9 +6350,9 @@ 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; -/* Determines the size of a byte stream character from an Unicode character +/* Determines the size of a Windows 936 encoded byte stream from an Unicode character * Adds the size to the byte stream character size value - * Returns 1 if successful or -1 on error + * Returns 1 if successful, 0 if the byte stream character is valid but not supported since it requires special handling or -1 on error */ int libuna_codepage_windows_936_unicode_character_size_to_byte_stream( libuna_unicode_character_t unicode_character, @@ -6443,9 +6442,11 @@ size_t *byte_stream_index, libcerror_error_t **error ) { - static char *function = "libuna_codepage_windows_936_copy_from_byte_stream"; - uint8_t additional_character = 0; - uint8_t byte_stream_character = 0; + static char *function = "libuna_codepage_windows_936_copy_from_byte_stream"; + libuna_unicode_character_t safe_unicode_character = 0xfffd; + size_t safe_byte_stream_index = 0; + uint8_t additional_character = 0; + uint8_t byte_stream_character = 0; if( unicode_character == NULL ) { @@ -6491,7 +6492,9 @@ return( -1 ); } - if( *byte_stream_index >= byte_stream_size ) + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, @@ -6502,21 +6505,21 @@ return( -1 ); } - byte_stream_character = byte_stream[ *byte_stream_index ]; + byte_stream_character = byte_stream[ safe_byte_stream_index ]; if( byte_stream_character < 0x80 ) { - *unicode_character = byte_stream_character; + safe_unicode_character = byte_stream_character; } else if( byte_stream_character == 0x80 ) { - *unicode_character = 0x20ac; + safe_unicode_character = 0x20ac; } - else if( ( *byte_stream_index + 1 ) <= byte_stream_size ) + else if( ( safe_byte_stream_index + 1 ) <= byte_stream_size ) { - *byte_stream_index += 1; + safe_byte_stream_index += 1; - additional_character = byte_stream[ *byte_stream_index ]; + additional_character = byte_stream[ safe_byte_stream_index ]; if( ( byte_stream_character >= 0x81 ) && ( byte_stream_character <= 0xa0 ) ) @@ -6528,138 +6531,134 @@ switch( byte_stream_character ) { case 0x81: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8140[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8140[ additional_character ]; break; case 0x82: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8240[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8240[ additional_character ]; break; case 0x83: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8340[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8340[ additional_character ]; break; case 0x84: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8440[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8440[ additional_character ]; break; case 0x85: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8540[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8540[ additional_character ]; break; case 0x86: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8640[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8640[ additional_character ]; break; case 0x87: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8740[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8740[ additional_character ]; break; case 0x88: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8840[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8840[ additional_character ]; break; case 0x89: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8940[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8940[ additional_character ]; break; case 0x8a: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8a40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8a40[ additional_character ]; break; case 0x8b: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8b40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8b40[ additional_character ]; break; case 0x8c: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8c40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8c40[ additional_character ]; break; case 0x8d: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8d40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8d40[ additional_character ]; break; case 0x8e: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8e40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8e40[ additional_character ]; break; case 0x8f: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8f40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8f40[ additional_character ]; break; case 0x90: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9040[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9040[ additional_character ]; break; case 0x91: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9140[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9140[ additional_character ]; break; case 0x92: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9240[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9240[ additional_character ]; break; case 0x93: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9340[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9340[ additional_character ]; break; case 0x94: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9440[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9440[ additional_character ]; break; case 0x95: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9540[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9540[ additional_character ]; break; case 0x96: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9640[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9640[ additional_character ]; break; case 0x97: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9740[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9740[ additional_character ]; break; case 0x98: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9840[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9840[ additional_character ]; break; case 0x99: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9940[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9940[ additional_character ]; break; case 0x9a: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9a40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9a40[ additional_character ]; break; case 0x9b: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9b40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9b40[ additional_character ]; break; case 0x9c: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9c40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9c40[ additional_character ]; break; case 0x9d: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9d40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9d40[ additional_character ]; break; case 0x9e: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9e40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9e40[ additional_character ]; break; case 0x9f: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9f40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9f40[ additional_character ]; break; case 0xa0: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa040[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa040[ additional_character ]; break; } } - else - { - *unicode_character = 0xfffd; - } } else if( ( byte_stream_character >= 0xa1 ) && ( byte_stream_character <= 0xa3 ) ) @@ -6671,22 +6670,18 @@ switch( byte_stream_character ) { case 0xa1: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa1a0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa1a0[ additional_character ]; break; case 0xa2: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa2a0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa2a0[ additional_character ]; break; case 0xa3: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa3a0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa3a0[ additional_character ]; break; } } - else - { - *unicode_character = 0xfffd; - } } else if( ( byte_stream_character >= 0xa4 ) && ( byte_stream_character <= 0xa6 ) ) @@ -6699,22 +6694,18 @@ switch( byte_stream_character ) { case 0xa4: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa4a0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa4a0[ additional_character ]; break; case 0xa5: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa5a0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa5a0[ additional_character ]; break; case 0xa6: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa6a0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa6a0[ additional_character ]; break; } } - else - { - *unicode_character = 0xfffd; - } } else if( byte_stream_character == 0xa7 ) { @@ -6723,18 +6714,14 @@ { additional_character -= 0xa0; - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa7a0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa7a0[ additional_character ]; } else if( ( additional_character >= 0xd0 ) && ( additional_character < 0xf8 ) ) { additional_character -= 0xd0; - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa7d0[ additional_character ]; - } - else - { - *unicode_character = 0xfffd; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa7d0[ additional_character ]; } } else if( byte_stream_character == 0xa8 ) @@ -6744,18 +6731,14 @@ { additional_character -= 0x40; - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa840[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa840[ additional_character ]; } else if( ( additional_character >= 0xa0 ) && ( additional_character < 0xf0 ) ) { additional_character -= 0xa0; - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa8a0[ additional_character ]; - } - else - { - *unicode_character = 0xfffd; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa8a0[ additional_character ]; } } else if( byte_stream_character == 0xa9 ) @@ -6765,26 +6748,22 @@ { additional_character -= 0x40; - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa940[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa940[ additional_character ]; } else if( additional_character == 0x88 ) { - *unicode_character = 0xfe6b; + safe_unicode_character = 0xfe6b; } else if( additional_character == 0x96 ) { - *unicode_character = 0x3007; + safe_unicode_character = 0x3007; } else if( ( additional_character >= 0xa0 ) && ( additional_character < 0xf0 ) ) { additional_character -= 0xa0; - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa9a0[ additional_character ]; - } - else - { - *unicode_character = 0xfffd; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa9a0[ additional_character ]; } } else if( byte_stream_character == 0xaa ) @@ -6794,15 +6773,11 @@ { additional_character -= 0x40; - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xaa40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xaa40[ additional_character ]; } else if( additional_character == 0xa0 ) { - *unicode_character = 0x7371; - } - else - { - *unicode_character = 0xfffd; + safe_unicode_character = 0x7371; } } else if( byte_stream_character == 0xab ) @@ -6812,15 +6787,11 @@ { additional_character -= 0x40; - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xab40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xab40[ additional_character ]; } else if( additional_character == 0xa0 ) { - *unicode_character = 0x73f7; - } - else - { - *unicode_character = 0xfffd; + safe_unicode_character = 0x73f7; } } else if( byte_stream_character == 0xac ) @@ -6830,15 +6801,11 @@ { additional_character -= 0x40; - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xac40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xac40[ additional_character ]; } else if( additional_character == 0xa0 ) { - *unicode_character = 0x747a; - } - else - { - *unicode_character = 0xfffd; + safe_unicode_character = 0x747a; } } else if( byte_stream_character == 0xad ) @@ -6848,15 +6815,11 @@ { additional_character -= 0x40; - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xad40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xad40[ additional_character ]; } else if( additional_character == 0xa0 ) { - *unicode_character = 0x74f2; - } - else - { - *unicode_character = 0xfffd; + safe_unicode_character = 0x74f2; } } else if( byte_stream_character == 0xae ) @@ -6866,15 +6829,11 @@ { additional_character -= 0x40; - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xae40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xae40[ additional_character ]; } else if( additional_character == 0xa0 ) { - *unicode_character = 0x7587; - } - else - { - *unicode_character = 0xfffd; + safe_unicode_character = 0x7587; } } else if( byte_stream_character == 0xaf ) @@ -6884,15 +6843,11 @@ { additional_character -= 0x40; - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xaf40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xaf40[ additional_character ]; } else if( additional_character == 0xa0 ) { - *unicode_character = 0x7644; - } - else - { - *unicode_character = 0xfffd; + safe_unicode_character = 0x7644; } } else if( ( byte_stream_character >= 0xb0 ) @@ -6905,298 +6860,294 @@ switch( byte_stream_character ) { case 0xb0: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb040[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb040[ additional_character ]; break; case 0xb1: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb140[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb140[ additional_character ]; break; case 0xb2: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb240[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb240[ additional_character ]; break; case 0xb3: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb340[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb340[ additional_character ]; break; case 0xb4: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb440[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb440[ additional_character ]; break; case 0xb5: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb540[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb540[ additional_character ]; break; case 0xb6: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb640[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb640[ additional_character ]; break; case 0xb7: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb740[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb740[ additional_character ]; break; case 0xb8: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb840[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb840[ additional_character ]; break; case 0xb9: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb940[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb940[ additional_character ]; break; case 0xba: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xba40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xba40[ additional_character ]; break; case 0xbb: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xbb40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xbb40[ additional_character ]; break; case 0xbc: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xbc40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xbc40[ additional_character ]; break; case 0xbd: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xbd40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xbd40[ additional_character ]; break; case 0xbe: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xbe40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xbe40[ additional_character ]; break; case 0xbf: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xbf40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xbf40[ additional_character ]; break; case 0xc0: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc040[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc040[ additional_character ]; break; case 0xc1: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc140[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc140[ additional_character ]; break; case 0xc2: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc240[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc240[ additional_character ]; break; case 0xc3: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc340[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc340[ additional_character ]; break; case 0xc4: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc440[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc440[ additional_character ]; break; case 0xc5: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc540[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc540[ additional_character ]; break; case 0xc6: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc640[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc640[ additional_character ]; break; case 0xc7: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc740[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc740[ additional_character ]; break; case 0xc8: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc840[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc840[ additional_character ]; break; case 0xc9: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc940[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc940[ additional_character ]; break; case 0xca: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xca40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xca40[ additional_character ]; break; case 0xcb: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xcb40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xcb40[ additional_character ]; break; case 0xcc: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xcc40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xcc40[ additional_character ]; break; case 0xcd: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xcd40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xcd40[ additional_character ]; break; case 0xce: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xce40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xce40[ additional_character ]; break; case 0xcf: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xcf40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xcf40[ additional_character ]; break; case 0xd0: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd040[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd040[ additional_character ]; break; case 0xd1: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd140[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd140[ additional_character ]; break; case 0xd2: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd240[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd240[ additional_character ]; break; case 0xd3: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd340[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd340[ additional_character ]; break; case 0xd4: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd440[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd440[ additional_character ]; break; case 0xd5: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd540[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd540[ additional_character ]; break; case 0xd6: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd640[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd640[ additional_character ]; break; case 0xd7: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd740[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd740[ additional_character ]; break; case 0xd8: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd840[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd840[ additional_character ]; break; case 0xd9: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd940[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd940[ additional_character ]; break; case 0xda: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xda40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xda40[ additional_character ]; break; case 0xdb: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xdb40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xdb40[ additional_character ]; break; case 0xdc: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xdc40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xdc40[ additional_character ]; break; case 0xdd: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xdd40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xdd40[ additional_character ]; break; case 0xde: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xde40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xde40[ additional_character ]; break; case 0xdf: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xdf40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xdf40[ additional_character ]; break; case 0xe0: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe040[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe040[ additional_character ]; break; case 0xe1: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe140[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe140[ additional_character ]; break; case 0xe2: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe240[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe240[ additional_character ]; break; case 0xe3: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe340[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe340[ additional_character ]; break; case 0xe4: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe440[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe440[ additional_character ]; break; case 0xe5: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe540[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe540[ additional_character ]; break; case 0xe6: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe640[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe640[ additional_character ]; break; case 0xe7: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe740[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe740[ additional_character ]; break; case 0xe8: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe840[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe840[ additional_character ]; break; case 0xe9: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe940[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe940[ additional_character ]; break; case 0xea: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xea40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xea40[ additional_character ]; break; case 0xeb: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xeb40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xeb40[ additional_character ]; break; case 0xec: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xec40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xec40[ additional_character ]; break; case 0xed: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xed40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xed40[ additional_character ]; break; case 0xee: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xee40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xee40[ additional_character ]; break; case 0xef: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xef40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xef40[ additional_character ]; break; case 0xf0: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf040[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf040[ additional_character ]; break; case 0xf1: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf140[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf140[ additional_character ]; break; case 0xf2: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf240[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf240[ additional_character ]; break; case 0xf3: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf340[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf340[ additional_character ]; break; case 0xf4: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf440[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf440[ additional_character ]; break; case 0xf5: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf540[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf540[ additional_character ]; break; case 0xf6: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf640[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf640[ additional_character ]; break; case 0xf7: - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf740[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf740[ additional_character ]; break; } } - else - { - *unicode_character = 0xfffd; - } } else if( byte_stream_character == 0xf8 ) { @@ -7205,15 +7156,11 @@ { additional_character -= 0x40; - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf840[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf840[ additional_character ]; } else if( additional_character == 0xa0 ) { - *unicode_character = 0x9d42; - } - else - { - *unicode_character = 0xfffd; + safe_unicode_character = 0x9d42; } } else if( byte_stream_character == 0xf9 ) @@ -7223,15 +7170,11 @@ { additional_character -= 0x40; - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf940[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf940[ additional_character ]; } else if( additional_character == 0xa0 ) { - *unicode_character = 0x9da2; - } - else - { - *unicode_character = 0xfffd; + safe_unicode_character = 0x9da2; } } else if( byte_stream_character == 0xfa ) @@ -7241,15 +7184,11 @@ { additional_character -= 0x40; - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xfa40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xfa40[ additional_character ]; } else if( additional_character == 0xa0 ) { - *unicode_character = 0x9e02; - } - else - { - *unicode_character = 0xfffd; + safe_unicode_character = 0x9e02; } } else if( byte_stream_character == 0xfb ) @@ -7259,15 +7198,11 @@ { additional_character -= 0x40; - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xfb40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xfb40[ additional_character ]; } else if( additional_character == 0xa0 ) { - *unicode_character = 0x9eaa; - } - else - { - *unicode_character = 0xfffd; + safe_unicode_character = 0x9eaa; } } else if( byte_stream_character == 0xfc ) @@ -7277,15 +7212,11 @@ { additional_character -= 0x40; - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xfc40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xfc40[ additional_character ]; } else if( additional_character == 0xa0 ) { - *unicode_character = 0x9f31; - } - else - { - *unicode_character = 0xfffd; + safe_unicode_character = 0x9f31; } } else if( byte_stream_character == 0xfd ) @@ -7295,15 +7226,11 @@ { additional_character -= 0x40; - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xfd40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xfd40[ additional_character ]; } else if( additional_character == 0xa0 ) { - *unicode_character = 0xf9f1; - } - else - { - *unicode_character = 0xfffd; + safe_unicode_character = 0xf9f1; } } else if( byte_stream_character == 0xfe ) @@ -7313,23 +7240,12 @@ { additional_character -= 0x40; - *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xfe40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xfe40[ additional_character ]; } - else - { - *unicode_character = 0xfffd; - } - } - else - { - *unicode_character = 0xfffd; } } - else - { - *unicode_character = 0xfffd; - } - *byte_stream_index += 1; + *unicode_character = safe_unicode_character; + *byte_stream_index = safe_byte_stream_index + 1; return( 1 ); } @@ -7344,8 +7260,9 @@ size_t *byte_stream_index, libcerror_error_t **error ) { - static char *function = "libuna_codepage_windows_936_copy_to_byte_stream"; - uint16_t byte_stream_value = 0x001a; + static char *function = "libuna_codepage_windows_936_copy_to_byte_stream"; + size_t safe_byte_stream_index = 0; + uint16_t byte_stream_value = 0x001a; if( byte_stream == NULL ) { @@ -7380,7 +7297,9 @@ return( -1 ); } - if( *byte_stream_index >= byte_stream_size ) + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, @@ -7437,17 +7356,15 @@ unicode_character -= 0xfe00; byte_stream_value = libuna_codepage_windows_936_unicode_to_byte_stream_base_0xfe00[ unicode_character ]; } - byte_stream[ *byte_stream_index ] = (uint8_t) ( byte_stream_value & 0x00ff ); - - byte_stream_value >>= 8; - - if( byte_stream_value != 0 ) + do { - *byte_stream_index += 1; + byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); - byte_stream[ *byte_stream_index ] = (uint8_t) ( byte_stream_value & 0x00ff ); + byte_stream_value >>= 8; } - *byte_stream_index += 1; + while( byte_stream_value != 0 ); + + *byte_stream_index = safe_byte_stream_index; return( 1 ); } diff -Nru libfshfs-20201104/libuna/libuna_codepage_windows_936.h libfshfs-20240221/libuna/libuna_codepage_windows_936.h --- libfshfs-20201104/libuna/libuna_codepage_windows_936.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_windows_936.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * Windows 936 codepage (Chinese Simplified) functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -25,7 +25,6 @@ #include #include -#include "libuna_extern.h" #include "libuna_libcerror.h" #include "libuna_types.h" @@ -33,13 +32,11 @@ extern "C" { #endif -LIBUNA_EXTERN \ int libuna_codepage_windows_936_unicode_character_size_to_byte_stream( libuna_unicode_character_t unicode_character, size_t *byte_stream_character_size, libcerror_error_t **error ); -LIBUNA_EXTERN \ int libuna_codepage_windows_936_copy_from_byte_stream( libuna_unicode_character_t *unicode_character, const uint8_t *byte_stream, @@ -47,7 +44,6 @@ size_t *byte_stream_index, libcerror_error_t **error ); -LIBUNA_EXTERN \ int libuna_codepage_windows_936_copy_to_byte_stream( libuna_unicode_character_t unicode_character, uint8_t *byte_stream, diff -Nru libfshfs-20201104/libuna/libuna_codepage_windows_949.c libfshfs-20240221/libuna/libuna_codepage_windows_949.c --- libfshfs-20201104/libuna/libuna_codepage_windows_949.c 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_windows_949.c 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * Windows 949 codepage (Korean) functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -26,7 +26,7 @@ #include "libuna_libcerror.h" #include "libuna_types.h" -/* Extended ASCII to Unicode character lookup table for Windows 949 codepage +/* Extended ASCII to Unicode character lookup tables for the Windows 949 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8140[ 192 ] = { @@ -2678,10 +2678,9 @@ 0x71b9, 0x71ba, 0x72a7, 0x79a7, 0x7a00, 0x7fb2, 0x8a70, 0xfffd }; -/* Unicode to ASCII character lookup table for Windows 949 codepage +/* Unicode to ASCII character lookup tables for the Windows 949 codepage * Unknown are filled with the ASCII replacement character 0x1a */ - const uint16_t libuna_codepage_windows_949_unicode_to_byte_stream_base_0x0080[ 256 ] = { 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, @@ -7210,9 +7209,9 @@ }; -/* Determines the size of a byte stream character from an Unicode character +/* Determines the size of a Windows 949 encoded byte stream from an Unicode character * Adds the size to the byte stream character size value - * Returns 1 if successful or -1 on error + * Returns 1 if successful, 0 if the byte stream character is valid but not supported since it requires special handling or -1 on error */ int libuna_codepage_windows_949_unicode_character_size_to_byte_stream( libuna_unicode_character_t unicode_character, @@ -7308,9 +7307,11 @@ size_t *byte_stream_index, libcerror_error_t **error ) { - static char *function = "libuna_codepage_windows_949_copy_from_byte_stream"; - uint8_t additional_character = 0; - uint8_t byte_stream_character = 0; + static char *function = "libuna_codepage_windows_949_copy_from_byte_stream"; + libuna_unicode_character_t safe_unicode_character = 0xfffd; + size_t safe_byte_stream_index = 0; + uint8_t additional_character = 0; + uint8_t byte_stream_character = 0; if( unicode_character == NULL ) { @@ -7356,7 +7357,9 @@ return( -1 ); } - if( *byte_stream_index >= byte_stream_size ) + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, @@ -7367,17 +7370,17 @@ return( -1 ); } - byte_stream_character = byte_stream[ *byte_stream_index ]; + byte_stream_character = byte_stream[ safe_byte_stream_index ]; if( byte_stream_character < 0x80 ) { - *unicode_character = byte_stream_character; + safe_unicode_character = byte_stream_character; } - else if( ( *byte_stream_index + 1 ) <= byte_stream_size ) + else if( ( safe_byte_stream_index + 1 ) <= byte_stream_size ) { - *byte_stream_index += 1; + safe_byte_stream_index += 1; - additional_character = byte_stream[ *byte_stream_index ]; + additional_character = byte_stream[ safe_byte_stream_index ]; if( ( byte_stream_character >= 0x81 ) && ( byte_stream_character <= 0xa1 ) ) @@ -7389,142 +7392,138 @@ switch( byte_stream_character ) { case 0x81: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8140[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8140[ additional_character ]; break; case 0x82: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8240[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8240[ additional_character ]; break; case 0x83: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8340[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8340[ additional_character ]; break; case 0x84: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8440[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8440[ additional_character ]; break; case 0x85: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8540[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8540[ additional_character ]; break; case 0x86: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8640[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8640[ additional_character ]; break; case 0x87: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8740[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8740[ additional_character ]; break; case 0x88: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8840[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8840[ additional_character ]; break; case 0x89: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8940[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8940[ additional_character ]; break; case 0x8a: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8a40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8a40[ additional_character ]; break; case 0x8b: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8b40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8b40[ additional_character ]; break; case 0x8c: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8c40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8c40[ additional_character ]; break; case 0x8d: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8d40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8d40[ additional_character ]; break; case 0x8e: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8e40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8e40[ additional_character ]; break; case 0x8f: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8f40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8f40[ additional_character ]; break; case 0x90: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9040[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9040[ additional_character ]; break; case 0x91: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9140[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9140[ additional_character ]; break; case 0x92: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9240[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9240[ additional_character ]; break; case 0x93: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9340[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9340[ additional_character ]; break; case 0x94: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9440[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9440[ additional_character ]; break; case 0x95: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9540[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9540[ additional_character ]; break; case 0x96: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9640[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9640[ additional_character ]; break; case 0x97: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9740[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9740[ additional_character ]; break; case 0x98: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9840[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9840[ additional_character ]; break; case 0x99: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9940[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9940[ additional_character ]; break; case 0x9a: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9a40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9a40[ additional_character ]; break; case 0x9b: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9b40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9b40[ additional_character ]; break; case 0x9c: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9c40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9c40[ additional_character ]; break; case 0x9d: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9d40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9d40[ additional_character ]; break; case 0x9e: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9e40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9e40[ additional_character ]; break; case 0x9f: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9f40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9f40[ additional_character ]; break; case 0xa0: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa040[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa040[ additional_character ]; break; case 0xa1: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa140[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa140[ additional_character ]; break; } } - else - { - *unicode_character = 0xfffd; - } } else if( byte_stream_character == 0xa2 ) { @@ -7533,11 +7532,7 @@ { additional_character -= 0x40; - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa240[ additional_character ]; - } - else - { - *unicode_character = 0xfffd; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa240[ additional_character ]; } } else if( ( byte_stream_character >= 0xa3 ) @@ -7550,18 +7545,14 @@ switch( byte_stream_character ) { case 0xa3: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa340[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa340[ additional_character ]; break; case 0xa4: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa440[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa440[ additional_character ]; break; } } - else - { - *unicode_character = 0xfffd; - } } else if( byte_stream_character == 0xa5 ) { @@ -7569,11 +7560,7 @@ { additional_character -= 0x40; - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa540[ additional_character ]; - } - else - { - *unicode_character = 0xfffd; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa540[ additional_character ]; } } else if( byte_stream_character == 0xa6 ) @@ -7583,11 +7570,7 @@ { additional_character -= 0x40; - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa640[ additional_character ]; - } - else - { - *unicode_character = 0xfffd; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa640[ additional_character ]; } } else if( byte_stream_character == 0xa7 ) @@ -7597,11 +7580,7 @@ { additional_character -= 0x40; - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa740[ additional_character ]; - } - else - { - *unicode_character = 0xfffd; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa740[ additional_character ]; } } else if( ( byte_stream_character >= 0xa8 ) @@ -7614,18 +7593,14 @@ switch( byte_stream_character ) { case 0xa8: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa840[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa840[ additional_character ]; break; case 0xa9: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa940[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa940[ additional_character ]; break; } } - else - { - *unicode_character = 0xfffd; - } } else if( ( byte_stream_character >= 0xaa ) && ( byte_stream_character <= 0xab ) ) @@ -7638,18 +7613,14 @@ switch( byte_stream_character ) { case 0xaa: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xaa40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xaa40[ additional_character ]; break; case 0xab: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xab40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xab40[ additional_character ]; break; } } - else - { - *unicode_character = 0xfffd; - } } else if( byte_stream_character == 0xac ) { @@ -7658,18 +7629,14 @@ { additional_character -= 0x40; - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xac40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xac40[ additional_character ]; } else if( ( additional_character >= 0xd0 ) && ( additional_character < 0xf8 ) ) { additional_character -= 0xd0; - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xacd0[ additional_character ]; - } - else - { - *unicode_character = 0xfffd; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xacd0[ additional_character ]; } } else if( byte_stream_character == 0xad ) @@ -7679,15 +7646,11 @@ { additional_character -= 0x40; - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xad40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xad40[ additional_character ]; } else if( additional_character == 0xa0 ) { - *unicode_character = 0xcdc5; - } - else - { - *unicode_character = 0xfffd; + safe_unicode_character = 0xcdc5; } } else if( byte_stream_character == 0xae ) @@ -7697,15 +7660,11 @@ { additional_character -= 0x40; - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xae40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xae40[ additional_character ]; } else if( additional_character == 0xa0 ) { - *unicode_character = 0xce2b; - } - else - { - *unicode_character = 0xfffd; + safe_unicode_character = 0xce2b; } } else if( byte_stream_character == 0xaf ) @@ -7715,15 +7674,11 @@ { additional_character -= 0x40; - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xaf40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xaf40[ additional_character ]; } else if( additional_character == 0xa0 ) { - *unicode_character = 0xce99; - } - else - { - *unicode_character = 0xfffd; + safe_unicode_character = 0xce99; } } else if( ( byte_stream_character >= 0xb0 ) @@ -7736,98 +7691,94 @@ switch( byte_stream_character ) { case 0xb0: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb040[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb040[ additional_character ]; break; case 0xb1: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb140[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb140[ additional_character ]; break; case 0xb2: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb240[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb240[ additional_character ]; break; case 0xb3: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb340[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb340[ additional_character ]; break; case 0xb4: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb440[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb440[ additional_character ]; break; case 0xb5: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb540[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb540[ additional_character ]; break; case 0xb6: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb640[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb640[ additional_character ]; break; case 0xb7: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb740[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb740[ additional_character ]; break; case 0xb8: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb840[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb840[ additional_character ]; break; case 0xb9: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb940[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb940[ additional_character ]; break; case 0xba: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xba40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xba40[ additional_character ]; break; case 0xbb: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xbb40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xbb40[ additional_character ]; break; case 0xbc: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xbc40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xbc40[ additional_character ]; break; case 0xbd: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xbd40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xbd40[ additional_character ]; break; case 0xbe: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xbe40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xbe40[ additional_character ]; break; case 0xbf: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xbf40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xbf40[ additional_character ]; break; case 0xc0: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc040[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc040[ additional_character ]; break; case 0xc1: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc140[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc140[ additional_character ]; break; case 0xc2: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc240[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc240[ additional_character ]; break; case 0xc3: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc340[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc340[ additional_character ]; break; case 0xc4: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc440[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc440[ additional_character ]; break; case 0xc5: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc540[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc540[ additional_character ]; break; } } - else - { - *unicode_character = 0xfffd; - } } else if( byte_stream_character == 0xc6 ) { @@ -7836,17 +7787,13 @@ { additional_character -= 0x40; - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc640[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc640[ additional_character ]; } else if( additional_character >= 0xa0 ) { additional_character -= 0xa0; - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc6a0[ additional_character ]; - } - else - { - *unicode_character = 0xfffd; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc6a0[ additional_character ]; } } else if( ( byte_stream_character >= 0xc7 ) @@ -7859,18 +7806,14 @@ switch( byte_stream_character ) { case 0xc7: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc7a0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc7a0[ additional_character ]; break; case 0xc8: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc8a0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc8a0[ additional_character ]; break; } } - else - { - *unicode_character = 0xfffd; - } } else if( ( byte_stream_character >= 0xca ) && ( byte_stream_character <= 0xfd ) ) @@ -7882,229 +7825,218 @@ switch( byte_stream_character ) { case 0xca: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xcaa0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xcaa0[ additional_character ]; break; case 0xcb: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xcba0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xcba0[ additional_character ]; break; case 0xcc: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xcca0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xcca0[ additional_character ]; break; case 0xcd: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xcda0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xcda0[ additional_character ]; break; case 0xce: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xcea0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xcea0[ additional_character ]; break; case 0xcf: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xcfa0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xcfa0[ additional_character ]; break; case 0xd0: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd0a0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd0a0[ additional_character ]; break; case 0xd1: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd1a0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd1a0[ additional_character ]; break; case 0xd2: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd2a0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd2a0[ additional_character ]; break; case 0xd3: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd3a0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd3a0[ additional_character ]; break; case 0xd4: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd4a0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd4a0[ additional_character ]; break; case 0xd5: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd5a0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd5a0[ additional_character ]; break; case 0xd6: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd6a0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd6a0[ additional_character ]; break; case 0xd7: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd7a0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd7a0[ additional_character ]; break; case 0xd8: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd8a0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd8a0[ additional_character ]; break; case 0xd9: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd9a0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd9a0[ additional_character ]; break; case 0xda: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xdaa0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xdaa0[ additional_character ]; break; case 0xdb: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xdba0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xdba0[ additional_character ]; break; case 0xdc: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xdca0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xdca0[ additional_character ]; break; case 0xdd: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xdda0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xdda0[ additional_character ]; break; case 0xde: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xdea0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xdea0[ additional_character ]; break; case 0xdf: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xdfa0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xdfa0[ additional_character ]; break; case 0xe0: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe0a0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe0a0[ additional_character ]; break; case 0xe1: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe1a0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe1a0[ additional_character ]; break; case 0xe2: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe2a0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe2a0[ additional_character ]; break; case 0xe3: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe3a0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe3a0[ additional_character ]; break; case 0xe4: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe4a0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe4a0[ additional_character ]; break; case 0xe5: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe5a0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe5a0[ additional_character ]; break; case 0xe6: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe6a0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe6a0[ additional_character ]; break; case 0xe7: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe7a0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe7a0[ additional_character ]; break; case 0xe8: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe8a0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe8a0[ additional_character ]; break; case 0xe9: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe9a0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe9a0[ additional_character ]; break; case 0xea: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xeaa0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xeaa0[ additional_character ]; break; case 0xeb: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xeba0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xeba0[ additional_character ]; break; case 0xec: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xeca0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xeca0[ additional_character ]; break; case 0xed: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xeda0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xeda0[ additional_character ]; break; case 0xee: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xeea0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xeea0[ additional_character ]; break; case 0xef: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xefa0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xefa0[ additional_character ]; break; case 0xf0: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf0a0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf0a0[ additional_character ]; break; case 0xf1: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf1a0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf1a0[ additional_character ]; break; case 0xf2: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf2a0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf2a0[ additional_character ]; break; case 0xf3: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf3a0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf3a0[ additional_character ]; break; case 0xf4: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf4a0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf4a0[ additional_character ]; break; case 0xf5: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf5a0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf5a0[ additional_character ]; break; case 0xf6: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf6a0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf6a0[ additional_character ]; break; case 0xf7: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf7a0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf7a0[ additional_character ]; break; case 0xf8: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf8a0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf8a0[ additional_character ]; break; case 0xf9: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf9a0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf9a0[ additional_character ]; break; case 0xfa: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xfaa0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xfaa0[ additional_character ]; break; case 0xfb: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xfba0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xfba0[ additional_character ]; break; case 0xfc: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xfca0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xfca0[ additional_character ]; break; case 0xfd: - *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xfda0[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xfda0[ additional_character ]; break; } } - else - { - *unicode_character = 0xfffd; - } } - else - { - *unicode_character = 0xfffd; - } - } - else - { - *unicode_character = 0xfffd; } - *byte_stream_index += 1; + *unicode_character = safe_unicode_character; + *byte_stream_index = safe_byte_stream_index + 1; return( 1 ); } @@ -8119,8 +8051,9 @@ size_t *byte_stream_index, libcerror_error_t **error ) { - static char *function = "libuna_codepage_windows_949_copy_to_byte_stream"; - uint16_t byte_stream_value = 0x001a; + static char *function = "libuna_codepage_windows_949_copy_to_byte_stream"; + size_t safe_byte_stream_index = 0; + uint16_t byte_stream_value = 0x001a; if( byte_stream == NULL ) { @@ -8155,7 +8088,9 @@ return( -1 ); } - if( *byte_stream_index >= byte_stream_size ) + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, @@ -8218,17 +8153,15 @@ unicode_character -= 0xff00; byte_stream_value = libuna_codepage_windows_949_unicode_to_byte_stream_base_0xff00[ unicode_character ]; } - byte_stream[ *byte_stream_index ] = (uint8_t) ( byte_stream_value & 0x00ff ); - - byte_stream_value >>= 8; - - if( byte_stream_value != 0 ) + do { - *byte_stream_index += 1; + byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); - byte_stream[ *byte_stream_index ] = (uint8_t) ( byte_stream_value & 0x00ff ); + byte_stream_value >>= 8; } - *byte_stream_index += 1; + while( byte_stream_value != 0 ); + + *byte_stream_index = safe_byte_stream_index; return( 1 ); } diff -Nru libfshfs-20201104/libuna/libuna_codepage_windows_949.h libfshfs-20240221/libuna/libuna_codepage_windows_949.h --- libfshfs-20201104/libuna/libuna_codepage_windows_949.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_windows_949.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * Windows 949 codepage (Korean) functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -25,7 +25,6 @@ #include #include -#include "libuna_extern.h" #include "libuna_libcerror.h" #include "libuna_types.h" @@ -33,13 +32,11 @@ extern "C" { #endif -LIBUNA_EXTERN \ int libuna_codepage_windows_949_unicode_character_size_to_byte_stream( libuna_unicode_character_t unicode_character, size_t *byte_stream_character_size, libcerror_error_t **error ); -LIBUNA_EXTERN \ int libuna_codepage_windows_949_copy_from_byte_stream( libuna_unicode_character_t *unicode_character, const uint8_t *byte_stream, @@ -47,7 +44,6 @@ size_t *byte_stream_index, libcerror_error_t **error ); -LIBUNA_EXTERN \ int libuna_codepage_windows_949_copy_to_byte_stream( libuna_unicode_character_t unicode_character, uint8_t *byte_stream, diff -Nru libfshfs-20201104/libuna/libuna_codepage_windows_950.c libfshfs-20240221/libuna/libuna_codepage_windows_950.c --- libfshfs-20201104/libuna/libuna_codepage_windows_950.c 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_windows_950.c 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * Windows 950 codepage (Traditional Chinese) functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -26,10 +26,9 @@ #include "libuna_libcerror.h" #include "libuna_types.h" -/* Extended ASCII to Unicode character lookup table for Windows 950 codepage +/* Extended ASCII to Unicode character lookup tables for the Windows 950 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ - const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa140[ 63 ] = { 0x3000, 0xff0c, 0x3001, 0x3002, 0xff0e, 0x2027, 0xff1b, 0xff1a, 0xff1f, 0xff01, 0xfe30, 0x2026, 0x2025, 0xfe50, 0xfe51, 0xfe52, @@ -2269,10 +2268,9 @@ 0x2551, 0x2550, 0x256d, 0x256e, 0x2570, 0x256f, 0x2593, }; -/* Unicode to ASCII character lookup table for Windows 950 codepage +/* Unicode to ASCII character lookup tables for the Windows 950 codepage * Unknown are filled with the ASCII replacement character 0x1a */ - const uint16_t libuna_codepage_windows_950_unicode_to_byte_stream_base_0x0080[ 128 ] = { 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, @@ -5314,9 +5312,9 @@ }; -/* Determines the size of a byte stream character from an Unicode character +/* Determines the size of a Windows 950 encoded byte stream from an Unicode character * Adds the size to the byte stream character size value - * Returns 1 if successful or -1 on error + * Returns 1 if successful, 0 if the byte stream character is valid but not supported since it requires special handling or -1 on error */ int libuna_codepage_windows_950_unicode_character_size_to_byte_stream( libuna_unicode_character_t unicode_character, @@ -5412,9 +5410,11 @@ size_t *byte_stream_index, libcerror_error_t **error ) { - static char *function = "libuna_codepage_windows_950_copy_from_byte_stream"; - uint8_t additional_character = 0; - uint8_t byte_stream_character = 0; + static char *function = "libuna_codepage_windows_950_copy_from_byte_stream"; + libuna_unicode_character_t safe_unicode_character = 0xfffd; + size_t safe_byte_stream_index = 0; + uint8_t additional_character = 0; + uint8_t byte_stream_character = 0; if( unicode_character == NULL ) { @@ -5460,7 +5460,9 @@ return( -1 ); } - if( *byte_stream_index >= byte_stream_size ) + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, @@ -5471,17 +5473,17 @@ return( -1 ); } - byte_stream_character = byte_stream[ *byte_stream_index ]; + byte_stream_character = byte_stream[ safe_byte_stream_index ]; if( byte_stream_character < 0x80 ) { - *unicode_character = byte_stream_character; + safe_unicode_character = byte_stream_character; } - else if( ( *byte_stream_index + 1 ) <= byte_stream_size ) + else if( ( safe_byte_stream_index + 1 ) <= byte_stream_size ) { - *byte_stream_index += 1; + safe_byte_stream_index += 1; - additional_character = byte_stream[ *byte_stream_index ]; + additional_character = byte_stream[ safe_byte_stream_index ]; if( ( byte_stream_character >= 0xa1 ) && ( byte_stream_character <= 0xa2 ) ) @@ -5494,11 +5496,11 @@ switch( byte_stream_character ) { case 0xa1: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa140[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa140[ additional_character ]; break; case 0xa2: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa240[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa240[ additional_character ]; break; } } @@ -5510,18 +5512,14 @@ switch( byte_stream_character ) { case 0xa1: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa1a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa1a1[ additional_character ]; break; case 0xa2: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa2a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa2a1[ additional_character ]; break; } } - else - { - *unicode_character = 0xfffd; - } } else if( byte_stream_character == 0xa3 ) { @@ -5530,22 +5528,18 @@ { additional_character -= 0x40; - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa340[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa340[ additional_character ]; } else if( ( additional_character >= 0xa1 ) && ( additional_character < 0xc0 ) ) { additional_character -= 0xa1; - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa3a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa3a1[ additional_character ]; } else if( additional_character == 0xe1 ) { - *unicode_character = 0x20ac; - } - else - { - *unicode_character = 0xfffd; + safe_unicode_character = 0x20ac; } } else if( ( byte_stream_character >= 0xa4 ) @@ -5559,139 +5553,139 @@ switch( byte_stream_character ) { case 0xa4: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa440[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa440[ additional_character ]; break; case 0xa5: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa540[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa540[ additional_character ]; break; case 0xa6: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa640[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa640[ additional_character ]; break; case 0xa7: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa740[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa740[ additional_character ]; break; case 0xa8: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa840[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa840[ additional_character ]; break; case 0xa9: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa940[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa940[ additional_character ]; break; case 0xaa: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xaa40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xaa40[ additional_character ]; break; case 0xab: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xab40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xab40[ additional_character ]; break; case 0xac: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xac40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xac40[ additional_character ]; break; case 0xad: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xad40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xad40[ additional_character ]; break; case 0xae: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xae40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xae40[ additional_character ]; break; case 0xaf: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xaf40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xaf40[ additional_character ]; break; case 0xb0: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb040[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb040[ additional_character ]; break; case 0xb1: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb140[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb140[ additional_character ]; break; case 0xb2: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb240[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb240[ additional_character ]; break; case 0xb3: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb340[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb340[ additional_character ]; break; case 0xb4: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb440[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb440[ additional_character ]; break; case 0xb5: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb540[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb540[ additional_character ]; break; case 0xb6: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb640[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb640[ additional_character ]; break; case 0xb7: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb740[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb740[ additional_character ]; break; case 0xb8: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb840[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb840[ additional_character ]; break; case 0xb9: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb940[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb940[ additional_character ]; break; case 0xba: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xba40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xba40[ additional_character ]; break; case 0xbb: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbb40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbb40[ additional_character ]; break; case 0xbc: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbc40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbc40[ additional_character ]; break; case 0xbd: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbd40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbd40[ additional_character ]; break; case 0xbe: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbe40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbe40[ additional_character ]; break; case 0xbf: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbf40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbf40[ additional_character ]; break; case 0xc0: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc040[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc040[ additional_character ]; break; case 0xc1: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc140[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc140[ additional_character ]; break; case 0xc2: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc240[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc240[ additional_character ]; break; case 0xc3: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc340[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc340[ additional_character ]; break; case 0xc4: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc440[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc440[ additional_character ]; break; case 0xc5: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc540[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc540[ additional_character ]; break; } } @@ -5703,146 +5697,142 @@ switch( byte_stream_character ) { case 0xa4: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa4a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa4a1[ additional_character ]; break; case 0xa5: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa5a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa5a1[ additional_character ]; break; case 0xa6: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa6a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa6a1[ additional_character ]; break; case 0xa7: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa7a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa7a1[ additional_character ]; break; case 0xa8: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa8a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa8a1[ additional_character ]; break; case 0xa9: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa9a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa9a1[ additional_character ]; break; case 0xaa: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xaaa1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xaaa1[ additional_character ]; break; case 0xab: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xaba1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xaba1[ additional_character ]; break; case 0xac: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xaca1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xaca1[ additional_character ]; break; case 0xad: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xada1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xada1[ additional_character ]; break; case 0xae: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xaea1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xaea1[ additional_character ]; break; case 0xaf: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xafa1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xafa1[ additional_character ]; break; case 0xb0: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb0a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb0a1[ additional_character ]; break; case 0xb1: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb1a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb1a1[ additional_character ]; break; case 0xb2: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb2a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb2a1[ additional_character ]; break; case 0xb3: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb3a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb3a1[ additional_character ]; break; case 0xb4: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb4a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb4a1[ additional_character ]; break; case 0xb5: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb5a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb5a1[ additional_character ]; break; case 0xb6: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb6a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb6a1[ additional_character ]; break; case 0xb7: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb7a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb7a1[ additional_character ]; break; case 0xb8: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb8a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb8a1[ additional_character ]; break; case 0xb9: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb9a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb9a1[ additional_character ]; break; case 0xba: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbaa1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbaa1[ additional_character ]; break; case 0xbb: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbba1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbba1[ additional_character ]; break; case 0xbc: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbca1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbca1[ additional_character ]; break; case 0xbd: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbda1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbda1[ additional_character ]; break; case 0xbe: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbea1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbea1[ additional_character ]; break; case 0xbf: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbfa1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbfa1[ additional_character ]; break; case 0xc0: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc0a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc0a1[ additional_character ]; break; case 0xc1: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc1a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc1a1[ additional_character ]; break; case 0xc2: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc2a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc2a1[ additional_character ]; break; case 0xc3: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc3a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc3a1[ additional_character ]; break; case 0xc4: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc4a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc4a1[ additional_character ]; break; case 0xc5: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc5a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc5a1[ additional_character ]; break; } } - else - { - *unicode_character = 0xfffd; - } } else if( byte_stream_character == 0xc6 ) { @@ -5851,11 +5841,7 @@ { additional_character -= 0x40; - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc640[ additional_character ]; - } - else - { - *unicode_character = 0xfffd; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc640[ additional_character ]; } } else if( ( byte_stream_character >= 0xc9 ) @@ -5869,199 +5855,199 @@ switch( byte_stream_character ) { case 0xc9: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc940[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc940[ additional_character ]; break; case 0xca: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xca40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xca40[ additional_character ]; break; case 0xcb: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcb40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcb40[ additional_character ]; break; case 0xcc: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcc40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcc40[ additional_character ]; break; case 0xcd: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcd40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcd40[ additional_character ]; break; case 0xce: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xce40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xce40[ additional_character ]; break; case 0xcf: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcf40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcf40[ additional_character ]; break; case 0xd0: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd040[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd040[ additional_character ]; break; case 0xd1: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd140[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd140[ additional_character ]; break; case 0xd2: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd240[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd240[ additional_character ]; break; case 0xd3: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd340[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd340[ additional_character ]; break; case 0xd4: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd440[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd440[ additional_character ]; break; case 0xd5: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd540[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd540[ additional_character ]; break; case 0xd6: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd640[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd640[ additional_character ]; break; case 0xd7: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd740[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd740[ additional_character ]; break; case 0xd8: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd840[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd840[ additional_character ]; break; case 0xd9: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd940[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd940[ additional_character ]; break; case 0xda: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xda40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xda40[ additional_character ]; break; case 0xdb: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdb40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdb40[ additional_character ]; break; case 0xdc: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdc40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdc40[ additional_character ]; break; case 0xdd: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdd40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdd40[ additional_character ]; break; case 0xde: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xde40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xde40[ additional_character ]; break; case 0xdf: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdf40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdf40[ additional_character ]; break; case 0xe0: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe040[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe040[ additional_character ]; break; case 0xe1: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe140[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe140[ additional_character ]; break; case 0xe2: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe240[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe240[ additional_character ]; break; case 0xe3: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe340[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe340[ additional_character ]; break; case 0xe4: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe440[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe440[ additional_character ]; break; case 0xe5: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe540[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe540[ additional_character ]; break; case 0xe6: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe640[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe640[ additional_character ]; break; case 0xe7: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe740[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe740[ additional_character ]; break; case 0xe8: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe840[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe840[ additional_character ]; break; case 0xe9: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe940[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe940[ additional_character ]; break; case 0xea: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xea40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xea40[ additional_character ]; break; case 0xeb: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xeb40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xeb40[ additional_character ]; break; case 0xec: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xec40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xec40[ additional_character ]; break; case 0xed: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xed40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xed40[ additional_character ]; break; case 0xee: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xee40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xee40[ additional_character ]; break; case 0xef: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xef40[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xef40[ additional_character ]; break; case 0xf0: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf040[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf040[ additional_character ]; break; case 0xf1: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf140[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf140[ additional_character ]; break; case 0xf2: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf240[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf240[ additional_character ]; break; case 0xf3: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf340[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf340[ additional_character ]; break; case 0xf4: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf440[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf440[ additional_character ]; break; case 0xf5: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf540[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf540[ additional_character ]; break; case 0xf6: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf640[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf640[ additional_character ]; break; case 0xf7: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf740[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf740[ additional_character ]; break; case 0xf8: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf840[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf840[ additional_character ]; break; case 0xf9: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf940[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf940[ additional_character ]; break; } } @@ -6073,217 +6059,206 @@ switch( byte_stream_character ) { case 0xc9: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc9a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc9a1[ additional_character ]; break; case 0xca: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcaa1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcaa1[ additional_character ]; break; case 0xcb: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcba1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcba1[ additional_character ]; break; case 0xcc: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcca1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcca1[ additional_character ]; break; case 0xcd: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcda1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcda1[ additional_character ]; break; case 0xce: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcea1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcea1[ additional_character ]; break; case 0xcf: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcfa1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcfa1[ additional_character ]; break; case 0xd0: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd0a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd0a1[ additional_character ]; break; case 0xd1: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd1a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd1a1[ additional_character ]; break; case 0xd2: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd2a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd2a1[ additional_character ]; break; case 0xd3: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd3a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd3a1[ additional_character ]; break; case 0xd4: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd4a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd4a1[ additional_character ]; break; case 0xd5: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd5a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd5a1[ additional_character ]; break; case 0xd6: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd6a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd6a1[ additional_character ]; break; case 0xd7: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd7a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd7a1[ additional_character ]; break; case 0xd8: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd8a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd8a1[ additional_character ]; break; case 0xd9: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd9a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd9a1[ additional_character ]; break; case 0xda: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdaa1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdaa1[ additional_character ]; break; case 0xdb: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdba1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdba1[ additional_character ]; break; case 0xdc: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdca1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdca1[ additional_character ]; break; case 0xdd: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdda1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdda1[ additional_character ]; break; case 0xde: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdea1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdea1[ additional_character ]; break; case 0xdf: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdfa1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdfa1[ additional_character ]; break; case 0xe0: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe0a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe0a1[ additional_character ]; break; case 0xe1: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe1a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe1a1[ additional_character ]; break; case 0xe2: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe2a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe2a1[ additional_character ]; break; case 0xe3: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe3a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe3a1[ additional_character ]; break; case 0xe4: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe4a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe4a1[ additional_character ]; break; case 0xe5: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe5a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe5a1[ additional_character ]; break; case 0xe6: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe6a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe6a1[ additional_character ]; break; case 0xe7: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe7a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe7a1[ additional_character ]; break; case 0xe8: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe8a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe8a1[ additional_character ]; break; case 0xe9: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe9a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe9a1[ additional_character ]; break; case 0xea: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xeaa1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xeaa1[ additional_character ]; break; case 0xeb: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xeba1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xeba1[ additional_character ]; break; case 0xec: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xeca1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xeca1[ additional_character ]; break; case 0xed: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xeda1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xeda1[ additional_character ]; break; case 0xee: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xeea1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xeea1[ additional_character ]; break; case 0xef: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xefa1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xefa1[ additional_character ]; break; case 0xf0: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf0a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf0a1[ additional_character ]; break; case 0xf1: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf1a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf1a1[ additional_character ]; break; case 0xf2: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf2a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf2a1[ additional_character ]; break; case 0xf3: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf3a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf3a1[ additional_character ]; break; case 0xf4: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf4a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf4a1[ additional_character ]; break; case 0xf5: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf5a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf5a1[ additional_character ]; break; case 0xf6: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf6a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf6a1[ additional_character ]; break; case 0xf7: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf7a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf7a1[ additional_character ]; break; case 0xf8: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf8a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf8a1[ additional_character ]; break; case 0xf9: - *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf9a1[ additional_character ]; + safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf9a1[ additional_character ]; break; } } - else - { - *unicode_character = 0xfffd; - } - } - else - { - *unicode_character = 0xfffd; } } - else - { - *unicode_character = 0xfffd; - } - *byte_stream_index += 1; + *unicode_character = safe_unicode_character; + *byte_stream_index = safe_byte_stream_index + 1; return( 1 ); } @@ -6298,8 +6273,9 @@ size_t *byte_stream_index, libcerror_error_t **error ) { - static char *function = "libuna_codepage_windows_950_copy_to_byte_stream"; - uint16_t byte_stream_value = 0x001a; + static char *function = "libuna_codepage_windows_950_copy_to_byte_stream"; + size_t safe_byte_stream_index = 0; + uint16_t byte_stream_value = 0x001a; if( byte_stream == NULL ) { @@ -6334,7 +6310,9 @@ return( -1 ); } - if( *byte_stream_index >= byte_stream_size ) + safe_byte_stream_index = *byte_stream_index; + + if( safe_byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, @@ -6397,17 +6375,15 @@ unicode_character -= 0xfe00; byte_stream_value = libuna_codepage_windows_950_unicode_to_byte_stream_base_0xfe00[ unicode_character ]; } - byte_stream[ *byte_stream_index ] = (uint8_t) ( byte_stream_value & 0x00ff ); - - byte_stream_value >>= 8; - - if( byte_stream_value != 0 ) + do { - *byte_stream_index += 1; + byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); - byte_stream[ *byte_stream_index ] = (uint8_t) ( byte_stream_value & 0x00ff ); + byte_stream_value >>= 8; } - *byte_stream_index += 1; + while( byte_stream_value != 0 ); + + *byte_stream_index = safe_byte_stream_index; return( 1 ); } diff -Nru libfshfs-20201104/libuna/libuna_codepage_windows_950.h libfshfs-20240221/libuna/libuna_codepage_windows_950.h --- libfshfs-20201104/libuna/libuna_codepage_windows_950.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_codepage_windows_950.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * Windows 950 codepage (Traditional Chinese) functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -25,7 +25,6 @@ #include #include -#include "libuna_extern.h" #include "libuna_libcerror.h" #include "libuna_types.h" @@ -33,13 +32,11 @@ extern "C" { #endif -LIBUNA_EXTERN \ int libuna_codepage_windows_950_unicode_character_size_to_byte_stream( libuna_unicode_character_t unicode_character, size_t *byte_stream_character_size, libcerror_error_t **error ); -LIBUNA_EXTERN \ int libuna_codepage_windows_950_copy_from_byte_stream( libuna_unicode_character_t *unicode_character, const uint8_t *byte_stream, @@ -47,7 +44,6 @@ size_t *byte_stream_index, libcerror_error_t **error ); -LIBUNA_EXTERN \ int libuna_codepage_windows_950_copy_to_byte_stream( libuna_unicode_character_t unicode_character, uint8_t *byte_stream, diff -Nru libfshfs-20201104/libuna/libuna_definitions.h libfshfs-20240221/libuna/libuna_definitions.h --- libfshfs-20201104/libuna/libuna_definitions.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_definitions.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * The internal definitions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -35,11 +35,11 @@ #else #include -#define LIBUNA_VERSION 20200711 +#define LIBUNA_VERSION 20240130 /* The libuna version string */ -#define LIBUNA_VERSION_STRING "20200711" +#define LIBUNA_VERSION_STRING "20240130" /* The endian definitions */ @@ -71,6 +71,31 @@ LIBUNA_CODEPAGE_KOI8_R = 20866, LIBUNA_CODEPAGE_KOI8_U = 21866, + LIBUNA_CODEPAGE_MAC_ROMAN = 10000, + LIBUNA_CODEPAGE_MAC_JAPANESE = 10001, + LIBUNA_CODEPAGE_MAC_CHINESETRAD = 10002, + LIBUNA_CODEPAGE_MAC_KOREAN = 10003, + LIBUNA_CODEPAGE_MAC_ARABIC = 10004, + LIBUNA_CODEPAGE_MAC_HEBREW = 10005, + LIBUNA_CODEPAGE_MAC_GREEK = 10006, + LIBUNA_CODEPAGE_MAC_RUSSIAN = 10007, + LIBUNA_CODEPAGE_MAC_CHINESESIMP = 10008, + LIBUNA_CODEPAGE_MAC_ROMANIAN = 10010, + LIBUNA_CODEPAGE_MAC_UKRAINIAN = 10017, + LIBUNA_CODEPAGE_MAC_THAI = 10021, + LIBUNA_CODEPAGE_MAC_CENTRALEURROMAN = 10029, + LIBUNA_CODEPAGE_MAC_ICELANDIC = 10079, + LIBUNA_CODEPAGE_MAC_TURKISH = 10081, + LIBUNA_CODEPAGE_MAC_CROATIAN = 10082, + + LIBUNA_CODEPAGE_MAC_CYRILLIC = 11007, + LIBUNA_CODEPAGE_MAC_SYMBOL = 11033, + LIBUNA_CODEPAGE_MAC_DINGBATS = 11034, + LIBUNA_CODEPAGE_MAC_CELTIC = 11039, + LIBUNA_CODEPAGE_MAC_GAELIC = 11040, + LIBUNA_CODEPAGE_MAC_FARSI = 11140, + LIBUNA_CODEPAGE_MAC_INUIT = 11236, + LIBUNA_CODEPAGE_OEM_437 = 437, LIBUNA_CODEPAGE_OEM_720 = 720, LIBUNA_CODEPAGE_OEM_737 = 737, @@ -83,6 +108,14 @@ LIBUNA_CODEPAGE_OEM_862 = 862, LIBUNA_CODEPAGE_OEM_866 = 866, + LIBUNA_CODEPAGE_UTF16_LITTLE_ENDIAN = 1200, + LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN = 1201, + LIBUNA_CODEPAGE_UTF32_LITTLE_ENDIAN = 12000, + LIBUNA_CODEPAGE_UTF32_BIG_ENDIAN = 12001, + LIBUNA_CODEPAGE_UTF7 = 65000, + LIBUNA_CODEPAGE_UTF8 = 65001, + LIBUNA_CODEPAGE_SCSU = 65002, + LIBUNA_CODEPAGE_WINDOWS_874 = 874, LIBUNA_CODEPAGE_WINDOWS_932 = 932, LIBUNA_CODEPAGE_WINDOWS_936 = 936, @@ -154,6 +187,30 @@ #define LIBUNA_CODEPAGE_OEM_CHINESE_TRADITIONAL LIBUNA_CODEPAGE_WINDOWS_950 #define LIBUNA_CODEPAGE_OEM_VIETNAMESE LIBUNA_CODEPAGE_WINDOWS_1258 +#define LIBUNA_CODEPAGE_MACOS_ROMAN LIBUNA_CODEPAGE_MAC_ROMAN +#define LIBUNA_CODEPAGE_MACOS_JAPANESE LIBUNA_CODEPAGE_MAC_JAPANESE +#define LIBUNA_CODEPAGE_MACOS_CHINESE_TRADITIONAL LIBUNA_CODEPAGE_MAC_CHINESETRAD +#define LIBUNA_CODEPAGE_MACOS_KOREAN LIBUNA_CODEPAGE_MAC_KOREAN +#define LIBUNA_CODEPAGE_MACOS_ARABIC LIBUNA_CODEPAGE_MAC_ARABIC +#define LIBUNA_CODEPAGE_MACOS_HEBREW LIBUNA_CODEPAGE_MAC_HEBREW +#define LIBUNA_CODEPAGE_MACOS_GREEK LIBUNA_CODEPAGE_MAC_GREEK +#define LIBUNA_CODEPAGE_MACOS_RUSSIAN LIBUNA_CODEPAGE_MAC_RUSSIAN +#define LIBUNA_CODEPAGE_MACOS_CHINESE_SIMPLIFIED LIBUNA_CODEPAGE_MAC_CHINESESIMP +#define LIBUNA_CODEPAGE_MACOS_ROMANIAN LIBUNA_CODEPAGE_MAC_ROMANIAN +#define LIBUNA_CODEPAGE_MACOS_UKRAINIAN LIBUNA_CODEPAGE_MAC_UKRAINIAN +#define LIBUNA_CODEPAGE_MACOS_THAI LIBUNA_CODEPAGE_MAC_THAI +#define LIBUNA_CODEPAGE_MACOS_CENTRALEURROMAN LIBUNA_CODEPAGE_MAC_CENTRALEURROMAN +#define LIBUNA_CODEPAGE_MACOS_ICELANDIC LIBUNA_CODEPAGE_MAC_ICELANDIC +#define LIBUNA_CODEPAGE_MACOS_TURKISH LIBUNA_CODEPAGE_MAC_TURKISH +#define LIBUNA_CODEPAGE_MACOS_CROATIAN LIBUNA_CODEPAGE_MAC_CROATIAN + +#define LIBUNA_CODEPAGE_MACOS_CYRILLIC LIBUNA_CODEPAGE_MAC_CYRILLIC +#define LIBUNA_CODEPAGE_MACOS_SYMBOL LIBUNA_CODEPAGE_MAC_SYMBOL +#define LIBUNA_CODEPAGE_MACOS_CELTIC LIBUNA_CODEPAGE_MAC_CELTIC +#define LIBUNA_CODEPAGE_MACOS_GAELIC LIBUNA_CODEPAGE_MAC_GAELIC +#define LIBUNA_CODEPAGE_MACOS_FARSI LIBUNA_CODEPAGE_MAC_FARSI +#define LIBUNA_CODEPAGE_MACOS_INUIT LIBUNA_CODEPAGE_MAC_INUIT + #define LIBUNA_CODEPAGE_WINDOWS_THAI LIBUNA_CODEPAGE_WINDOWS_874 #define LIBUNA_CODEPAGE_WINDOWS_JAPANESE LIBUNA_CODEPAGE_WINDOWS_932 #define LIBUNA_CODEPAGE_WINDOWS_CHINESE_SIMPLIFIED LIBUNA_CODEPAGE_WINDOWS_936 @@ -331,6 +388,8 @@ LIBUNA_BASE64_FLAG_STRIP_WHITESPACE = 0x01 }; +#define LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE 0x8000 + #endif /* !defined( HAVE_LOCAL_LIBUNA ) */ #define LIBUNA_BASE32_VARIANT_ENCODING_BYTE_STREAM 0 @@ -365,8 +424,7 @@ #define LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_END 0x0000dbffUL #define LIBUNA_UNICODE_CHARACTER_MAX 0x0010ffffUL -#define LIBUNA_UTF16_CHARACTER_MAX 0x0010ffffUL -#define LIBUNA_UTF32_CHARACTER_MAX 0x7fffffffUL +#define LIBUNA_UCS_CHARACTER_MAX 0x7fffffffUL #define LIBUNA_ASCII_REPLACEMENT_CHARACTER 0x1a diff -Nru libfshfs-20201104/libuna/libuna_error.c libfshfs-20240221/libuna/libuna_error.c --- libfshfs-20201104/libuna/libuna_error.c 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_error.c 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * Error functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_error.h libfshfs-20240221/libuna/libuna_error.h --- libfshfs-20201104/libuna/libuna_error.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_error.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * Error functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_extern.h libfshfs-20240221/libuna/libuna_extern.h --- libfshfs-20201104/libuna/libuna_extern.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_extern.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * The internal extern definition * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -30,7 +30,11 @@ #include +#if defined( __CYGWIN__ ) || defined( __MINGW32__ ) +#define LIBUNA_EXTERN_VARIABLE extern +#else #define LIBUNA_EXTERN_VARIABLE LIBUNA_EXTERN +#endif #else #define LIBUNA_EXTERN /* extern */ diff -Nru libfshfs-20201104/libuna/libuna_libcerror.h libfshfs-20240221/libuna/libuna_libcerror.h --- libfshfs-20201104/libuna/libuna_libcerror.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_libcerror.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libcerror header wrapper * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_scsu.c libfshfs-20240221/libuna/libuna_scsu.c --- libfshfs-20201104/libuna/libuna_scsu.c 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_scsu.c 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * Standard Compression Scheme for Unicode (SCSU) functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_scsu.h libfshfs-20240221/libuna/libuna_scsu.h --- libfshfs-20201104/libuna/libuna_scsu.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_scsu.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * Standard Compression Scheme for Unicode (SCSU) functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_support.c libfshfs-20240221/libuna/libuna_support.c --- libfshfs-20201104/libuna/libuna_support.c 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_support.c 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * Support functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_support.h libfshfs-20240221/libuna/libuna_support.h --- libfshfs-20201104/libuna/libuna_support.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_support.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * Support functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_types.h libfshfs-20240221/libuna/libuna_types.h --- libfshfs-20201104/libuna/libuna_types.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_types.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * The internal type definitions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_unicode_character.c libfshfs-20240221/libuna/libuna_unicode_character.c --- libfshfs-20201104/libuna/libuna_unicode_character.c 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_unicode_character.c 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * Unicode character functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -38,6 +38,24 @@ #include "libuna_codepage_iso_8859_16.h" #include "libuna_codepage_koi8_r.h" #include "libuna_codepage_koi8_u.h" +#include "libuna_codepage_mac_arabic.h" +#include "libuna_codepage_mac_celtic.h" +#include "libuna_codepage_mac_centraleurroman.h" +#include "libuna_codepage_mac_croatian.h" +#include "libuna_codepage_mac_cyrillic.h" +#include "libuna_codepage_mac_dingbats.h" +#include "libuna_codepage_mac_farsi.h" +#include "libuna_codepage_mac_gaelic.h" +#include "libuna_codepage_mac_greek.h" +#include "libuna_codepage_mac_icelandic.h" +#include "libuna_codepage_mac_inuit.h" +#include "libuna_codepage_mac_roman.h" +#include "libuna_codepage_mac_romanian.h" +#include "libuna_codepage_mac_russian.h" +#include "libuna_codepage_mac_symbol.h" +#include "libuna_codepage_mac_thai.h" +#include "libuna_codepage_mac_turkish.h" +#include "libuna_codepage_mac_ukrainian.h" #include "libuna_codepage_windows_874.h" #include "libuna_codepage_windows_932.h" #include "libuna_codepage_windows_936.h" @@ -102,7 +120,7 @@ /* Determines the size of a byte stream character from an Unicode character * Adds the size to the byte stream character size value - * Returns 1 if successful or -1 on error + * Returns 1 if successful, 0 if the byte stream character is valid but not supported since it requires special handling or -1 on error */ int libuna_unicode_character_size_to_byte_stream( libuna_unicode_character_t unicode_character, @@ -147,6 +165,22 @@ case LIBUNA_CODEPAGE_ISO_8859_16: case LIBUNA_CODEPAGE_KOI8_R: case LIBUNA_CODEPAGE_KOI8_U: + case LIBUNA_CODEPAGE_MAC_ARABIC: + case LIBUNA_CODEPAGE_MAC_CELTIC: + case LIBUNA_CODEPAGE_MAC_CENTRALEURROMAN: + case LIBUNA_CODEPAGE_MAC_CROATIAN: + case LIBUNA_CODEPAGE_MAC_CYRILLIC: + case LIBUNA_CODEPAGE_MAC_DINGBATS: + case LIBUNA_CODEPAGE_MAC_FARSI: + case LIBUNA_CODEPAGE_MAC_GAELIC: + case LIBUNA_CODEPAGE_MAC_GREEK: + case LIBUNA_CODEPAGE_MAC_ICELANDIC: + case LIBUNA_CODEPAGE_MAC_INUIT: + case LIBUNA_CODEPAGE_MAC_ROMAN: + case LIBUNA_CODEPAGE_MAC_ROMANIAN: + case LIBUNA_CODEPAGE_MAC_RUSSIAN: + case LIBUNA_CODEPAGE_MAC_TURKISH: + case LIBUNA_CODEPAGE_MAC_UKRAINIAN: case LIBUNA_CODEPAGE_WINDOWS_874: case LIBUNA_CODEPAGE_WINDOWS_1250: case LIBUNA_CODEPAGE_WINDOWS_1251: @@ -160,6 +194,20 @@ safe_byte_stream_character_size += 1; break; + case LIBUNA_CODEPAGE_MAC_SYMBOL: + result = libuna_codepage_mac_symbol_unicode_character_size_to_byte_stream( + unicode_character, + &safe_byte_stream_character_size, + error ); + break; + + case LIBUNA_CODEPAGE_MAC_THAI: + result = libuna_codepage_mac_thai_unicode_character_size_to_byte_stream( + unicode_character, + &safe_byte_stream_character_size, + error ); + break; + case LIBUNA_CODEPAGE_WINDOWS_932: result = libuna_codepage_windows_932_unicode_character_size_to_byte_stream( unicode_character, @@ -199,7 +247,7 @@ return( -1 ); } - if( result != 1 ) + if( result == -1 ) { libcerror_error_set( error, @@ -216,7 +264,7 @@ } /* Copies an Unicode character from a byte stream - * Returns 1 if successful or -1 on error + * Returns 1 if successful, 0 if the byte stream character is valid but not supported since it requires special handling or -1 on error */ int libuna_unicode_character_copy_from_byte_stream( libuna_unicode_character_t *unicode_character, @@ -535,48 +583,192 @@ break; case LIBUNA_CODEPAGE_KOI8_R: - if( byte_stream_character < 0x80 ) - { - safe_unicode_character = byte_stream_character; - } - else - { - byte_stream_character -= 0x80; + result = libuna_codepage_koi8_r_copy_from_byte_stream( + &safe_unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); + break; - safe_unicode_character = libuna_codepage_koi8_r_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; - } - safe_byte_stream_index += 1; + case LIBUNA_CODEPAGE_KOI8_U: + result = libuna_codepage_koi8_u_copy_from_byte_stream( + &safe_unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); + break; + case LIBUNA_CODEPAGE_MAC_ARABIC: + result = libuna_codepage_mac_arabic_copy_from_byte_stream( + &safe_unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); break; - case LIBUNA_CODEPAGE_KOI8_U: - if( byte_stream_character < 0x80 ) - { - safe_unicode_character = byte_stream_character; - } - else - { - byte_stream_character -= 0x80; + case LIBUNA_CODEPAGE_MAC_CELTIC: + result = libuna_codepage_mac_celtic_copy_from_byte_stream( + &safe_unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); + break; - safe_unicode_character = libuna_codepage_koi8_u_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; - } - safe_byte_stream_index += 1; + case LIBUNA_CODEPAGE_MAC_CENTRALEURROMAN: + result = libuna_codepage_mac_centraleurroman_copy_from_byte_stream( + &safe_unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); + break; + case LIBUNA_CODEPAGE_MAC_CROATIAN: + result = libuna_codepage_mac_croatian_copy_from_byte_stream( + &safe_unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); break; - case LIBUNA_CODEPAGE_WINDOWS_874: - if( byte_stream_character < 0x80 ) - { - safe_unicode_character = byte_stream_character; - } - else - { - byte_stream_character -= 0x80; + case LIBUNA_CODEPAGE_MAC_CYRILLIC: + result = libuna_codepage_mac_cyrillic_copy_from_byte_stream( + &safe_unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); + break; - safe_unicode_character = libuna_codepage_windows_874_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; - } - safe_byte_stream_index += 1; + case LIBUNA_CODEPAGE_MAC_DINGBATS: + result = libuna_codepage_mac_dingbats_copy_from_byte_stream( + &safe_unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); + break; + + case LIBUNA_CODEPAGE_MAC_FARSI: + result = libuna_codepage_mac_farsi_copy_from_byte_stream( + &safe_unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); + break; + + case LIBUNA_CODEPAGE_MAC_GAELIC: + result = libuna_codepage_mac_gaelic_copy_from_byte_stream( + &safe_unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); + break; + + case LIBUNA_CODEPAGE_MAC_GREEK: + result = libuna_codepage_mac_greek_copy_from_byte_stream( + &safe_unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); + break; + + case LIBUNA_CODEPAGE_MAC_ICELANDIC: + result = libuna_codepage_mac_icelandic_copy_from_byte_stream( + &safe_unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); + break; + + case LIBUNA_CODEPAGE_MAC_INUIT: + result = libuna_codepage_mac_inuit_copy_from_byte_stream( + &safe_unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); + break; + + case LIBUNA_CODEPAGE_MAC_ROMAN: + result = libuna_codepage_mac_roman_copy_from_byte_stream( + &safe_unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); + break; + case LIBUNA_CODEPAGE_MAC_ROMANIAN: + result = libuna_codepage_mac_romanian_copy_from_byte_stream( + &safe_unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); + break; + + case LIBUNA_CODEPAGE_MAC_RUSSIAN: + result = libuna_codepage_mac_russian_copy_from_byte_stream( + &safe_unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); + break; + + case LIBUNA_CODEPAGE_MAC_SYMBOL: + result = libuna_codepage_mac_symbol_copy_from_byte_stream( + &safe_unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); + break; + + case LIBUNA_CODEPAGE_MAC_THAI: + result = libuna_codepage_mac_thai_copy_from_byte_stream( + &safe_unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); + break; + + case LIBUNA_CODEPAGE_MAC_TURKISH: + result = libuna_codepage_mac_turkish_copy_from_byte_stream( + &safe_unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); + break; + + case LIBUNA_CODEPAGE_MAC_UKRAINIAN: + result = libuna_codepage_mac_ukrainian_copy_from_byte_stream( + &safe_unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); + break; + + case LIBUNA_CODEPAGE_WINDOWS_874: + result = libuna_codepage_windows_874_copy_from_byte_stream( + &safe_unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); break; case LIBUNA_CODEPAGE_WINDOWS_932: @@ -616,159 +808,84 @@ break; case LIBUNA_CODEPAGE_WINDOWS_1250: - if( byte_stream_character < 0x80 ) - { - safe_unicode_character = byte_stream_character; - } - else - { - byte_stream_character -= 0x80; - - safe_unicode_character = libuna_codepage_windows_1250_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; - } - safe_byte_stream_index += 1; - + result = libuna_codepage_windows_1250_copy_from_byte_stream( + &safe_unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); break; case LIBUNA_CODEPAGE_WINDOWS_1251: - if( byte_stream_character < 0x80 ) - { - safe_unicode_character = byte_stream_character; - } - else - { - byte_stream_character -= 0x80; - - safe_unicode_character = libuna_codepage_windows_1251_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; - } - safe_byte_stream_index += 1; - + result = libuna_codepage_windows_1251_copy_from_byte_stream( + &safe_unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); break; case LIBUNA_CODEPAGE_WINDOWS_1252: - if( ( byte_stream_character < 0x80 ) - || ( byte_stream_character >= 0xa0 ) ) - { - safe_unicode_character = byte_stream_character; - } - else - { - byte_stream_character -= 0x80; - - safe_unicode_character = libuna_codepage_windows_1252_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; - } - safe_byte_stream_index += 1; - + result = libuna_codepage_windows_1252_copy_from_byte_stream( + &safe_unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); break; case LIBUNA_CODEPAGE_WINDOWS_1253: - if( byte_stream_character < 0x80 ) - { - safe_unicode_character = byte_stream_character; - } - else - { - byte_stream_character -= 0x80; - - safe_unicode_character = libuna_codepage_windows_1253_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; - } - safe_byte_stream_index += 1; - + result = libuna_codepage_windows_1253_copy_from_byte_stream( + &safe_unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); break; case LIBUNA_CODEPAGE_WINDOWS_1254: - if( byte_stream_character < 0x80 ) - { - safe_unicode_character = byte_stream_character; - } - else if( byte_stream_character < 0xa0 ) - { - byte_stream_character -= 0x80; - - safe_unicode_character = libuna_codepage_windows_1254_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; - } - else if( byte_stream_character < 0xd0 ) - { - safe_unicode_character = byte_stream_character; - } - else if( byte_stream_character < 0xe0 ) - { - byte_stream_character -= 0xd0; - - safe_unicode_character = libuna_codepage_windows_1254_byte_stream_to_unicode_base_0xd0[ byte_stream_character ]; - } - else if( byte_stream_character < 0xf0 ) - { - safe_unicode_character = byte_stream_character; - } - else - { - byte_stream_character -= 0xf0; - - safe_unicode_character = libuna_codepage_windows_1254_byte_stream_to_unicode_base_0xf0[ byte_stream_character ]; - } - safe_byte_stream_index += 1; - + result = libuna_codepage_windows_1254_copy_from_byte_stream( + &safe_unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); break; case LIBUNA_CODEPAGE_WINDOWS_1255: - if( byte_stream_character < 0x80 ) - { - safe_unicode_character = byte_stream_character; - } - else - { - byte_stream_character -= 0x80; - - safe_unicode_character = libuna_codepage_windows_1255_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; - } - safe_byte_stream_index += 1; - + result = libuna_codepage_windows_1255_copy_from_byte_stream( + &safe_unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); break; case LIBUNA_CODEPAGE_WINDOWS_1256: - if( byte_stream_character < 0x80 ) - { - safe_unicode_character = byte_stream_character; - } - else - { - byte_stream_character -= 0x80; - - safe_unicode_character = libuna_codepage_windows_1256_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; - } - safe_byte_stream_index += 1; - + result = libuna_codepage_windows_1256_copy_from_byte_stream( + &safe_unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); break; case LIBUNA_CODEPAGE_WINDOWS_1257: - if( byte_stream_character < 0x80 ) - { - safe_unicode_character = byte_stream_character; - } - else - { - byte_stream_character -= 0x80; - - safe_unicode_character = libuna_codepage_windows_1257_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; - } - safe_byte_stream_index += 1; - + result = libuna_codepage_windows_1257_copy_from_byte_stream( + &safe_unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); break; case LIBUNA_CODEPAGE_WINDOWS_1258: - if( byte_stream_character < 0x80 ) - { - safe_unicode_character = byte_stream_character; - } - else - { - byte_stream_character -= 0x80; - - safe_unicode_character = libuna_codepage_windows_1258_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; - } - safe_byte_stream_index += 1; - + result = libuna_codepage_windows_1258_copy_from_byte_stream( + &safe_unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); break; default: @@ -782,7 +899,7 @@ return( -1 ); } - if( result != 1 ) + if( result == -1 ) { libcerror_error_set( error, @@ -800,7 +917,7 @@ } /* Copies an Unicode character to a byte stream - * Returns 1 if successful or -1 on error + * Returns 1 if successful, 0 if the Unicode character is valid but not supported since it requires special handling or -1 on error */ int libuna_unicode_character_copy_to_byte_stream( libuna_unicode_character_t unicode_character, @@ -1697,423 +1814,192 @@ break; case LIBUNA_CODEPAGE_KOI8_R: - if( unicode_character < 0x0080 ) - { - byte_stream[ safe_byte_stream_index ] = (uint8_t) unicode_character; - } - else if( ( unicode_character >= 0x0410 ) - && ( unicode_character < 0x0450 ) ) - { - unicode_character -= 0x0410; - - byte_stream[ safe_byte_stream_index ] = libuna_codepage_koi8_r_unicode_to_byte_stream_base_0x0410[ unicode_character ]; - } - else if( ( unicode_character >= 0x2550 ) - && ( unicode_character < 0x2570 ) ) - { - unicode_character -= 0x2550; - - byte_stream[ safe_byte_stream_index ] = libuna_codepage_koi8_r_unicode_to_byte_stream_base_0x2550[ unicode_character ]; - } - else switch( unicode_character ) - { - case 0x00a0: - byte_stream[ safe_byte_stream_index ] = 0x9a; - break; - - case 0x00a9: - byte_stream[ safe_byte_stream_index ] = 0xbf; - break; - - case 0x00b0: - byte_stream[ safe_byte_stream_index ] = 0x9c; - break; - - case 0x00b2: - byte_stream[ safe_byte_stream_index ] = 0x9d; - break; - - case 0x00b7: - byte_stream[ safe_byte_stream_index ] = 0x9e; - break; - - case 0x00f7: - byte_stream[ safe_byte_stream_index ] = 0x9f; - break; - - case 0x0401: - byte_stream[ safe_byte_stream_index ] = 0xb3; - break; - - case 0x0451: - byte_stream[ safe_byte_stream_index ] = 0xa3; - break; - - case 0x2219: - byte_stream[ safe_byte_stream_index ] = 0x95; - break; - - case 0x221a: - byte_stream[ safe_byte_stream_index ] = 0x96; - break; - - case 0x2248: - byte_stream[ safe_byte_stream_index ] = 0x97; - break; - - case 0x2264: - byte_stream[ safe_byte_stream_index ] = 0x98; - break; - - case 0x2265: - byte_stream[ safe_byte_stream_index ] = 0x99; - break; - - case 0x2320: - byte_stream[ safe_byte_stream_index ] = 0x93; - break; - - case 0x2321: - byte_stream[ safe_byte_stream_index ] = 0x9b; - break; - - case 0x2500: - byte_stream[ safe_byte_stream_index ] = 0x80; - break; - - case 0x2502: - byte_stream[ safe_byte_stream_index ] = 0x81; - break; - - case 0x250c: - byte_stream[ safe_byte_stream_index ] = 0x82; - break; - - case 0x2510: - byte_stream[ safe_byte_stream_index ] = 0x83; - break; - - case 0x2514: - byte_stream[ safe_byte_stream_index ] = 0x84; - break; - - case 0x2518: - byte_stream[ safe_byte_stream_index ] = 0x85; - break; - - case 0x251c: - byte_stream[ safe_byte_stream_index ] = 0x86; - break; - - case 0x2524: - byte_stream[ safe_byte_stream_index ] = 0x87; - break; - - case 0x252c: - byte_stream[ safe_byte_stream_index ] = 0x88; - break; - - case 0x2534: - byte_stream[ safe_byte_stream_index ] = 0x89; - break; - - case 0x253c: - byte_stream[ safe_byte_stream_index ] = 0x8a; - break; - - case 0x2580: - byte_stream[ safe_byte_stream_index ] = 0x8b; - break; - - case 0x2584: - byte_stream[ safe_byte_stream_index ] = 0x8c; - break; - - case 0x2588: - byte_stream[ safe_byte_stream_index ] = 0x8d; - break; - - case 0x258c: - byte_stream[ safe_byte_stream_index ] = 0x8e; - break; - - case 0x2590: - byte_stream[ safe_byte_stream_index ] = 0x8f; - break; - - case 0x2591: - byte_stream[ safe_byte_stream_index ] = 0x90; - break; - - case 0x2592: - byte_stream[ safe_byte_stream_index ] = 0x91; - break; - - case 0x2593: - byte_stream[ safe_byte_stream_index ] = 0x92; - break; - - case 0x25a0: - byte_stream[ safe_byte_stream_index ] = 0x94; - break; - - default: - byte_stream[ safe_byte_stream_index ] = 0x1a; - break; - } - safe_byte_stream_index += 1; - + result = libuna_codepage_koi8_r_copy_to_byte_stream( + unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); break; case LIBUNA_CODEPAGE_KOI8_U: - if( unicode_character < 0x0080 ) - { - byte_stream[ safe_byte_stream_index ] = (uint8_t) unicode_character; - } - else if( ( unicode_character >= 0x0410 ) - && ( unicode_character < 0x0450 ) ) - { - unicode_character -= 0x0410; - - byte_stream[ safe_byte_stream_index ] = libuna_codepage_koi8_u_unicode_to_byte_stream_base_0x0410[ unicode_character ]; - } - else if( ( unicode_character >= 0x2550 ) - && ( unicode_character < 0x2570 ) ) - { - unicode_character -= 0x2550; - - byte_stream[ safe_byte_stream_index ] = libuna_codepage_koi8_u_unicode_to_byte_stream_base_0x2550[ unicode_character ]; - } - else switch( unicode_character ) - { - case 0x00a0: - byte_stream[ safe_byte_stream_index ] = 0x9a; - break; - - case 0x00a9: - byte_stream[ safe_byte_stream_index ] = 0xbf; - break; - - case 0x00b0: - byte_stream[ safe_byte_stream_index ] = 0x9c; - break; - - case 0x00b2: - byte_stream[ safe_byte_stream_index ] = 0x9d; - break; - - case 0x00b7: - byte_stream[ safe_byte_stream_index ] = 0x9e; - break; - - case 0x00f7: - byte_stream[ safe_byte_stream_index ] = 0x9f; - break; - - case 0x0401: - byte_stream[ safe_byte_stream_index ] = 0xb3; - break; - - case 0x0404: - byte_stream[ safe_byte_stream_index ] = 0xb4; - break; - - case 0x0406: - byte_stream[ safe_byte_stream_index ] = 0xb6; - break; - - case 0x0407: - byte_stream[ safe_byte_stream_index ] = 0xb7; - break; - - case 0x0451: - byte_stream[ safe_byte_stream_index ] = 0xa3; - break; - - case 0x0454: - byte_stream[ safe_byte_stream_index ] = 0xa4; - break; - - case 0x0456: - byte_stream[ safe_byte_stream_index ] = 0xa6; - break; - - case 0x0457: - byte_stream[ safe_byte_stream_index ] = 0xa7; - break; - - case 0x0490: - byte_stream[ safe_byte_stream_index ] = 0xbd; - break; - - case 0x0491: - byte_stream[ safe_byte_stream_index ] = 0xad; - break; - - case 0x2219: - byte_stream[ safe_byte_stream_index ] = 0x95; - break; - - case 0x221a: - byte_stream[ safe_byte_stream_index ] = 0x96; - break; - - case 0x2248: - byte_stream[ safe_byte_stream_index ] = 0x97; - break; - - case 0x2264: - byte_stream[ safe_byte_stream_index ] = 0x98; - break; - - case 0x2265: - byte_stream[ safe_byte_stream_index ] = 0x99; - break; - - case 0x2320: - byte_stream[ safe_byte_stream_index ] = 0x93; - break; - - case 0x2321: - byte_stream[ safe_byte_stream_index ] = 0x9b; - break; - - case 0x2500: - byte_stream[ safe_byte_stream_index ] = 0x80; - break; - - case 0x2502: - byte_stream[ safe_byte_stream_index ] = 0x81; - break; - - case 0x250c: - byte_stream[ safe_byte_stream_index ] = 0x82; - break; - - case 0x2510: - byte_stream[ safe_byte_stream_index ] = 0x83; - break; + result = libuna_codepage_koi8_u_copy_to_byte_stream( + unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); + break; - case 0x2514: - byte_stream[ safe_byte_stream_index ] = 0x84; - break; + case LIBUNA_CODEPAGE_MAC_ARABIC: + result = libuna_codepage_mac_arabic_copy_to_byte_stream( + unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); + break; - case 0x2518: - byte_stream[ safe_byte_stream_index ] = 0x85; - break; + case LIBUNA_CODEPAGE_MAC_CELTIC: + result = libuna_codepage_mac_celtic_copy_to_byte_stream( + unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); + break; - case 0x251c: - byte_stream[ safe_byte_stream_index ] = 0x86; - break; + case LIBUNA_CODEPAGE_MAC_CENTRALEURROMAN: + result = libuna_codepage_mac_centraleurroman_copy_to_byte_stream( + unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); + break; - case 0x2524: - byte_stream[ safe_byte_stream_index ] = 0x87; - break; + case LIBUNA_CODEPAGE_MAC_CROATIAN: + result = libuna_codepage_mac_croatian_copy_to_byte_stream( + unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); + break; - case 0x252c: - byte_stream[ safe_byte_stream_index ] = 0x88; - break; + case LIBUNA_CODEPAGE_MAC_CYRILLIC: + result = libuna_codepage_mac_cyrillic_copy_to_byte_stream( + unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); + break; - case 0x2534: - byte_stream[ safe_byte_stream_index ] = 0x89; - break; + case LIBUNA_CODEPAGE_MAC_DINGBATS: + result = libuna_codepage_mac_dingbats_copy_to_byte_stream( + unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); + break; - case 0x253c: - byte_stream[ safe_byte_stream_index ] = 0x8a; - break; + case LIBUNA_CODEPAGE_MAC_FARSI: + result = libuna_codepage_mac_farsi_copy_to_byte_stream( + unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); + break; - case 0x2580: - byte_stream[ safe_byte_stream_index ] = 0x8b; - break; + case LIBUNA_CODEPAGE_MAC_GAELIC: + result = libuna_codepage_mac_gaelic_copy_to_byte_stream( + unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); + break; - case 0x2584: - byte_stream[ safe_byte_stream_index ] = 0x8c; - break; + case LIBUNA_CODEPAGE_MAC_GREEK: + result = libuna_codepage_mac_greek_copy_to_byte_stream( + unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); + break; - case 0x2588: - byte_stream[ safe_byte_stream_index ] = 0x8d; - break; + case LIBUNA_CODEPAGE_MAC_ICELANDIC: + result = libuna_codepage_mac_icelandic_copy_to_byte_stream( + unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); + break; - case 0x258c: - byte_stream[ safe_byte_stream_index ] = 0x8e; - break; + case LIBUNA_CODEPAGE_MAC_INUIT: + result = libuna_codepage_mac_inuit_copy_to_byte_stream( + unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); + break; - case 0x2590: - byte_stream[ safe_byte_stream_index ] = 0x8f; - break; + case LIBUNA_CODEPAGE_MAC_ROMAN: + result = libuna_codepage_mac_roman_copy_to_byte_stream( + unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); + break; - case 0x2591: - byte_stream[ safe_byte_stream_index ] = 0x90; - break; + case LIBUNA_CODEPAGE_MAC_ROMANIAN: + result = libuna_codepage_mac_romanian_copy_to_byte_stream( + unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); + break; - case 0x2592: - byte_stream[ safe_byte_stream_index ] = 0x91; - break; + case LIBUNA_CODEPAGE_MAC_RUSSIAN: + result = libuna_codepage_mac_russian_copy_to_byte_stream( + unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); + break; - case 0x2593: - byte_stream[ safe_byte_stream_index ] = 0x92; - break; + case LIBUNA_CODEPAGE_MAC_SYMBOL: + result = libuna_codepage_mac_symbol_copy_to_byte_stream( + unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); + break; - case 0x25a0: - byte_stream[ safe_byte_stream_index ] = 0x94; - break; + case LIBUNA_CODEPAGE_MAC_THAI: + result = libuna_codepage_mac_thai_copy_to_byte_stream( + unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); + break; - default: - byte_stream[ safe_byte_stream_index ] = 0x1a; - break; - } - safe_byte_stream_index += 1; + case LIBUNA_CODEPAGE_MAC_TURKISH: + result = libuna_codepage_mac_turkish_copy_to_byte_stream( + unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); + break; + case LIBUNA_CODEPAGE_MAC_UKRAINIAN: + result = libuna_codepage_mac_ukrainian_copy_to_byte_stream( + unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); break; case LIBUNA_CODEPAGE_WINDOWS_874: - if( ( unicode_character < 0x0080 ) - || ( unicode_character == 0x00a0 ) ) - { - byte_stream[ safe_byte_stream_index ] = (uint8_t) unicode_character; - } - else if( ( unicode_character >= 0x0e00 ) - && ( unicode_character < 0x0e60 ) ) - { - unicode_character -= 0x0e00; - - byte_stream[ safe_byte_stream_index ] = libuna_codepage_windows_874_unicode_to_byte_stream_base_0x0e00[ unicode_character ]; - } - else if( ( unicode_character >= 0x2018 ) - && ( unicode_character < 0x2020 ) ) - { - unicode_character -= 0x2018; - - byte_stream[ safe_byte_stream_index ] = libuna_codepage_windows_874_unicode_to_byte_stream_base_0x2018[ unicode_character ]; - } - else switch( unicode_character ) - { - case 0x2013: - byte_stream[ safe_byte_stream_index ] = 0x96; - break; - - case 0x2014: - byte_stream[ safe_byte_stream_index ] = 0x97; - break; - - case 0x2022: - byte_stream[ safe_byte_stream_index ] = 0x95; - break; - - case 0x2026: - byte_stream[ safe_byte_stream_index ] = 0x85; - break; - - case 0x20ac: - byte_stream[ safe_byte_stream_index ] = 0x80; - break; - - default: - byte_stream[ safe_byte_stream_index ] = 0x1a; - break; - } - safe_byte_stream_index += 1; - + result = libuna_codepage_windows_874_copy_to_byte_stream( + unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); break; case LIBUNA_CODEPAGE_WINDOWS_932: @@ -2153,832 +2039,592 @@ break; case LIBUNA_CODEPAGE_WINDOWS_1250: - if( unicode_character < 0x0080 ) - { - byte_stream[ safe_byte_stream_index ] = (uint8_t) unicode_character; - } - else if( ( unicode_character >= 0x00a0 ) - && ( unicode_character < 0x0120 ) ) - { - unicode_character -= 0x00a0; - - byte_stream[ safe_byte_stream_index ] = libuna_codepage_windows_1250_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; - } - else if( ( unicode_character >= 0x0138 ) - && ( unicode_character < 0x0180 ) ) - { - unicode_character -= 0x0138; - - byte_stream[ safe_byte_stream_index ] = libuna_codepage_windows_1250_unicode_to_byte_stream_base_0x0138[ unicode_character ]; - } - else if( ( unicode_character >= 0x02d8 ) - && ( unicode_character < 0x02e0 ) ) - { - unicode_character -= 0x02d8; - - byte_stream[ safe_byte_stream_index ] = libuna_codepage_windows_1250_unicode_to_byte_stream_base_0x02d8[ unicode_character ]; - } - else if( ( unicode_character >= 0x2010 ) - && ( unicode_character < 0x2028 ) ) - { - unicode_character -= 0x2010; - - byte_stream[ safe_byte_stream_index ] = libuna_codepage_windows_1250_unicode_to_byte_stream_base_0x2010[ unicode_character ]; - } - else if( ( unicode_character >= 0x2030 ) - && ( unicode_character < 0x2040 ) ) - { - unicode_character -= 0x2030; - - byte_stream[ safe_byte_stream_index ] = libuna_codepage_windows_1250_unicode_to_byte_stream_base_0x2030[ unicode_character ]; - } - else switch( unicode_character ) - { - case 0x02c7: - byte_stream[ safe_byte_stream_index ] = 0xa1; - break; - - case 0x20ac: - byte_stream[ safe_byte_stream_index ] = 0x80; - break; - - case 0x2122: - byte_stream[ safe_byte_stream_index ] = 0x99; - break; - - default: - byte_stream[ safe_byte_stream_index ] = 0x1a; - break; - } - safe_byte_stream_index += 1; - + result = libuna_codepage_windows_1250_copy_to_byte_stream( + unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); break; case LIBUNA_CODEPAGE_WINDOWS_1251: - if( unicode_character < 0x0080 ) - { - byte_stream[ safe_byte_stream_index ] = (uint8_t) unicode_character; - } - else if( ( unicode_character >= 0x00a0 ) - && ( unicode_character < 0x00c0 ) ) - { - unicode_character -= 0x00a0; - - byte_stream[ safe_byte_stream_index ] = libuna_codepage_windows_1251_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; - } - else if( ( unicode_character >= 0x0400 ) - && ( unicode_character < 0x0460 ) ) - { - unicode_character -= 0x0400; - - byte_stream[ safe_byte_stream_index ] = libuna_codepage_windows_1251_unicode_to_byte_stream_base_0x0400[ unicode_character ]; - } - else if( ( unicode_character >= 0x2010 ) - && ( unicode_character < 0x2028 ) ) - { - unicode_character -= 0x2010; - - byte_stream[ safe_byte_stream_index ] = libuna_codepage_windows_1251_unicode_to_byte_stream_base_0x2010[ unicode_character ]; - } - else switch( unicode_character ) - { - case 0x0490: - byte_stream[ safe_byte_stream_index ] = 0xa5; - break; - - case 0x0491: - byte_stream[ safe_byte_stream_index ] = 0xb4; - break; - - case 0x2030: - byte_stream[ safe_byte_stream_index ] = 0x89; - break; - - case 0x2039: - byte_stream[ safe_byte_stream_index ] = 0x8b; - break; - - case 0x203a: - byte_stream[ safe_byte_stream_index ] = 0x9b; - break; - - case 0x20ac: - byte_stream[ safe_byte_stream_index ] = 0x88; - break; - - case 0x2116: - byte_stream[ safe_byte_stream_index ] = 0xb9; - break; - - case 0x2122: - byte_stream[ safe_byte_stream_index ] = 0x99; - break; - - default: - byte_stream[ safe_byte_stream_index ] = 0x1a; - break; - } - safe_byte_stream_index += 1; - + result = libuna_codepage_windows_1251_copy_to_byte_stream( + unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); break; case LIBUNA_CODEPAGE_WINDOWS_1252: - if( unicode_character < 0x0080 ) - { - byte_stream[ safe_byte_stream_index ] = (uint8_t) unicode_character; - } - else if( ( unicode_character >= 0x00a0 ) - && ( unicode_character < 0x0100 ) ) - { - byte_stream[ safe_byte_stream_index ] = (uint8_t) unicode_character; - } - else if( ( unicode_character >= 0x2010 ) - && ( unicode_character < 0x2028 ) ) - { - unicode_character -= 0x2010; - - byte_stream[ safe_byte_stream_index ] = libuna_codepage_windows_1252_unicode_to_byte_stream_base_0x2010[ unicode_character ]; - } - else switch( unicode_character ) - { - case 0x0152: - byte_stream[ safe_byte_stream_index ] = 0x8c; - break; - - case 0x0153: - byte_stream[ safe_byte_stream_index ] = 0x9c; - break; - - case 0x0160: - byte_stream[ safe_byte_stream_index ] = 0x8a; - break; - - case 0x0161: - byte_stream[ safe_byte_stream_index ] = 0x9a; - break; - - case 0x0178: - byte_stream[ safe_byte_stream_index ] = 0x9f; - break; - - case 0x017d: - byte_stream[ safe_byte_stream_index ] = 0x8e; - break; - - case 0x017e: - byte_stream[ safe_byte_stream_index ] = 0x9e; - break; - - case 0x0192: - byte_stream[ safe_byte_stream_index ] = 0x83; - break; - - case 0x02c6: - byte_stream[ safe_byte_stream_index ] = 0x88; - break; - - case 0x02dc: - byte_stream[ safe_byte_stream_index ] = 0x98; - break; - - case 0x2030: - byte_stream[ safe_byte_stream_index ] = 0x89; - break; - - case 0x2039: - byte_stream[ safe_byte_stream_index ] = 0x8b; - break; - - case 0x203a: - byte_stream[ safe_byte_stream_index ] = 0x9b; - break; - - case 0x20ac: - byte_stream[ safe_byte_stream_index ] = 0x80; - break; - - case 0x2122: - byte_stream[ safe_byte_stream_index ] = 0x99; - break; - - default: - byte_stream[ safe_byte_stream_index ] = 0x1a; - break; - } - safe_byte_stream_index += 1; - + result = libuna_codepage_windows_1252_copy_to_byte_stream( + unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); break; case LIBUNA_CODEPAGE_WINDOWS_1253: - if( unicode_character < 0x0080 ) - { - byte_stream[ safe_byte_stream_index ] = (uint8_t) unicode_character; - } - else if( ( unicode_character >= 0x00a0 ) - && ( unicode_character < 0x00c0 ) ) - { - unicode_character -= 0x00a0; - - byte_stream[ safe_byte_stream_index ] = libuna_codepage_windows_1253_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; - } - else if( ( unicode_character >= 0x0380 ) - && ( unicode_character < 0x03d0 ) ) - { - unicode_character -= 0x0380; - - byte_stream[ safe_byte_stream_index ] = libuna_codepage_windows_1253_unicode_to_byte_stream_base_0x0380[ unicode_character ]; - } - else if( ( unicode_character >= 0x2010 ) - && ( unicode_character < 0x2028 ) ) - { - unicode_character -= 0x2010; - - byte_stream[ safe_byte_stream_index ] = libuna_codepage_windows_1253_unicode_to_byte_stream_base_0x2010[ unicode_character ]; - } - else switch( unicode_character ) - { - case 0x0192: - byte_stream[ safe_byte_stream_index ] = 0x83; - break; - - case 0x2030: - byte_stream[ safe_byte_stream_index ] = 0x89; - break; - - case 0x2039: - byte_stream[ safe_byte_stream_index ] = 0x8b; - break; - - case 0x203a: - byte_stream[ safe_byte_stream_index ] = 0x9b; - break; - - case 0x20ac: - byte_stream[ safe_byte_stream_index ] = 0x80; - break; - - case 0x2122: - byte_stream[ safe_byte_stream_index ] = 0x99; - break; - - default: - byte_stream[ safe_byte_stream_index ] = 0x1a; - break; - } - safe_byte_stream_index += 1; - + result = libuna_codepage_windows_1253_copy_to_byte_stream( + unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); break; case LIBUNA_CODEPAGE_WINDOWS_1254: - if( unicode_character < 0x0080 ) - { - byte_stream[ safe_byte_stream_index ] = (uint8_t) unicode_character; - } - else if( ( unicode_character >= 0x00a0 ) - && ( unicode_character < 0x00d0 ) ) - { - byte_stream[ safe_byte_stream_index ] = (uint8_t) unicode_character; - } - else if( ( unicode_character >= 0x00d0 ) - && ( unicode_character < 0x0100 ) ) - { - unicode_character -= 0x00d0; - - byte_stream[ safe_byte_stream_index ] = libuna_codepage_windows_1254_unicode_to_byte_stream_base_0x00d0[ unicode_character ]; - } - else if( ( unicode_character >= 0x2010 ) - && ( unicode_character < 0x2028 ) ) - { - unicode_character -= 0x2010; - - byte_stream[ safe_byte_stream_index ] = libuna_codepage_windows_1254_unicode_to_byte_stream_base_0x2010[ unicode_character ]; - } - else switch( unicode_character ) - { - case 0x011e: - byte_stream[ safe_byte_stream_index ] = 0xd0; - break; - - case 0x011f: - byte_stream[ safe_byte_stream_index ] = 0xf0; - break; - - case 0x0130: - byte_stream[ safe_byte_stream_index ] = 0xdd; - break; - - case 0x0131: - byte_stream[ safe_byte_stream_index ] = 0xfd; - break; - - case 0x0152: - byte_stream[ safe_byte_stream_index ] = 0x8c; - break; - - case 0x0153: - byte_stream[ safe_byte_stream_index ] = 0x9c; - break; - - case 0x015e: - byte_stream[ safe_byte_stream_index ] = 0xde; - break; - - case 0x015f: - byte_stream[ safe_byte_stream_index ] = 0xfe; - break; - - case 0x0160: - byte_stream[ safe_byte_stream_index ] = 0x8a; - break; - - case 0x0161: - byte_stream[ safe_byte_stream_index ] = 0x9a; - break; - - case 0x0178: - byte_stream[ safe_byte_stream_index ] = 0x9f; - break; - - case 0x0192: - byte_stream[ safe_byte_stream_index ] = 0x83; - break; - - case 0x02c6: - byte_stream[ safe_byte_stream_index ] = 0x88; - break; - - case 0x02dc: - byte_stream[ safe_byte_stream_index ] = 0x98; - break; - - case 0x2030: - byte_stream[ safe_byte_stream_index ] = 0x89; - break; - - case 0x2039: - byte_stream[ safe_byte_stream_index ] = 0x8b; - break; - - case 0x203a: - byte_stream[ safe_byte_stream_index ] = 0x9b; - break; - - case 0x20ac: - byte_stream[ safe_byte_stream_index ] = 0x80; - break; - - case 0x2122: - byte_stream[ safe_byte_stream_index ] = 0x99; - break; - - default: - byte_stream[ safe_byte_stream_index ] = 0x1a; - break; - } - safe_byte_stream_index += 1; - + result = libuna_codepage_windows_1254_copy_to_byte_stream( + unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); break; case LIBUNA_CODEPAGE_WINDOWS_1255: - if( unicode_character < 0x0080 ) - { - byte_stream[ safe_byte_stream_index ] = (uint8_t) unicode_character; - } - else if( ( unicode_character >= 0x00a0 ) - && ( unicode_character < 0x00c0 ) ) - { - unicode_character -= 0x00a0; - - byte_stream[ safe_byte_stream_index ] = libuna_codepage_windows_1255_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; - } - else if( ( unicode_character >= 0x05b0 ) - && ( unicode_character < 0x05c8 ) ) - { - unicode_character -= 0x05b0; - - byte_stream[ safe_byte_stream_index ] = libuna_codepage_windows_1255_unicode_to_byte_stream_base_0x05b0[ unicode_character ]; - } - else if( ( unicode_character >= 0x05d0 ) - && ( unicode_character < 0x05f8 ) ) - { - unicode_character -= 0x05d0; - - byte_stream[ safe_byte_stream_index ] = libuna_codepage_windows_1255_unicode_to_byte_stream_base_0x05d0[ unicode_character ]; - } - else if( ( unicode_character >= 0x2010 ) - && ( unicode_character < 0x2028 ) ) - { - unicode_character -= 0x2010; - - byte_stream[ safe_byte_stream_index ] = libuna_codepage_windows_1255_unicode_to_byte_stream_base_0x2010[ unicode_character ]; - } - else switch( unicode_character ) - { - case 0x00d7: - byte_stream[ safe_byte_stream_index ] = 0xaa; - break; - - case 0x00f7: - byte_stream[ safe_byte_stream_index ] = 0xba; - break; - - case 0x0192: - byte_stream[ safe_byte_stream_index ] = 0x83; - break; - - case 0x02c6: - byte_stream[ safe_byte_stream_index ] = 0x88; - break; - - case 0x02dc: - byte_stream[ safe_byte_stream_index ] = 0x98; - break; - - case 0x200e: - byte_stream[ safe_byte_stream_index ] = 0xfd; - break; - - case 0x200f: - byte_stream[ safe_byte_stream_index ] = 0xfe; - break; - - case 0x2030: - byte_stream[ safe_byte_stream_index ] = 0x89; - break; - - case 0x2039: - byte_stream[ safe_byte_stream_index ] = 0x8b; - break; - - case 0x203a: - byte_stream[ safe_byte_stream_index ] = 0x9b; - break; - - case 0x20aa: - byte_stream[ safe_byte_stream_index ] = 0xa4; - break; - - case 0x20ac: - byte_stream[ safe_byte_stream_index ] = 0x80; - break; - - case 0x2122: - byte_stream[ safe_byte_stream_index ] = 0x99; - break; - - default: - byte_stream[ safe_byte_stream_index ] = 0x1a; - break; - } - safe_byte_stream_index += 1; - + result = libuna_codepage_windows_1255_copy_to_byte_stream( + unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); break; case LIBUNA_CODEPAGE_WINDOWS_1256: - if( unicode_character < 0x0080 ) - { - byte_stream[ safe_byte_stream_index ] = (uint8_t) unicode_character; - } - else if( ( unicode_character >= 0x00a0 ) - && ( unicode_character < 0x00c0 ) ) - { - unicode_character -= 0x00a0; - - byte_stream[ safe_byte_stream_index ] = libuna_codepage_windows_1256_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; - } - else if( ( unicode_character >= 0x00e0 ) - && ( unicode_character < 0x0100 ) ) - { - unicode_character -= 0x00e0; - - byte_stream[ safe_byte_stream_index ] = libuna_codepage_windows_1256_unicode_to_byte_stream_base_0x00e0[ unicode_character ]; - } - else if( ( unicode_character >= 0x0618 ) - && ( unicode_character < 0x0658 ) ) - { - unicode_character -= 0x0618; - - byte_stream[ safe_byte_stream_index ] = libuna_codepage_windows_1256_unicode_to_byte_stream_base_0x0618[ unicode_character ]; - } - else if( ( unicode_character >= 0x2008 ) - && ( unicode_character < 0x2028 ) ) - { - unicode_character -= 0x2008; - - byte_stream[ safe_byte_stream_index ] = libuna_codepage_windows_1256_unicode_to_byte_stream_base_0x2008[ unicode_character ]; - } - else switch( unicode_character ) - { - case 0x00d7: - byte_stream[ safe_byte_stream_index ] = 0xd7; - break; - - case 0x0152: - byte_stream[ safe_byte_stream_index ] = 0x8c; - break; - - case 0x0153: - byte_stream[ safe_byte_stream_index ] = 0x9c; - break; - - case 0x0192: - byte_stream[ safe_byte_stream_index ] = 0x83; - break; - - case 0x02c6: - byte_stream[ safe_byte_stream_index ] = 0x88; - break; - - case 0x060c: - byte_stream[ safe_byte_stream_index ] = 0xa1; - break; - - case 0x0679: - byte_stream[ safe_byte_stream_index ] = 0x8a; - break; - - case 0x067e: - byte_stream[ safe_byte_stream_index ] = 0x81; - break; + result = libuna_codepage_windows_1256_copy_to_byte_stream( + unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); + break; - case 0x0686: - byte_stream[ safe_byte_stream_index ] = 0x8d; - break; + case LIBUNA_CODEPAGE_WINDOWS_1257: + result = libuna_codepage_windows_1257_copy_to_byte_stream( + unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); + break; - case 0x0688: - byte_stream[ safe_byte_stream_index ] = 0x8f; - break; + case LIBUNA_CODEPAGE_WINDOWS_1258: + result = libuna_codepage_windows_1258_copy_to_byte_stream( + unicode_character, + byte_stream, + byte_stream_size, + &safe_byte_stream_index, + error ); + break; - case 0x0691: - byte_stream[ safe_byte_stream_index ] = 0x9a; - break; + default: + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, + "%s: unsupported codepage: %d.", + function, + codepage ); - case 0x0698: - byte_stream[ safe_byte_stream_index ] = 0x8e; - break; + return( -1 ); + } + if( result == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_COPY_FAILED, + "%s: unable to copy Unicode character to byte stream.", + function ); - case 0x06a9: - byte_stream[ safe_byte_stream_index ] = 0x98; - break; + return( -1 ); + } + *byte_stream_index = safe_byte_stream_index; - case 0x06af: - byte_stream[ safe_byte_stream_index ] = 0x90; - break; + return( result ); +} - case 0x06ba: - byte_stream[ safe_byte_stream_index ] = 0x9f; - break; +/* Determines the size of an UCS-2 character from an Unicode character + * Adds the size to the UCS-2 character size value + * Returns 1 if successful or -1 on error + */ +int libuna_unicode_character_size_to_ucs2( + libuna_unicode_character_t unicode_character, + size_t *ucs2_character_size, + libcerror_error_t **error ) +{ + static char *function = "libuna_unicode_character_size_to_ucs2"; - case 0x06be: - byte_stream[ safe_byte_stream_index ] = 0xaa; - break; + if( ucs2_character_size == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid UCS-2 character size.", + function ); - case 0x06c1: - byte_stream[ safe_byte_stream_index ] = 0xc0; - break; + return( -1 ); + } + /* Determine if the Unicode character is valid + * UCS-2 with surrogate pairs supports upto 0x10ffff characters + */ + if( unicode_character > LIBUNA_UNICODE_CHARACTER_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, + "%s: unsupported Unicode character.", + function ); - case 0x06d2: - byte_stream[ safe_byte_stream_index ] = 0xff; - break; + return( -1 ); + } + if( unicode_character > LIBUNA_UNICODE_BASIC_MULTILINGUAL_PLANE_MAX ) + { + *ucs2_character_size += 2; + } + else + { + *ucs2_character_size += 1; + } + return( 1 ); +} - case 0x2030: - byte_stream[ safe_byte_stream_index ] = 0x89; - break; +/* Copies an Unicode character from an UCS-2 string + * Returns 1 if successful or -1 on error + */ +int libuna_unicode_character_copy_from_ucs2( + libuna_unicode_character_t *unicode_character, + const libuna_utf16_character_t *ucs2_string, + size_t ucs2_string_size, + size_t *ucs2_string_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_unicode_character_copy_from_ucs2"; + libuna_utf16_character_t ucs2_surrogate = 0; + libuna_unicode_character_t safe_unicode_character = 0; + size_t safe_ucs2_string_index = 0; - case 0x2039: - byte_stream[ safe_byte_stream_index ] = 0x8b; - break; + if( unicode_character == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid Unicode character.", + function ); - case 0x203a: - byte_stream[ safe_byte_stream_index ] = 0x9b; - break; + return( -1 ); + } + if( ucs2_string == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid UCS-2 string.", + function ); - case 0x20ac: - byte_stream[ safe_byte_stream_index ] = 0x80; - break; + return( -1 ); + } + if( ucs2_string_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid UCS-2 string size value exceeds maximum.", + function ); - case 0x2122: - byte_stream[ safe_byte_stream_index ] = 0x99; - break; + return( -1 ); + } + if( ucs2_string_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid UCS-2 string index.", + function ); - default: - byte_stream[ safe_byte_stream_index ] = 0x1a; - break; - } - safe_byte_stream_index += 1; + return( -1 ); + } + safe_ucs2_string_index = *ucs2_string_index; - break; + if( safe_ucs2_string_index >= ucs2_string_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: UCS-2 string too small.", + function ); - case LIBUNA_CODEPAGE_WINDOWS_1257: - if( unicode_character < 0x0080 ) - { - byte_stream[ safe_byte_stream_index ] = (uint8_t) unicode_character; - } - else if( ( unicode_character >= 0x00a0 ) - && ( unicode_character < 0x0180 ) ) - { - unicode_character -= 0x00a0; + return( -1 ); + } + safe_unicode_character = ucs2_string[ safe_ucs2_string_index ]; + safe_ucs2_string_index += 1; - byte_stream[ safe_byte_stream_index ] = libuna_codepage_windows_1257_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; - } - else if( ( unicode_character >= 0x2010 ) - && ( unicode_character < 0x2028 ) ) - { - unicode_character -= 0x2010; + /* Determine if the UCS-2 character is within the high surrogate range + */ + if( ( safe_unicode_character >= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ) + && ( safe_unicode_character <= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_END ) ) + { + if( safe_ucs2_string_index >= ucs2_string_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, + "%s: missing surrogate UCS-2 character bytes.", + function ); - byte_stream[ safe_byte_stream_index ] = libuna_codepage_windows_1257_unicode_to_byte_stream_base_0x2010[ unicode_character ]; - } - else switch( unicode_character ) - { - case 0x02c7: - byte_stream[ safe_byte_stream_index ] = 0x8e; - break; + return( -1 ); + } + ucs2_surrogate = ucs2_string[ safe_ucs2_string_index ]; - case 0x02d9: - byte_stream[ safe_byte_stream_index ] = 0xff; - break; + /* Determine if the UCS-2 character is within the low surrogate range + */ + if( ( ucs2_surrogate >= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_START ) + && ( ucs2_surrogate <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) + { + safe_unicode_character -= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START; + safe_unicode_character <<= 10; + safe_unicode_character += ucs2_surrogate - LIBUNA_UNICODE_SURROGATE_LOW_RANGE_START; + safe_unicode_character += 0x010000; - case 0x02db: - byte_stream[ safe_byte_stream_index ] = 0x9e; - break; + safe_ucs2_string_index += 1; + } + } + /* Determine if the Unicode character is valid + * UCS-2 with surrogate pairs supports upto 0x10ffff characters + */ + if( safe_unicode_character > LIBUNA_UNICODE_CHARACTER_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, + "%s: unsupported Unicode character.", + function ); - case 0x2030: - byte_stream[ safe_byte_stream_index ] = 0x89; - break; + return( -1 ); + } + *unicode_character = safe_unicode_character; + *ucs2_string_index = safe_ucs2_string_index; - case 0x2039: - byte_stream[ safe_byte_stream_index ] = 0x8b; - break; + return( 1 ); +} - case 0x203a: - byte_stream[ safe_byte_stream_index ] = 0x9b; - break; +/* Copies an Unicode character into a UCS-2 string + * Returns 1 if successful or -1 on error + */ +int libuna_unicode_character_copy_to_ucs2( + libuna_unicode_character_t unicode_character, + libuna_utf16_character_t *ucs2_string, + size_t ucs2_string_size, + size_t *ucs2_string_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_unicode_character_copy_to_ucs2"; + size_t safe_ucs2_string_index = 0; - case 0x20ac: - byte_stream[ safe_byte_stream_index ] = 0x80; - break; + if( ucs2_string == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid UCS-2 string.", + function ); - case 0x2122: - byte_stream[ safe_byte_stream_index ] = 0x99; - break; + return( -1 ); + } + if( ucs2_string_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid UCS-2 string size value exceeds maximum.", + function ); - default: - byte_stream[ safe_byte_stream_index ] = 0x1a; - break; - } - safe_byte_stream_index += 1; + return( -1 ); + } + if( ucs2_string_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid UCS-2 string index.", + function ); - break; + return( -1 ); + } + safe_ucs2_string_index = *ucs2_string_index; - case LIBUNA_CODEPAGE_WINDOWS_1258: - if( unicode_character < 0x0080 ) - { - byte_stream[ safe_byte_stream_index ] = (uint8_t) unicode_character; - } - else if( ( unicode_character >= 0x00a0 ) - && ( unicode_character < 0x00c0 ) ) - { - byte_stream[ safe_byte_stream_index ] = (uint8_t) unicode_character; - } - else if( ( unicode_character >= 0x00c0 ) - && ( unicode_character < 0x0108 ) ) - { - unicode_character -= 0x00c0; + if( safe_ucs2_string_index >= ucs2_string_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: UCS-2 string too small.", + function ); - byte_stream[ safe_byte_stream_index ] = libuna_codepage_windows_1258_unicode_to_byte_stream_base_0x00c0[ unicode_character ]; - } - else if( ( unicode_character >= 0x2010 ) - && ( unicode_character < 0x2028 ) ) - { - unicode_character -= 0x2010; + return( -1 ); + } + /* Determine if the Unicode character is valid + */ + if( unicode_character > LIBUNA_UCS_CHARACTER_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, + "%s: unsupported Unicode character.", + function ); - byte_stream[ safe_byte_stream_index ] = libuna_codepage_windows_1258_unicode_to_byte_stream_base_0x2010[ unicode_character ]; - } - else switch( unicode_character ) - { - case 0x0110: - byte_stream[ safe_byte_stream_index ] = 0xd0; - break; + return( -1 ); + } + if( unicode_character <= LIBUNA_UNICODE_BASIC_MULTILINGUAL_PLANE_MAX ) + { + ucs2_string[ safe_ucs2_string_index++ ] = (libuna_utf16_character_t) unicode_character; + } + else + { + if( ( ucs2_string_size < 2 ) + || ( safe_ucs2_string_index > ( ucs2_string_size - 2 ) ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: UCS-2 string too small.", + function ); - case 0x0111: - byte_stream[ safe_byte_stream_index ] = 0xf0; - break; + return( -1 ); + } + unicode_character -= 0x010000; + ucs2_string[ safe_ucs2_string_index++ ] = (libuna_utf16_character_t) ( ( unicode_character >> 10 ) + LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ); + ucs2_string[ safe_ucs2_string_index++ ] = (libuna_utf16_character_t) ( ( unicode_character & 0x03ff ) + LIBUNA_UNICODE_SURROGATE_LOW_RANGE_START ); + } + *ucs2_string_index = safe_ucs2_string_index; - case 0x0152: - byte_stream[ safe_byte_stream_index ] = 0x8c; - break; + return( 1 ); +} - case 0x0153: - byte_stream[ safe_byte_stream_index ] = 0x9c; - break; +/* Determines the size of an UCS-4 character from an Unicode character + * Adds the size to the UCS-4 character size value + * Returns 1 if successful or -1 on error + */ +int libuna_unicode_character_size_to_ucs4( + libuna_unicode_character_t unicode_character, + size_t *ucs4_character_size, + libcerror_error_t **error ) +{ + static char *function = "libuna_unicode_character_size_to_ucs4"; - case 0x0178: - byte_stream[ safe_byte_stream_index ] = 0x9f; - break; + LIBUNA_UNREFERENCED_PARAMETER( unicode_character ) - case 0x0192: - byte_stream[ safe_byte_stream_index ] = 0x83; - break; + if( ucs4_character_size == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid UCS-4 character size.", + function ); - case 0x01a0: - byte_stream[ safe_byte_stream_index ] = 0xd5; - break; + return( -1 ); + } + if( unicode_character > LIBUNA_UCS_CHARACTER_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, + "%s: unsupported Unicode character.", + function ); - case 0x01a1: - byte_stream[ safe_byte_stream_index ] = 0xf5; - break; + return( -1 ); + } + *ucs4_character_size += 1; - case 0x01af: - byte_stream[ safe_byte_stream_index ] = 0xdd; - break; + return( 1 ); +} - case 0x01b0: - byte_stream[ safe_byte_stream_index ] = 0xfd; - break; +/* Copies an Unicode character from an UCS-4 string + * Returns 1 if successful or -1 on error + */ +int libuna_unicode_character_copy_from_ucs4( + libuna_unicode_character_t *unicode_character, + const libuna_utf32_character_t *ucs4_string, + size_t ucs4_string_size, + size_t *ucs4_string_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_unicode_character_copy_from_ucs4"; + libuna_unicode_character_t safe_unicode_character = 0; + size_t safe_ucs4_string_index = 0; - case 0x02c6: - byte_stream[ safe_byte_stream_index ] = 0x88; - break; + if( unicode_character == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid Unicode character.", + function ); - case 0x02dc: - byte_stream[ safe_byte_stream_index ] = 0x98; - break; + return( -1 ); + } + if( ucs4_string == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid UCS-4 string.", + function ); - case 0x0300: - byte_stream[ safe_byte_stream_index ] = 0xcc; - break; + return( -1 ); + } + if( ucs4_string_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid UCS-4 string size value exceeds maximum.", + function ); - case 0x0301: - byte_stream[ safe_byte_stream_index ] = 0xec; - break; + return( -1 ); + } + if( ucs4_string_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid UCS-4 string index.", + function ); - case 0x0303: - byte_stream[ safe_byte_stream_index ] = 0xde; - break; + return( -1 ); + } + safe_ucs4_string_index = *ucs4_string_index; - case 0x0309: - byte_stream[ safe_byte_stream_index ] = 0xd2; - break; + if( safe_ucs4_string_index >= ucs4_string_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: UCS-4 string too small.", + function ); - case 0x0323: - byte_stream[ safe_byte_stream_index ] = 0xf2; - break; + return( -1 ); + } + safe_unicode_character = ucs4_string[ safe_ucs4_string_index ]; - case 0x2030: - byte_stream[ safe_byte_stream_index ] = 0x89; - break; + /* Determine if the Unicode character is valid + */ + if( safe_unicode_character > LIBUNA_UNICODE_CHARACTER_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, + "%s: unsupported Unicode character.", + function ); - case 0x2039: - byte_stream[ safe_byte_stream_index ] = 0x8b; - break; + return( -1 ); + } + *unicode_character = safe_unicode_character; + *ucs4_string_index = safe_ucs4_string_index + 1; - case 0x203a: - byte_stream[ safe_byte_stream_index ] = 0x9b; - break; + return( 1 ); +} - case 0x20ab: - byte_stream[ safe_byte_stream_index ] = 0xfe; - break; +/* Copies an Unicode character into a UCS-4 string + * Returns 1 if successful or -1 on error + */ +int libuna_unicode_character_copy_to_ucs4( + libuna_unicode_character_t unicode_character, + libuna_utf32_character_t *ucs4_string, + size_t ucs4_string_size, + size_t *ucs4_string_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_unicode_character_copy_to_ucs4"; + size_t safe_ucs4_string_index = 0; - case 0x20ac: - byte_stream[ safe_byte_stream_index ] = 0x80; - break; + if( ucs4_string == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid UCS-4 string.", + function ); - case 0x2122: - byte_stream[ safe_byte_stream_index ] = 0x99; - break; + return( -1 ); + } + if( ucs4_string_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid UCS-4 string size value exceeds maximum.", + function ); - default: - byte_stream[ safe_byte_stream_index ] = 0x1a; - break; - } - safe_byte_stream_index += 1; + return( -1 ); + } + if( ucs4_string_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid UCS-4 string index.", + function ); - break; + return( -1 ); + } + safe_ucs4_string_index = *ucs4_string_index; - default: - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, - "%s: unsupported codepage: %d.", - function, - codepage ); + if( safe_ucs4_string_index >= ucs4_string_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: UCS-4 string too small.", + function ); - return( -1 ); + return( -1 ); } - if( result != 1 ) + /* Determine if the Unicode character is valid + */ + if( unicode_character > LIBUNA_UCS_CHARACTER_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_COPY_FAILED, - "%s: unable to copy Unicode character to byte stream.", + LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, + "%s: unsupported Unicode character.", function ); return( -1 ); } - *byte_stream_index = safe_byte_stream_index; + ucs4_string[ safe_ucs4_string_index ] = (libuna_utf32_character_t) unicode_character; + + *ucs4_string_index = safe_ucs4_string_index + 1; return( 1 ); } @@ -3030,9 +2676,18 @@ /* Determine if the Unicode character is valid */ - if( unicode_character > LIBUNA_UNICODE_CHARACTER_MAX ) + if( ( ( unicode_character >= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ) + && ( unicode_character <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) + || ( unicode_character > LIBUNA_UNICODE_CHARACTER_MAX ) ) { - unicode_character = LIBUNA_UNICODE_REPLACEMENT_CHARACTER; + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, + "%s: unsupported Unicode character.", + function ); + + return( -1 ); } /* The + character must be escaped */ @@ -3556,7 +3211,14 @@ } else { - safe_unicode_character = LIBUNA_UNICODE_REPLACEMENT_CHARACTER; + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, + "%s: unsupported low surrogate UTF-16 character.", + function ); + + return( -1 ); } } if( safe_utf7_stream_index >= utf7_stream_size ) @@ -3670,9 +3332,18 @@ /* Determine if the Unicode character is valid */ - if( unicode_character > LIBUNA_UNICODE_CHARACTER_MAX ) + if( ( ( unicode_character >= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ) + && ( unicode_character <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) + || ( unicode_character > LIBUNA_UNICODE_CHARACTER_MAX ) ) { - unicode_character = LIBUNA_UNICODE_REPLACEMENT_CHARACTER; + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, + "%s: unsupported Unicode character.", + function ); + + return( -1 ); } /* A-Z is not a continous range on an EBCDIC based system * it consists of the ranges: A-I, J-R, S-Z @@ -3984,6 +3655,7 @@ } /* Determines the size of an UTF-8 character from an Unicode character + * This function supports upto U+10FFFF (4 byte UTF-8 characters) * Adds the size to the UTF-8 character size value * Returns 1 if successful or -1 on error */ @@ -4006,6 +3678,24 @@ return( -1 ); } + /* Determine if the Unicode character is valid + */ + if( ( ( unicode_character >= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ) + && ( unicode_character <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) + || ( unicode_character > LIBUNA_UNICODE_CHARACTER_MAX ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, + "%s: unsupported Unicode character.", + function ); + + return( -1 ); + } + /* RFC 3629 limits the UTF-8 character to consist of a maximum of 4 bytes + * while its predecessor RFC 2279 allowed up to 6 bytes + */ if( unicode_character < 0x00000080UL ) { safe_utf8_character_size += 1; @@ -4018,45 +3708,17 @@ { safe_utf8_character_size += 3; } - else if( unicode_character > LIBUNA_UNICODE_CHARACTER_MAX ) - { - safe_utf8_character_size += 3; - } else { safe_utf8_character_size += 4; } - -/* If UTF-8 USC support is needed it should be implemented in - * utf8_usc or something, but for now leave this here as a reminder - - else if( unicode_character < 0x010000 ) - { - safe_utf8_character_size += 3; - } - else if( unicode_character > LIBUNA_UNICODE_CHARACTER_MAX ) - { - safe_utf8_character_size += 2; - } - else if( unicode_character < 0x0200000 ) - { - safe_utf8_character_size += 4; - } - else if( unicode_character < 0x0400000 ) - { - safe_utf8_character_size += 5; - } - else - { - safe_utf8_character_size += 6; - } -*/ *utf8_character_size += safe_utf8_character_size; return( 1 ); } /* Copies an Unicode character from an UTF-8 string + * This function supports upto U+10FFFF (4 byte UTF-8 characters) * Returns 1 if successful or -1 on error */ int libuna_unicode_character_copy_from_utf8( @@ -4073,8 +3735,8 @@ uint8_t byte_value2 = 0; uint8_t byte_value3 = 0; uint8_t byte_value4 = 0; - uint8_t byte_value5 = 0; uint8_t utf8_character_additional_bytes = 0; + int result = 0; if( unicode_character == NULL ) { @@ -4137,6 +3799,22 @@ */ byte_value1 = utf8_string[ safe_utf8_string_index ]; + /* Determine the UTF-8 character and make sure it is valid + * RFC 3629 limits the UTF-8 character to consist of a maximum of 4 bytes + * while its predecessor RFC 2279 allowed up to 6 bytes + */ + if( byte_value1 > 0xf4 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, + "%s: invalid 1st UTF-8 character byte: 0x%02" PRIx8 ".", + function, + byte_value1 ); + + return( -1 ); + } if( byte_value1 < 0xc0 ) { utf8_character_additional_bytes = 0; @@ -4149,17 +3827,9 @@ { utf8_character_additional_bytes = 2; } - else if( byte_value1 < 0xf8 ) - { - utf8_character_additional_bytes = 3; - } - else if( byte_value1 < 0xfc ) - { - utf8_character_additional_bytes = 4; - } else { - utf8_character_additional_bytes = 5; + utf8_character_additional_bytes = 3; } if( ( ( (size_t) utf8_character_additional_bytes + 1 ) > utf8_string_size ) || ( safe_utf8_string_index > ( utf8_string_size - ( utf8_character_additional_bytes + 1 ) ) ) ) @@ -4173,28 +3843,11 @@ return( -1 ); } - /* Determine the UTF-8 character and make sure it is valid - * Unicode limits the UTF-8 character to consist of a maximum of 4 bytes - * while ISO 10646 Universal Character Set (UCS) allows up to 6 bytes - */ - if( byte_value1 > 0xf4 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, - "%s: invalid 1st UTF-8 character byte: 0x%02" PRIx8 ".", - function, - byte_value1 ); - - return( -1 ); - } safe_unicode_character = byte_value1; if( utf8_character_additional_bytes == 0 ) { - if( ( byte_value1 >= 0x80 ) - && ( byte_value1 < 0xc2 ) ) + if( byte_value1 >= 0x80 ) { libcerror_error_set( error, @@ -4211,7 +3864,8 @@ { byte_value2 = utf8_string[ safe_utf8_string_index + 1 ]; - if( byte_value2 > 0xbf ) + if( ( byte_value2 < 0x80 ) + || ( byte_value2 > 0xbf ) ) { libcerror_error_set( error, @@ -4223,59 +3877,531 @@ return( -1 ); } - if( ( byte_value1 == 0xe0 ) - && ( byte_value2 < 0xa0 ) ) + result = 1; + + switch( byte_value1 ) + { + case 0xe0: + if( ( byte_value2 < 0xa0 ) + || ( byte_value2 > 0xbf ) ) + { + result = 0; + } + break; + + case 0xed: + if( ( byte_value2 < 0x80 ) + || ( byte_value2 > 0x9f ) ) + { + result = 0; + } + break; + + case 0xf0: + if( ( byte_value2 < 0x90 ) + || ( byte_value2 > 0xbf ) ) + { + result = 0; + } + break; + + case 0xf4: + if( ( byte_value2 < 0x80 ) + || ( byte_value2 > 0xbf ) ) + { + result = 0; + } + break; + + default: + break; + } + if( result == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, - "%s: invalid 2nd UTF-8 character byte: 0x%02" PRIx8 ".", + "%s: invalid 1st and 2nd UTF-8 character byte pair: 0x%02" PRIx8 " 0x%02" PRIx8 ".", function, + byte_value1, byte_value2 ); return( -1 ); } - else if( ( byte_value1 == 0xed ) - && ( byte_value2 > 0x9f ) ) + safe_unicode_character <<= 6; + safe_unicode_character += byte_value2; + + if( utf8_character_additional_bytes == 1 ) + { + safe_unicode_character -= 0x03080; + } + } + if( utf8_character_additional_bytes >= 2 ) + { + byte_value3 = utf8_string[ safe_utf8_string_index + 2 ]; + + if( ( byte_value3 < 0x80 ) + || ( byte_value3 > 0xbf ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, - "%s: invalid 2nd UTF-8 character byte: 0x%02" PRIx8 ".", + "%s: invalid 3rd UTF-8 character byte: 0x%02" PRIx8 ".", function, - byte_value2 ); + byte_value3 ); return( -1 ); } - else if( ( byte_value1 == 0xf0 ) - && ( byte_value2 < 0x90 ) ) + result = 1; + + switch( byte_value2 ) + { + case 0xe0: + if( ( byte_value2 < 0xa0 ) + || ( byte_value2 > 0xbf ) ) + { + result = 0; + } + break; + + case 0xed: + if( ( byte_value2 < 0x80 ) + || ( byte_value2 > 0x9f ) ) + { + result = 0; + } + break; + + default: + break; + } + if( result == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, - "%s: invalid 2nd UTF-8 character byte: 0x%02" PRIx8 ".", + "%s: invalid 2nd and 3rd UTF-8 character byte pair: 0x%02" PRIx8 " 0x%02" PRIx8 ".", function, - byte_value2 ); + byte_value2, + byte_value3 ); return( -1 ); } - else if( ( byte_value1 == 0xf4 ) - && ( byte_value2 > 0x8f ) ) + safe_unicode_character <<= 6; + safe_unicode_character += byte_value3; + + if( utf8_character_additional_bytes == 2 ) + { + safe_unicode_character -= 0x0e2080; + } + } + if( utf8_character_additional_bytes >= 3 ) + { + byte_value4 = utf8_string[ safe_utf8_string_index + 3 ]; + + if( ( byte_value4 < 0x80 ) + || ( byte_value4 > 0xbf ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, - "%s: invalid 2nd UTF-8 character byte: 0x%02" PRIx8 ".", + "%s: invalid 4th UTF-8 character byte: 0x%02" PRIx8 ".", function, - byte_value2 ); + byte_value4 ); return( -1 ); } - else if( byte_value2 < 0x80 ) + safe_unicode_character <<= 6; + safe_unicode_character += byte_value4; + + if( utf8_character_additional_bytes == 3 ) + { + safe_unicode_character -= 0x03c82080; + } + } + /* Determine if the Unicode character is valid + */ + if( ( ( safe_unicode_character >= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ) + && ( safe_unicode_character <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) + || ( safe_unicode_character > LIBUNA_UNICODE_CHARACTER_MAX ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, + "%s: unsupported Unicode character.", + function ); + + return( -1 ); + } + *unicode_character = safe_unicode_character; + *utf8_string_index = safe_utf8_string_index + 1 + utf8_character_additional_bytes; + + return( 1 ); +} + +/* Copies an Unicode character into a UTF-8 string + * This function supports upto U+10FFFF (4 byte UTF-8 characters) + * Returns 1 if successful or -1 on error + */ +int libuna_unicode_character_copy_to_utf8( + libuna_unicode_character_t unicode_character, + libuna_utf8_character_t *utf8_string, + size_t utf8_string_size, + size_t *utf8_string_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_unicode_character_copy_to_utf8"; + size_t safe_utf8_string_index = 0; + size_t utf8_character_iterator = 0; + uint8_t utf8_character_additional_bytes = 0; + uint8_t utf8_first_character_mark = 0; + + if( utf8_string == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid UTF-8 string.", + function ); + + return( -1 ); + } + if( utf8_string_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid UTF-8 string size value exceeds maximum.", + function ); + + return( -1 ); + } + if( utf8_string_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid UTF-8 string index.", + function ); + + return( -1 ); + } + safe_utf8_string_index = *utf8_string_index; + + if( safe_utf8_string_index >= utf8_string_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: UTF-8 string too small.", + function ); + + return( -1 ); + } + /* Determine if the Unicode character is valid + */ + if( ( ( unicode_character >= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ) + && ( unicode_character <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) + || ( unicode_character > LIBUNA_UNICODE_CHARACTER_MAX ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, + "%s: unsupported Unicode character.", + function ); + + return( -1 ); + } + /* Determine how many UTF-8 character bytes are required + */ + if( unicode_character < 0x080 ) + { + utf8_character_additional_bytes = 0; + utf8_first_character_mark = 0; + } + else if( unicode_character < 0x0800 ) + { + utf8_character_additional_bytes = 1; + utf8_first_character_mark = 0x0c0; + } + else if( unicode_character < 0x010000 ) + { + utf8_character_additional_bytes = 2; + utf8_first_character_mark = 0x0e0; + } + else + { + utf8_character_additional_bytes = 3; + utf8_first_character_mark = 0x0f0; + } + /* Convert Unicode character into UTF-8 character bytes + */ + if( ( utf8_character_additional_bytes > utf8_string_size ) + || ( safe_utf8_string_index >= ( utf8_string_size - utf8_character_additional_bytes ) ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: UTF-8 string too small.", + function ); + + return( -1 ); + } + for( utf8_character_iterator = safe_utf8_string_index + utf8_character_additional_bytes; + utf8_character_iterator > safe_utf8_string_index; + utf8_character_iterator-- ) + { + utf8_string[ utf8_character_iterator ] = (libuna_utf8_character_t) ( ( unicode_character & 0x0bf ) | 0x080 ); + + unicode_character >>= 6; + } + utf8_string[ safe_utf8_string_index ] = (libuna_utf8_character_t) ( unicode_character | utf8_first_character_mark ); + + *utf8_string_index = safe_utf8_string_index + 1 + utf8_character_additional_bytes; + + return( 1 ); +} + +/* Determines the size of an UTF-8 character from an Unicode character + * This function supports upto U+7FFFFFF (6 byte UTF-8 characters) + * Adds the size to the UTF-8 character size value + * Returns 1 if successful or -1 on error + */ +int libuna_unicode_character_size_to_utf8_rfc2279( + libuna_unicode_character_t unicode_character, + size_t *utf8_character_size, + libcerror_error_t **error ) +{ + static char *function = "libuna_unicode_character_size_to_utf8_rfc2279"; + size_t safe_utf8_character_size = 0; + + if( utf8_character_size == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid UTF-8 character size.", + function ); + + return( -1 ); + } + if( unicode_character > LIBUNA_UCS_CHARACTER_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, + "%s: unsupported Unicode character.", + function ); + + return( -1 ); + } + /* RFC 3629 limits the UTF-8 character to consist of a maximum of 4 bytes + * while its predecessor RFC 2279 allowed up to 6 bytes + */ + if( unicode_character < 0x00000080UL ) + { + safe_utf8_character_size += 1; + } + else if( unicode_character < 0x00000800UL ) + { + safe_utf8_character_size += 2; + } + else if( unicode_character < 0x00010000UL ) + { + safe_utf8_character_size += 3; + } + else if( unicode_character < 0x00200000UL ) + { + safe_utf8_character_size += 4; + } + else if( unicode_character < 0x04000000UL ) + { + safe_utf8_character_size += 5; + } + else + { + safe_utf8_character_size += 6; + } + *utf8_character_size += safe_utf8_character_size; + + return( 1 ); +} + +/* Copies an Unicode character from an UTF-8 string + * This function supports upto U+7FFFFFF (6 byte UTF-8 characters) + * Returns 1 if successful or -1 on error + */ +int libuna_unicode_character_copy_from_utf8_rfc2279( + libuna_unicode_character_t *unicode_character, + const libuna_utf8_character_t *utf8_string, + size_t utf8_string_size, + size_t *utf8_string_index, + libcerror_error_t **error ) +{ + static char *function = "libuna_unicode_character_copy_from_utf8_rfc2279"; + libuna_unicode_character_t safe_unicode_character = 0; + size_t safe_utf8_string_index = 0; + uint8_t byte_value1 = 0; + uint8_t byte_value2 = 0; + uint8_t byte_value3 = 0; + uint8_t byte_value4 = 0; + uint8_t byte_value5 = 0; + uint8_t byte_value6 = 0; + uint8_t utf8_character_additional_bytes = 0; + + if( unicode_character == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid Unicode character.", + function ); + + return( -1 ); + } + if( utf8_string == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid UTF-8 string.", + function ); + + return( -1 ); + } + if( utf8_string_size > (size_t) SSIZE_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, + "%s: invalid UTF-8 string size value exceeds maximum.", + function ); + + return( -1 ); + } + if( utf8_string_index == NULL ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, + "%s: invalid UTF-8 string index.", + function ); + + return( -1 ); + } + safe_utf8_string_index = *utf8_string_index; + + if( safe_utf8_string_index >= utf8_string_size ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: UTF-8 string too small.", + function ); + + return( -1 ); + } + /* Determine the number of additional bytes of the UTF-8 character + */ + byte_value1 = utf8_string[ safe_utf8_string_index ]; + + /* Determine the UTF-8 character and make sure it is valid + * RFC 3629 limits the UTF-8 character to consist of a maximum of 4 bytes + * while its predecessor RFC 2279 allowed up to 6 bytes + */ + if( byte_value1 > 0xfd ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, + "%s: invalid 1st UTF-8 character byte: 0x%02" PRIx8 ".", + function, + byte_value1 ); + + return( -1 ); + } + if( byte_value1 < 0xc0 ) + { + utf8_character_additional_bytes = 0; + } + else if( byte_value1 < 0xe0 ) + { + utf8_character_additional_bytes = 1; + } + else if( byte_value1 < 0xf0 ) + { + utf8_character_additional_bytes = 2; + } + else if( byte_value1 < 0xf8 ) + { + utf8_character_additional_bytes = 3; + } + else if( byte_value1 < 0xfc ) + { + utf8_character_additional_bytes = 4; + } + else + { + utf8_character_additional_bytes = 5; + } + if( ( ( (size_t) utf8_character_additional_bytes + 1 ) > utf8_string_size ) + || ( safe_utf8_string_index > ( utf8_string_size - ( utf8_character_additional_bytes + 1 ) ) ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, + "%s: missing UTF-8 character bytes.", + function ); + + return( -1 ); + } + /* Determine the UTF-8 character and make sure it is valid + * RFC 3629 limits the UTF-8 character to consist of a maximum of 4 bytes + * while its predecessor RFC 2279 allowed up to 6 bytes + */ + safe_unicode_character = byte_value1; + + if( utf8_character_additional_bytes == 0 ) + { + if( byte_value1 >= 0x80 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_ARGUMENTS, + LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, + "%s: invalid 1st UTF-8 character byte: 0x%02" PRIx8 ".", + function, + byte_value1 ); + + return( -1 ); + } + } + if( utf8_character_additional_bytes >= 1 ) + { + byte_value2 = utf8_string[ safe_utf8_string_index + 1 ]; + + if( ( byte_value2 < 0x80 ) + || ( byte_value2 > 0xbf ) ) { libcerror_error_set( error, @@ -4372,8 +4498,10 @@ } if( utf8_character_additional_bytes == 5 ) { - if( ( utf8_string[ safe_utf8_string_index + 5 ] < 0x80 ) - || ( utf8_string[ safe_utf8_string_index + 5 ] > 0xbf ) ) + byte_value6 = utf8_string[ safe_utf8_string_index + 5 ]; + + if( ( byte_value6 < 0x80 ) + || ( byte_value6 > 0xbf ) ) { libcerror_error_set( error, @@ -4381,19 +4509,26 @@ LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 6th UTF-8 character byte: 0x%02" PRIx8 ".", function, - utf8_string[ safe_utf8_string_index + 5 ] ); + byte_value6 ); return( -1 ); } safe_unicode_character <<= 6; - safe_unicode_character += utf8_string[ safe_utf8_string_index + 5 ]; + safe_unicode_character += byte_value6; safe_unicode_character -= 0x082082080; } /* Determine if the Unicode character is valid */ - if( safe_unicode_character > LIBUNA_UNICODE_CHARACTER_MAX ) + if( safe_unicode_character > LIBUNA_UCS_CHARACTER_MAX ) { - safe_unicode_character = LIBUNA_UNICODE_REPLACEMENT_CHARACTER; + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, + "%s: unsupported Unicode character.", + function ); + + return( -1 ); } *unicode_character = safe_unicode_character; *utf8_string_index = safe_utf8_string_index + 1 + utf8_character_additional_bytes; @@ -4402,16 +4537,17 @@ } /* Copies an Unicode character into a UTF-8 string + * This function supports upto U+7FFFFFF (6 byte UTF-8 characters) * Returns 1 if successful or -1 on error */ -int libuna_unicode_character_copy_to_utf8( +int libuna_unicode_character_copy_to_utf8_rfc2279( libuna_unicode_character_t unicode_character, libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, libcerror_error_t **error ) { - static char *function = "libuna_unicode_character_copy_to_utf8"; + static char *function = "libuna_unicode_character_copy_to_utf8_rfc2279"; size_t safe_utf8_string_index = 0; size_t utf8_character_iterator = 0; uint8_t utf8_character_additional_bytes = 0; @@ -4465,9 +4601,16 @@ } /* Determine if the Unicode character is valid */ - if( unicode_character > LIBUNA_UNICODE_CHARACTER_MAX ) + if( unicode_character > LIBUNA_UCS_CHARACTER_MAX ) { - unicode_character = LIBUNA_UNICODE_REPLACEMENT_CHARACTER; + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, + "%s: unsupported Unicode character.", + function ); + + return( -1 ); } /* Determine how many UTF-8 character bytes are required */ @@ -4552,8 +4695,20 @@ return( -1 ); } - if( ( unicode_character > LIBUNA_UNICODE_BASIC_MULTILINGUAL_PLANE_MAX ) - && ( unicode_character <= LIBUNA_UTF16_CHARACTER_MAX ) ) + if( ( ( unicode_character >= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ) + && ( unicode_character <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) + || ( unicode_character > LIBUNA_UNICODE_CHARACTER_MAX ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, + "%s: unsupported Unicode character.", + function ); + + return( -1 ); + } + if( unicode_character > LIBUNA_UNICODE_BASIC_MULTILINGUAL_PLANE_MAX ) { *utf16_character_size += 2; } @@ -4670,15 +4825,30 @@ } else { - safe_unicode_character = LIBUNA_UNICODE_REPLACEMENT_CHARACTER; + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, + "%s: unsupported low surrogate UTF-16 character.", + function ); + + return( -1 ); } } /* Determine if the Unicode character is valid */ - else if( ( safe_unicode_character >= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_START ) - && ( safe_unicode_character <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) + if( ( ( safe_unicode_character >= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ) + && ( safe_unicode_character <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) + || ( safe_unicode_character > LIBUNA_UNICODE_CHARACTER_MAX ) ) { - safe_unicode_character = LIBUNA_UNICODE_REPLACEMENT_CHARACTER; + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, + "%s: unsupported Unicode character.", + function ); + + return( -1 ); } *unicode_character = safe_unicode_character; *utf16_string_index = safe_utf16_string_index; @@ -4748,10 +4918,17 @@ /* Determine if the Unicode character is valid */ if( ( ( unicode_character >= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ) - && ( unicode_character <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) - || ( unicode_character > LIBUNA_UTF16_CHARACTER_MAX ) ) + && ( unicode_character <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) + || ( unicode_character > LIBUNA_UNICODE_CHARACTER_MAX ) ) { - unicode_character = LIBUNA_UNICODE_REPLACEMENT_CHARACTER; + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, + "%s: unsupported Unicode character.", + function ); + + return( -1 ); } if( unicode_character <= LIBUNA_UNICODE_BASIC_MULTILINGUAL_PLANE_MAX ) { @@ -4795,6 +4972,7 @@ libuna_unicode_character_t safe_unicode_character = 0; libuna_utf16_character_t utf16_surrogate = 0; size_t safe_utf16_stream_index = 0; + int byte_order_without_flags = 0; if( unicode_character == NULL ) { @@ -4840,8 +5018,10 @@ return( -1 ); } - if( ( byte_order != LIBUNA_ENDIAN_BIG ) - && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) + byte_order_without_flags = byte_order & 0xff; + + if( ( byte_order_without_flags != LIBUNA_ENDIAN_BIG ) + && ( byte_order_without_flags != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, @@ -4866,13 +5046,13 @@ return( -1 ); } - if( byte_order == LIBUNA_ENDIAN_BIG ) + if( byte_order_without_flags == LIBUNA_ENDIAN_BIG ) { safe_unicode_character = utf16_stream[ safe_utf16_stream_index ]; safe_unicode_character <<= 8; safe_unicode_character += utf16_stream[ safe_utf16_stream_index + 1 ]; } - else if( byte_order == LIBUNA_ENDIAN_LITTLE ) + else if( byte_order_without_flags == LIBUNA_ENDIAN_LITTLE ) { safe_unicode_character = utf16_stream[ safe_utf16_stream_index + 1 ]; safe_unicode_character <<= 8; @@ -4885,63 +5065,86 @@ if( ( safe_unicode_character >= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_START ) && ( safe_unicode_character <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, - "%s: unsupported UTF-16 character.", - function ); - - return( -1 ); - } - /* Determine if the UTF-16 character is within the high surrogate range - */ - if( ( safe_unicode_character >= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ) - && ( safe_unicode_character <= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_END ) ) - { - if( safe_utf16_stream_index > ( utf16_stream_size - 2 ) ) + if( ( byte_order & LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE ) == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, - "%s: missing surrogate UTF-16 character bytes.", + "%s: unsupported UTF-16 character.", function ); return( -1 ); } - if( byte_order == LIBUNA_ENDIAN_BIG ) + } + /* Determine if the UTF-16 character is within the high surrogate range + */ + if( ( safe_unicode_character >= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ) + && ( safe_unicode_character <= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_END ) ) + { + if( safe_utf16_stream_index > ( utf16_stream_size - 2 ) ) { - utf16_surrogate = utf16_stream[ safe_utf16_stream_index ]; - utf16_surrogate <<= 8; - utf16_surrogate += utf16_stream[ safe_utf16_stream_index + 1 ]; + if( ( byte_order & LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE ) == 0 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, + "%s: missing surrogate UTF-16 character bytes.", + function ); + + return( -1 ); + } } - else if( byte_order == LIBUNA_ENDIAN_LITTLE ) + else { - utf16_surrogate = utf16_stream[ safe_utf16_stream_index + 1 ]; - utf16_surrogate <<= 8; - utf16_surrogate += utf16_stream[ safe_utf16_stream_index ]; - } - safe_utf16_stream_index += 2; + if( byte_order_without_flags == LIBUNA_ENDIAN_BIG ) + { + utf16_surrogate = utf16_stream[ safe_utf16_stream_index ]; + utf16_surrogate <<= 8; + utf16_surrogate += utf16_stream[ safe_utf16_stream_index + 1 ]; + } + else if( byte_order_without_flags == LIBUNA_ENDIAN_LITTLE ) + { + utf16_surrogate = utf16_stream[ safe_utf16_stream_index + 1 ]; + utf16_surrogate <<= 8; + utf16_surrogate += utf16_stream[ safe_utf16_stream_index ]; + } + /* Determine if the UTF-16 character is within the low surrogate range + */ + if( ( utf16_surrogate >= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_START ) + && ( utf16_surrogate <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) + { + safe_unicode_character -= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START; + safe_unicode_character <<= 10; + safe_unicode_character += utf16_surrogate - LIBUNA_UNICODE_SURROGATE_LOW_RANGE_START; + safe_unicode_character += 0x010000; - /* Determine if the UTF-16 character is within the low surrogate range - */ - if( ( utf16_surrogate < LIBUNA_UNICODE_SURROGATE_LOW_RANGE_START ) - || ( utf16_surrogate > LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, - "%s: unsupported low surrogate UTF-16 character.", - function ); + safe_utf16_stream_index += 2; + } + else if( ( byte_order & LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE ) == 0 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, + "%s: unsupported low surrogate UTF-16 character.", + function ); - return( -1 ); + return( -1 ); + } } - safe_unicode_character -= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START; - safe_unicode_character <<= 10; - safe_unicode_character += utf16_surrogate - LIBUNA_UNICODE_SURROGATE_LOW_RANGE_START; - safe_unicode_character += 0x010000; + } + if( safe_unicode_character > LIBUNA_UNICODE_CHARACTER_MAX ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, + "%s: unsupported Unicode character.", + function ); + + return( -1 ); } *unicode_character = safe_unicode_character; *utf16_stream_index = safe_utf16_stream_index; @@ -4963,6 +5166,7 @@ static char *function = "libuna_unicode_character_copy_to_utf16_stream"; libuna_utf16_character_t utf16_surrogate = 0; size_t safe_utf16_stream_index = 0; + int byte_order_without_flags = 0; if( utf16_stream == NULL ) { @@ -4997,8 +5201,10 @@ return( -1 ); } - if( ( byte_order != LIBUNA_ENDIAN_BIG ) - && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) + byte_order_without_flags = byte_order & 0xff; + + if( ( byte_order_without_flags != LIBUNA_ENDIAN_BIG ) + && ( byte_order_without_flags != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, @@ -5013,9 +5219,7 @@ /* Determine if the Unicode character is valid */ - if( ( ( unicode_character >= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ) - && ( unicode_character <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) - || ( unicode_character > LIBUNA_UTF16_CHARACTER_MAX ) ) + if( unicode_character > LIBUNA_UNICODE_CHARACTER_MAX ) { libcerror_error_set( error, @@ -5026,6 +5230,21 @@ return( -1 ); } + if( ( unicode_character >= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ) + && ( unicode_character <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) + { + if( ( byte_order & LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE ) == 0 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, + "%s: unsupported Unicode character.", + function ); + + return( -1 ); + } + } if( unicode_character <= LIBUNA_UNICODE_BASIC_MULTILINGUAL_PLANE_MAX ) { if( ( utf16_stream_size < 2 ) @@ -5112,7 +5331,7 @@ * Returns 1 if successful or -1 on error */ int libuna_unicode_character_size_to_utf32( - libuna_unicode_character_t unicode_character LIBUNA_ATTRIBUTE_UNUSED, + libuna_unicode_character_t unicode_character, size_t *utf32_character_size, libcerror_error_t **error ) { @@ -5131,6 +5350,19 @@ return( -1 ); } + if( ( ( unicode_character >= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ) + && ( unicode_character <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) + || ( unicode_character > LIBUNA_UNICODE_CHARACTER_MAX ) ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, + "%s: unsupported Unicode character.", + function ); + + return( -1 ); + } *utf32_character_size += 1; return( 1 ); @@ -5207,16 +5439,22 @@ return( -1 ); } + safe_unicode_character = utf32_string[ safe_utf32_string_index ]; + /* Determine if the Unicode character is valid */ - if( ( utf32_string[ safe_utf32_string_index ] >= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_START ) - && ( utf32_string[ safe_utf32_string_index ] <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) - { - safe_unicode_character = LIBUNA_UNICODE_REPLACEMENT_CHARACTER; - } - else + if( ( ( safe_unicode_character >= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ) + && ( safe_unicode_character <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) + || ( safe_unicode_character > LIBUNA_UNICODE_CHARACTER_MAX ) ) { - safe_unicode_character = utf32_string[ safe_utf32_string_index ]; + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, + "%s: unsupported Unicode character.", + function ); + + return( -1 ); } *unicode_character = safe_unicode_character; *utf32_string_index = safe_utf32_string_index + 1; @@ -5286,15 +5524,20 @@ /* Determine if the Unicode character is valid */ if( ( ( unicode_character >= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ) - && ( unicode_character <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) - || ( unicode_character > LIBUNA_UTF32_CHARACTER_MAX ) ) - { - utf32_string[ safe_utf32_string_index ] = (libuna_utf32_character_t) LIBUNA_UNICODE_REPLACEMENT_CHARACTER; - } - else + && ( unicode_character <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) + || ( unicode_character > LIBUNA_UNICODE_CHARACTER_MAX ) ) { - utf32_string[ safe_utf32_string_index ] = (libuna_utf32_character_t) unicode_character; + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, + "%s: unsupported Unicode character.", + function ); + + return( -1 ); } + utf32_string[ safe_utf32_string_index ] = (libuna_utf32_character_t) unicode_character; + *utf32_string_index = safe_utf32_string_index + 1; return( 1 ); @@ -5407,10 +5650,18 @@ } /* Determine if the Unicode character is valid */ - if( ( safe_unicode_character >= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_START ) - && ( safe_unicode_character <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) + if( ( ( safe_unicode_character >= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ) + && ( safe_unicode_character <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) + || ( safe_unicode_character > LIBUNA_UNICODE_CHARACTER_MAX ) ) { - safe_unicode_character = LIBUNA_UNICODE_REPLACEMENT_CHARACTER; + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, + "%s: unsupported Unicode character.", + function ); + + return( -1 ); } *unicode_character = safe_unicode_character; *utf32_stream_index = safe_utf32_stream_index + 4; @@ -5494,10 +5745,17 @@ /* Determine if the Unicode character is valid */ if( ( ( unicode_character >= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ) - && ( unicode_character <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) - || ( unicode_character > LIBUNA_UTF32_CHARACTER_MAX ) ) + && ( unicode_character <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) + || ( unicode_character > LIBUNA_UNICODE_CHARACTER_MAX ) ) { - unicode_character = LIBUNA_UNICODE_REPLACEMENT_CHARACTER; + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, + "%s: unsupported Unicode character.", + function ); + + return( -1 ); } if( byte_order == LIBUNA_ENDIAN_BIG ) { diff -Nru libfshfs-20201104/libuna/libuna_unicode_character.h libfshfs-20240221/libuna/libuna_unicode_character.h --- libfshfs-20201104/libuna/libuna_unicode_character.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_unicode_character.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * Unicode character functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -60,6 +60,50 @@ libcerror_error_t **error ); LIBUNA_EXTERN \ +int libuna_unicode_character_size_to_ucs2( + libuna_unicode_character_t unicode_character, + size_t *ucs2_character_size, + libcerror_error_t **error ); + +LIBUNA_EXTERN \ +int libuna_unicode_character_copy_from_ucs2( + libuna_unicode_character_t *unicode_character, + const libuna_utf16_character_t *ucs2_string, + size_t ucs2_string_size, + size_t *ucs2_string_index, + libcerror_error_t **error ); + +LIBUNA_EXTERN \ +int libuna_unicode_character_copy_to_ucs2( + libuna_unicode_character_t unicode_character, + libuna_utf16_character_t *ucs2_string, + size_t ucs2_string_size, + size_t *ucs2_string_index, + libcerror_error_t **error ); + +LIBUNA_EXTERN \ +int libuna_unicode_character_size_to_ucs4( + libuna_unicode_character_t unicode_character, + size_t *ucs4_character_size, + libcerror_error_t **error ); + +LIBUNA_EXTERN \ +int libuna_unicode_character_copy_from_ucs4( + libuna_unicode_character_t *unicode_character, + const libuna_utf32_character_t *ucs4_string, + size_t ucs4_string_size, + size_t *ucs4_string_index, + libcerror_error_t **error ); + +LIBUNA_EXTERN \ +int libuna_unicode_character_copy_to_ucs4( + libuna_unicode_character_t unicode_character, + libuna_utf32_character_t *ucs4_string, + size_t ucs4_string_size, + size_t *ucs4_string_index, + libcerror_error_t **error ); + +LIBUNA_EXTERN \ int libuna_unicode_character_size_to_utf7_stream( libuna_unicode_character_t unicode_character, size_t *utf7_stream_character_size, @@ -103,6 +147,28 @@ libuna_unicode_character_t unicode_character, libuna_utf8_character_t *utf8_string, size_t utf8_string_size, + size_t *utf8_string_index, + libcerror_error_t **error ); + +LIBUNA_EXTERN \ +int libuna_unicode_character_size_to_utf8_rfc2279( + libuna_unicode_character_t unicode_character, + size_t *utf8_character_size, + libcerror_error_t **error ); + +LIBUNA_EXTERN \ +int libuna_unicode_character_copy_from_utf8_rfc2279( + libuna_unicode_character_t *unicode_character, + const libuna_utf8_character_t *utf8_string, + size_t utf8_string_size, + size_t *utf8_string_index, + libcerror_error_t **error ); + +LIBUNA_EXTERN \ +int libuna_unicode_character_copy_to_utf8_rfc2279( + libuna_unicode_character_t unicode_character, + libuna_utf8_character_t *utf8_string, + size_t utf8_string_size, size_t *utf8_string_index, libcerror_error_t **error ); diff -Nru libfshfs-20201104/libuna/libuna_unused.h libfshfs-20240221/libuna/libuna_unused.h --- libfshfs-20201104/libuna/libuna_unused.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_unused.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * Definitions to silence compiler warnings about unused function attributes/parameters. * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_url_stream.c libfshfs-20240221/libuna/libuna_url_stream.c --- libfshfs-20201104/libuna/libuna_url_stream.c 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_url_stream.c 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * Percent or URL encoded stream functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_url_stream.h libfshfs-20240221/libuna/libuna_url_stream.h --- libfshfs-20201104/libuna/libuna_url_stream.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_url_stream.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * Percent or URL encoded stream functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_utf16_stream.c libfshfs-20240221/libuna/libuna_utf16_stream.c --- libfshfs-20201104/libuna/libuna_utf16_stream.c 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_utf16_stream.c 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * UTF-16 stream functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -122,6 +122,7 @@ { static char *function = "libuna_utf16_stream_size_from_utf8"; libuna_unicode_character_t unicode_character = 0; + size_t safe_utf16_stream_size = 0; size_t utf8_string_index = 0; if( utf8_string == NULL ) @@ -159,7 +160,7 @@ } /* Add the byte order mark */ - *utf16_stream_size = 1; + safe_utf16_stream_size = 1; while( utf8_string_index < utf8_string_size ) { @@ -185,7 +186,7 @@ */ if( libuna_unicode_character_size_to_utf16( unicode_character, - utf16_stream_size, + &safe_utf16_stream_size, error ) != 1 ) { libcerror_error_set( @@ -204,7 +205,7 @@ } /* Convert the number of characters into bytes */ - *utf16_stream_size *= 2; + *utf16_stream_size = safe_utf16_stream_size * 2; return( 1 ); } @@ -355,6 +356,7 @@ { static char *function = "libuna_utf16_stream_size_from_utf16"; libuna_unicode_character_t unicode_character = 0; + size_t safe_utf16_stream_size = 0; size_t utf16_string_index = 0; if( utf16_string == NULL ) @@ -392,7 +394,7 @@ } /* Add the byte order mark */ - *utf16_stream_size = 1; + safe_utf16_stream_size = 1; while( utf16_string_index < utf16_string_size ) { @@ -418,7 +420,7 @@ */ if( libuna_unicode_character_size_to_utf16( unicode_character, - utf16_stream_size, + &safe_utf16_stream_size, error ) != 1 ) { libcerror_error_set( @@ -437,7 +439,7 @@ } /* Convert the number of characters into bytes */ - *utf16_stream_size *= 2; + *utf16_stream_size = safe_utf16_stream_size * 2; return( 1 ); } @@ -588,6 +590,7 @@ { static char *function = "libuna_utf16_stream_size_from_utf32"; libuna_unicode_character_t unicode_character = 0; + size_t safe_utf16_stream_size = 0; size_t utf32_string_index = 0; if( utf32_string == NULL ) @@ -625,7 +628,7 @@ } /* Add the byte order mark */ - *utf16_stream_size += 1; + safe_utf16_stream_size += 1; while( utf32_string_index < utf32_string_size ) { @@ -651,7 +654,7 @@ */ if( libuna_unicode_character_size_to_utf16( unicode_character, - utf16_stream_size, + &safe_utf16_stream_size, error ) != 1 ) { libcerror_error_set( @@ -670,7 +673,7 @@ } /* Convert the number of characters into bytes */ - *utf16_stream_size *= 2; + *utf16_stream_size = safe_utf16_stream_size * 2; return( 1 ); } diff -Nru libfshfs-20201104/libuna/libuna_utf16_stream.h libfshfs-20240221/libuna/libuna_utf16_stream.h --- libfshfs-20201104/libuna/libuna_utf16_stream.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_utf16_stream.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * UTF-16 stream functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_utf16_string.c libfshfs-20240221/libuna/libuna_utf16_string.c --- libfshfs-20201104/libuna/libuna_utf16_string.c 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_utf16_string.c 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * UTF-16 string functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -119,6 +119,10 @@ return( -1 ); } + if( unicode_character == 0 ) + { + break; + } } /* Check if the string is terminated with an end-of-string character */ @@ -285,6 +289,10 @@ return( -1 ); } + if( unicode_character == 0 ) + { + break; + } } /* Check if the string is terminated with an end-of-string character */ @@ -544,6 +552,10 @@ return( -1 ); } + if( unicode_character == 0 ) + { + break; + } } /* Check if the string is terminated with an end-of-string character */ @@ -708,6 +720,10 @@ return( -1 ); } + if( unicode_character == 0 ) + { + break; + } } /* Check if the string is terminated with an end-of-string character */ @@ -965,6 +981,10 @@ return( -1 ); } + if( unicode_character == 0 ) + { + break; + } } /* Check if the string is terminated with an end-of-string character */ @@ -1127,6 +1147,10 @@ return( -1 ); } + if( unicode_character == 0 ) + { + break; + } } /* Check if the string is terminated with an end-of-string character */ @@ -1249,6 +1273,10 @@ return( -1 ); } + if( unicode_character == 0 ) + { + break; + } } /* Check if the string is terminated with an end-of-string character */ @@ -1422,6 +1450,10 @@ return( -1 ); } + if( unicode_character == 0 ) + { + break; + } } /* Check if the string is terminated with an end-of-string character */ @@ -1611,9 +1643,10 @@ libcerror_error_t **error ) { static char *function = "libuna_utf16_string_size_from_utf16_stream"; - size_t utf16_stream_index = 0; libuna_unicode_character_t unicode_character = 0; + size_t utf16_stream_index = 0; int read_byte_order = 0; + int result = 0; if( utf16_stream == NULL ) { @@ -1686,18 +1719,6 @@ byte_order = read_byte_order; } } - if( ( byte_order != LIBUNA_ENDIAN_BIG ) - && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, - "%s: unsupported byte order.", - function ); - - return( -1 ); - } while( ( utf16_stream_index + 1 ) < utf16_stream_size ) { /* Convert the UTF-16 stream bytes into an Unicode character @@ -1721,10 +1742,21 @@ } /* Determine how many UTF-16 character bytes are required */ - if( libuna_unicode_character_size_to_utf16( - unicode_character, - utf16_string_size, - error ) != 1 ) + if( ( byte_order & LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE ) == 0 ) + { + result = libuna_unicode_character_size_to_utf16( + unicode_character, + utf16_string_size, + error ); + } + else + { + result = libuna_unicode_character_size_to_ucs2( + unicode_character, + utf16_string_size, + error ); + } + if( result != 1 ) { libcerror_error_set( error, @@ -1735,6 +1767,10 @@ return( -1 ); } + if( unicode_character == 0 ) + { + break; + } } /* Check if the string is terminated with an end-of-string character */ @@ -1793,9 +1829,10 @@ libcerror_error_t **error ) { static char *function = "libuna_utf16_string_with_index_copy_from_utf16_stream"; - size_t utf16_stream_index = 0; libuna_unicode_character_t unicode_character = 0; + size_t utf16_stream_index = 0; int read_byte_order = 0; + int result = 0; if( utf16_string == NULL ) { @@ -1885,18 +1922,6 @@ byte_order = read_byte_order; } } - if( ( byte_order != LIBUNA_ENDIAN_BIG ) - && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, - "%s: unsupported byte order.", - function ); - - return( -1 ); - } while( ( utf16_stream_index + 1 ) < utf16_stream_size ) { /* Convert the UTF-16 stream bytes into an Unicode character @@ -1920,12 +1945,25 @@ } /* Convert the Unicode character into UTF-16 character bytes */ - if( libuna_unicode_character_copy_to_utf16( - unicode_character, - utf16_string, - utf16_string_size, - utf16_string_index, - error ) != 1 ) + if( ( byte_order & LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE ) == 0 ) + { + result = libuna_unicode_character_copy_to_utf16( + unicode_character, + utf16_string, + utf16_string_size, + utf16_string_index, + error ); + } + else + { + result = libuna_unicode_character_copy_to_ucs2( + unicode_character, + utf16_string, + utf16_string_size, + utf16_string_index, + error ); + } + if( result != 1 ) { libcerror_error_set( error, @@ -1936,6 +1974,10 @@ return( -1 ); } + if( unicode_character == 0 ) + { + break; + } } /* Check if the string is terminated with an end-of-string character */ @@ -1971,11 +2013,12 @@ libcerror_error_t **error ) { static char *function = "libuna_utf16_string_compare_with_utf16_stream"; + libuna_unicode_character_t utf16_stream_unicode_character = 0; + libuna_unicode_character_t utf16_unicode_character = 0; size_t utf16_stream_index = 0; size_t utf16_string_index = 0; - libuna_unicode_character_t utf16_unicode_character = 0; - libuna_unicode_character_t utf16_stream_unicode_character = 0; int read_byte_order = 0; + int result = 0; if( utf16_string == NULL ) { @@ -2054,18 +2097,6 @@ byte_order = read_byte_order; } } - if( ( byte_order != LIBUNA_ENDIAN_BIG ) - && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, - "%s: unsupported byte order.", - function ); - - return( -1 ); - } if( ( utf16_string_size >= 1 ) && ( utf16_string[ utf16_string_size - 1 ] == 0 ) ) { @@ -2084,12 +2115,25 @@ { /* Convert the UTF-16 character bytes into an Unicode character */ - if( libuna_unicode_character_copy_from_utf16( - &utf16_unicode_character, - utf16_string, - utf16_string_size, - &utf16_string_index, - error ) != 1 ) + if( ( byte_order & LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE ) == 0 ) + { + result = libuna_unicode_character_copy_from_utf16( + &utf16_unicode_character, + utf16_string, + utf16_string_size, + &utf16_string_index, + error ); + } + else + { + result = libuna_unicode_character_copy_from_ucs2( + &utf16_unicode_character, + utf16_string, + utf16_string_size, + &utf16_string_index, + error ); + } + if( result != 1 ) { libcerror_error_set( error, @@ -2229,6 +2273,10 @@ return( -1 ); } + if( unicode_character == 0 ) + { + break; + } } /* Check if the string is terminated with an end-of-string character */ @@ -2391,6 +2439,10 @@ return( -1 ); } + if( unicode_character == 0 ) + { + break; + } } /* Check if the string is terminated with an end-of-string character */ @@ -2646,18 +2698,6 @@ byte_order = read_byte_order; } } - if( ( byte_order != LIBUNA_ENDIAN_BIG ) - && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, - "%s: unsupported byte order.", - function ); - - return( -1 ); - } while( ( utf32_stream_index + 3 ) < utf32_stream_size ) { /* Convert the UTF-32 stream bytes into an Unicode character @@ -2695,6 +2735,10 @@ return( -1 ); } + if( unicode_character == 0 ) + { + break; + } } /* Check if the string is terminated with an end-of-string character */ @@ -2849,18 +2893,6 @@ byte_order = read_byte_order; } } - if( ( byte_order != LIBUNA_ENDIAN_BIG ) - && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, - "%s: unsupported byte order.", - function ); - - return( -1 ); - } while( ( utf32_stream_index + 3 ) < utf32_stream_size ) { /* Convert the UTF-32 stream bytes into an Unicode character @@ -2900,6 +2932,10 @@ return( -1 ); } + if( unicode_character == 0 ) + { + break; + } } /* Check if the string is terminated with an end-of-string character */ @@ -3022,18 +3058,6 @@ byte_order = read_byte_order; } } - if( ( byte_order != LIBUNA_ENDIAN_BIG ) - && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, - "%s: unsupported byte order.", - function ); - - return( -1 ); - } if( ( utf16_string_size >= 1 ) && ( utf16_string[ utf16_string_size - 1 ] == 0 ) ) { @@ -3468,7 +3492,6 @@ { break; } - unicode_character_set = 0; } } /* Check if the string is terminated with an end-of-string character @@ -3901,7 +3924,6 @@ { break; } - unicode_character_set = 0; } } /* Check if the string is terminated with an end-of-string character diff -Nru libfshfs-20201104/libuna/libuna_utf16_string.h libfshfs-20240221/libuna/libuna_utf16_string.h --- libfshfs-20201104/libuna/libuna_utf16_string.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_utf16_string.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * UTF-16 string functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_utf32_stream.c libfshfs-20240221/libuna/libuna_utf32_stream.c --- libfshfs-20201104/libuna/libuna_utf32_stream.c 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_utf32_stream.c 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * UTF-32 stream functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -126,6 +126,7 @@ { static char *function = "libuna_utf32_stream_size_from_utf8"; libuna_unicode_character_t unicode_character = 0; + size_t safe_utf32_stream_size = 0; size_t utf8_string_index = 0; if( utf8_string == NULL ) @@ -163,7 +164,7 @@ } /* Add the byte order mark */ - *utf32_stream_size = 1; + safe_utf32_stream_size = 1; while( utf8_string_index < utf8_string_size ) { @@ -189,7 +190,7 @@ */ if( libuna_unicode_character_size_to_utf32( unicode_character, - utf32_stream_size, + &safe_utf32_stream_size, error ) != 1 ) { libcerror_error_set( @@ -208,7 +209,7 @@ } /* Convert the number of characters into bytes */ - *utf32_stream_size *= 4; + *utf32_stream_size = safe_utf32_stream_size * 4; return( 1 ); } @@ -359,6 +360,7 @@ { static char *function = "libuna_utf32_stream_size_from_utf16"; libuna_unicode_character_t unicode_character = 0; + size_t safe_utf32_stream_size = 0; size_t utf16_string_index = 0; if( utf16_string == NULL ) @@ -396,7 +398,7 @@ } /* Add the byte order mark */ - *utf32_stream_size = 1; + safe_utf32_stream_size = 1; while( utf16_string_index < utf16_string_size ) { @@ -422,7 +424,7 @@ */ if( libuna_unicode_character_size_to_utf32( unicode_character, - utf32_stream_size, + &safe_utf32_stream_size, error ) != 1 ) { libcerror_error_set( @@ -441,7 +443,7 @@ } /* Convert the number of characters into bytes */ - *utf32_stream_size *= 4; + *utf32_stream_size = safe_utf32_stream_size * 4; return( 1 ); } @@ -592,6 +594,7 @@ { static char *function = "libuna_utf32_stream_size_from_utf32"; libuna_unicode_character_t unicode_character = 0; + size_t safe_utf32_stream_size = 0; size_t utf32_string_index = 0; if( utf32_string == NULL ) @@ -629,7 +632,7 @@ } /* Add the byte order mark */ - *utf32_stream_size = 1; + safe_utf32_stream_size = 1; while( utf32_string_index < utf32_string_size ) { @@ -655,7 +658,7 @@ */ if( libuna_unicode_character_size_to_utf32( unicode_character, - utf32_stream_size, + &safe_utf32_stream_size, error ) != 1 ) { libcerror_error_set( @@ -674,7 +677,7 @@ } /* Convert the number of characters into bytes */ - *utf32_stream_size *= 4; + *utf32_stream_size = safe_utf32_stream_size * 4; return( 1 ); } diff -Nru libfshfs-20201104/libuna/libuna_utf32_stream.h libfshfs-20240221/libuna/libuna_utf32_stream.h --- libfshfs-20201104/libuna/libuna_utf32_stream.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_utf32_stream.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * UTF-32 stream functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_utf32_string.c libfshfs-20240221/libuna/libuna_utf32_string.c --- libfshfs-20201104/libuna/libuna_utf32_string.c 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_utf32_string.c 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * UTF-32 string functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -119,6 +119,10 @@ return( -1 ); } + if( unicode_character == 0 ) + { + break; + } } /* Check if the string is terminated with an end-of-string character */ @@ -285,6 +289,10 @@ return( -1 ); } + if( unicode_character == 0 ) + { + break; + } } /* Check if the string is terminated with an end-of-string character */ @@ -544,6 +552,10 @@ return( -1 ); } + if( unicode_character == 0 ) + { + break; + } } /* Check if the string is terminated with an end-of-string character */ @@ -708,6 +720,10 @@ return( -1 ); } + if( unicode_character == 0 ) + { + break; + } } /* Check if the string is terminated with an end-of-string character */ @@ -965,6 +981,10 @@ return( -1 ); } + if( unicode_character == 0 ) + { + break; + } } /* Check if the string is terminated with an end-of-string character */ @@ -1127,6 +1147,10 @@ return( -1 ); } + if( unicode_character == 0 ) + { + break; + } } /* Check if the string is terminated with an end-of-string character */ @@ -1249,6 +1273,10 @@ return( -1 ); } + if( unicode_character == 0 ) + { + break; + } } /* Check if the string is terminated with an end-of-string character */ @@ -1422,6 +1450,10 @@ return( -1 ); } + if( unicode_character == 0 ) + { + break; + } } /* Check if the string is terminated with an end-of-string character */ @@ -1688,6 +1720,10 @@ return( -1 ); } + if( unicode_character == 0 ) + { + break; + } } /* Check if the string is terminated with an end-of-string character */ @@ -1850,6 +1886,10 @@ return( -1 ); } + if( unicode_character == 0 ) + { + break; + } } /* Check if the string is terminated with an end-of-string character */ @@ -1884,9 +1924,10 @@ libcerror_error_t **error ) { static char *function = "libuna_utf32_string_size_from_utf16_stream"; - size_t utf16_stream_index = 0; libuna_unicode_character_t unicode_character = 0; + size_t utf16_stream_index = 0; int read_byte_order = 0; + int result = 0; if( utf16_stream == NULL ) { @@ -1959,18 +2000,6 @@ byte_order = read_byte_order; } } - if( ( byte_order != LIBUNA_ENDIAN_BIG ) - && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, - "%s: unsupported byte order.", - function ); - - return( -1 ); - } while( ( utf16_stream_index + 1 ) < utf16_stream_size ) { /* Convert the UTF-16 stream bytes into an Unicode character @@ -1994,10 +2023,21 @@ } /* Determine how many UTF-8 character bytes are required */ - if( libuna_unicode_character_size_to_utf32( - unicode_character, - utf32_string_size, - error ) != 1 ) + if( ( byte_order & LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE ) == 0 ) + { + result = libuna_unicode_character_size_to_utf32( + unicode_character, + utf32_string_size, + error ); + } + else + { + result = libuna_unicode_character_size_to_ucs4( + unicode_character, + utf32_string_size, + error ); + } + if( result != 1 ) { libcerror_error_set( error, @@ -2008,6 +2048,10 @@ return( -1 ); } + if( unicode_character == 0 ) + { + break; + } } /* Check if the string is terminated with an end-of-string character */ @@ -2066,9 +2110,10 @@ libcerror_error_t **error ) { static char *function = "libuna_utf32_string_with_index_copy_from_utf16_stream"; - size_t utf16_stream_index = 0; libuna_unicode_character_t unicode_character = 0; + size_t utf16_stream_index = 0; int read_byte_order = 0; + int result = 0; if( utf32_string == NULL ) { @@ -2158,18 +2203,6 @@ byte_order = read_byte_order; } } - if( ( byte_order != LIBUNA_ENDIAN_BIG ) - && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, - "%s: unsupported byte order.", - function ); - - return( -1 ); - } while( ( utf16_stream_index + 1 ) < utf16_stream_size ) { /* Convert the UTF-16 stream bytes into an Unicode character @@ -2193,12 +2226,25 @@ } /* Convert the Unicode character into UTF-32 character bytes */ - if( libuna_unicode_character_copy_to_utf32( - unicode_character, - utf32_string, - utf32_string_size, - utf32_string_index, - error ) != 1 ) + if( ( byte_order & LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE ) == 0 ) + { + result = libuna_unicode_character_copy_to_utf32( + unicode_character, + utf32_string, + utf32_string_size, + utf32_string_index, + error ); + } + else + { + result = libuna_unicode_character_copy_to_ucs4( + unicode_character, + utf32_string, + utf32_string_size, + utf32_string_index, + error ); + } + if( result != 1 ) { libcerror_error_set( error, @@ -2209,6 +2255,10 @@ return( -1 ); } + if( unicode_character == 0 ) + { + break; + } } /* Check if the string is terminated with an end-of-string character */ @@ -2244,11 +2294,12 @@ libcerror_error_t **error ) { static char *function = "libuna_utf32_string_compare_with_utf16_stream"; + libuna_unicode_character_t utf16_stream_unicode_character = 0; + libuna_unicode_character_t utf32_unicode_character = 0; size_t utf16_stream_index = 0; size_t utf32_string_index = 0; - libuna_unicode_character_t utf32_unicode_character = 0; - libuna_unicode_character_t utf16_stream_unicode_character = 0; int read_byte_order = 0; + int result = 0; if( utf32_string == NULL ) { @@ -2327,18 +2378,6 @@ byte_order = read_byte_order; } } - if( ( byte_order != LIBUNA_ENDIAN_BIG ) - && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, - "%s: unsupported byte order.", - function ); - - return( -1 ); - } if( ( utf32_string_size >= 1 ) && ( utf32_string[ utf32_string_size - 1 ] == 0 ) ) { @@ -2357,12 +2396,25 @@ { /* Convert the UTF-32 character bytes into an Unicode character */ - if( libuna_unicode_character_copy_from_utf32( - &utf32_unicode_character, - utf32_string, - utf32_string_size, - &utf32_string_index, - error ) != 1 ) + if( ( byte_order & LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE ) == 0 ) + { + result = libuna_unicode_character_copy_from_utf32( + &utf32_unicode_character, + utf32_string, + utf32_string_size, + &utf32_string_index, + error ); + } + else + { + result = libuna_unicode_character_copy_from_ucs4( + &utf32_unicode_character, + utf32_string, + utf32_string_size, + &utf32_string_index, + error ); + } + if( result != 1 ) { libcerror_error_set( error, @@ -2504,18 +2556,6 @@ byte_order = read_byte_order; } } - if( ( byte_order != LIBUNA_ENDIAN_BIG ) - && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, - "%s: unsupported byte order.", - function ); - - return( -1 ); - } while( ( utf32_stream_index + 1 ) < utf32_stream_size ) { /* Convert the UTF-32 stream bytes into an Unicode character @@ -2553,6 +2593,10 @@ return( -1 ); } + if( unicode_character == 0 ) + { + break; + } } /* Check if the string is terminated with an end-of-string character */ @@ -2707,18 +2751,6 @@ byte_order = read_byte_order; } } - if( ( byte_order != LIBUNA_ENDIAN_BIG ) - && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, - "%s: unsupported byte order.", - function ); - - return( -1 ); - } while( ( utf32_stream_index + 1 ) < utf32_stream_size ) { /* Convert the UTF-32 stream bytes into an Unicode character @@ -2758,6 +2790,10 @@ return( -1 ); } + if( unicode_character == 0 ) + { + break; + } } /* Check if the string is terminated with an end-of-string character */ @@ -2880,18 +2916,6 @@ byte_order = read_byte_order; } } - if( ( byte_order != LIBUNA_ENDIAN_BIG ) - && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, - "%s: unsupported byte order.", - function ); - - return( -1 ); - } if( ( utf32_string_size >= 1 ) && ( utf32_string[ utf32_string_size - 1 ] == 0 ) ) { @@ -3326,7 +3350,6 @@ { break; } - unicode_character_set = 0; } } /* Check if the string is terminated with an end-of-string character @@ -3759,7 +3782,6 @@ { break; } - unicode_character_set = 0; } } /* Check if the string is terminated with an end-of-string character diff -Nru libfshfs-20201104/libuna/libuna_utf32_string.h libfshfs-20240221/libuna/libuna_utf32_string.h --- libfshfs-20201104/libuna/libuna_utf32_string.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_utf32_string.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * UTF-32 string functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_utf7_stream.c libfshfs-20240221/libuna/libuna_utf7_stream.c --- libfshfs-20201104/libuna/libuna_utf7_stream.c 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_utf7_stream.c 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * UTF-7 stream functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_utf7_stream.h libfshfs-20240221/libuna/libuna_utf7_stream.h --- libfshfs-20201104/libuna/libuna_utf7_stream.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_utf7_stream.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * UTF-7 stream functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_utf8_stream.c libfshfs-20240221/libuna/libuna_utf8_stream.c --- libfshfs-20201104/libuna/libuna_utf8_stream.c 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_utf8_stream.c 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * UTF-8 stream functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_utf8_stream.h libfshfs-20240221/libuna/libuna_utf8_stream.h --- libfshfs-20201104/libuna/libuna_utf8_stream.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_utf8_stream.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * UTF-8 stream functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/libuna/libuna_utf8_string.c libfshfs-20240221/libuna/libuna_utf8_string.c --- libfshfs-20201104/libuna/libuna_utf8_string.c 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_utf8_string.c 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * UTF-8 string functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -1439,6 +1439,10 @@ return( -1 ); } + if( unicode_character == 0 ) + { + break; + } } /* Check if the string is terminated with an end-of-string character */ @@ -1601,6 +1605,10 @@ return( -1 ); } + if( unicode_character == 0 ) + { + break; + } } /* Check if the string is terminated with an end-of-string character */ @@ -1777,9 +1785,10 @@ libcerror_error_t **error ) { static char *function = "libuna_utf8_string_size_from_utf16_stream"; - size_t utf16_stream_index = 0; libuna_unicode_character_t unicode_character = 0; + size_t utf16_stream_index = 0; int read_byte_order = 0; + int result = 0; if( utf16_stream == NULL ) { @@ -1852,18 +1861,6 @@ byte_order = read_byte_order; } } - if( ( byte_order != LIBUNA_ENDIAN_BIG ) - && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, - "%s: unsupported byte order.", - function ); - - return( -1 ); - } while( ( utf16_stream_index + 1 ) < utf16_stream_size ) { /* Convert the UTF-16 stream bytes into an Unicode character @@ -1887,10 +1884,21 @@ } /* Determine how many UTF-8 character bytes are required */ - if( libuna_unicode_character_size_to_utf8( - unicode_character, - utf8_string_size, - error ) != 1 ) + if( ( byte_order & LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE ) == 0 ) + { + result = libuna_unicode_character_size_to_utf8( + unicode_character, + utf8_string_size, + error ); + } + else + { + result = libuna_unicode_character_size_to_utf8_rfc2279( + unicode_character, + utf8_string_size, + error ); + } + if( result != 1 ) { libcerror_error_set( error, @@ -1963,9 +1971,10 @@ libcerror_error_t **error ) { static char *function = "libuna_utf8_string_with_index_copy_from_utf16_stream"; - size_t utf16_stream_index = 0; libuna_unicode_character_t unicode_character = 0; + size_t utf16_stream_index = 0; int read_byte_order = 0; + int result = 0; if( utf8_string == NULL ) { @@ -2055,18 +2064,6 @@ byte_order = read_byte_order; } } - if( ( byte_order != LIBUNA_ENDIAN_BIG ) - && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, - "%s: unsupported byte order.", - function ); - - return( -1 ); - } while( ( utf16_stream_index + 1 ) < utf16_stream_size ) { /* Convert the UTF-16 stream bytes into an Unicode character @@ -2090,12 +2087,25 @@ } /* Convert the Unicode character into UTF-8 character bytes */ - if( libuna_unicode_character_copy_to_utf8( - unicode_character, - utf8_string, - utf8_string_size, - utf8_string_index, - error ) != 1 ) + if( ( byte_order & LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE ) == 0 ) + { + result = libuna_unicode_character_copy_to_utf8( + unicode_character, + utf8_string, + utf8_string_size, + utf8_string_index, + error ); + } + else + { + result = libuna_unicode_character_copy_to_utf8_rfc2279( + unicode_character, + utf8_string, + utf8_string_size, + utf8_string_index, + error ); + } + if( result != 1 ) { libcerror_error_set( error, @@ -2145,11 +2155,12 @@ libcerror_error_t **error ) { static char *function = "libuna_utf8_string_compare_with_utf16_stream"; + libuna_unicode_character_t utf16_stream_unicode_character = 0; + libuna_unicode_character_t utf8_unicode_character = 0; size_t utf16_stream_index = 0; size_t utf8_string_index = 0; - libuna_unicode_character_t utf8_unicode_character = 0; - libuna_unicode_character_t utf16_stream_unicode_character = 0; int read_byte_order = 0; + int result = 0; if( utf8_string == NULL ) { @@ -2228,18 +2239,6 @@ byte_order = read_byte_order; } } - if( ( byte_order != LIBUNA_ENDIAN_BIG ) - && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, - "%s: unsupported byte order.", - function ); - - return( -1 ); - } if( ( utf8_string_size >= 1 ) && ( utf8_string[ utf8_string_size - 1 ] == 0 ) ) { @@ -2258,12 +2257,25 @@ { /* Convert the UTF-8 character bytes into an Unicode character */ - if( libuna_unicode_character_copy_from_utf8( - &utf8_unicode_character, - utf8_string, - utf8_string_size, - &utf8_string_index, - error ) != 1 ) + if( ( byte_order & LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE ) == 0 ) + { + result = libuna_unicode_character_copy_from_utf8( + &utf8_unicode_character, + utf8_string, + utf8_string_size, + &utf8_string_index, + error ); + } + else + { + result = libuna_unicode_character_copy_from_utf8_rfc2279( + &utf8_unicode_character, + utf8_string, + utf8_string_size, + &utf8_string_index, + error ); + } + if( result != 1 ) { libcerror_error_set( error, @@ -2403,6 +2415,10 @@ return( -1 ); } + if( unicode_character == 0 ) + { + break; + } } /* Check if the string is terminated with an end-of-string character */ @@ -2565,6 +2581,10 @@ return( -1 ); } + if( unicode_character == 0 ) + { + break; + } } /* Check if the string is terminated with an end-of-string character */ @@ -2820,18 +2840,6 @@ byte_order = read_byte_order; } } - if( ( byte_order != LIBUNA_ENDIAN_BIG ) - && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, - "%s: unsupported byte order.", - function ); - - return( -1 ); - } while( ( utf32_stream_index + 3 ) < utf32_stream_size ) { /* Convert the UTF-32 stream bytes into an Unicode character @@ -3027,18 +3035,6 @@ byte_order = read_byte_order; } } - if( ( byte_order != LIBUNA_ENDIAN_BIG ) - && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, - "%s: unsupported byte order.", - function ); - - return( -1 ); - } while( ( utf32_stream_index + 3 ) < utf32_stream_size ) { /* Convert the UTF-32 stream bytes into an Unicode character @@ -3204,18 +3200,6 @@ byte_order = read_byte_order; } } - if( ( byte_order != LIBUNA_ENDIAN_BIG ) - && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, - "%s: unsupported byte order.", - function ); - - return( -1 ); - } if( ( utf8_string_size >= 1 ) && ( utf8_string[ utf8_string_size - 1 ] == 0 ) ) { @@ -3650,7 +3634,6 @@ { break; } - unicode_character_set = 0; } } /* Check if the string is terminated with an end-of-string character @@ -4083,7 +4066,6 @@ { break; } - unicode_character_set = 0; } } /* Check if the string is terminated with an end-of-string character diff -Nru libfshfs-20201104/libuna/libuna_utf8_string.h libfshfs-20240221/libuna/libuna_utf8_string.h --- libfshfs-20201104/libuna/libuna_utf8_string.h 2020-11-04 11:56:16.000000000 +0000 +++ libfshfs-20240221/libuna/libuna_utf8_string.h 2024-02-21 06:04:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * UTF-8 string functions * - * Copyright (C) 2008-2020, Joachim Metz + * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/ltmain.sh libfshfs-20240221/ltmain.sh --- libfshfs-20201104/ltmain.sh 2020-11-04 11:56:23.000000000 +0000 +++ libfshfs-20240221/ltmain.sh 2024-02-21 06:04:20.000000000 +0000 @@ -1,12 +1,12 @@ -#! /bin/sh +#! /usr/bin/env sh ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in -## by inline-source v2014-01-03.01 +## by inline-source v2019-02-19.15 -# libtool (GNU libtool) 2.4.6 +# libtool (GNU libtool) 2.4.7 # Provide generalized library-building support services. # Written by Gordon Matzigkeit , 1996 -# Copyright (C) 1996-2015 Free Software Foundation, Inc. +# Copyright (C) 1996-2019, 2021-2022 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -31,8 +31,8 @@ PROGRAM=libtool PACKAGE=libtool -VERSION=2.4.6 -package_revision=2.4.6 +VERSION=2.4.7 +package_revision=2.4.7 ## ------ ## @@ -64,34 +64,25 @@ # libraries, which are installed to $pkgauxdir. # Set a version string for this script. -scriptversion=2015-01-20.17; # UTC +scriptversion=2019-02-19.15; # UTC # General shell script boiler plate, and helper functions. # Written by Gary V. Vaughan, 2004 -# Copyright (C) 2004-2015 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. - -# As a special exception to the GNU General Public License, if you distribute -# this file as part of a program or library that is built using GNU Libtool, -# you may include this file under the same distribution terms that you use -# for the rest of that program. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# This is free software. There is NO warranty; not even for +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# +# Copyright (C) 2004-2019, 2021 Bootstrap Authors +# +# This file is dual licensed under the terms of the MIT license +# , and GPL version 2 or later +# . You must apply one of +# these licenses when using or redistributing this software or any of +# the files within it. See the URLs above, or the file `LICENSE` +# included in the Bootstrap distribution for the full license texts. -# Please report bugs or propose patches to gary@gnu.org. +# Please report bugs or propose patches to: +# ## ------ ## @@ -139,9 +130,12 @@ _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" fi" done - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# These NLS vars are set unconditionally (bootstrap issue #24). Unset those +# in case the environment reset is needed later and the $save_* variant is not +# defined (see the code above). +LC_ALL=C +LANGUAGE=C +export LANGUAGE LC_ALL # Make sure IFS has a sensible default sp=' ' @@ -159,6 +153,26 @@ fi +# func_unset VAR +# -------------- +# Portably unset VAR. +# In some shells, an 'unset VAR' statement leaves a non-zero return +# status if VAR is already unset, which might be problematic if the +# statement is used at the end of a function (thus poisoning its return +# value) or when 'set -e' is active (causing even a spurious abort of +# the script in this case). +func_unset () +{ + { eval $1=; (eval unset $1) >/dev/null 2>&1 && eval unset $1 || : ; } +} + + +# Make sure CDPATH doesn't cause `cd` commands to output the target dir. +func_unset CDPATH + +# Make sure ${,E,F}GREP behave sanely. +func_unset GREP_OPTIONS + ## ------------------------- ## ## Locate command utilities. ## @@ -259,7 +273,7 @@ rm -f conftest.in conftest.tmp conftest.nl conftest.out } - func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin + func_path_progs "sed gsed" func_check_prog_sed "$PATH:/usr/xpg4/bin" rm -f conftest.sed SED=$func_path_progs_result } @@ -295,7 +309,7 @@ rm -f conftest.in conftest.tmp conftest.nl conftest.out } - func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin + func_path_progs "grep ggrep" func_check_prog_grep "$PATH:/usr/xpg4/bin" GREP=$func_path_progs_result } @@ -360,6 +374,35 @@ s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g s/\n//g" +# require_check_ifs_backslash +# --------------------------- +# Check if we can use backslash as IFS='\' separator, and set +# $check_ifs_backshlash_broken to ':' or 'false'. +require_check_ifs_backslash=func_require_check_ifs_backslash +func_require_check_ifs_backslash () +{ + _G_save_IFS=$IFS + IFS='\' + _G_check_ifs_backshlash='a\\b' + for _G_i in $_G_check_ifs_backshlash + do + case $_G_i in + a) + check_ifs_backshlash_broken=false + ;; + '') + break + ;; + *) + check_ifs_backshlash_broken=: + break + ;; + esac + done + IFS=$_G_save_IFS + require_check_ifs_backslash=: +} + ## ----------------- ## ## Global variables. ## @@ -580,16 +623,16 @@ { $debug_cmd - func_quote_for_eval "$2" - eval "$1+=\\ \$func_quote_for_eval_result" + func_quote_arg pretty "$2" + eval "$1+=\\ \$func_quote_arg_result" }' else func_append_quoted () { $debug_cmd - func_quote_for_eval "$2" - eval "$1=\$$1\\ \$func_quote_for_eval_result" + func_quote_arg pretty "$2" + eval "$1=\$$1\\ \$func_quote_arg_result" } fi @@ -1091,85 +1134,203 @@ } -# func_quote_for_eval ARG... -# -------------------------- -# Aesthetically quote ARGs to be evaled later. -# This function returns two values: -# i) func_quote_for_eval_result -# double-quoted, suitable for a subsequent eval -# ii) func_quote_for_eval_unquoted_result -# has all characters that are still active within double -# quotes backslashified. -func_quote_for_eval () +# func_quote_portable EVAL ARG +# ---------------------------- +# Internal function to portably implement func_quote_arg. Note that we still +# keep attention to performance here so we as much as possible try to avoid +# calling sed binary (so far O(N) complexity as long as func_append is O(1)). +func_quote_portable () { $debug_cmd - func_quote_for_eval_unquoted_result= - func_quote_for_eval_result= - while test 0 -lt $#; do - case $1 in - *[\\\`\"\$]*) - _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; - *) - _G_unquoted_arg=$1 ;; - esac - if test -n "$func_quote_for_eval_unquoted_result"; then - func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" - else - func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" + $require_check_ifs_backslash + + func_quote_portable_result=$2 + + # one-time-loop (easy break) + while true + do + if $1; then + func_quote_portable_result=`$ECHO "$2" | $SED \ + -e "$sed_double_quote_subst" -e "$sed_double_backslash"` + break fi - case $_G_unquoted_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting, command substitution and variable expansion - # for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - _G_quoted_arg=\"$_G_unquoted_arg\" + # Quote for eval. + case $func_quote_portable_result in + *[\\\`\"\$]*) + # Fallback to sed for $func_check_bs_ifs_broken=:, or when the string + # contains the shell wildcard characters. + case $check_ifs_backshlash_broken$func_quote_portable_result in + :*|*[\[\*\?]*) + func_quote_portable_result=`$ECHO "$func_quote_portable_result" \ + | $SED "$sed_quote_subst"` + break + ;; + esac + + func_quote_portable_old_IFS=$IFS + for _G_char in '\' '`' '"' '$' + do + # STATE($1) PREV($2) SEPARATOR($3) + set start "" "" + func_quote_portable_result=dummy"$_G_char$func_quote_portable_result$_G_char"dummy + IFS=$_G_char + for _G_part in $func_quote_portable_result + do + case $1 in + quote) + func_append func_quote_portable_result "$3$2" + set quote "$_G_part" "\\$_G_char" + ;; + start) + set first "" "" + func_quote_portable_result= + ;; + first) + set quote "$_G_part" "" + ;; + esac + done + done + IFS=$func_quote_portable_old_IFS ;; - *) - _G_quoted_arg=$_G_unquoted_arg - ;; + *) ;; esac - - if test -n "$func_quote_for_eval_result"; then - func_append func_quote_for_eval_result " $_G_quoted_arg" - else - func_append func_quote_for_eval_result "$_G_quoted_arg" - fi - shift + break done + + func_quote_portable_unquoted_result=$func_quote_portable_result + case $func_quote_portable_result in + # double-quote args containing shell metacharacters to delay + # word splitting, command substitution and variable expansion + # for a subsequent eval. + # many bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + func_quote_portable_result=\"$func_quote_portable_result\" + ;; + esac } -# func_quote_for_expand ARG -# ------------------------- -# Aesthetically quote ARG to be evaled later; same as above, -# but do not quote variable references. -func_quote_for_expand () -{ - $debug_cmd +# func_quotefast_eval ARG +# ----------------------- +# Quote one ARG (internal). This is equivalent to 'func_quote_arg eval ARG', +# but optimized for speed. Result is stored in $func_quotefast_eval. +if test xyes = `(x=; printf -v x %q yes; echo x"$x") 2>/dev/null`; then + printf -v _GL_test_printf_tilde %q '~' + if test '\~' = "$_GL_test_printf_tilde"; then + func_quotefast_eval () + { + printf -v func_quotefast_eval_result %q "$1" + } + else + # Broken older Bash implementations. Make those faster too if possible. + func_quotefast_eval () + { + case $1 in + '~'*) + func_quote_portable false "$1" + func_quotefast_eval_result=$func_quote_portable_result + ;; + *) + printf -v func_quotefast_eval_result %q "$1" + ;; + esac + } + fi +else + func_quotefast_eval () + { + func_quote_portable false "$1" + func_quotefast_eval_result=$func_quote_portable_result + } +fi - case $1 in - *[\\\`\"]*) - _G_arg=`$ECHO "$1" | $SED \ - -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; - *) - _G_arg=$1 ;; + +# func_quote_arg MODEs ARG +# ------------------------ +# Quote one ARG to be evaled later. MODEs argument may contain zero or more +# specifiers listed below separated by ',' character. This function returns two +# values: +# i) func_quote_arg_result +# double-quoted (when needed), suitable for a subsequent eval +# ii) func_quote_arg_unquoted_result +# has all characters that are still active within double +# quotes backslashified. Available only if 'unquoted' is specified. +# +# Available modes: +# ---------------- +# 'eval' (default) +# - escape shell special characters +# 'expand' +# - the same as 'eval'; but do not quote variable references +# 'pretty' +# - request aesthetic output, i.e. '"a b"' instead of 'a\ b'. This might +# be used later in func_quote to get output like: 'echo "a b"' instead +# of 'echo a\ b'. This is slower than default on some shells. +# 'unquoted' +# - produce also $func_quote_arg_unquoted_result which does not contain +# wrapping double-quotes. +# +# Examples for 'func_quote_arg pretty,unquoted string': +# +# string | *_result | *_unquoted_result +# ------------+-----------------------+------------------- +# " | \" | \" +# a b | "a b" | a b +# "a b" | "\"a b\"" | \"a b\" +# * | "*" | * +# z="${x-$y}" | "z=\"\${x-\$y}\"" | z=\"\${x-\$y}\" +# +# Examples for 'func_quote_arg pretty,unquoted,expand string': +# +# string | *_result | *_unquoted_result +# --------------+---------------------+-------------------- +# z="${x-$y}" | "z=\"${x-$y}\"" | z=\"${x-$y}\" +func_quote_arg () +{ + _G_quote_expand=false + case ,$1, in + *,expand,*) + _G_quote_expand=: + ;; esac - case $_G_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting and command substitution for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - _G_arg=\"$_G_arg\" + case ,$1, in + *,pretty,*|*,expand,*|*,unquoted,*) + func_quote_portable $_G_quote_expand "$2" + func_quote_arg_result=$func_quote_portable_result + func_quote_arg_unquoted_result=$func_quote_portable_unquoted_result + ;; + *) + # Faster quote-for-eval for some shells. + func_quotefast_eval "$2" + func_quote_arg_result=$func_quotefast_eval_result ;; esac +} + - func_quote_for_expand_result=$_G_arg +# func_quote MODEs ARGs... +# ------------------------ +# Quote all ARGs to be evaled later and join them into single command. See +# func_quote_arg's description for more info. +func_quote () +{ + $debug_cmd + _G_func_quote_mode=$1 ; shift + func_quote_result= + while test 0 -lt $#; do + func_quote_arg "$_G_func_quote_mode" "$1" + if test -n "$func_quote_result"; then + func_append func_quote_result " $func_quote_arg_result" + else + func_append func_quote_result "$func_quote_arg_result" + fi + shift + done } @@ -1215,8 +1376,8 @@ _G_cmd=$1 _G_fail_exp=${2-':'} - func_quote_for_expand "$_G_cmd" - eval "func_notquiet $func_quote_for_expand_result" + func_quote_arg pretty,expand "$_G_cmd" + eval "func_notquiet $func_quote_arg_result" $opt_dry_run || { eval "$_G_cmd" @@ -1241,8 +1402,8 @@ _G_fail_exp=${2-':'} $opt_quiet || { - func_quote_for_expand "$_G_cmd" - eval "func_echo $func_quote_for_expand_result" + func_quote_arg expand,pretty "$_G_cmd" + eval "func_echo $func_quote_arg_result" } $opt_dry_run || { @@ -1369,30 +1530,26 @@ # End: #! /bin/sh -# Set a version string for this script. -scriptversion=2014-01-07.03; # UTC - # A portable, pluggable option parser for Bourne shell. # Written by Gary V. Vaughan, 2010 -# Copyright (C) 2010-2015 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program 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 General Public License for more details. +# This is free software. There is NO warranty; not even for +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# +# Copyright (C) 2010-2019, 2021 Bootstrap Authors +# +# This file is dual licensed under the terms of the MIT license +# , and GPL version 2 or later +# . You must apply one of +# these licenses when using or redistributing this software or any of +# the files within it. See the URLs above, or the file `LICENSE` +# included in the Bootstrap distribution for the full license texts. -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# Please report bugs or propose patches to: +# -# Please report bugs or propose patches to gary@gnu.org. +# Set a version string for this script. +scriptversion=2019-02-19.15; # UTC ## ------ ## @@ -1415,7 +1572,7 @@ # # In order for the '--version' option to work, you will need to have a # suitably formatted comment like the one at the top of this file -# starting with '# Written by ' and ending with '# warranty; '. +# starting with '# Written by ' and ending with '# Copyright'. # # For '-h' and '--help' to work, you will also need a one line # description of your script's purpose in a comment directly above the @@ -1427,7 +1584,7 @@ # to display verbose messages only when your user has specified # '--verbose'. # -# After sourcing this file, you can plug processing for additional +# After sourcing this file, you can plug in processing for additional # options by amending the variables from the 'Configuration' section # below, and following the instructions in the 'Option parsing' # section further down. @@ -1476,8 +1633,8 @@ ## ------------------------- ## # This section contains functions for adding, removing, and running hooks -# to the main code. A hook is just a named list of of function, that can -# be run in order later on. +# in the main code. A hook is just a list of function names that can be +# run in order later on. # func_hookable FUNC_NAME # ----------------------- @@ -1510,7 +1667,8 @@ # func_remove_hook FUNC_NAME HOOK_FUNC # ------------------------------------ -# Remove HOOK_FUNC from the list of functions called by FUNC_NAME. +# Remove HOOK_FUNC from the list of hook functions to be called by +# FUNC_NAME. func_remove_hook () { $debug_cmd @@ -1519,10 +1677,28 @@ } +# func_propagate_result FUNC_NAME_A FUNC_NAME_B +# --------------------------------------------- +# If the *_result variable of FUNC_NAME_A _is set_, assign its value to +# *_result variable of FUNC_NAME_B. +func_propagate_result () +{ + $debug_cmd + + func_propagate_result_result=: + if eval "test \"\${${1}_result+set}\" = set" + then + eval "${2}_result=\$${1}_result" + else + func_propagate_result_result=false + fi +} + + # func_run_hooks FUNC_NAME [ARG]... # --------------------------------- # Run all hook functions registered to FUNC_NAME. -# It is assumed that the list of hook functions contains nothing more +# It's assumed that the list of hook functions contains nothing more # than a whitespace-delimited list of legal shell function names, and # no effort is wasted trying to catch shell meta-characters or preserve # whitespace. @@ -1532,22 +1708,19 @@ case " $hookable_fns " in *" $1 "*) ;; - *) func_fatal_error "'$1' does not support hook funcions.n" ;; + *) func_fatal_error "'$1' does not support hook functions." ;; esac eval _G_hook_fns=\$$1_hooks; shift for _G_hook in $_G_hook_fns; do - eval $_G_hook '"$@"' - - # store returned options list back into positional - # parameters for next 'cmd' execution. - eval _G_hook_result=\$${_G_hook}_result - eval set dummy "$_G_hook_result"; shift + func_unset "${_G_hook}_result" + eval $_G_hook '${1+"$@"}' + func_propagate_result $_G_hook func_run_hooks + if $func_propagate_result_result; then + eval set dummy "$func_run_hooks_result"; shift + fi done - - func_quote_for_eval ${1+"$@"} - func_run_hooks_result=$func_quote_for_eval_result } @@ -1557,10 +1730,18 @@ ## --------------- ## # In order to add your own option parsing hooks, you must accept the -# full positional parameter list in your hook function, remove any -# options that you action, and then pass back the remaining unprocessed -# options in '_result', escaped suitably for -# 'eval'. Like this: +# full positional parameter list from your hook function. You may remove +# or edit any options that you action, and then pass back the remaining +# unprocessed options in '_result', escaped +# suitably for 'eval'. +# +# The '_result' variable is automatically unset +# before your hook gets called; for best performance, only set the +# *_result variable when necessary (i.e. don't call the 'func_quote' +# function unnecessarily because it can be an expensive operation on some +# machines). +# +# Like this: # # my_options_prep () # { @@ -1570,9 +1751,8 @@ # usage_message=$usage_message' # -s, --silent don'\''t print informational messages # ' -# -# func_quote_for_eval ${1+"$@"} -# my_options_prep_result=$func_quote_for_eval_result +# # No change in '$@' (ignored completely by this hook). Leave +# # my_options_prep_result variable intact. # } # func_add_hook func_options_prep my_options_prep # @@ -1581,25 +1761,36 @@ # { # $debug_cmd # -# # Note that for efficiency, we parse as many options as we can +# args_changed=false +# +# # Note that, for efficiency, we parse as many options as we can # # recognise in a loop before passing the remainder back to the # # caller on the first unrecognised argument we encounter. # while test $# -gt 0; do # opt=$1; shift # case $opt in -# --silent|-s) opt_silent=: ;; +# --silent|-s) opt_silent=: +# args_changed=: +# ;; # # Separate non-argument short options: # -s*) func_split_short_opt "$_G_opt" # set dummy "$func_split_short_opt_name" \ # "-$func_split_short_opt_arg" ${1+"$@"} # shift +# args_changed=: # ;; -# *) set dummy "$_G_opt" "$*"; shift; break ;; +# *) # Make sure the first unrecognised option "$_G_opt" +# # is added back to "$@" in case we need it later, +# # if $args_changed was set to 'true'. +# set dummy "$_G_opt" ${1+"$@"}; shift; break ;; # esac # done # -# func_quote_for_eval ${1+"$@"} -# my_silent_option_result=$func_quote_for_eval_result +# # Only call 'func_quote' here if we processed at least one argument. +# if $args_changed; then +# func_quote eval ${1+"$@"} +# my_silent_option_result=$func_quote_result +# fi # } # func_add_hook func_parse_options my_silent_option # @@ -1610,17 +1801,26 @@ # # $opt_silent && $opt_verbose && func_fatal_help "\ # '--silent' and '--verbose' options are mutually exclusive." -# -# func_quote_for_eval ${1+"$@"} -# my_option_validation_result=$func_quote_for_eval_result # } # func_add_hook func_validate_options my_option_validation # -# You'll alse need to manually amend $usage_message to reflect the extra +# You'll also need to manually amend $usage_message to reflect the extra # options you parse. It's preferable to append if you can, so that # multiple option parsing hooks can be added safely. +# func_options_finish [ARG]... +# ---------------------------- +# Finishing the option parse loop (call 'func_options' hooks ATM). +func_options_finish () +{ + $debug_cmd + + func_run_hooks func_options ${1+"$@"} + func_propagate_result func_run_hooks func_options_finish +} + + # func_options [ARG]... # --------------------- # All the functions called inside func_options are hookable. See the @@ -1630,17 +1830,27 @@ { $debug_cmd - func_options_prep ${1+"$@"} - eval func_parse_options \ - ${func_options_prep_result+"$func_options_prep_result"} - eval func_validate_options \ - ${func_parse_options_result+"$func_parse_options_result"} + _G_options_quoted=false - eval func_run_hooks func_options \ - ${func_validate_options_result+"$func_validate_options_result"} + for my_func in options_prep parse_options validate_options options_finish + do + func_unset func_${my_func}_result + func_unset func_run_hooks_result + eval func_$my_func '${1+"$@"}' + func_propagate_result func_$my_func func_options + if $func_propagate_result_result; then + eval set dummy "$func_options_result"; shift + _G_options_quoted=: + fi + done - # save modified positional parameters for caller - func_options_result=$func_run_hooks_result + $_G_options_quoted || { + # As we (func_options) are top-level options-parser function and + # nobody quoted "$@" for us yet, we need to do it explicitly for + # caller. + func_quote eval ${1+"$@"} + func_options_result=$func_quote_result + } } @@ -1649,9 +1859,8 @@ # All initialisations required before starting the option parse loop. # Note that when calling hook functions, we pass through the list of # positional parameters. If a hook function modifies that list, and -# needs to propogate that back to rest of this script, then the complete -# modified list must be put in 'func_run_hooks_result' before -# returning. +# needs to propagate that back to rest of this script, then the complete +# modified list must be put in 'func_run_hooks_result' before returning. func_hookable func_options_prep func_options_prep () { @@ -1662,9 +1871,7 @@ opt_warning_types= func_run_hooks func_options_prep ${1+"$@"} - - # save modified positional parameters for caller - func_options_prep_result=$func_run_hooks_result + func_propagate_result func_run_hooks func_options_prep } @@ -1676,25 +1883,32 @@ { $debug_cmd - func_parse_options_result= - + _G_parse_options_requote=false # this just eases exit handling while test $# -gt 0; do # Defer to hook functions for initial option parsing, so they # get priority in the event of reusing an option name. func_run_hooks func_parse_options ${1+"$@"} - - # Adjust func_parse_options positional parameters to match - eval set dummy "$func_run_hooks_result"; shift + func_propagate_result func_run_hooks func_parse_options + if $func_propagate_result_result; then + eval set dummy "$func_parse_options_result"; shift + # Even though we may have changed "$@", we passed the "$@" array + # down into the hook and it quoted it for us (because we are in + # this if-branch). No need to quote it again. + _G_parse_options_requote=false + fi # Break out of the loop if we already parsed every option. test $# -gt 0 || break + # We expect that one of the options parsed in this function matches + # and thus we remove _G_opt from "$@" and need to re-quote. + _G_match_parse_options=: _G_opt=$1 shift case $_G_opt in --debug|-x) debug_cmd='set -x' - func_echo "enabling shell trace mode" + func_echo "enabling shell trace mode" >&2 $debug_cmd ;; @@ -1704,7 +1918,10 @@ ;; --warnings|--warning|-W) - test $# = 0 && func_missing_arg $_G_opt && break + if test $# = 0 && func_missing_arg $_G_opt; then + _G_parse_options_requote=: + break + fi case " $warning_categories $1" in *" $1 "*) # trailing space prevents matching last $1 above @@ -1757,15 +1974,24 @@ shift ;; - --) break ;; + --) _G_parse_options_requote=: ; break ;; -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; - *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; + *) set dummy "$_G_opt" ${1+"$@"}; shift + _G_match_parse_options=false + break + ;; esac + + if $_G_match_parse_options; then + _G_parse_options_requote=: + fi done - # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - func_parse_options_result=$func_quote_for_eval_result + if $_G_parse_options_requote; then + # save modified positional parameters for caller + func_quote eval ${1+"$@"} + func_parse_options_result=$func_quote_result + fi } @@ -1782,12 +2008,10 @@ test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" func_run_hooks func_validate_options ${1+"$@"} + func_propagate_result func_run_hooks func_validate_options # Bail if the options were screwed! $exit_cmd $EXIT_FAILURE - - # save modified positional parameters for caller - func_validate_options_result=$func_run_hooks_result } @@ -1843,8 +2067,8 @@ # func_split_equals STRING # ------------------------ -# Set func_split_equals_lhs and func_split_equals_rhs shell variables after -# splitting STRING at the '=' sign. +# Set func_split_equals_lhs and func_split_equals_rhs shell variables +# after splitting STRING at the '=' sign. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ @@ -1859,8 +2083,9 @@ func_split_equals_lhs=${1%%=*} func_split_equals_rhs=${1#*=} - test "x$func_split_equals_lhs" = "x$1" \ - && func_split_equals_rhs= + if test "x$func_split_equals_lhs" = "x$1"; then + func_split_equals_rhs= + fi }' else # ...otherwise fall back to using expr, which is often a shell builtin. @@ -1870,7 +2095,7 @@ func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` func_split_equals_rhs= - test "x$func_split_equals_lhs" = "x$1" \ + test "x$func_split_equals_lhs=" = "x$1" \ || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` } fi #func_split_equals @@ -1896,7 +2121,7 @@ { $debug_cmd - func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` + func_split_short_opt_name=`expr "x$1" : 'x\(-.\)'` func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` } fi #func_split_short_opt @@ -1938,31 +2163,44 @@ # func_version # ------------ # Echo version message to standard output and exit. +# The version message is extracted from the calling file's header +# comments, with leading '# ' stripped: +# 1. First display the progname and version +# 2. Followed by the header comment line matching /^# Written by / +# 3. Then a blank line followed by the first following line matching +# /^# Copyright / +# 4. Immediately followed by any lines between the previous matches, +# except lines preceding the intervening completely blank line. +# For example, see the header comments of this file. func_version () { $debug_cmd printf '%s\n' "$progname $scriptversion" $SED -n ' - /(C)/!b go - :more - /\./!{ - N - s|\n# | | - b more - } - :go - /^# Written by /,/# warranty; / { - s|^# || - s|^# *$|| - s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| - p + /^# Written by /!b + s|^# ||; p; n + + :fwd2blnk + /./ { + n + b fwd2blnk } - /^# Written by / { - s|^# || - p + p; n + + :holdwrnt + s|^# || + s|^# *$|| + /^Copyright /!{ + /./H + n + b holdwrnt } - /^warranty; /q' < "$progpath" + + s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| + G + s|\(\n\)\n*|\1|g + p; q' < "$progpath" exit $? } @@ -1972,12 +2210,12 @@ # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) -# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" +# time-stamp-pattern: "30/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: # Set a version string. -scriptversion='(GNU libtool) 2.4.6' +scriptversion='(GNU libtool) 2.4.7' # func_echo ARG... @@ -2068,7 +2306,7 @@ compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) - version: $progname (GNU libtool) 2.4.6 + version: $progname (GNU libtool) 2.4.7 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` @@ -2270,6 +2508,8 @@ nonopt= preserve_args= + _G_rc_lt_options_prep=: + # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) @@ -2293,11 +2533,16 @@ uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; + *) + _G_rc_lt_options_prep=false + ;; esac - # Pass back the list of options. - func_quote_for_eval ${1+"$@"} - libtool_options_prep_result=$func_quote_for_eval_result + if $_G_rc_lt_options_prep; then + # Pass back the list of options. + func_quote eval ${1+"$@"} + libtool_options_prep_result=$func_quote_result + fi } func_add_hook func_options_prep libtool_options_prep @@ -2309,9 +2554,12 @@ { $debug_cmd + _G_rc_lt_parse_options=false + # Perform our own loop to consume as many options as possible in # each iteration. while test $# -gt 0; do + _G_match_lt_parse_options=: _G_opt=$1 shift case $_G_opt in @@ -2386,15 +2634,20 @@ func_append preserve_args " $_G_opt" ;; - # An option not handled by this hook function: - *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; + # An option not handled by this hook function: + *) set dummy "$_G_opt" ${1+"$@"} ; shift + _G_match_lt_parse_options=false + break + ;; esac + $_G_match_lt_parse_options && _G_rc_lt_parse_options=: done - - # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - libtool_parse_options_result=$func_quote_for_eval_result + if $_G_rc_lt_parse_options; then + # save modified positional parameters for caller + func_quote eval ${1+"$@"} + libtool_parse_options_result=$func_quote_result + fi } func_add_hook func_parse_options libtool_parse_options @@ -2415,17 +2668,10 @@ # preserve --debug test : = "$debug_cmd" || func_append preserve_args " --debug" - case $host in - # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 - # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 - *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) - # don't eliminate duplications in $postdeps and $predeps - opt_duplicate_compiler_generated_deps=: - ;; - *) - opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps - ;; - esac + # Keeping compiler generated duplicates in $postdeps and $predeps is not + # harmful, and is necessary in a majority of systems that use it to satisfy + # symbol dependencies. + opt_duplicate_compiler_generated_deps=: $opt_help || { # Sanity checks first: @@ -2451,8 +2697,8 @@ } # Pass back the unparsed argument list - func_quote_for_eval ${1+"$@"} - libtool_validate_options_result=$func_quote_for_eval_result + func_quote eval ${1+"$@"} + libtool_validate_options_result=$func_quote_result } func_add_hook func_validate_options libtool_validate_options @@ -3418,8 +3664,8 @@ esac done - func_quote_for_eval "$libobj" - test "X$libobj" != "X$func_quote_for_eval_result" \ + func_quote_arg pretty "$libobj" + test "X$libobj" != "X$func_quote_arg_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name '$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" @@ -3492,8 +3738,8 @@ func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result - func_quote_for_eval "$srcfile" - qsrcfile=$func_quote_for_eval_result + func_quote_arg pretty "$srcfile" + qsrcfile=$func_quote_arg_result # Only build a PIC object if we are building libtool libraries. if test yes = "$build_libtool_libs"; then @@ -3648,7 +3894,8 @@ -prefer-non-pic try to build non-PIC objects only -shared do not build a '.o' file suitable for static linking -static only build a '.o' file suitable for static linking - -Wc,FLAG pass FLAG directly to the compiler + -Wc,FLAG + -Xcompiler FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a 'standard' object file from the given SOURCEFILE. @@ -3754,6 +4001,8 @@ -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler + -Wa,FLAG + -Xassembler FLAG pass linker-specific FLAG directly to the assembler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) @@ -4096,8 +4345,8 @@ case $nonopt in *shtool*) :;; *) false;; esac then # Aesthetically quote it. - func_quote_for_eval "$nonopt" - install_prog="$func_quote_for_eval_result " + func_quote_arg pretty "$nonopt" + install_prog="$func_quote_arg_result " arg=$1 shift else @@ -4107,8 +4356,8 @@ # The real first argument should be the name of the installation program. # Aesthetically quote it. - func_quote_for_eval "$arg" - func_append install_prog "$func_quote_for_eval_result" + func_quote_arg pretty "$arg" + func_append install_prog "$func_quote_arg_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; @@ -4165,12 +4414,12 @@ esac # Aesthetically quote the argument. - func_quote_for_eval "$arg" - func_append install_prog " $func_quote_for_eval_result" + func_quote_arg pretty "$arg" + func_append install_prog " $func_quote_arg_result" if test -n "$arg2"; then - func_quote_for_eval "$arg2" + func_quote_arg pretty "$arg2" fi - func_append install_shared_prog " $func_quote_for_eval_result" + func_append install_shared_prog " $func_quote_arg_result" done test -z "$install_prog" && \ @@ -4181,8 +4430,8 @@ if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else - func_quote_for_eval "$install_override_mode" - func_append install_shared_prog " -m $func_quote_for_eval_result" + func_quote_arg pretty "$install_override_mode" + func_append install_shared_prog " -m $func_quote_arg_result" fi fi @@ -4478,8 +4727,8 @@ relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_quiet || { - func_quote_for_expand "$relink_command" - eval "func_echo $func_quote_for_expand_result" + func_quote_arg expand,pretty "$relink_command" + eval "func_echo $func_quote_arg_result" } if eval "$relink_command"; then : else @@ -5258,7 +5507,8 @@ if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" - qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` + func_quote_arg pretty "$ECHO" + qECHO=$func_quote_arg_result $ECHO "\ # A function that is used when there is no print builtin or printf. @@ -5268,7 +5518,7 @@ \$1 _LTECHO_EOF' } - ECHO=\"$qECHO\" + ECHO=$qECHO fi # Very basic option parsing. These options are (a) specific to @@ -6611,9 +6861,9 @@ while test "$#" -gt 0; do arg=$1 shift - func_quote_for_eval "$arg" - qarg=$func_quote_for_eval_unquoted_result - func_append libtool_args " $func_quote_for_eval_result" + func_quote_arg pretty,unquoted "$arg" + qarg=$func_quote_arg_unquoted_result + func_append libtool_args " $func_quote_arg_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then @@ -6849,6 +7099,13 @@ prev= continue ;; + xassembler) + func_append compiler_flags " -Xassembler $qarg" + prev= + func_append compile_command " -Xassembler $qarg" + func_append finalize_command " -Xassembler $qarg" + continue + ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" @@ -7019,7 +7276,7 @@ # These systems don't actually have a C library (as such) test X-lc = "X$arg" && continue ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*) # Do not include libc due to us having libc/libc_r. test X-lc = "X$arg" && continue ;; @@ -7039,7 +7296,7 @@ esac elif test X-lc_r = "X$arg"; then case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*) # Do not include libc_r directly, use -pthread flag. continue ;; @@ -7069,8 +7326,20 @@ prev=xcompiler continue ;; - - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + # Solaris ld rejects as of 11.4. Refer to Oracle bug 22985199. + -pthread) + case $host in + *solaris2*) ;; + *) + case "$new_inherited_linker_flags " in + *" $arg "*) ;; + * ) func_append new_inherited_linker_flags " $arg" ;; + esac + ;; + esac + continue + ;; + -mt|-mthreads|-kthread|-Kthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" @@ -7211,9 +7480,9 @@ save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs - func_quote_for_eval "$flag" - func_append arg " $func_quote_for_eval_result" - func_append compiler_flags " $func_quote_for_eval_result" + func_quote_arg pretty "$flag" + func_append arg " $func_quote_arg_result" + func_append compiler_flags " $func_quote_arg_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" @@ -7227,16 +7496,21 @@ save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs - func_quote_for_eval "$flag" - func_append arg " $wl$func_quote_for_eval_result" - func_append compiler_flags " $wl$func_quote_for_eval_result" - func_append linker_flags " $func_quote_for_eval_result" + func_quote_arg pretty "$flag" + func_append arg " $wl$func_quote_arg_result" + func_append compiler_flags " $wl$func_quote_arg_result" + func_append linker_flags " $func_quote_arg_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; + -Xassembler) + prev=xassembler + continue + ;; + -Xcompiler) prev=xcompiler continue @@ -7254,8 +7528,8 @@ # -msg_* for osf cc -msg_*) - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result + func_quote_arg pretty "$arg" + arg=$func_quote_arg_result ;; # Flags to be passed through unchanged, with rationale: @@ -7274,12 +7548,15 @@ # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization # -specs=* GCC specs files # -stdlib=* select c++ std lib with clang + # -fsanitize=* Clang/GCC memory and address sanitizer + # -fuse-ld=* Linker select flags for GCC + # -Wa,* Pass flags directly to the assembler -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ - -specs=*) - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result + -specs=*|-fsanitize=*|-fuse-ld=*|-Wa,*) + func_quote_arg pretty "$arg" + arg=$func_quote_arg_result func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" @@ -7300,15 +7577,15 @@ continue else # Otherwise treat like 'Some other compiler flag' below - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result + func_quote_arg pretty "$arg" + arg=$func_quote_arg_result fi ;; # Some other compiler flag. -* | +*) - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result + func_quote_arg pretty "$arg" + arg=$func_quote_arg_result ;; *.$objext) @@ -7428,8 +7705,8 @@ *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result + func_quote_arg pretty "$arg" + arg=$func_quote_arg_result ;; esac # arg @@ -8634,7 +8911,7 @@ test CXX = "$tagname" && { case $host_os in linux*) - case `$CC -V 2>&1 | sed 5q` in + case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C++ 5.9 func_suncc_cstd_abi @@ -8807,7 +9084,7 @@ # case $version_type in # correct linux to gnu/linux during the next big refactor - darwin|freebsd-elf|linux|osf|windows|none) + darwin|freebsd-elf|linux|midnightbsd-elf|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor @@ -8898,7 +9175,7 @@ versuffix=.$current.$revision ;; - freebsd-elf) + freebsd-elf | midnightbsd-elf) func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision @@ -9124,7 +9401,7 @@ *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-midnightbsd*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) @@ -9935,8 +10212,8 @@ for cmd in $concat_cmds; do IFS=$save_ifs $opt_quiet || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" + func_quote_arg expand,pretty "$cmd" + eval "func_echo $func_quote_arg_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? @@ -10029,8 +10306,8 @@ eval cmd=\"$cmd\" IFS=$save_ifs $opt_quiet || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" + func_quote_arg expand,pretty "$cmd" + eval "func_echo $func_quote_arg_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? @@ -10504,12 +10781,13 @@ elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + func_quote_arg pretty "$var_value" + relink_command="$var=$func_quote_arg_result; export $var; $relink_command" fi done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + func_quote eval cd "`pwd`" + func_quote_arg pretty,unquoted "($func_quote_result; $relink_command)" + relink_command=$func_quote_arg_unquoted_result fi # Only actually do things if not in dry run mode. @@ -10749,13 +11027,15 @@ elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + func_quote_arg pretty,unquoted "$var_value" + relink_command="$var=$func_quote_arg_unquoted_result; export $var; $relink_command" fi done # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + func_quote eval cd "`pwd`" + relink_command="($func_quote_result; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + func_quote_arg pretty,unquoted "$relink_command" + relink_command=$func_quote_arg_unquoted_result if test yes = "$hardcode_automatic"; then relink_command= fi diff -Nru libfshfs-20201104/m4/gettext.m4 libfshfs-20240221/m4/gettext.m4 --- libfshfs-20201104/m4/gettext.m4 2016-02-17 07:53:59.000000000 +0000 +++ libfshfs-20240221/m4/gettext.m4 2023-12-03 09:06:54.000000000 +0000 @@ -1,16 +1,16 @@ -# gettext.m4 serial 63 (gettext-0.18) -dnl Copyright (C) 1995-2010 Free Software Foundation, Inc. +# gettext.m4 serial 71 (gettext-0.20.2) +dnl Copyright (C) 1995-2014, 2016, 2018-2020 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl -dnl This file can can be used in projects which are not available under -dnl the GNU General Public License or the GNU Library General Public +dnl This file can be used in projects which are not available under +dnl the GNU General Public License or the GNU Lesser General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered -dnl by the GNU Library General Public License, and the rest of the GNU -dnl gettext package package is covered by the GNU General Public License. +dnl by the GNU Lesser General Public License, and the rest of the GNU +dnl gettext package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: @@ -20,22 +20,20 @@ dnl Macro to add for using GNU gettext. dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). -dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The -dnl default (if it is not specified or empty) is 'no-libtool'. -dnl INTLSYMBOL should be 'external' for packages with no intl directory, -dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. +dnl INTLSYMBOL must be one of 'external', 'use-libtool'. +dnl INTLSYMBOL should be 'external' for packages other than GNU gettext, and +dnl 'use-libtool' for the packages 'gettext-runtime' and 'gettext-tools'. dnl If INTLSYMBOL is 'use-libtool', then a libtool library dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, dnl depending on --{enable,disable}-{shared,static} and on the presence of -dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library -dnl $(top_builddir)/intl/libintl.a will be created. +dnl AM-DISABLE-SHARED). dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext dnl implementations (in libc or libintl) without the ngettext() function dnl will be ignored. If NEEDSYMBOL is specified and is dnl 'need-formatstring-macros', then GNU gettext implementations that don't dnl support the ISO C 99 formatstring macros will be ignored. dnl INTLDIR is used to find the intl libraries. If empty, -dnl the value `$(top_builddir)/intl/' is used. +dnl the value '$(top_builddir)/intl/' is used. dnl dnl The result of the configuration is one of three cases: dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled @@ -57,19 +55,17 @@ AC_DEFUN([AM_GNU_GETTEXT], [ dnl Argument checking. - ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , + ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [use-libtool], , [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT -])])])])]) +])])])]) ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old], - [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])]) + [errprint([ERROR: Use of AM_GNU_GETTEXT without [external] argument is no longer supported. +])]) ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT ])])])]) define([gt_included_intl], - ifelse([$1], [external], - ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]), - [yes])) - define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], [])) + ifelse([$1], [external], [no], [yes])) gt_NEEDS_INIT AM_GNU_GETTEXT_NEED([$2]) @@ -91,13 +87,12 @@ dnl again, outside any 'if'. There are two solutions: dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. - dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not - dnl documented, we avoid it. + dnl Since AC_PROVIDE_IFELSE is not documented, we avoid it. ifelse(gt_included_intl, yes, , [ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) ]) - dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation. + dnl Sometimes, on Mac OS X, libintl requires linking with CoreFoundation. gt_INTL_MACOSX dnl Set USE_NLS. @@ -157,12 +152,23 @@ fi AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc], - [AC_TRY_LINK([#include -$gt_revision_test_code + [AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#ifndef __GNU_GETTEXT_SUPPORTED_REVISION extern int _nl_msg_cat_cntr; -extern int *_nl_domain_bindings;], - [bindtextdomain ("", ""); -return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings], +extern int *_nl_domain_bindings; +#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings) +#else +#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 +#endif +$gt_revision_test_code + ]], + [[ +bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION + ]])], [eval "$gt_func_gnugettext_libc=yes"], [eval "$gt_func_gnugettext_libc=no"])]) @@ -183,35 +189,57 @@ gt_save_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" dnl Now see whether libintl exists and does not depend on libiconv. - AC_TRY_LINK([#include -$gt_revision_test_code + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#ifndef __GNU_GETTEXT_SUPPORTED_REVISION extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif -const char *_nl_expand_alias (const char *);], - [bindtextdomain ("", ""); -return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], +const char *_nl_expand_alias (const char *); +#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias ("")) +#else +#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 +#endif +$gt_revision_test_code + ]], + [[ +bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION + ]])], [eval "$gt_func_gnugettext_libintl=yes"], [eval "$gt_func_gnugettext_libintl=no"]) dnl Now see whether libintl exists and depends on libiconv. if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" - AC_TRY_LINK([#include -$gt_revision_test_code + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#ifndef __GNU_GETTEXT_SUPPORTED_REVISION extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif -const char *_nl_expand_alias (const char *);], - [bindtextdomain ("", ""); -return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], - [LIBINTL="$LIBINTL $LIBICONV" - LTLIBINTL="$LTLIBINTL $LTLIBICONV" - eval "$gt_func_gnugettext_libintl=yes" - ]) +const char *_nl_expand_alias (const char *); +#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias ("")) +#else +#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 +#endif +$gt_revision_test_code + ]], + [[ +bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION + ]])], + [LIBINTL="$LIBINTL $LIBICONV" + LTLIBINTL="$LTLIBINTL $LTLIBICONV" + eval "$gt_func_gnugettext_libintl=yes" + ]) fi CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS"]) @@ -245,8 +273,8 @@ dnl Mark actions used to generate GNU NLS library. BUILD_INCLUDED_LIBINTL=yes USE_INCLUDED_LIBINTL=yes - LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD" - LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD" + LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.la $LIBICONV $LIBTHREAD" + LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.la $LTLIBICONV $LTLIBTHREAD" LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` fi @@ -314,43 +342,14 @@ fi ifelse(gt_included_intl, yes, [ - dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL - dnl to 'yes' because some of the testsuite requires it. - if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then - BUILD_INCLUDED_LIBINTL=yes - fi + dnl In GNU gettext we have to set BUILD_INCLUDED_LIBINTL to 'yes' + dnl because some of the testsuite requires it. + BUILD_INCLUDED_LIBINTL=yes dnl Make all variables we use known to autoconf. AC_SUBST([BUILD_INCLUDED_LIBINTL]) AC_SUBST([USE_INCLUDED_LIBINTL]) AC_SUBST([CATOBJEXT]) - - dnl For backward compatibility. Some configure.ins may be using this. - nls_cv_header_intl= - nls_cv_header_libgt= - - dnl For backward compatibility. Some Makefiles may be using this. - DATADIRNAME=share - AC_SUBST([DATADIRNAME]) - - dnl For backward compatibility. Some Makefiles may be using this. - INSTOBJEXT=.mo - AC_SUBST([INSTOBJEXT]) - - dnl For backward compatibility. Some Makefiles may be using this. - GENCAT=gencat - AC_SUBST([GENCAT]) - - dnl For backward compatibility. Some Makefiles may be using this. - INTLOBJS= - if test "$USE_INCLUDED_LIBINTL" = yes; then - INTLOBJS="\$(GETTOBJS)" - fi - AC_SUBST([INTLOBJS]) - - dnl Enable libtool support if the surrounding package wishes it. - INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix - AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX]) ]) dnl For backward compatibility. Some Makefiles may be using this. @@ -381,3 +380,7 @@ dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) + + +dnl Usage: AM_GNU_GETTEXT_REQUIRE_VERSION([gettext-version]) +AC_DEFUN([AM_GNU_GETTEXT_REQUIRE_VERSION], []) diff -Nru libfshfs-20201104/m4/host-cpu-c-abi.m4 libfshfs-20240221/m4/host-cpu-c-abi.m4 --- libfshfs-20201104/m4/host-cpu-c-abi.m4 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/m4/host-cpu-c-abi.m4 2023-12-03 09:06:54.000000000 +0000 @@ -0,0 +1,675 @@ +# host-cpu-c-abi.m4 serial 13 +dnl Copyright (C) 2002-2020 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible and Sam Steingold. + +dnl Sets the HOST_CPU variable to the canonical name of the CPU. +dnl Sets the HOST_CPU_C_ABI variable to the canonical name of the CPU with its +dnl C language ABI (application binary interface). +dnl Also defines __${HOST_CPU}__ and __${HOST_CPU_C_ABI}__ as C macros in +dnl config.h. +dnl +dnl This canonical name can be used to select a particular assembly language +dnl source file that will interoperate with C code on the given host. +dnl +dnl For example: +dnl * 'i386' and 'sparc' are different canonical names, because code for i386 +dnl will not run on SPARC CPUs and vice versa. They have different +dnl instruction sets. +dnl * 'sparc' and 'sparc64' are different canonical names, because code for +dnl 'sparc' and code for 'sparc64' cannot be linked together: 'sparc' code +dnl contains 32-bit instructions, whereas 'sparc64' code contains 64-bit +dnl instructions. A process on a SPARC CPU can be in 32-bit mode or in 64-bit +dnl mode, but not both. +dnl * 'mips' and 'mipsn32' are different canonical names, because they use +dnl different argument passing and return conventions for C functions, and +dnl although the instruction set of 'mips' is a large subset of the +dnl instruction set of 'mipsn32'. +dnl * 'mipsn32' and 'mips64' are different canonical names, because they use +dnl different sizes for the C types like 'int' and 'void *', and although +dnl the instruction sets of 'mipsn32' and 'mips64' are the same. +dnl * The same canonical name is used for different endiannesses. You can +dnl determine the endianness through preprocessor symbols: +dnl - 'arm': test __ARMEL__. +dnl - 'mips', 'mipsn32', 'mips64': test _MIPSEB vs. _MIPSEL. +dnl - 'powerpc64': test _BIG_ENDIAN vs. _LITTLE_ENDIAN. +dnl * The same name 'i386' is used for CPUs of type i386, i486, i586 +dnl (Pentium), AMD K7, Pentium II, Pentium IV, etc., because +dnl - Instructions that do not exist on all of these CPUs (cmpxchg, +dnl MMX, SSE, SSE2, 3DNow! etc.) are not frequently used. If your +dnl assembly language source files use such instructions, you will +dnl need to make the distinction. +dnl - Speed of execution of the common instruction set is reasonable across +dnl the entire family of CPUs. If you have assembly language source files +dnl that are optimized for particular CPU types (like GNU gmp has), you +dnl will need to make the distinction. +dnl See . +AC_DEFUN([gl_HOST_CPU_C_ABI], +[ + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([gl_C_ASM]) + AC_CACHE_CHECK([host CPU and C ABI], [gl_cv_host_cpu_c_abi], + [case "$host_cpu" in + +changequote(,)dnl + i[34567]86 ) +changequote([,])dnl + gl_cv_host_cpu_c_abi=i386 + ;; + + x86_64 ) + # On x86_64 systems, the C compiler may be generating code in one of + # these ABIs: + # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64. + # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64 + # with native Windows (mingw, MSVC). + # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32. + # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if (defined __x86_64__ || defined __amd64__ \ + || defined _M_X64 || defined _M_AMD64) + int ok; + #else + error fail + #endif + ]])], + [AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __ILP32__ || defined _ILP32 + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=x86_64-x32], + [gl_cv_host_cpu_c_abi=x86_64])], + [gl_cv_host_cpu_c_abi=i386]) + ;; + +changequote(,)dnl + alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] ) +changequote([,])dnl + gl_cv_host_cpu_c_abi=alpha + ;; + + arm* | aarch64 ) + # Assume arm with EABI. + # On arm64 systems, the C compiler may be generating code in one of + # these ABIs: + # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64. + # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32. + # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#ifdef __aarch64__ + int ok; + #else + error fail + #endif + ]])], + [AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __ILP32__ || defined _ILP32 + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=arm64-ilp32], + [gl_cv_host_cpu_c_abi=arm64])], + [# Don't distinguish little-endian and big-endian arm, since they + # don't require different machine code for simple operations and + # since the user can distinguish them through the preprocessor + # defines __ARMEL__ vs. __ARMEB__. + # But distinguish arm which passes floating-point arguments and + # return values in integer registers (r0, r1, ...) - this is + # gcc -mfloat-abi=soft or gcc -mfloat-abi=softfp - from arm which + # passes them in float registers (s0, s1, ...) and double registers + # (d0, d1, ...) - this is gcc -mfloat-abi=hard. GCC 4.6 or newer + # sets the preprocessor defines __ARM_PCS (for the first case) and + # __ARM_PCS_VFP (for the second case), but older GCC does not. + echo 'double ddd; void func (double dd) { ddd = dd; }' > conftest.c + # Look for a reference to the register d0 in the .s file. + AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c) >/dev/null 2>&1 + if LC_ALL=C grep 'd0,' conftest.$gl_asmext >/dev/null; then + gl_cv_host_cpu_c_abi=armhf + else + gl_cv_host_cpu_c_abi=arm + fi + rm -f conftest* + ]) + ;; + + hppa1.0 | hppa1.1 | hppa2.0* | hppa64 ) + # On hppa, the C compiler may be generating 32-bit code or 64-bit + # code. In the latter case, it defines _LP64 and __LP64__. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#ifdef __LP64__ + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=hppa64], + [gl_cv_host_cpu_c_abi=hppa]) + ;; + + ia64* ) + # On ia64 on HP-UX, the C compiler may be generating 64-bit code or + # 32-bit code. In the latter case, it defines _ILP32. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#ifdef _ILP32 + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=ia64-ilp32], + [gl_cv_host_cpu_c_abi=ia64]) + ;; + + mips* ) + # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this + # at 32. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64) + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=mips64], + [# In the n32 ABI, _ABIN32 is defined, _ABIO32 is not defined (but + # may later get defined by ), and _MIPS_SIM == _ABIN32. + # In the 32 ABI, _ABIO32 is defined, _ABIN32 is not defined (but + # may later get defined by ), and _MIPS_SIM == _ABIO32. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if (_MIPS_SIM == _ABIN32) + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=mipsn32], + [gl_cv_host_cpu_c_abi=mips])]) + ;; + + powerpc* ) + # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD. + # No need to distinguish them here; the caller may distinguish + # them based on the OS. + # On powerpc64 systems, the C compiler may still be generating + # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may + # be generating 64-bit code. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __powerpc64__ || defined _ARCH_PPC64 + int ok; + #else + error fail + #endif + ]])], + [# On powerpc64, there are two ABIs on Linux: The AIX compatible + # one and the ELFv2 one. The latter defines _CALL_ELF=2. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined _CALL_ELF && _CALL_ELF == 2 + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=powerpc64-elfv2], + [gl_cv_host_cpu_c_abi=powerpc64]) + ], + [gl_cv_host_cpu_c_abi=powerpc]) + ;; + + rs6000 ) + gl_cv_host_cpu_c_abi=powerpc + ;; + + riscv32 | riscv64 ) + # There are 2 architectures (with variants): rv32* and rv64*. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if __riscv_xlen == 64 + int ok; + #else + error fail + #endif + ]])], + [cpu=riscv64], + [cpu=riscv32]) + # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d. + # Size of 'long' and 'void *': + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __LP64__ + int ok; + #else + error fail + #endif + ]])], + [main_abi=lp64], + [main_abi=ilp32]) + # Float ABIs: + # __riscv_float_abi_double: + # 'float' and 'double' are passed in floating-point registers. + # __riscv_float_abi_single: + # 'float' are passed in floating-point registers. + # __riscv_float_abi_soft: + # No values are passed in floating-point registers. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __riscv_float_abi_double + int ok; + #else + error fail + #endif + ]])], + [float_abi=d], + [AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __riscv_float_abi_single + int ok; + #else + error fail + #endif + ]])], + [float_abi=f], + [float_abi='']) + ]) + gl_cv_host_cpu_c_abi="${cpu}-${main_abi}${float_abi}" + ;; + + s390* ) + # On s390x, the C compiler may be generating 64-bit (= s390x) code + # or 31-bit (= s390) code. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __LP64__ || defined __s390x__ + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=s390x], + [gl_cv_host_cpu_c_abi=s390]) + ;; + + sparc | sparc64 ) + # UltraSPARCs running Linux have `uname -m` = "sparc64", but the + # C compiler still generates 32-bit code. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __sparcv9 || defined __arch64__ + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=sparc64], + [gl_cv_host_cpu_c_abi=sparc]) + ;; + + *) + gl_cv_host_cpu_c_abi="$host_cpu" + ;; + esac + ]) + + dnl In most cases, $HOST_CPU and $HOST_CPU_C_ABI are the same. + HOST_CPU=`echo "$gl_cv_host_cpu_c_abi" | sed -e 's/-.*//'` + HOST_CPU_C_ABI="$gl_cv_host_cpu_c_abi" + AC_SUBST([HOST_CPU]) + AC_SUBST([HOST_CPU_C_ABI]) + + # This was + # AC_DEFINE_UNQUOTED([__${HOST_CPU}__]) + # AC_DEFINE_UNQUOTED([__${HOST_CPU_C_ABI}__]) + # earlier, but KAI C++ 3.2d doesn't like this. + sed -e 's/-/_/g' >> confdefs.h < -#include ], - [iconv_t cd = iconv_open("",""); - iconv(cd,NULL,NULL,NULL,NULL); - iconv_close(cd);], + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#include + ]], + [[iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd);]])], [am_cv_func_iconv=yes]) if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" - AC_TRY_LINK([#include -#include ], - [iconv_t cd = iconv_open("",""); - iconv(cd,NULL,NULL,NULL,NULL); - iconv_close(cd);], + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#include + ]], + [[iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd);]])], [am_cv_lib_iconv=yes] [am_cv_func_iconv=yes]) LIBS="$am_save_LIBS" @@ -58,33 +67,43 @@ ]) if test "$am_cv_func_iconv" = yes; then AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [ - dnl This tests against bugs in AIX 5.1, HP-UX 11.11, Solaris 10. + dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11, + dnl Solaris 10. am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi - AC_TRY_RUN([ + am_cv_func_iconv_works=no + for ac_iconv_const in '' 'const'; do + AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[ #include #include -int main () -{ + +#ifndef ICONV_CONST +# define ICONV_CONST $ac_iconv_const +#endif + ]], + [[int result = 0; /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { - static const char input[] = "\342\202\254"; /* EURO SIGN */ + static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; - const char *inptr = input; + ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, - (char **) &inptr, &inbytesleft, + &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) - return 1; + result |= 1; + iconv_close (cd_utf8_to_88591); } } /* Test against Solaris 10 bug: Failures are not distinguishable from @@ -93,17 +112,37 @@ iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); if (cd_ascii_to_88591 != (iconv_t)(-1)) { - static const char input[] = "\263"; + static ICONV_CONST char input[] = "\263"; char buf[10]; - const char *inptr = input; + ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_ascii_to_88591, - (char **) &inptr, &inbytesleft, + &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) - return 1; + result |= 2; + iconv_close (cd_ascii_to_88591); + } + } + /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ + { + iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); + if (cd_88591_to_utf8 != (iconv_t)(-1)) + { + static ICONV_CONST char input[] = "\304"; + static char buf[2] = { (char)0xDE, (char)0xAD }; + ICONV_CONST char *inptr = input; + size_t inbytesleft = 1; + char *outptr = buf; + size_t outbytesleft = 1; + size_t res = iconv (cd_88591_to_utf8, + &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) + result |= 4; + iconv_close (cd_88591_to_utf8); } } #if 0 /* This bug could be worked around by the caller. */ @@ -112,37 +151,53 @@ iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { - static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; + static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; - const char *inptr = input; + ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, - (char **) &inptr, &inbytesleft, + &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) - return 1; + result |= 8; + iconv_close (cd_88591_to_utf8); } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ - if (/* Try standardized names. */ - iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) - /* Try IRIX, OSF/1 names. */ - && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) - /* Try AIX names. */ - && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) - /* Try HP-UX names. */ - && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) - return 1; - return 0; -}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no], - [case "$host_os" in - aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; - *) am_cv_func_iconv_works="guessing yes" ;; - esac]) + { + /* Try standardized names. */ + iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP"); + /* Try IRIX, OSF/1 names. */ + iconv_t cd2 = iconv_open ("UTF-8", "eucJP"); + /* Try AIX names. */ + iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP"); + /* Try HP-UX names. */ + iconv_t cd4 = iconv_open ("utf8", "eucJP"); + if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1) + && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1)) + result |= 16; + if (cd1 != (iconv_t)(-1)) + iconv_close (cd1); + if (cd2 != (iconv_t)(-1)) + iconv_close (cd2); + if (cd3 != (iconv_t)(-1)) + iconv_close (cd3); + if (cd4 != (iconv_t)(-1)) + iconv_close (cd4); + } + return result; +]])], + [am_cv_func_iconv_works=yes], , + [case "$host_os" in + aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; + *) am_cv_func_iconv_works="guessing yes" ;; + esac]) + test "$am_cv_func_iconv_works" = no || break + done LIBS="$am_save_LIBS" ]) case "$am_cv_func_iconv_works" in @@ -183,32 +238,51 @@ m4_version_prereq([2.64], [[AC_DEFUN_ONCE( [$1], [$2])]], - [[AC_DEFUN( - [$1], [$2])]])) + [m4_ifdef([gl_00GNULIB], + [[AC_DEFUN_ONCE( + [$1], [$2])]], + [[AC_DEFUN( + [$1], [$2])]])])) gl_iconv_AC_DEFUN([AM_ICONV], [ AM_ICONV_LINK if test "$am_cv_func_iconv" = yes; then AC_MSG_CHECKING([for iconv declaration]) AC_CACHE_VAL([am_cv_proto_iconv], [ - AC_TRY_COMPILE([ + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[ #include #include extern #ifdef __cplusplus "C" #endif -#if defined(__STDC__) || defined(__cplusplus) +#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif -], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"]) + ]], + [[]])], + [am_cv_proto_iconv_arg1=""], + [am_cv_proto_iconv_arg1="const"]) am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` AC_MSG_RESULT([ $am_cv_proto_iconv]) - AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], - [Define as const if the declaration of iconv() needs const.]) + else + dnl When compiling GNU libiconv on a system that does not have iconv yet, + dnl pick the POSIX compliant declaration without 'const'. + am_cv_proto_iconv_arg1="" fi + AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], + [Define as const if the declaration of iconv() needs const.]) + dnl Also substitute ICONV_CONST in the gnulib generated . + m4_ifdef([gl_ICONV_H_DEFAULTS], + [AC_REQUIRE([gl_ICONV_H_DEFAULTS]) + if test -n "$am_cv_proto_iconv_arg1"; then + ICONV_CONST="const" + fi + ]) ]) diff -Nru libfshfs-20201104/m4/intlmacosx.m4 libfshfs-20240221/m4/intlmacosx.m4 --- libfshfs-20201104/m4/intlmacosx.m4 2016-02-17 07:53:59.000000000 +0000 +++ libfshfs-20240221/m4/intlmacosx.m4 2023-12-03 09:06:54.000000000 +0000 @@ -1,50 +1,64 @@ -# intlmacosx.m4 serial 3 (gettext-0.18) -dnl Copyright (C) 2004-2010 Free Software Foundation, Inc. +# intlmacosx.m4 serial 8 (gettext-0.20.2) +dnl Copyright (C) 2004-2014, 2016, 2019-2020 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl -dnl This file can can be used in projects which are not available under -dnl the GNU General Public License or the GNU Library General Public +dnl This file can be used in projects which are not available under +dnl the GNU General Public License or the GNU Lesser General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered -dnl by the GNU Library General Public License, and the rest of the GNU -dnl gettext package package is covered by the GNU General Public License. +dnl by the GNU Lesser General Public License, and the rest of the GNU +dnl gettext package is covered by the GNU General Public License. dnl They are *not* in the public domain. -dnl Checks for special options needed on MacOS X. +dnl Checks for special options needed on Mac OS X. dnl Defines INTL_MACOSX_LIBS. AC_DEFUN([gt_INTL_MACOSX], [ - dnl Check for API introduced in MacOS X 10.2. + dnl Check for API introduced in Mac OS X 10.4. AC_CACHE_CHECK([for CFPreferencesCopyAppValue], [gt_cv_func_CFPreferencesCopyAppValue], [gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" - AC_TRY_LINK([#include ], - [CFPreferencesCopyAppValue(NULL, NULL)], + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[CFPreferencesCopyAppValue(NULL, NULL)]])], [gt_cv_func_CFPreferencesCopyAppValue=yes], [gt_cv_func_CFPreferencesCopyAppValue=no]) LIBS="$gt_save_LIBS"]) if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1], - [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) + [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) fi - dnl Check for API introduced in MacOS X 10.3. - AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent], + dnl Don't check for the API introduced in Mac OS X 10.5, CFLocaleCopyCurrent, + dnl because in macOS 10.13.4 it has the following behaviour: + dnl When two or more languages are specified in the + dnl "System Preferences > Language & Region > Preferred Languages" panel, + dnl it returns en_CC where CC is the territory (even when English is not among + dnl the preferred languages!). What we want instead is what + dnl CFLocaleCopyCurrent returned in earlier macOS releases and what + dnl CFPreferencesCopyAppValue still returns, namely ll_CC where ll is the + dnl first among the preferred languages and CC is the territory. + AC_CACHE_CHECK([for CFLocaleCopyPreferredLanguages], [gt_cv_func_CFLocaleCopyPreferredLanguages], [gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" - AC_TRY_LINK([#include ], [CFLocaleCopyCurrent();], - [gt_cv_func_CFLocaleCopyCurrent=yes], - [gt_cv_func_CFLocaleCopyCurrent=no]) + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[CFLocaleCopyPreferredLanguages();]])], + [gt_cv_func_CFLocaleCopyPreferredLanguages=yes], + [gt_cv_func_CFLocaleCopyPreferredLanguages=no]) LIBS="$gt_save_LIBS"]) - if test $gt_cv_func_CFLocaleCopyCurrent = yes; then - AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1], - [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) + if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then + AC_DEFINE([HAVE_CFLOCALECOPYPREFERREDLANGUAGES], [1], + [Define to 1 if you have the Mac OS X function CFLocaleCopyPreferredLanguages in the CoreFoundation framework.]) fi INTL_MACOSX_LIBS= - if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then + if test $gt_cv_func_CFPreferencesCopyAppValue = yes \ + || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" fi AC_SUBST([INTL_MACOSX_LIBS]) diff -Nru libfshfs-20201104/m4/lib-ld.m4 libfshfs-20240221/m4/lib-ld.m4 --- libfshfs-20201104/m4/lib-ld.m4 2016-02-17 07:53:59.000000000 +0000 +++ libfshfs-20240221/m4/lib-ld.m4 2023-12-03 09:06:54.000000000 +0000 @@ -1,110 +1,168 @@ -# lib-ld.m4 serial 4 (gettext-0.18) -dnl Copyright (C) 1996-2003, 2009-2010 Free Software Foundation, Inc. +# lib-ld.m4 serial 9 +dnl Copyright (C) 1996-2003, 2009-2020 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Subroutines of libtool.m4, -dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision -dnl with libtool.m4. +dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid +dnl collision with libtool.m4. -dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. +dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no. AC_DEFUN([AC_LIB_PROG_LD_GNU], [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld], -[# I'd rather use --version here, but apparently some GNU ld's only accept -v. +[# I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh + # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which + # contains only /bin. Note that ksh looks also at the FPATH variable, + # so we have to set that as well for the test. + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + || PATH_SEPARATOR=';' + } fi -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by GCC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]* | [A-Za-z]:[\\/]*)] - [re_direlt='/[^/][^/]*/\.\./'] - # Canonicalize the path of ld - ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac + +if test -n "$LD"; then + AC_MSG_CHECKING([for ld]) +elif test "$GCC" = yes; then + AC_MSG_CHECKING([for ld used by $CC]) elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi -AC_CACHE_VAL([acl_cv_path_LD], -[if test -z "$LD"; then - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - acl_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in - *GNU* | *'with BFD'*) - test "$with_gnu_ld" != no && break ;; - *) - test "$with_gnu_ld" != yes && break ;; +if test -n "$LD"; then + # Let the user override the test with a path. + : +else + AC_CACHE_VAL([acl_cv_path_LD], + [ + acl_cv_path_LD= # Final result of this test + ac_prog=ld # Program to search in $PATH + if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + acl_output=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $acl_output in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of ld + acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'` + while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do + acl_output=`echo $acl_output | sed "s%$re_direlt%/%"` + done + # Got the pathname. No search in PATH is needed. + acl_cv_path_LD="$acl_output" + ac_prog= + ;; + "") + # If it fails, then pretend we aren't using GCC. + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; esac fi - done - IFS="$ac_save_ifs" -else - acl_cv_path_LD="$LD" # Let the user override the test with a path. -fi]) -LD="$acl_cv_path_LD" + if test -n "$ac_prog"; then + # Search for $ac_prog in $PATH. + acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$acl_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + acl_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$acl_cv_path_LD" -v 2>&1 = 1.10 to complain if config.rpath is missing. - m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) + dnl Complain if config.rpath is missing. + AC_REQUIRE_AUX_FILE([config.rpath]) AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host @@ -157,15 +160,15 @@ dnl macro call that searches for libname. AC_DEFUN([AC_LIB_FROMPACKAGE], [ - pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) define([acl_frompackage_]NAME, [$2]) popdef([NAME]) pushdef([PACK],[$2]) - pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) define([acl_libsinpackage_]PACKUP, - m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1]) + m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1]) popdef([PACKUP]) popdef([PACK]) ]) @@ -178,23 +181,23 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], [ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) - pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])]) - pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) - dnl Autoconf >= 2.61 supports dots in --with options. - pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" + eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" + eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" ]) - AC_ARG_WITH(P_A_C_K[-prefix], -[[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib - --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], + AC_ARG_WITH(PACK[-prefix], +[[ --with-]]PACK[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib + --without-]]PACK[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], [ if test "X$withval" = "Xno"; then use_additional=no @@ -203,17 +206,23 @@ AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" + eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" + eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" - if test "$acl_libdirstem2" != "$acl_libdirstem" \ - && ! test -d "$withval/$acl_libdirstem"; then - additional_libdir="$withval/$acl_libdirstem2" - fi + additional_libdir2="$withval/$acl_libdirstem2" + additional_libdir3="$withval/$acl_libdirstem3" fi fi ]) + if test "X$additional_libdir2" = "X$additional_libdir"; then + additional_libdir2= + fi + if test "X$additional_libdir3" = "X$additional_libdir"; then + additional_libdir3= + fi dnl Search the library and its dependencies in $additional_libdir and dnl $LDFLAGS. Using breadth-first-seach. LIB[]NAME= @@ -242,7 +251,7 @@ names_already_handled="$names_already_handled $name" dnl See if it was already located by an earlier AC_LIB_LINKFLAGS dnl or AC_LIB_HAVE_LINKFLAGS call. - uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then @@ -269,48 +278,54 @@ shrext= fi if test $use_additional = yes; then - dir="$additional_libdir" - dnl The same code as in the loop below: - dnl First look for a shared library. - if test -n "$acl_shlibext"; then - if test -f "$dir/$libname$shrext"; then - found_dir="$dir" - found_so="$dir/$libname$shrext" - else - if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then - ver=`(cd "$dir" && \ - for f in "$libname$shrext".*; do echo "$f"; done \ - | sed -e "s,^$libname$shrext\\\\.,," \ - | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ - | sed 1q ) 2>/dev/null` - if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then - found_dir="$dir" - found_so="$dir/$libname$shrext.$ver" + for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do + if test "X$found_dir" = "X"; then + eval dir=\$$additional_libdir_variable + if test -n "$dir"; then + dnl The same code as in the loop below: + dnl First look for a shared library. + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi fi - else - eval library_names=\"$acl_library_names_spec\" - for f in $library_names; do - if test -f "$dir/$f"; then + dnl Then look for a static library. + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then found_dir="$dir" - found_so="$dir/$f" - break + found_a="$dir/$libname.$acl_libext" fi - done + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi fi fi - fi - dnl Then look for a static library. - if test "X$found_dir" = "X"; then - if test -f "$dir/$libname.$acl_libext"; then - found_dir="$dir" - found_a="$dir/$libname.$acl_libext" - fi - fi - if test "X$found_dir" != "X"; then - if test -f "$dir/$libname.la"; then - found_la="$dir/$libname.la" - fi - fi + done fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIB[]NAME; do @@ -320,7 +335,7 @@ dir=`echo "X$x" | sed -e 's/^X-L//'` dnl First look for a shared library. if test -n "$acl_shlibext"; then - if test -f "$dir/$libname$shrext"; then + if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else @@ -330,14 +345,14 @@ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` - if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do - if test -f "$dir/$f"; then + if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break @@ -348,7 +363,7 @@ fi dnl Then look for a static library. if test "X$found_dir" = "X"; then - if test -f "$dir/$libname.$acl_libext"; then + if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi @@ -374,7 +389,8 @@ dnl standard /usr/lib. if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ - || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then + || test "X$found_dir" = "X/usr/$acl_libdirstem2" \ + || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then dnl No hardcoding is needed. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else @@ -474,6 +490,13 @@ fi additional_includedir="$basedir/include" ;; + */$acl_libdirstem3 | */$acl_libdirstem3/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'` + if test "$name" = '$1'; then + LIB[]NAME[]_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; esac if test "X$additional_includedir" != "X"; then dnl Potentially add $additional_includedir to $INCNAME. @@ -524,19 +547,21 @@ for dep in $dependency_libs; do case "$dep" in -L*) - additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` - dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. + dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + dnl Potentially add $dependency_libdir to $LIBNAME and $LTLIBNAME. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's /usr/local/lib and we are using GCC on Linux, dnl 3. if it's already present in $LDFLAGS or the already dnl constructed $LIBNAME, dnl 4. if it doesn't exist as a directory. - if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ - && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then + if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \ + && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \ + && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then haveit= - if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ - || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then + if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \ + || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \ + || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; @@ -547,29 +572,29 @@ haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X-L$additional_libdir"; then + if test "X$x" = "X-L$dependency_libdir"; then haveit=yes break fi done if test -z "$haveit"; then - if test -d "$additional_libdir"; then - dnl Really add $additional_libdir to $LIBNAME. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" + if test -d "$dependency_libdir"; then + dnl Really add $dependency_libdir to $LIBNAME. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$dependency_libdir" fi fi haveit= for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X-L$additional_libdir"; then + if test "X$x" = "X-L$dependency_libdir"; then haveit=yes break fi done if test -z "$haveit"; then - if test -d "$additional_libdir"; then - dnl Really add $additional_libdir to $LTLIBNAME. - LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" + if test -d "$dependency_libdir"; then + dnl Really add $dependency_libdir to $LTLIBNAME. + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$dependency_libdir" fi fi fi @@ -667,7 +692,6 @@ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" done fi - popdef([P_A_C_K]) popdef([PACKLIBS]) popdef([PACKUP]) popdef([PACK]) @@ -718,7 +742,8 @@ dir="$next" dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem" \ - && test "X$dir" != "X/usr/$acl_libdirstem2"; then + && test "X$dir" != "X/usr/$acl_libdirstem2" \ + && test "X$dir" != "X/usr/$acl_libdirstem3"; then rpathdirs="$rpathdirs $dir" fi next= @@ -728,7 +753,8 @@ -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem" \ - && test "X$dir" != "X/usr/$acl_libdirstem2"; then + && test "X$dir" != "X/usr/$acl_libdirstem2" \ + && test "X$dir" != "X/usr/$acl_libdirstem3"; then rpathdirs="$rpathdirs $dir" fi next= ;; diff -Nru libfshfs-20201104/m4/lib-prefix.m4 libfshfs-20240221/m4/lib-prefix.m4 --- libfshfs-20201104/m4/lib-prefix.m4 2016-02-17 07:53:59.000000000 +0000 +++ libfshfs-20240221/m4/lib-prefix.m4 2023-12-03 09:06:54.000000000 +0000 @@ -1,18 +1,11 @@ -# lib-prefix.m4 serial 7 (gettext-0.18) -dnl Copyright (C) 2001-2005, 2008-2010 Free Software Foundation, Inc. +# lib-prefix.m4 serial 17 +dnl Copyright (C) 2001-2005, 2008-2020 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. -dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and -dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't -dnl require excessive bracketing. -ifdef([AC_HELP_STRING], -[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], -[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) - dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed dnl to access previously installed libraries. The basic assumption is that dnl a user will want packages to use other packages he previously installed @@ -32,9 +25,9 @@ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) - AC_LIB_ARG_WITH([lib-prefix], -[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib - --without-lib-prefix don't search for libraries in includedir and libdir], + AC_ARG_WITH([lib-prefix], +[[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib + --without-lib-prefix don't search for libraries in includedir and libdir]], [ if test "X$withval" = "Xno"; then use_additional=no @@ -154,71 +147,174 @@ ]) dnl AC_LIB_PREPARE_MULTILIB creates -dnl - a variable acl_libdirstem, containing the basename of the libdir, either -dnl "lib" or "lib64" or "lib/64", -dnl - a variable acl_libdirstem2, as a secondary possible value for -dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or -dnl "lib/amd64". +dnl - a function acl_is_expected_elfclass, that tests whether standard input +dn; has a 32-bit or 64-bit ELF header, depending on the host CPU ABI, +dnl - 3 variables acl_libdirstem, acl_libdirstem2, acl_libdirstem3, containing +dnl the basename of the libdir to try in turn, either "lib" or "lib64" or +dnl "lib/64" or "lib32" or "lib/sparcv9" or "lib/amd64" or similar. AC_DEFUN([AC_LIB_PREPARE_MULTILIB], [ - dnl There is no formal standard regarding lib and lib64. - dnl On glibc systems, the current practice is that on a system supporting + dnl There is no formal standard regarding lib, lib32, and lib64. + dnl On most glibc systems, the current practice is that on a system supporting dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under - dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine - dnl the compiler's default mode by looking at the compiler's library search - dnl path. If at least one of its elements ends in /lib64 or points to a - dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI. - dnl Otherwise we use the default, namely "lib". + dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. However, on + dnl Arch Linux based distributions, it's the opposite: 32-bit libraries go + dnl under $prefix/lib32 and 64-bit libraries go under $prefix/lib. + dnl We determine the compiler's default mode by looking at the compiler's + dnl library search path. If at least one of its elements ends in /lib64 or + dnl points to a directory whose absolute pathname ends in /lib64, we use that + dnl for 64-bit ABIs. Similarly for 32-bit ABIs. Otherwise we use the default, + dnl namely "lib". dnl On Solaris systems, the current practice is that on a system supporting dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. AC_REQUIRE([AC_CANONICAL_HOST]) - acl_libdirstem=lib - acl_libdirstem2= - case "$host_os" in - solaris*) - dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment - dnl . - dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." - dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the - dnl symlink is missing, so we set acl_libdirstem2 too. - AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], - [AC_EGREP_CPP([sixtyfour bits], [ -#ifdef _LP64 -sixtyfour bits -#endif - ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no]) - ]) - if test $gl_cv_solaris_64bit = yes; then - acl_libdirstem=lib/64 - case "$host_cpu" in - sparc*) acl_libdirstem2=lib/sparcv9 ;; - i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; - esac - fi - ;; - *) - searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` - if test -n "$searchpath"; then - acl_save_IFS="${IFS= }"; IFS=":" - for searchdir in $searchpath; do - if test -d "$searchdir"; then - case "$searchdir" in - */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; - */../ | */.. ) - # Better ignore directories of this form. They are misleading. - ;; - *) searchdir=`cd "$searchdir" && pwd` - case "$searchdir" in - */lib64 ) acl_libdirstem=lib64 ;; - esac ;; - esac - fi - done - IFS="$acl_save_IFS" - fi - ;; - esac - test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" + AC_REQUIRE([gl_HOST_CPU_C_ABI_32BIT]) + + AC_CACHE_CHECK([for ELF binary format], [gl_cv_elf], + [AC_EGREP_CPP([Extensible Linking Format], + [#ifdef __ELF__ + Extensible Linking Format + #endif + ], + [gl_cv_elf=yes], + [gl_cv_elf=no]) + ]) + if test $gl_cv_elf; then + # Extract the ELF class of a file (5th byte) in decimal. + # Cf. https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header + if od -A x < /dev/null >/dev/null 2>/dev/null; then + # Use POSIX od. + func_elfclass () + { + od -A n -t d1 -j 4 -N 1 + } + else + # Use BSD hexdump. + func_elfclass () + { + dd bs=1 count=1 skip=4 2>/dev/null | hexdump -e '1/1 "%3d "' + echo + } + fi +changequote(,)dnl + case $HOST_CPU_C_ABI_32BIT in + yes) + # 32-bit ABI. + acl_is_expected_elfclass () + { + test "`func_elfclass | sed -e 's/[ ]//g'`" = 1 + } + ;; + no) + # 64-bit ABI. + acl_is_expected_elfclass () + { + test "`func_elfclass | sed -e 's/[ ]//g'`" = 2 + } + ;; + *) + # Unknown. + acl_is_expected_elfclass () + { + : + } + ;; + esac +changequote([,])dnl + else + acl_is_expected_elfclass () + { + : + } + fi + + dnl Allow the user to override the result by setting acl_cv_libdirstems. + AC_CACHE_CHECK([for the common suffixes of directories in the library search path], + [acl_cv_libdirstems], + [dnl Try 'lib' first, because that's the default for libdir in GNU, see + dnl . + acl_libdirstem=lib + acl_libdirstem2= + acl_libdirstem3= + case "$host_os" in + solaris*) + dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment + dnl . + dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." + dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the + dnl symlink is missing, so we set acl_libdirstem2 too. + if test $HOST_CPU_C_ABI_32BIT = no; then + acl_libdirstem2=lib/64 + case "$host_cpu" in + sparc*) acl_libdirstem3=lib/sparcv9 ;; + i*86 | x86_64) acl_libdirstem3=lib/amd64 ;; + esac + fi + ;; + *) + dnl If $CC generates code for a 32-bit ABI, the libraries are + dnl surely under $prefix/lib or $prefix/lib32, not $prefix/lib64. + dnl Similarly, if $CC generates code for a 64-bit ABI, the libraries + dnl are surely under $prefix/lib or $prefix/lib64, not $prefix/lib32. + dnl Find the compiler's search path. However, non-system compilers + dnl sometimes have odd library search paths. But we can't simply invoke + dnl '/usr/bin/gcc -print-search-dirs' because that would not take into + dnl account the -m32/-m31 or -m64 options from the $CC or $CFLAGS. + searchpath=`(LC_ALL=C $CC $CPPFLAGS $CFLAGS -print-search-dirs) 2>/dev/null \ + | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test $HOST_CPU_C_ABI_32BIT != no; then + # 32-bit or unknown ABI. + if test -d /usr/lib32; then + acl_libdirstem2=lib32 + fi + fi + if test $HOST_CPU_C_ABI_32BIT != yes; then + # 64-bit or unknown ABI. + if test -d /usr/lib64; then + acl_libdirstem3=lib64 + fi + fi + if test -n "$searchpath"; then + acl_save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib32/ | */lib32 ) acl_libdirstem2=lib32 ;; + */lib64/ | */lib64 ) acl_libdirstem3=lib64 ;; + */../ | */.. ) + # Better ignore directories of this form. They are misleading. + ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib32 ) acl_libdirstem2=lib32 ;; + */lib64 ) acl_libdirstem3=lib64 ;; + esac ;; + esac + fi + done + IFS="$acl_save_IFS" + if test $HOST_CPU_C_ABI_32BIT = yes; then + # 32-bit ABI. + acl_libdirstem3= + fi + if test $HOST_CPU_C_ABI_32BIT = no; then + # 64-bit ABI. + acl_libdirstem2= + fi + fi + ;; + esac + test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" + test -n "$acl_libdirstem3" || acl_libdirstem3="$acl_libdirstem" + acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2,$acl_libdirstem3" + ]) + dnl Decompose acl_cv_libdirstems into acl_libdirstem, acl_libdirstem2, and + dnl acl_libdirstem3. +changequote(,)dnl + acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'` + acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,//' -e 's/,.*//'` + acl_libdirstem3=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,[^,]*,//' -e 's/,.*//'` +changequote([,])dnl ]) diff -Nru libfshfs-20201104/m4/libbfio.m4 libfshfs-20240221/m4/libbfio.m4 --- libfshfs-20201104/m4/libbfio.m4 2020-02-21 05:55:37.000000000 +0000 +++ libfshfs-20240221/m4/libbfio.m4 2023-12-03 09:06:54.000000000 +0000 @@ -1,6 +1,6 @@ dnl Checks for libbfio required headers and functions dnl -dnl Version: 20191230 +dnl Version: 20201125 dnl Function to detect if libbfio is available dnl ac_libbfio_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -26,7 +26,7 @@ [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libbfio], - [libbfio >= 20191230], + [libbfio >= 20201125], [ac_cv_libbfio=yes], [ac_cv_libbfio=check]) ]) @@ -102,11 +102,21 @@ [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, + libbfio_handle_read_buffer_at_offset, + [ac_cv_libbfio_dummy=yes], + [ac_cv_libbfio=no]) + AC_CHECK_LIB( + bfio, libbfio_handle_write_buffer, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, + libbfio_handle_write_buffer_at_offset, + [ac_cv_libbfio_dummy=yes], + [ac_cv_libbfio=no]) + AC_CHECK_LIB( + bfio, libbfio_handle_seek_offset, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) @@ -263,11 +273,21 @@ [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, + libbfio_pool_read_buffer_at_offset, + [ac_cv_libbfio_dummy=yes], + [ac_cv_libbfio=no]) + AC_CHECK_LIB( + bfio, libbfio_pool_write_buffer, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, + libbfio_pool_write_buffer_at_offset, + [ac_cv_libbfio_dummy=yes], + [ac_cv_libbfio=no]) + AC_CHECK_LIB( + bfio, libbfio_pool_seek_offset, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) @@ -282,6 +302,22 @@ [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) + dnl File pool functions + AC_CHECK_LIB( + bfio, + libbfio_file_pool_open, + [ac_cv_libbfio_dummy=yes], + [ac_cv_libbfio=no]) + + AS_IF( + [test "x$ac_cv_enable_wide_character_type" != xno], + [AC_CHECK_LIB( + bfio, + libbfio_file_pool_open_wide, + [ac_cv_libbfio_dummy=yes], + [ac_cv_libbfio=no]) + ]) + ac_cv_libbfio_LIBADD="-lbfio"]) ]) AS_IF( diff -Nru libfshfs-20201104/m4/libcdata.m4 libfshfs-20240221/m4/libcdata.m4 --- libfshfs-20201104/m4/libcdata.m4 2019-12-24 14:53:04.000000000 +0000 +++ libfshfs-20240221/m4/libcdata.m4 2023-12-03 09:06:54.000000000 +0000 @@ -1,6 +1,6 @@ dnl Checks for libcdata required headers and functions dnl -dnl Version: 20191221 +dnl Version: 20230108 dnl Function to detect if libcdata is available dnl ac_libcdata_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -26,7 +26,7 @@ [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libcdata], - [libcdata >= 20190112], + [libcdata >= 20230108], [ac_cv_libcdata=yes], [ac_cv_libcdata=check]) ]) @@ -128,7 +128,7 @@ dnl Balanced tree functions AC_CHECK_LIB( cdata, - libfdata_btree_initialize, + libcdata_btree_initialize, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( @@ -240,11 +240,21 @@ [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, + libcdata_list_insert_element_with_existing, + [ac_cv_libcdata_dummy=yes], + [ac_cv_libcdata=no]) + AC_CHECK_LIB( + cdata, libcdata_list_insert_value, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, + libcdata_list_insert_value_with_existing, + [ac_cv_libcdata_dummy=yes], + [ac_cv_libcdata=no]) + AC_CHECK_LIB( + cdata, libcdata_list_remove_element, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) @@ -358,6 +368,11 @@ [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( + cdata, + libcdata_range_list_range_has_overlapping_range, + [ac_cv_libcdata_dummy=yes], + [ac_cv_libcdata=no]) + AC_CHECK_LIB( cdata, libcdata_range_list_get_spanning_range, [ac_cv_libcdata_dummy=yes], diff -Nru libfshfs-20201104/m4/libcrypto.m4 libfshfs-20240221/m4/libcrypto.m4 --- libfshfs-20201104/m4/libcrypto.m4 2020-11-01 07:16:27.000000000 +0000 +++ libfshfs-20240221/m4/libcrypto.m4 2023-12-03 09:06:54.000000000 +0000 @@ -1,6 +1,6 @@ dnl Checks for libcrypto required headers and functions dnl -dnl Version: 20200719 +dnl Version: 20231007 dnl Function to detect whether openssl/evp.h can be used in combination with zlib.h AC_DEFUN([AX_LIBCRYPTO_CHECK_OPENSSL_EVP_ZLIB_COMPATIBILE], @@ -24,21 +24,38 @@ [if `EVP_CipherInit_ex' can be used with duplicate keys], [ac_cv_openssl_xts_duplicate_keys], [AC_LANG_PUSH(C) - AC_LINK_IFELSE( + ac_cv_libcrypto_backup_LIBS="$LIBS" + LIBS="$LIBS $ac_cv_libcrypto_LIBADD" + AC_RUN_IFELSE( [AC_LANG_PROGRAM( - [[#include + [[#include +#include #include ]], [[unsigned char key[ 16 ] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; +int result = 0; + +#if defined( HAVE_EVP_CIPHER_CTX_INIT ) EVP_CIPHER_CTX ctx; -int result; EVP_CIPHER_CTX_init( &ctx ); +#else +EVP_CIPHER_CTX *ctx = EVP_CIPHER_CTX_new(); +#endif + result = EVP_CipherInit_ex(ctx, EVP_aes_128_xts(), NULL, key, key, 0); + +#if defined( HAVE_EVP_CIPHER_CTX_INIT ) EVP_CIPHER_CTX_cleanup( &ctx ); +#else +EVP_CIPHER_CTX_free( ctx ); +#endif + +if( result != 1 ) return( EXIT_FAILURE ); -return( result == 1 ); ]] )], +return( EXIT_SUCCESS ); ]] )], [ac_cv_openssl_xts_duplicate_keys=yes], [ac_cv_openssl_xts_duplicate_keys=no]) + LIBS="$ac_cv_libcrypto_backup_LIBS" AC_LANG_POP(C)]) ]) @@ -101,9 +118,36 @@ AC_CHECK_LIB( crypto, - EVP_DigestInit_ex, + EVP_DigestInit_ex2, [ac_cv_libcrypto_dummy=yes], - [ac_cv_libcrypto_evp_md=no]) + [ac_cv_libcrypto_dummy=no]) + + AS_IF( + [test "x$ac_cv_lib_crypto_EVP_DigestInit_ex2" = xyes], + [dnl Check for OpenSSL 3 API functions + AC_CHECK_LIB( + crypto, + EVP_MD_CTX_reset, + [ac_cv_libcrypto_dummy=yes], + [ac_cv_libcrypto_evp_md=no]) + AC_CHECK_LIB( + crypto, + EVP_MD_fetch, + [ac_cv_libcrypto_dummy=yes], + [ac_cv_libcrypto_evp_md=no]) + AC_CHECK_LIB( + crypto, + EVP_MD_free, + [ac_cv_libcrypto_dummy=yes], + [ac_cv_libcrypto_evp_md=no]) + ], + [AC_CHECK_LIB( + crypto, + EVP_DigestInit_ex, + [ac_cv_libcrypto_dummy=yes], + [ac_cv_libcrypto_evp_md=no]) + ]) + AC_CHECK_LIB( crypto, EVP_DigestUpdate, @@ -116,7 +160,7 @@ [ac_cv_libcrypto_evp_md=no]) AS_IF( - [test "x$ac_cv_enable_openssl_evp_md" = xyes && "x$ac_cv_libcrypto_evp_md" = xno], + [test "x$ac_cv_enable_openssl_evp_md" = xyes && test "x$ac_cv_libcrypto_evp_md" = xno], [AC_MSG_FAILURE( [Missing OpenSSL EVP MD support], [1]) @@ -137,6 +181,14 @@ [1], [Define to 1 if you have the `EVP_MD_CTX_cleanup' function".]) ]) + + AS_IF( + [test "x$ac_cv_lib_crypto_EVP_DigestInit_ex2" = xyes], + [AC_DEFINE( + [HAVE_EVP_DIGESTINIT_EX2], + [1], + [Define to 1 if you have the `EVP_DigestInit_ex2' function".]) + ]) ]) dnl Function to detect if openssl EVP MD5 functions are available @@ -420,15 +472,41 @@ AC_CHECK_LIB( crypto, - EVP_CIPHER_CTX_set_padding, + EVP_CipherInit_ex2, [ac_cv_libcrypto_dummy=yes], - [ac_cv_libcrypto_evp_cipher=no]) + [ac_cv_libcrypto_dummy=no]) + + AS_IF( + [test "x$ac_cv_lib_crypto_EVP_CipherInit_ex2" = xyes], + [dnl Check for OpenSSL 3 API functions + AC_CHECK_LIB( + crypto, + EVP_CIPHER_CTX_reset, + [ac_cv_libcrypto_dummy=yes], + [ac_cv_libcrypto_evp_cipher=no]) + AC_CHECK_LIB( + crypto, + EVP_CIPHER_fetch, + [ac_cv_libcrypto_dummy=yes], + [ac_cv_libcrypto_evp_cipher=no]) + AC_CHECK_LIB( + crypto, + EVP_CIPHER_free, + [ac_cv_libcrypto_dummy=yes], + [ac_cv_libcrypto_evp_cipher=no]) + ], + [AC_CHECK_LIB( + crypto, + EVP_CipherInit_ex, + [ac_cv_libcrypto_dummy=yes], + [ac_cv_libcrypto_evp_cipher=no]) + AC_CHECK_LIB( + crypto, + EVP_CIPHER_CTX_set_padding, + [ac_cv_libcrypto_dummy=yes], + [ac_cv_libcrypto_evp_cipher=no]) + ]) - AC_CHECK_LIB( - crypto, - EVP_CipherInit_ex, - [ac_cv_libcrypto_dummy=yes], - [ac_cv_libcrypto_evp_cipher=no]) AC_CHECK_LIB( crypto, EVP_CipherUpdate, @@ -441,7 +519,7 @@ [ac_cv_libcrypto_evp_cipher=no]) AS_IF( - [test "x$ac_cv_enable_openssl_evp_cipher" = xyes && "x$ac_cv_libcrypto_evp_cipher" = xno], + [test "x$ac_cv_enable_openssl_evp_cipher" = xyes && test "x$ac_cv_libcrypto_evp_cipher" = xno], [AC_MSG_FAILURE( [Missing OpenSSL EVP CIPHER support], [1]) @@ -462,6 +540,14 @@ [1], [Define to 1 if you have the `EVP_CIPHER_CTX_cleanup' function".]) ]) + + AS_IF( + [test "x$ac_cv_lib_crypto_EVP_CipherInit_ex2" = xyes], + [AC_DEFINE( + [HAVE_EVP_CIPHERINIT_EX2], + [1], + [Define to 1 if you have the `EVP_CipherInit_ex2' function".]) + ]) ]) dnl Function to detect if openssl AES-CBC and AES-ECB functions are available @@ -598,13 +684,18 @@ [1], [Define to 1 if you have the 'crypto' library (-lcrypto).]) - ac_cv_libcrypto_LIBADD="-lcrypto" + ac_cv_libcrypto_CPPFLAGS="$openssl_CFLAGS" + ac_cv_libcrypto_LIBADD="$openssl_LIBS" + + AS_IF( + [test "x$ac_cv_libcrypto_LIBADD" = x], + [ac_cv_libcrypto_LIBADD="-lcrypto"]) dnl On Cygwin also link zlib since libcrypto relies on it AS_CASE( [$host], [*cygwin*], - [ac_cv_libcrypto_LIBADD="-lcrypto -lz"]) + [ac_cv_libcrypto_LIBADD="$ac_cv_libcrypto_LIBADD -lz"]) dnl Enforce the dynamic loader library to be included if available AC_CHECK_LIB( @@ -870,7 +961,7 @@ [auto-detect]) AS_IF( - [test "x$ac_cv_enable_static_executables" = xno], + [test "x$ac_cv_enable_static_executables" != xyes], [dnl Check for a shared library version AX_LIBCRYPTO_CHECK_LIB]) diff -Nru libfshfs-20201104/m4/libfcache.m4 libfshfs-20240221/m4/libfcache.m4 --- libfshfs-20201104/m4/libfcache.m4 2019-12-14 11:48:26.000000000 +0000 +++ libfshfs-20240221/m4/libfcache.m4 2023-12-03 09:06:54.000000000 +0000 @@ -1,6 +1,6 @@ dnl Checks for libfcache required headers and functions dnl -dnl Version: 20191109 +dnl Version: 20230115 dnl Function to detect if libfcache is available dnl ac_libfcache_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -184,7 +184,7 @@ AC_STRUCT_TM dnl Headers included in libfcache/libfcache_date_time.h - AC_HEADER_TIME + AC_CHECK_HEADERS([sys/time.h]) dnl Date and time functions used in libfcache/libfcache_date_time.h AC_CHECK_FUNCS([clock_gettime time]) diff -Nru libfshfs-20201104/m4/libfdata.m4 libfshfs-20240221/m4/libfdata.m4 --- libfshfs-20201104/m4/libfdata.m4 2019-09-02 17:28:18.000000000 +0000 +++ libfshfs-20240221/m4/libfdata.m4 2023-12-03 09:06:54.000000000 +0000 @@ -1,6 +1,6 @@ dnl Functions for libfdata dnl -dnl Version: 20190811 +dnl Version: 20230318 dnl Function to detect if libfdata is available dnl ac_libfdata_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -26,7 +26,7 @@ [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libfdata], - [libfdata >= 20190811], + [libfdata >= 20201129], [ac_cv_libfdata=yes], [ac_cv_libfdata=check]) ]) @@ -125,9 +125,6 @@ [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) - dnl Balanced tree functions - dnl TODO: add functions - dnl List functions AC_CHECK_LIB( fdata, @@ -204,6 +201,11 @@ AC_CHECK_LIB( fdata, + libfdata_list_get_element_mapped_range, + [ac_cv_libfdata_dummy=yes], + [ac_cv_libfdata=no]) + AC_CHECK_LIB( + fdata, libfdata_list_get_mapped_offset, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) diff -Nru libfshfs-20201104/m4/libfmos.m4 libfshfs-20240221/m4/libfmos.m4 --- libfshfs-20201104/m4/libfmos.m4 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/m4/libfmos.m4 2023-12-03 09:06:54.000000000 +0000 @@ -0,0 +1,175 @@ +dnl Checks for libfmos required headers and functions +dnl +dnl Version: 20220804 + +dnl Function to detect if libfmos is available +dnl ac_libfmos_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments +AC_DEFUN([AX_LIBFMOS_CHECK_LIB], + [AS_IF( + [test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libfmos" = xno], + [ac_cv_libfmos=no], + [ac_cv_libfmos=check + dnl Check if the directory provided as parameter exists + AS_IF( + [test "x$ac_cv_with_libfmos" != x && test "x$ac_cv_with_libfmos" != xauto-detect], + [AS_IF( + [test -d "$ac_cv_with_libfmos"], + [CFLAGS="$CFLAGS -I${ac_cv_with_libfmos}/include" + LDFLAGS="$LDFLAGS -L${ac_cv_with_libfmos}/lib"], + [AC_MSG_FAILURE( + [no such directory: $ac_cv_with_libfmos], + [1]) + ]) + ], + [dnl Check for a pkg-config file + AS_IF( + [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], + [PKG_CHECK_MODULES( + [libfmos], + [libfmos >= 20191217], + [ac_cv_libfmos=yes], + [ac_cv_libfmos=check]) + ]) + AS_IF( + [test "x$ac_cv_libfmos" = xyes], + [ac_cv_libfmos_CPPFLAGS="$pkg_cv_libfmos_CFLAGS" + ac_cv_libfmos_LIBADD="$pkg_cv_libfmos_LIBS"]) + ]) + + AS_IF( + [test "x$ac_cv_libfmos" = xcheck], + [dnl Check for headers + AC_CHECK_HEADERS([libfmos.h]) + + AS_IF( + [test "x$ac_cv_header_libfmos_h" = xno], + [ac_cv_libfmos=no], + [dnl Check for the individual functions + ac_cv_libfmos=yes + + AC_CHECK_LIB( + fmos, + libfmos_get_version, + [ac_cv_libfmos_dummy=yes], + [ac_cv_libfmos=no]) + + dnl ADC functions + AC_CHECK_LIB( + fmos, + libfmos_adc_decompress, + [ac_cv_libfmos_dummy=yes], + [ac_cv_libfmos=no]) + + dnl LZFSE functions + AC_CHECK_LIB( + fmos, + libfmos_lzfse_decompress, + [ac_cv_libfmos_dummy=yes], + [ac_cv_libfmos=no]) + + dnl LZVN functions + AC_CHECK_LIB( + fmos, + libfmos_lzvn_decompress, + [ac_cv_libfmos_dummy=yes], + [ac_cv_libfmos=no]) + + ac_cv_libfmos_LIBADD="-lfmos"]) + ]) + AS_IF( + [test "x$ac_cv_with_libfmos" != x && test "x$ac_cv_with_libfmos" != xauto-detect && test "x$ac_cv_libfmos" != xyes], + [AC_MSG_FAILURE( + [unable to find supported libfmos in directory: $ac_cv_with_libfmos], + [1]) + ]) + ]) + + AS_IF( + [test "x$ac_cv_libfmos" = xyes], + [AC_DEFINE( + [HAVE_LIBFMOS], + [1], + [Define to 1 if you have the `fmos' library (-lfmos).]) + ]) + + AS_IF( + [test "x$ac_cv_libfmos" = xyes], + [AC_SUBST( + [HAVE_LIBFMOS], + [1]) ], + [AC_SUBST( + [HAVE_LIBFMOS], + [0]) + ]) + ]) + +dnl Function to detect if libfmos dependencies are available +AC_DEFUN([AX_LIBFMOS_CHECK_LOCAL], + [dnl No additional checks. + + ac_cv_libfmos_CPPFLAGS="-I../libfmos"; + ac_cv_libfmos_LIBADD="../libfmos/libfmos.la"; + + ac_cv_libfmos=local + ]) + +dnl Function to detect how to enable libfmos +AC_DEFUN([AX_LIBFMOS_CHECK_ENABLE], + [AX_COMMON_ARG_WITH( + [libfmos], + [libfmos], + [search for libfmos in includedir and libdir or in the specified DIR, or no if to use local version], + [auto-detect], + [DIR]) + + dnl Check for a shared library version + AX_LIBFMOS_CHECK_LIB + + dnl Check if the dependencies for the local library version + AS_IF( + [test "x$ac_cv_libfmos" != xyes], + [AX_LIBFMOS_CHECK_LOCAL + + AC_DEFINE( + [HAVE_LOCAL_LIBFMOS], + [1], + [Define to 1 if the local version of libfmos is used.]) + AC_SUBST( + [HAVE_LOCAL_LIBFMOS], + [1]) + ]) + + AM_CONDITIONAL( + [HAVE_LOCAL_LIBFMOS], + [test "x$ac_cv_libfmos" = xlocal]) + AS_IF( + [test "x$ac_cv_libfmos_CPPFLAGS" != "x"], + [AC_SUBST( + [LIBFMOS_CPPFLAGS], + [$ac_cv_libfmos_CPPFLAGS]) + ]) + AS_IF( + [test "x$ac_cv_libfmos_LIBADD" != "x"], + [AC_SUBST( + [LIBFMOS_LIBADD], + [$ac_cv_libfmos_LIBADD]) + ]) + + AS_IF( + [test "x$ac_cv_libfmos" = xyes], + [AC_SUBST( + [ax_libfmos_pc_libs_private], + [-lfmos]) + ]) + + AS_IF( + [test "x$ac_cv_libfmos" = xyes], + [AC_SUBST( + [ax_libfmos_spec_requires], + [libfmos]) + AC_SUBST( + [ax_libfmos_spec_build_requires], + [libfmos-devel]) + ]) + ]) + diff -Nru libfshfs-20201104/m4/libfuse.m4 libfshfs-20240221/m4/libfuse.m4 --- libfshfs-20201104/m4/libfuse.m4 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/m4/libfuse.m4 2023-12-03 09:06:54.000000000 +0000 @@ -0,0 +1,202 @@ +dnl Checks for libfuse required headers and functions +dnl +dnl Version: 20220118 + +dnl Function to detect if libfuse is available +dnl ac_libfuse_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments +AC_DEFUN([AX_LIBFUSE_CHECK_LIB], + [dnl Check if parameters were provided + AS_IF( + [test "x$ac_cv_with_libfuse" != x && test "x$ac_cv_with_libfuse" != xno && test "x$ac_cv_with_libfuse" != xauto-detect], + [AS_IF( + [test -d "$ac_cv_with_libfuse"], + [CFLAGS="$CFLAGS -I${ac_cv_with_libfuse}/include" + LDFLAGS="$LDFLAGS -L${ac_cv_with_libfuse}/lib"], + [AC_MSG_WARN([no such directory: $ac_cv_with_libfuse]) + ]) + ]) + + AS_IF( + [test "x$ac_cv_with_libfuse" = xno], + [ac_cv_libfuse=no], + [dnl Check for a pkg-config file + AS_IF( + [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], + [PKG_CHECK_MODULES( + [fuse], + [fuse >= 2.6], + [ac_cv_libfuse=libfuse], + [ac_cv_libfuse=no]) + ]) + + AS_IF( + [test "x$ac_cv_libfuse" = xlibfuse], + [ac_cv_libfuse_CPPFLAGS="$pkg_cv_fuse_CFLAGS" + ac_cv_libfuse_LIBADD="$pkg_cv_fuse_LIBS"], + [dnl Check for headers + AC_CHECK_HEADERS( + [fuse.h], + [ac_cv_header_fuse_h=yes], + [ac_cv_header_fuse_h=no]) + + dnl libfuse sometimes requires -D_FILE_OFFSET_BITS=64 to be set + dnl macFuse requires -DFUSE_USE_VERSION=26 to be set + AS_IF( + [test "x$ac_cv_header_fuse_h" = xno], + [AS_UNSET([ac_cv_header_fuse_h]) + CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=26" + AC_CHECK_HEADERS([fuse.h]) + ]) + + AS_IF( + [test "x$ac_cv_header_fuse_h" = xno], + [ac_cv_libfuse=no], + [dnl Check for the individual functions + ac_cv_libfuse=libfuse + + AC_CHECK_LIB( + fuse, + fuse_daemonize, + [ac_cv_libfuse_dummy=yes], + [ac_cv_libfuse=no]) + AC_CHECK_LIB( + fuse, + fuse_destroy, + [ac_cv_libfuse_dummy=yes], + [ac_cv_libfuse=no]) + AC_CHECK_LIB( + fuse, + fuse_mount, + [ac_cv_libfuse_dummy=yes], + [ac_cv_libfuse=no]) + AC_CHECK_LIB( + fuse, + fuse_new, + [ac_cv_libfuse_dummy=yes], + [ac_cv_libfuse=no]) + + ac_cv_libfuse_LIBADD="-lfuse"; + ]) + ]) + + dnl Check for libosxfuse + AS_IF( + [test "x$ac_cv_with_libfuse" != xno && test "x$ac_cv_header_fuse_h" = xno], + [CPPFLAGS="$CPPFLAGS -DFUSE_USE_VERSION=26" + AC_CHECK_HEADERS([osxfuse/fuse.h]) + + dnl libosxfuse sometimes requires -D_FILE_OFFSET_BITS=64 to be set + AS_IF( + [test "x$ac_cv_header_osxfuse_fuse_h" = xno], + [AS_UNSET([ac_cv_header_osxfuse_fuse_h]) + CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=64" + AC_CHECK_HEADERS([osxfuse/fuse.h]) + ]) + + AS_IF( + [test "x$ac_cv_header_osxfuse_fuse_h" = xno], + [ac_cv_libfuse=no], + [dnl Check for the individual functions + ac_cv_libfuse=libosxfuse + + AC_CHECK_LIB( + osxfuse, + fuse_daemonize, + [ac_cv_libfuse_dummy=yes], + [ac_cv_libfuse=no]) + AC_CHECK_LIB( + osxfuse, + fuse_destroy, + [ac_cv_libfuse_dummy=yes], + [ac_cv_libfuse=no]) + AC_CHECK_LIB( + osxfuse, + fuse_mount, + [ac_cv_libfuse_dummy=yes], + [ac_cv_libfuse=no]) + AC_CHECK_LIB( + osxfuse, + fuse_new, + [ac_cv_libfuse_dummy=yes], + [ac_cv_libfuse=no]) + + ac_cv_libfuse_LIBADD="-losxfuse"; + ]) + ]) + ]) + + AS_IF( + [test "x$ac_cv_libfuse" = xlibfuse], + [AC_DEFINE( + [HAVE_LIBFUSE], + [1], + [Define to 1 if you have the 'fuse' library (-lfuse).]) + ]) + AS_IF( + [test "x$ac_cv_libfuse" = xlibosxfuse], + [AC_DEFINE( + [HAVE_LIBOSXFUSE], + [1], + [Define to 1 if you have the 'osxfuse' library (-losxfuse).]) + ]) + + AS_IF( + [test "x$ac_cv_libfuse" != xno], + [AC_SUBST( + [HAVE_LIBFUSE], + [1]) ], + [AC_SUBST( + [HAVE_LIBFUSE], + [0]) + ]) + ]) + +dnl Function to detect how to enable libfuse +AC_DEFUN([AX_LIBFUSE_CHECK_ENABLE], + [AX_COMMON_ARG_WITH( + [libfuse], + [libfuse], + [search for libfuse in includedir and libdir or in the specified DIR, or no if not to use libfuse], + [auto-detect], + [DIR]) + + dnl Check for a shared library version + AX_LIBFUSE_CHECK_LIB + + AS_IF( + [test "x$ac_cv_libfuse_CPPFLAGS" != "x"], + [AC_SUBST( + [LIBFUSE_CPPFLAGS], + [$ac_cv_libfuse_CPPFLAGS]) + ]) + AS_IF( + [test "x$ac_cv_libfuse_LIBADD" != "x"], + [AC_SUBST( + [LIBFUSE_LIBADD], + [$ac_cv_libfuse_LIBADD]) + ]) + + AS_IF( + [test "x$ac_cv_libfuse" = xlibfuse], + [AC_SUBST( + [ax_libfuse_pc_libs_private], + [-lfuse]) + ]) + AS_IF( + [test "x$ac_cv_libfuse" = xlibosxfuse], + [AC_SUBST( + [ax_libfuse_pc_libs_private], + [-losxfuse]) + ]) + + AS_IF( + [test "x$ac_cv_libfuse" = xlibfuse], + [AC_SUBST( + [ax_libfuse_spec_requires], + [fuse-libs]) + AC_SUBST( + [ax_libfuse_spec_build_requires], + [fuse-devel]) + ]) + ]) + diff -Nru libfshfs-20201104/m4/libtool.m4 libfshfs-20240221/m4/libtool.m4 --- libfshfs-20201104/m4/libtool.m4 2020-11-04 11:56:23.000000000 +0000 +++ libfshfs-20240221/m4/libtool.m4 2024-02-21 06:04:20.000000000 +0000 @@ -1,6 +1,7 @@ # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # -# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. +# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives @@ -31,7 +32,7 @@ # along with this program. If not, see . ]) -# serial 58 LT_INIT +# serial 59 LT_INIT # LT_PREREQ(VERSION) @@ -181,6 +182,7 @@ m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl +m4_require([_LT_DECL_FILECMD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl @@ -219,8 +221,8 @@ ofile=libtool can_build_shared=yes -# All known linkers require a '.a' archive for static linking (except MSVC, -# which needs '.lib'). +# All known linkers require a '.a' archive for static linking (except MSVC and +# ICC, which need '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld @@ -778,7 +780,7 @@ # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ + $SED '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || @@ -1042,8 +1044,8 @@ _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD - echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD - $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD + echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD + $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF @@ -1067,17 +1069,12 @@ _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - 10.[[012]][[,.]]*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + darwin*) + case $MACOSX_DEPLOYMENT_TARGET,$host in + 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + *) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac @@ -1126,12 +1123,12 @@ output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(module_expsym_cmds, $1)="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" m4_if([$1], [CXX], [ if test yes != "$lt_cv_apple_cc_single_mod"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi ],[]) else @@ -1245,7 +1242,8 @@ # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], -[AC_MSG_CHECKING([for sysroot]) +[m4_require([_LT_DECL_SED])dnl +AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], [Search for dependent libraries within DIR (or the compiler's sysroot @@ -1262,7 +1260,7 @@ fi ;; #( /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` ;; #( no|'') ;; #( @@ -1292,7 +1290,7 @@ # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; @@ -1309,7 +1307,7 @@ echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test yes = "$lt_cv_prog_gnu_ld"; then - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; @@ -1321,7 +1319,7 @@ ;; esac else - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; @@ -1343,7 +1341,7 @@ echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then emul=elf - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; @@ -1351,7 +1349,7 @@ emul="${emul}64" ;; esac - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; @@ -1359,7 +1357,7 @@ emul="${emul}ltsmip" ;; esac - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; @@ -1379,14 +1377,14 @@ # not appear in the list. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in + case `$FILECMD conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) - case `/usr/bin/file conftest.o` in + case `$FILECMD conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; @@ -1454,7 +1452,7 @@ # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in + case `$FILECMD conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) @@ -1493,9 +1491,22 @@ m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} -: ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) -_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) + +# Use ARFLAGS variable as AR's operation code to sync the variable naming with +# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have +# higher priority because thats what people were doing historically (setting +# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS +# variable obsoleted/removed. + +test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} +lt_ar_flags=$AR_FLAGS +_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) + +# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override +# by AR_FLAGS because that was never working and AR_FLAGS is about to die. +_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], + [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no @@ -1714,7 +1725,7 @@ lt_cv_sys_max_cmd_len=8192; ;; - bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) + bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` @@ -1757,7 +1768,7 @@ sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi @@ -2207,26 +2218,35 @@ striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) +if test -z "$STRIP"; then + AC_MSG_RESULT([no]) else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP"; then + if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + old_striplib="$STRIP --strip-debug" + striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) + else + case $host_os in + darwin*) + # FIXME - insert some real tests, host_os isn't really good enough striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) - else + ;; + freebsd*) + if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then + old_striplib="$STRIP --strip-debug" + striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + ;; + *) AC_MSG_RESULT([no]) - fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac + ;; + esac + fi fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) @@ -2549,7 +2569,7 @@ case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' + soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; @@ -2559,14 +2579,14 @@ ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' + library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; - *,cl*) - # Native MSVC + *,cl* | *,icl*) + # Native MSVC or ICC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' @@ -2585,7 +2605,7 @@ done IFS=$lt_save_ifs # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form @@ -2622,7 +2642,7 @@ ;; *) - # Assume MSVC wrapper + # Assume MSVC and ICC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; @@ -2655,7 +2675,7 @@ shlibpath_var=LD_LIBRARY_PATH ;; -freebsd* | dragonfly*) +freebsd* | dragonfly* | midnightbsd*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then @@ -3457,7 +3477,7 @@ bsdi[[45]]*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_cmd='$FILECMD -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; @@ -3491,14 +3511,14 @@ lt_cv_deplibs_check_method=pass_all ;; -freebsd* | dragonfly*) +freebsd* | dragonfly* | midnightbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_cmd=$FILECMD lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac @@ -3512,7 +3532,7 @@ ;; hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_cmd=$FILECMD case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' @@ -3559,7 +3579,7 @@ newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_cmd=$FILECMD lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; @@ -3686,13 +3706,13 @@ mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac - case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in + case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 @@ -3718,7 +3738,7 @@ # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) - case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in + case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; @@ -3958,7 +3978,7 @@ if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. - lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" + lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" @@ -3976,20 +3996,20 @@ # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n"\ +lt_cv_sys_global_symbol_to_cdecl="$SED -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ +lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ @@ -4013,7 +4033,7 @@ if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. - # Also find C++ and __fastcall symbols from MSVC++, + # Also find C++ and __fastcall symbols from MSVC++ or ICC, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ @@ -4031,9 +4051,9 @@ " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no @@ -4320,7 +4340,7 @@ ;; esac ;; - freebsd* | dragonfly*) + freebsd* | dragonfly* | midnightbsd*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) @@ -4403,7 +4423,7 @@ _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) - case `$CC -V 2>&1 | sed 5q` in + case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' @@ -4739,7 +4759,7 @@ _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) - case `$CC -V 2>&1 | sed 5q` in + case `$CC -V 2>&1 | $SED 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' @@ -4922,7 +4942,7 @@ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else - _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) @@ -4930,7 +4950,7 @@ ;; cygwin* | mingw* | cegcc*) case $cc_basename in - cl*) + cl* | icl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) @@ -4987,15 +5007,15 @@ case $host_os in cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time + # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. + # Microsoft Visual C++ or Intel C++ Compiler. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) + # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) with_gnu_ld=yes ;; openbsd* | bitrig*) @@ -5047,7 +5067,7 @@ _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no - case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in + case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... @@ -5159,6 +5179,7 @@ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' ;; interix[[3-9]]*) @@ -5173,7 +5194,7 @@ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) @@ -5216,7 +5237,7 @@ _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac - case `$CC -V 2>&1 | sed 5q` in + case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes @@ -5228,7 +5249,7 @@ if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi @@ -5244,7 +5265,7 @@ _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi @@ -5376,7 +5397,7 @@ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else - _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no @@ -5559,12 +5580,12 @@ cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. + # Microsoft Visual C++ or Intel C++ Compiler. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in - cl*) - # Native MSVC + cl* | icl*) + # Native MSVC or ICC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes @@ -5605,7 +5626,7 @@ fi' ;; *) - # Assume MSVC wrapper + # Assume MSVC and ICC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. @@ -5653,7 +5674,7 @@ ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) + freebsd* | dragonfly* | midnightbsd*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes @@ -5864,6 +5885,7 @@ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' ;; osf3*) @@ -6634,8 +6656,8 @@ cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in - ,cl* | no,cl*) - # Native MSVC + ,cl* | no,cl* | ,icl* | no,icl*) + # Native MSVC or ICC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' @@ -6733,6 +6755,7 @@ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' ;; dgux*) @@ -6763,7 +6786,7 @@ _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; - freebsd* | dragonfly*) + freebsd* | dragonfly* | midnightbsd*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes @@ -6900,7 +6923,7 @@ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in @@ -7040,13 +7063,13 @@ _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi ;; *) - case `$CC -V 2>&1 | sed 5q` in + case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' @@ -8192,6 +8215,14 @@ AC_SUBST([DLLTOOL]) ]) +# _LT_DECL_FILECMD +# ---------------- +# Check for a file(cmd) program that can be used to detect file type and magic +m4_defun([_LT_DECL_FILECMD], +[AC_CHECK_TOOL([FILECMD], [file], [:]) +_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types]) +])# _LD_DECL_FILECMD + # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates diff -Nru libfshfs-20201104/m4/libuna.m4 libfshfs-20240221/m4/libuna.m4 --- libfshfs-20201104/m4/libuna.m4 2020-07-17 07:28:24.000000000 +0000 +++ libfshfs-20240221/m4/libuna.m4 2023-12-03 09:06:54.000000000 +0000 @@ -1,6 +1,6 @@ dnl Checks for libuna or required headers and functions dnl -dnl Version: 20200711 +dnl Version: 20230702 dnl Function to detect if a specific libuna definition is available. AC_DEFUN([AX_LIBUNA_CHECK_DEFINITION], @@ -43,7 +43,7 @@ [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libuna], - [libuna >= 20200711], + [libuna >= 20230702], [ac_cv_libuna=yes], [ac_cv_libuna=check]) ]) @@ -225,6 +225,138 @@ [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) + dnl Unicode character functions + AC_CHECK_LIB( + una, + libuna_unicode_character_size_to_byte_stream, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_copy_from_byte_stream, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_copy_to_byte_stream, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_size_to_ucs2, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_copy_from_ucs2, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_copy_to_ucs2, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_size_to_ucs4, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_copy_from_ucs4, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_copy_to_ucs4, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_copy_from_utf7_stream, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_copy_to_utf7_stream, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_size_to_utf8, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_copy_from_utf8, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_copy_to_utf8, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_size_to_utf8_rfc2279, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_copy_from_utf8_rfc2279, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_copy_to_utf8_rfc2279, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_size_to_utf16, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_copy_from_utf16, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_copy_to_utf16, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_copy_from_utf16_stream, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_copy_to_utf16_stream, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_copy_from_utf32, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_copy_to_utf32, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_copy_from_utf32_stream, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_copy_to_utf32_stream, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + dnl UTF-8 stream functions AC_CHECK_LIB( una, @@ -339,6 +471,11 @@ [ac_cv_libuna=no]) AC_CHECK_LIB( una, + libuna_utf8_string_compare_with_byte_stream, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, libuna_utf8_string_size_from_utf7_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) @@ -354,6 +491,11 @@ [ac_cv_libuna=no]) AC_CHECK_LIB( una, + libuna_utf8_string_compare_with_utf7_stream, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, libuna_utf8_string_size_from_utf8_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) @@ -369,47 +511,47 @@ [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf8_string_size_from_utf16_stream, + libuna_utf8_string_compare_with_utf8_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf8_string_copy_from_utf16_stream, + libuna_utf8_string_size_from_utf16, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf8_string_with_index_copy_from_utf16_stream, + libuna_utf8_string_copy_from_utf16, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf8_string_size_from_utf32_stream, + libuna_utf8_string_with_index_copy_from_utf16, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf8_string_copy_from_utf32_stream, + libuna_utf8_string_compare_with_utf16, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf8_string_with_index_copy_from_utf32_stream, + libuna_utf8_string_size_from_utf16_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf8_string_size_from_utf16, + libuna_utf8_string_copy_from_utf16_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf8_string_copy_from_utf16, + libuna_utf8_string_with_index_copy_from_utf16_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf8_string_with_index_copy_from_utf16, + libuna_utf8_string_compare_with_utf16_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( @@ -429,6 +571,31 @@ [ac_cv_libuna=no]) AC_CHECK_LIB( una, + libuna_utf8_string_compare_with_utf32, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_utf8_string_size_from_utf32_stream, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_utf8_string_copy_from_utf32_stream, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_utf8_string_with_index_copy_from_utf32_stream, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_utf8_string_compare_with_utf32_stream, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, libuna_utf8_string_size_from_scsu_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) @@ -461,6 +628,11 @@ [ac_cv_libuna=no]) AC_CHECK_LIB( una, + libuna_utf16_string_compare_with_byte_stream, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, libuna_utf16_string_size_from_utf7_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) @@ -476,6 +648,27 @@ [ac_cv_libuna=no]) AC_CHECK_LIB( una, + libuna_utf16_string_compare_with_utf7_stream, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_utf16_string_size_from_utf8, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_utf16_string_copy_from_utf8, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_utf16_string_with_index_copy_from_utf8, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + dnl libuna_utf16_string_compare_with_utf8 is implemented by libuna_utf8_string_compare_with_utf16 + AC_CHECK_LIB( + una, libuna_utf16_string_size_from_utf8_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) @@ -491,6 +684,11 @@ [ac_cv_libuna=no]) AC_CHECK_LIB( una, + libuna_utf16_string_compare_with_utf8_stream, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, libuna_utf16_string_size_from_utf16_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) @@ -506,47 +704,47 @@ [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf16_string_size_from_utf32_stream, + libuna_utf16_string_compare_with_utf16_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf16_string_copy_from_utf32_stream, + libuna_utf16_string_size_from_utf32, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf16_string_with_index_copy_from_utf32_stream, + libuna_utf16_string_copy_from_utf32, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf16_string_size_from_utf8, + libuna_utf16_string_with_index_copy_from_utf32, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf16_string_copy_from_utf8, + libuna_utf16_string_compare_with_utf32, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf16_string_with_index_copy_from_utf8, + libuna_utf16_string_size_from_utf32_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf16_string_size_from_utf32, + libuna_utf16_string_copy_from_utf32_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf16_string_copy_from_utf32, + libuna_utf16_string_with_index_copy_from_utf32_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf16_string_with_index_copy_from_utf32, + libuna_utf16_string_compare_with_utf32_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( @@ -583,6 +781,11 @@ [ac_cv_libuna=no]) AC_CHECK_LIB( una, + libuna_utf32_string_compare_with_byte_stream, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, libuna_utf32_string_size_from_utf7_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) @@ -598,11 +801,31 @@ [ac_cv_libuna=no]) AC_CHECK_LIB( una, + libuna_utf32_string_compare_with_utf7_stream, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, libuna_utf32_string_size_from_utf8_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, + libuna_utf32_string_size_from_utf8, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_utf32_string_copy_from_utf8, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + libuna_utf32_string_with_index_copy_from_utf8, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + dnl libuna_utf32_string_compare_with_utf8 is implemented by libuna_utf8_string_compare_with_utf32 + AC_CHECK_LIB( + una, libuna_utf32_string_copy_from_utf8_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) @@ -613,61 +836,63 @@ [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf32_string_size_from_utf16_stream, + libuna_utf32_string_compare_with_utf8_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf32_string_copy_from_utf16_stream, + libuna_utf32_string_size_from_utf16, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf32_string_with_index_copy_from_utf16_stream, + libuna_utf32_string_copy_from_utf16, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf32_string_size_from_utf32_stream, + libuna_utf32_string_with_index_copy_from_utf16, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) + dnl libuna_utf32_string_compare_with_utf16 is implemented by libuna_utf16_string_compare_with_utf32 AC_CHECK_LIB( una, - libuna_utf32_string_copy_from_utf32_stream, + libuna_utf32_string_size_from_utf16_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf32_string_with_index_copy_from_utf32_stream, + libuna_utf32_string_copy_from_utf16_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf32_string_size_from_utf8, + libuna_utf32_string_with_index_copy_from_utf16_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf32_string_copy_from_utf8, + libuna_utf32_string_compare_with_utf16_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( - libuna_utf32_string_with_index_copy_from_utf8, + una, + libuna_utf32_string_size_from_utf32_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf32_string_size_from_utf16, + libuna_utf32_string_copy_from_utf32_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf32_string_copy_from_utf16, + libuna_utf32_string_with_index_copy_from_utf32_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf32_string_with_index_copy_from_utf16, + libuna_utf32_string_compare_with_utf32_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( @@ -708,6 +933,13 @@ [test "x$ac_cv_libuna_defines_compare_less" != xyes], [ac_cv_libuna=no]) + AX_LIBUNA_CHECK_DEFINITION( + LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE, + [ac_cv_libuna_defines_compare_greater]) + AS_IF( + [test "x$ac_cv_libuna_defines_utf16_stream_allow_unpaired_surrogate" != xyes], + [ac_cv_libuna=no]) + ac_cv_libuna_LIBADD="-luna"]) ]) AS_IF( diff -Nru libfshfs-20201104/m4/ltoptions.m4 libfshfs-20240221/m4/ltoptions.m4 --- libfshfs-20201104/m4/ltoptions.m4 2020-11-04 11:56:23.000000000 +0000 +++ libfshfs-20240221/m4/ltoptions.m4 2024-02-21 06:04:20.000000000 +0000 @@ -1,7 +1,7 @@ # Helper functions for option handling. -*- Autoconf -*- # -# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software -# Foundation, Inc. +# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free +# Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives diff -Nru libfshfs-20201104/m4/ltsugar.m4 libfshfs-20240221/m4/ltsugar.m4 --- libfshfs-20201104/m4/ltsugar.m4 2020-11-04 11:56:23.000000000 +0000 +++ libfshfs-20240221/m4/ltsugar.m4 2024-02-21 06:04:20.000000000 +0000 @@ -1,6 +1,6 @@ # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # -# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software +# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 2004 # diff -Nru libfshfs-20201104/m4/ltversion.m4 libfshfs-20240221/m4/ltversion.m4 --- libfshfs-20201104/m4/ltversion.m4 2020-11-04 11:56:24.000000000 +0000 +++ libfshfs-20240221/m4/ltversion.m4 2024-02-21 06:04:20.000000000 +0000 @@ -1,6 +1,7 @@ # ltversion.m4 -- version numbers -*- Autoconf -*- # -# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. +# Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation, +# Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives @@ -9,15 +10,15 @@ # @configure_input@ -# serial 4179 ltversion.m4 +# serial 4245 ltversion.m4 # This file is part of GNU Libtool -m4_define([LT_PACKAGE_VERSION], [2.4.6]) -m4_define([LT_PACKAGE_REVISION], [2.4.6]) +m4_define([LT_PACKAGE_VERSION], [2.4.7]) +m4_define([LT_PACKAGE_REVISION], [2.4.7]) AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.4.6' -macro_revision='2.4.6' +[macro_version='2.4.7' +macro_revision='2.4.7' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) diff -Nru libfshfs-20201104/m4/lt~obsolete.m4 libfshfs-20240221/m4/lt~obsolete.m4 --- libfshfs-20201104/m4/lt~obsolete.m4 2020-11-04 11:56:24.000000000 +0000 +++ libfshfs-20240221/m4/lt~obsolete.m4 2024-02-21 06:04:20.000000000 +0000 @@ -1,7 +1,7 @@ # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # -# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software -# Foundation, Inc. +# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free +# Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives diff -Nru libfshfs-20201104/m4/nls.m4 libfshfs-20240221/m4/nls.m4 --- libfshfs-20201104/m4/nls.m4 2016-02-17 07:53:59.000000000 +0000 +++ libfshfs-20240221/m4/nls.m4 2023-12-03 09:06:54.000000000 +0000 @@ -1,17 +1,17 @@ -# nls.m4 serial 5 (gettext-0.18) -dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation, -dnl Inc. +# nls.m4 serial 6 (gettext-0.20.2) +dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016, 2019-2020 Free +dnl Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl -dnl This file can can be used in projects which are not available under -dnl the GNU General Public License or the GNU Library General Public +dnl This file can be used in projects which are not available under +dnl the GNU General Public License or the GNU Lesser General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered -dnl by the GNU Library General Public License, and the rest of the GNU -dnl gettext package package is covered by the GNU General Public License. +dnl by the GNU Lesser General Public License, and the rest of the GNU +dnl gettext package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: diff -Nru libfshfs-20201104/m4/po.m4 libfshfs-20240221/m4/po.m4 --- libfshfs-20201104/m4/po.m4 2016-02-17 07:53:59.000000000 +0000 +++ libfshfs-20240221/m4/po.m4 2023-12-03 09:06:54.000000000 +0000 @@ -1,35 +1,36 @@ -# po.m4 serial 17 (gettext-0.18) -dnl Copyright (C) 1995-2010 Free Software Foundation, Inc. +# po.m4 serial 31 (gettext-0.20.2) +dnl Copyright (C) 1995-2014, 2016, 2018-2020 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl -dnl This file can can be used in projects which are not available under -dnl the GNU General Public License or the GNU Library General Public +dnl This file can be used in projects which are not available under +dnl the GNU General Public License or the GNU Lesser General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered -dnl by the GNU Library General Public License, and the rest of the GNU -dnl gettext package package is covered by the GNU General Public License. +dnl by the GNU Lesser General Public License, and the rest of the GNU +dnl gettext package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2003. -AC_PREREQ([2.50]) +AC_PREREQ([2.60]) dnl Checks for all prerequisites of the po subdirectory. AC_DEFUN([AM_PO_SUBDIRS], [ AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl - AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake + AC_REQUIRE([AC_PROG_MKDIR_P])dnl + AC_REQUIRE([AC_PROG_SED])dnl AC_REQUIRE([AM_NLS])dnl dnl Release version of the gettext macros. This is used to ensure that dnl the gettext macros and po/Makefile.in.in are in sync. - AC_SUBST([GETTEXT_MACRO_VERSION], [0.18]) + AC_SUBST([GETTEXT_MACRO_VERSION], [0.20]) dnl Perform the following tests also if --disable-nls has been given, dnl because they are needed for "make dist" to work. @@ -45,13 +46,6 @@ dnl Test whether it is GNU msgfmt >= 0.15. changequote(,)dnl - case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in - '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; - *) MSGFMT_015=$MSGFMT ;; - esac -changequote([,])dnl - AC_SUBST([MSGFMT_015]) -changequote(,)dnl case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; *) GMSGFMT_015=$GMSGFMT ;; @@ -82,11 +76,21 @@ AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) - dnl Installation directories. - dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we - dnl have to define it here, so that it can be used in po/Makefile. - test -n "$localedir" || localedir='${datadir}/locale' - AC_SUBST([localedir]) + dnl Test whether it is GNU msgmerge >= 0.20. + if LC_ALL=C $MSGMERGE --help | grep ' --for-msgfmt ' >/dev/null; then + MSGMERGE_FOR_MSGFMT_OPTION='--for-msgfmt' + else + dnl Test whether it is GNU msgmerge >= 0.12. + if LC_ALL=C $MSGMERGE --help | grep ' --no-fuzzy-matching ' >/dev/null; then + MSGMERGE_FOR_MSGFMT_OPTION='--no-fuzzy-matching --no-location --quiet' + else + dnl With these old versions, $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) is + dnl slow. But this is not a big problem, as such old gettext versions are + dnl hardly in use any more. + MSGMERGE_FOR_MSGFMT_OPTION='--no-location --quiet' + fi + fi + AC_SUBST([MSGMERGE_FOR_MSGFMT_OPTION]) dnl Support for AM_XGETTEXT_OPTION. test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= @@ -102,7 +106,7 @@ case "$ac_file" in */Makefile.in) # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` - ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" + ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. @@ -118,7 +122,8 @@ if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then rm -f "$ac_dir/POTFILES" test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" - cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" + gt_tab=`printf '\t'` + cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" POMAKEFILEDEPS="POTFILES.in" # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend # on $ac_dir but don't depend on user-specified configuration @@ -128,14 +133,11 @@ if test -n "$OBSOLETE_ALL_LINGUAS"; then test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi - ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` - # Hide the ALL_LINGUAS assigment from automake < 1.5. - eval 'ALL_LINGUAS''=$ALL_LINGUAS_' + ALL_LINGUAS=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # The set of available languages was given in configure.in. - # Hide the ALL_LINGUAS assigment from automake < 1.5. - eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' + ALL_LINGUAS=$OBSOLETE_ALL_LINGUAS fi # Compute POFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) @@ -206,9 +208,8 @@ esac done]], [# Capture the value of obsolete ALL_LINGUAS because we need it to compute - # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it - # from automake < 1.5. - eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' + # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. + OBSOLETE_ALL_LINGUAS="$ALL_LINGUAS" # Capture the value of LINGUAS because we need it to compute CATALOGS. LINGUAS="${LINGUAS-%UNSET%}" ]) @@ -226,7 +227,7 @@ changequote(,)dnl # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` - ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" + ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. @@ -254,6 +255,7 @@ fi # A sed script that extracts the value of VARIABLE from a Makefile. + tab=`printf '\t'` sed_x_variable=' # Test if the hold space is empty. x @@ -261,9 +263,9 @@ x ta # Yes it was empty. Look if we have the expected variable definition. -/^[ ]*VARIABLE[ ]*=/{ +/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=/{ # Seen the first line of the variable definition. - s/^[ ]*VARIABLE[ ]*=// + s/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=// ba } bd @@ -308,15 +310,13 @@ fi if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then # The LINGUAS file contains the set of available languages. - ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` + ALL_LINGUAS=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS. sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'` - ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"` + ALL_LINGUAS=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"` fi - # Hide the ALL_LINGUAS assigment from automake < 1.5. - eval 'ALL_LINGUAS''=$ALL_LINGUAS_' # Compute POFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) # Compute UPDATEPOFILES @@ -326,9 +326,9 @@ # Compute GMOFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) # Compute PROPERTIESFILES - # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties) + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(DOMAIN)_$(lang).properties) # Compute CLASSFILES - # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class) + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(DOMAIN)_$(lang).class) # Compute QMFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm) # Compute MSGFILES @@ -353,8 +353,8 @@ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" DUMMYPOFILES="$DUMMYPOFILES $lang.nop" GMOFILES="$GMOFILES $srcdirpre$lang.gmo" - PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties" - CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class" + PROPERTIESFILES="$PROPERTIESFILES \$(srcdir)/\$(DOMAIN)_$lang.properties" + CLASSFILES="$CLASSFILES \$(srcdir)/\$(DOMAIN)_$lang.class" QMFILES="$QMFILES $srcdirpre$lang.qm" frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg" @@ -405,14 +405,15 @@ fi sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp" + tab=`printf '\t'` if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then # Add dependencies that cannot be formulated as a simple suffix rule. for lang in $ALL_LINGUAS; do frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` cat >> "$ac_file.tmp" <> "$ac_file.tmp" <conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh + # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which + # contains only /bin. Note that ksh looks also at the FPATH variable, + # so we have to set that as well for the test. + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + || PATH_SEPARATOR=';' + } fi # Find out how to test for executable files. Don't use a zero-byte file, diff -Nru libfshfs-20201104/m4/python.m4 libfshfs-20240221/m4/python.m4 --- libfshfs-20201104/m4/python.m4 2020-07-17 07:28:24.000000000 +0000 +++ libfshfs-20240221/m4/python.m4 2023-12-03 09:06:54.000000000 +0000 @@ -1,6 +1,6 @@ dnl Functions for Python bindings dnl -dnl Version: 20200708 +dnl Version: 20231119 dnl Function to check if the python binary is available dnl "python${PYTHON_VERSION} python python# python#.#" @@ -8,13 +8,13 @@ [AS_IF( [test "x${PYTHON_VERSION}" != x], [ax_python_progs="python${PYTHON_VERSION}"], - [ax_python_progs="python python2 python2.7 python2.6 python2.5 python3 python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0"]) + [ax_python_progs="python python3 python3.12 python3.11 python3.10 python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2 python2.7 python2.6 python2.5"]) AC_CHECK_PROGS( [PYTHON], [$ax_python_progs]) AS_IF( [test "x${PYTHON}" != x], - [ax_prog_python_version=`${PYTHON} -c "import sys; sys.stdout.write(sys.version[[:3]])" 2>/dev/null`; + [ax_prog_python_version=`${PYTHON} -c "import sys; sys.stdout.write('%d.%d' % (sys.version_info[[0]], sys.version_info[[1]]))" 2>/dev/null`; ax_prog_python_platform=`${PYTHON} -c "import sys; sys.stdout.write(sys.platform)" 2>/dev/null`; AC_SUBST( [PYTHON_PLATFORM], @@ -28,60 +28,6 @@ [$PYTHON]) ]) -dnl Function to check if the python2 binary is available -dnl "python2 python2.#" -AC_DEFUN([AX_PROG_PYTHON2], - [ax_python2_progs="python2 python2.7 python2.6 python2.5" - AC_CHECK_PROGS( - [PYTHON2], - [$ax_python2_progs]) - AS_IF( - [test "x${PYTHON2}" != x], - [ax_prog_python2_version=`${PYTHON2} -c "import sys; sys.stdout.write(sys.version[[:3]])" 2>/dev/null`; - AC_SUBST( - [PYTHON2_VERSION], - [$ax_prog_python2_version]) - - ax_prog_python2_platform=`${PYTHON2} -c "import sys; sys.stdout.write(sys.platform)" 2>/dev/null`; - AC_SUBST( - [PYTHON2_PLATFORM], - [$ax_prog_python2_platform]) - ], - [AC_MSG_ERROR( - [Unable to find python2]) - ]) - AC_SUBST( - [PYTHON2], - [$PYTHON2]) - ]) - -dnl Function to check if the python3 binary is available -dnl "python3 python3.#" -AC_DEFUN([AX_PROG_PYTHON3], - [ax_python3_progs="python3 python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0" - AC_CHECK_PROGS( - [PYTHON3], - [$ax_python3_progs]) - AS_IF( - [test "x${PYTHON3}" != x], - [ax_prog_python3_version=`${PYTHON3} -c "import sys; sys.stdout.write(sys.version[[:3]])" 2>/dev/null`; - AC_SUBST( - [PYTHON3_VERSION], - [$ax_prog_python3_version]) - - ax_prog_python3_platform=`${PYTHON3} -c "import sys; sys.stdout.write(sys.platform)" 2>/dev/null`; - AC_SUBST( - [PYTHON3_PLATFORM], - [$ax_prog_python3_platform]) - ], - [AC_MSG_ERROR( - [Unable to find python3]) - ]) - AC_SUBST( - [PYTHON3], - [$PYTHON3]) - ]) - dnl Function to check if the python-config binary is available dnl "python${PYTHON_VERSION}-config python-config" AC_DEFUN([AX_PROG_PYTHON_CONFIG], @@ -95,7 +41,7 @@ [test "x${PYTHON_CONFIG}" = x], [AC_CHECK_PROGS( [PYTHON_CONFIG], - [python-config]) + [python-config python3-config python3.12-config python3.11-config python3.10-config python3.9-config python3.8-config python3.7-config python3.6-config python3.5-config python3.4-config python3.3-config python3.2-config python3.1-config python3.0-config python2-config python2.7-config python2.6-config python2.5-config]) ]) AS_IF( [test "x${PYTHON_CONFIG}" = x], @@ -107,42 +53,6 @@ [$PYTHON_CONFIG]) ]) -dnl Function to check if the python2-config binary is available -AC_DEFUN([AX_PROG_PYTHON2_CONFIG], - [AS_IF( - [test "x${PYTHON2_CONFIG}" = x], - [AC_CHECK_PROGS( - [PYTHON2_CONFIG], - [python2-config]) - ]) - AS_IF( - [test "x${PYTHON2_CONFIG}" = x], - [AC_MSG_ERROR( - [Unable to find python2-config]) - ]) - AC_SUBST( - [PYTHON2_CONFIG], - [$PYTHON2_CONFIG]) - ]) - -dnl Function to check if the python3-config binary is available -AC_DEFUN([AX_PROG_PYTHON3_CONFIG], - [AS_IF( - [test "x${PYTHON3_CONFIG}" = x], - [AC_CHECK_PROGS( - [PYTHON3_CONFIG], - [python3-config]) - ]) - AS_IF( - [test "x${PYTHON3_CONFIG}" = x], - [AC_MSG_ERROR( - [Unable to find python3-config]) - ]) - AC_SUBST( - [PYTHON3_CONFIG], - [$PYTHON3_CONFIG]) - ]) - dnl Function to detect if a Python build environment is available AC_DEFUN([AX_PYTHON_CHECK], [AX_PROG_PYTHON @@ -254,228 +164,6 @@ ]) ]) -dnl Function to detect if a Python 2 build environment is available -AC_DEFUN([AX_PYTHON2_CHECK], - [AX_PROG_PYTHON2 - AX_PROG_PYTHON2_CONFIG - - AS_IF( - [test "x${PYTHON2_CONFIG}" != x], - [dnl Check for Python 2 includes - PYTHON2_INCLUDES=`${PYTHON2_CONFIG} --includes 2>/dev/null`; - - AC_MSG_CHECKING( - [for Python verison 2 includes]) - AC_MSG_RESULT( - [$PYTHON2_INCLUDES]) - - dnl Check for Python 2 libraries - PYTHON2_LDFLAGS=`${PYTHON2_CONFIG} --ldflags 2>/dev/null`; - - AC_MSG_CHECKING( - [for Python 2 libraries]) - AC_MSG_RESULT( - [$PYTHON2_LDFLAGS]) - - dnl For CygWin add the -no-undefined linker flag - AS_CASE( - [$host_os], - [cygwin*],[PYTHON2_LDFLAGS="${PYTHON2_LDFLAGS} -no-undefined"], - [*],[]) - - dnl Check for the existence of Python.h - BACKUP_CPPFLAGS="${CPPFLAGS}" - CPPFLAGS="${CPPFLAGS} ${PYTHON2_INCLUDES}" - - AC_CHECK_HEADERS( - [Python.h], - [ac_cv_header_python2_h=yes], - [ac_cv_header_python2_h=no]) - - CPPFLAGS="${BACKUP_CPPFLAGS}" - ]) - - AS_IF( - [test "x${ac_cv_header_python2_h}" != xyes], - [ac_cv_enable_python2=no], - [ac_cv_enable_python2=$PYTHON2_VERSION - AC_SUBST( - [PYTHON2_CPPFLAGS], - [$PYTHON2_INCLUDES]) - - AC_SUBST( - [PYTHON2_LDFLAGS], - [$PYTHON2_LDFLAGS]) - - dnl Check for Python prefix - AS_IF( - [test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno], - [ax_python2_prefix="\${prefix}"], - [ax_python2_prefix=`${PYTHON2_CONFIG} --prefix 2>/dev/null`]) - - AC_SUBST( - [PYTHON2_PREFIX], - [$ax_python2_prefix]) - - dnl Check for Python exec-prefix - AS_IF( - [test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno], - [ax_python2_exec_prefix="\${exec_prefix}"], - [ax_python2_exec_prefix=`${PYTHON2_CONFIG} --exec-prefix 2>/dev/null`]) - - AC_SUBST( - [PYTHON2_EXEC_PREFIX], - [$ax_python2_exec_prefix]) - - dnl Check for Python 2 library directory - ax_python2_pythondir_suffix=`${PYTHON2} -c "import sys; import distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_lib(0, 0, prefix=''))" 2>/dev/null`; - - AS_IF( - [test "x${ac_cv_with_pythondir2}" = x || test "x${ac_cv_with_pythondir2}" = xno], - [AS_IF( - [test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno], - [ax_python2_pythondir="${ax_python_prefix}/${ax_python2_pythondir_suffix}"], - [ax_python2_pythondir=`${PYTHON2} -c "import sys; import distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_lib()) " 2>/dev/null`])], - [ax_python2_pythondir=$ac_cv_with_pythondir2]) - - AC_SUBST( - [pythondir2], - [$ax_python2_pythondir]) - - dnl Check for Python 2 platform specific library directory - ax_python2_pyexecdir_suffix=`${PYTHON2} -c "import sys; import distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_lib(1, 0, prefix=''))" 2>/dev/null`; - ax_python2_library_dir=`${PYTHON2} -c "import sys; import distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_lib(True)) " 2>/dev/null`; - - AS_IF( - [test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno], - [ax_python2_pyexecdir="${ax_python2_exec_prefix}/${ax_python2_pyexecdir_suffix}"], - [ax_python2_pyexecdir=$ax_python2_library_dir]) - - AC_SUBST( - [pyexecdir2], - [$ax_python2_pyexecdir]) - - AC_SUBST( - [PYTHON2_LIBRARY_DIR], - [$ax_python2_pyexecdir_suffix]) - - AC_SUBST( - [PYTHON2_PACKAGE_DIR], - [$ax_python2_library_dir]) - ]) - ]) - -dnl Function to detect if a Python 3 build environment is available -AC_DEFUN([AX_PYTHON3_CHECK], - [AX_PROG_PYTHON3 - AX_PROG_PYTHON3_CONFIG - - AS_IF( - [test "x${PYTHON3_CONFIG}" != x], - [dnl Check for Python 3 includes - PYTHON3_INCLUDES=`${PYTHON3_CONFIG} --includes 2>/dev/null`; - - AC_MSG_CHECKING( - [for Python verison 3 includes]) - AC_MSG_RESULT( - [$PYTHON3_INCLUDES]) - - dnl Check for Python 3 libraries - PYTHON3_LDFLAGS=`${PYTHON3_CONFIG} --ldflags 2>/dev/null`; - - AC_MSG_CHECKING( - [for Python 3 libraries]) - AC_MSG_RESULT( - [$PYTHON3_LDFLAGS]) - - dnl For CygWin add the -no-undefined linker flag - AS_CASE( - [$host_os], - [cygwin*],[PYTHON3_LDFLAGS="${PYTHON3_LDFLAGS} -no-undefined"], - [*],[]) - - dnl Check for the existence of Python.h - BACKUP_CPPFLAGS="${CPPFLAGS}" - CPPFLAGS="${CPPFLAGS} ${PYTHON3_INCLUDES}" - - AC_CHECK_HEADERS( - [Python.h], - [ac_cv_header_python3_h=yes], - [ac_cv_header_python3_h=no]) - - CPPFLAGS="${BACKUP_CPPFLAGS}" - ]) - - AS_IF( - [test "x${ac_cv_header_python3_h}" != xyes], - [ac_cv_enable_python3=no], - [ac_cv_enable_python3=$PYTHON3_VERSION - AC_SUBST( - [PYTHON3_CPPFLAGS], - [$PYTHON3_INCLUDES]) - - AC_SUBST( - [PYTHON3_LDFLAGS], - [$PYTHON3_LDFLAGS]) - - dnl Check for Python prefix - AS_IF( - [test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno], - [ax_python3_prefix="\${prefix}"], - [ax_python3_prefix=`${PYTHON3_CONFIG} --prefix 2>/dev/null`]) - - AC_SUBST( - [PYTHON3_PREFIX], - [$ax_python3_prefix]) - - dnl Check for Python exec-prefix - AS_IF( - [test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno], - [ax_python3_exec_prefix="\${exec_prefix}"], - [ax_python3_exec_prefix=`${PYTHON3_CONFIG} --exec-prefix 2>/dev/null`]) - - AC_SUBST( - [PYTHON3_EXEC_PREFIX], - [$ax_python3_exec_prefix]) - - dnl Check for Python 3 library directory - ax_python3_pythondir_suffix=`${PYTHON3} -c "import sys; import distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_lib(0, 0, prefix=''))" 2>/dev/null`; - - AS_IF( - [test "x${ac_cv_with_pythondir3}" = x || test "x${ac_cv_with_pythondir3}" = xno], - [AS_IF( - [test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno], - [ax_python3_pythondir="${ax_python_prefix}/${ax_python3_pythondir_suffix}"], - [ax_python3_pythondir=`${PYTHON3} -c "import sys; import distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_lib()) " 2>/dev/null`])], - [ax_python3_pythondir=$ac_cv_with_pythondir3]) - - AC_SUBST( - [pythondir3], - [$ax_python3_pythondir]) - - dnl Check for Python 3 platform specific library directory - ax_python3_pyexecdir_suffix=`${PYTHON3} -c "import sys; import distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_lib(1, 0, prefix=''))" 2>/dev/null`; - ax_python3_library_dir=`${PYTHON3} -c "import sys; import distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_lib(True)) " 2>/dev/null`; - - AS_IF( - [test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno], - [ax_python3_pyexecdir="${ax_python3_exec_prefix}/${ax_python3_pyexecdir_suffix}"], - [ax_python3_pyexecdir=$ax_python3_library_dir]) - - AC_SUBST( - [pyexecdir3], - [$ax_python3_pyexecdir]) - - AC_SUBST( - [PYTHON3_LIBRARY_DIR], - [$ax_python3_pyexecdir_suffix]) - - AC_SUBST( - [PYTHON3_PACKAGE_DIR], - [$ax_python3_library_dir]) - ]) - ]) - dnl Function to determine the prefix of pythondir AC_DEFUN([AX_PYTHON_CHECK_PYPREFIX], [AX_COMMON_ARG_WITH( @@ -502,74 +190,17 @@ [no], [no]) - AX_COMMON_ARG_ENABLE( - [python2], - [python2], - [build Python 2 bindings], - [no]) - AX_COMMON_ARG_WITH( - [pythondir2], - [pythondir2], - [use to specify the Python 2 directory (pythondir2)], - [no], - [no]) - - AX_COMMON_ARG_ENABLE( - [python3], - [python3], - [build Python 3 bindings], - [no]) - AX_COMMON_ARG_WITH( - [pythondir3], - [pythondir3], - [use to specify the Python 3 directory (pythondir3)], - [no], - [no]) - AS_IF( [test "x${ac_cv_enable_python}" != xno], [AX_PYTHON_CHECK]) - AS_IF( - [test "x${ac_cv_enable_python2}" != xno], - [AX_PYTHON2_CHECK]) - - AS_IF( - [test "x${ac_cv_enable_python3}" != xno], - [AX_PYTHON3_CHECK]) - AM_CONDITIONAL( HAVE_PYTHON, [test "x${ac_cv_enable_python}" != xno]) AM_CONDITIONAL( - HAVE_PYTHON2, - [test "x${ac_cv_enable_python2}" != xno]) - - AM_CONDITIONAL( - HAVE_PYTHON3, - [test "x${ac_cv_enable_python3}" != xno]) - - AM_CONDITIONAL( HAVE_PYTHON_TESTS, - [test "x${ac_cv_enable_python}" != xno || test "x${ac_cv_enable_python2}" != xno || test "x${ac_cv_enable_python3}" != xno]) - - AS_IF( - [test "x${ac_cv_enable_python}" = xno], - [AS_IF( - [test "x${ac_cv_enable_python2}" != xno || test "x${ac_cv_enable_python3}" != xno], - [AS_IF( - [test "x${ac_cv_enable_python2}" != xno], - [ac_cv_enable_python=${ac_cv_enable_python2}], - [ac_cv_enable_python=""]) - AS_IF( - [test "x${ac_cv_enable_python3}" != xno], - [AS_IF( - [test "x${ac_cv_enable_python}" != x], - [ac_cv_enable_python="${ac_cv_enable_python}, "]) - ac_cv_enable_python="${ac_cv_enable_python}${ac_cv_enable_python3}"]) - ]) - ]) + [test "x${ac_cv_enable_python}" != xno]) ]) ]) diff -Nru libfshfs-20201104/m4/zlib.m4 libfshfs-20240221/m4/zlib.m4 --- libfshfs-20201104/m4/zlib.m4 2020-10-24 19:30:00.000000000 +0000 +++ libfshfs-20240221/m4/zlib.m4 2023-12-03 09:06:54.000000000 +0000 @@ -1,6 +1,6 @@ dnl Checks for zlib required headers and functions dnl -dnl Version: 20200712 +dnl Version: 20201230 dnl Function to detect if zlib is available AC_DEFUN([AX_ZLIB_CHECK_LIB], @@ -189,6 +189,21 @@ inflateEnd, [ac_zlib_dummy=yes], [ac_cv_inflate=local]) + AC_CHECK_LIB( + z, + inflateGetDictionary, + [ac_zlib_dummy=yes], + [ac_cv_inflate=local]) + AC_CHECK_LIB( + z, + inflatePrime, + [ac_zlib_dummy=yes], + [ac_cv_inflate=local]) + AC_CHECK_LIB( + z, + inflateSetDictionary, + [ac_zlib_dummy=yes], + [ac_cv_inflate=local]) AS_IF( [test "x$ac_cv_inflate" = xzlib], diff -Nru libfshfs-20201104/manuals/Makefile.am libfshfs-20240221/manuals/Makefile.am --- libfshfs-20201104/manuals/Makefile.am 2016-02-17 07:59:39.000000000 +0000 +++ libfshfs-20240221/manuals/Makefile.am 2023-12-03 09:06:54.000000000 +0000 @@ -1,14 +1,16 @@ man_MANS = \ fshfsinfo.1 \ + fshfsmount.1 \ libfshfs.3 EXTRA_DIST = \ fshfsinfo.1 \ + fshfsmount.1 \ libfshfs.3 MAINTAINERCLEANFILES = \ Makefile.in distclean: clean - /bin/rm -f Makefile + -rm -f Makefile diff -Nru libfshfs-20201104/manuals/Makefile.in libfshfs-20240221/manuals/Makefile.in --- libfshfs-20201104/manuals/Makefile.in 2020-11-04 11:56:31.000000000 +0000 +++ libfshfs-20240221/manuals/Makefile.in 2024-02-21 06:04:26.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -90,25 +90,26 @@ subdir = manuals ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcdata.m4 \ - $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \ - $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \ - $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcrypto.m4 \ - $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcthreads.m4 \ - $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ - $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ - $(top_srcdir)/m4/libhmac.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/libuna.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \ - $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \ - $(top_srcdir)/m4/zlib.m4 $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libbfio.m4 \ + $(top_srcdir)/m4/libcdata.m4 $(top_srcdir)/m4/libcerror.m4 \ + $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ + $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ + $(top_srcdir)/m4/libcrypto.m4 $(top_srcdir)/m4/libcsplit.m4 \ + $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \ + $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ + $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmos.m4 \ + $(top_srcdir)/m4/libfuse.m4 $(top_srcdir)/m4/libhmac.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/pthread.m4 \ + $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ + $(top_srcdir)/m4/types.m4 $(top_srcdir)/m4/zlib.m4 \ + $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) @@ -167,6 +168,7 @@ man3dir = $(mandir)/man3 NROFF = nroff MANS = $(man_MANS) +am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -184,6 +186,8 @@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ @@ -199,8 +203,10 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -220,6 +226,8 @@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ +HAVE_LIBFMOS = @HAVE_LIBFMOS@ +HAVE_LIBFUSE = @HAVE_LIBFUSE@ HAVE_LIBHMAC = @HAVE_LIBHMAC@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ @@ -235,6 +243,7 @@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ +HAVE_LOCAL_LIBFMOS = @HAVE_LOCAL_LIBFMOS@ HAVE_LOCAL_LIBHMAC = @HAVE_LOCAL_LIBHMAC@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ @@ -288,8 +297,12 @@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ +LIBFMOS_CPPFLAGS = @LIBFMOS_CPPFLAGS@ +LIBFMOS_LIBADD = @LIBFMOS_LIBADD@ LIBFSHFS_DLL_EXPORT = @LIBFSHFS_DLL_EXPORT@ LIBFSHFS_DLL_IMPORT = @LIBFSHFS_DLL_IMPORT@ +LIBFUSE_CPPFLAGS = @LIBFUSE_CPPFLAGS@ +LIBFUSE_LIBADD = @LIBFUSE_LIBADD@ LIBHMAC_CPPFLAGS = @LIBHMAC_CPPFLAGS@ LIBHMAC_LIBADD = @LIBHMAC_LIBADD@ LIBICONV = @LIBICONV@ @@ -311,8 +324,8 @@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ @@ -335,26 +348,6 @@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ -PYTHON2 = @PYTHON2@ -PYTHON2_CONFIG = @PYTHON2_CONFIG@ -PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ -PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ -PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ -PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ -PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ -PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ -PYTHON2_PREFIX = @PYTHON2_PREFIX@ -PYTHON2_VERSION = @PYTHON2_VERSION@ -PYTHON3 = @PYTHON3@ -PYTHON3_CONFIG = @PYTHON3_CONFIG@ -PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ -PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ -PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ -PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ -PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ -PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ -PYTHON3_PREFIX = @PYTHON3_PREFIX@ -PYTHON3_VERSION = @PYTHON3_VERSION@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ @@ -432,6 +425,12 @@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ +ax_libfmos_pc_libs_private = @ax_libfmos_pc_libs_private@ +ax_libfmos_spec_build_requires = @ax_libfmos_spec_build_requires@ +ax_libfmos_spec_requires = @ax_libfmos_spec_requires@ +ax_libfuse_pc_libs_private = @ax_libfuse_pc_libs_private@ +ax_libfuse_spec_build_requires = @ax_libfuse_spec_build_requires@ +ax_libfuse_spec_requires = @ax_libfuse_spec_requires@ ax_libhmac_pc_libs_private = @ax_libhmac_pc_libs_private@ ax_libhmac_spec_build_requires = @ax_libhmac_spec_build_requires@ ax_libhmac_spec_requires = @ax_libhmac_spec_requires@ @@ -456,6 +455,8 @@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +fuse_CFLAGS = @fuse_CFLAGS@ +fuse_LIBS = @fuse_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -493,6 +494,8 @@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ +libfmos_CFLAGS = @libfmos_CFLAGS@ +libfmos_LIBS = @libfmos_LIBS@ libfshfs_spec_requires = @libfshfs_spec_requires@ libfshfs_spec_tools_build_requires = @libfshfs_spec_tools_build_requires@ libhmac_CFLAGS = @libhmac_CFLAGS@ @@ -511,11 +514,8 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ -pyexecdir2 = @pyexecdir2@ -pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ -pythondir2 = @pythondir2@ -pythondir3 = @pythondir3@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -528,10 +528,12 @@ zlib_LIBS = @zlib_LIBS@ man_MANS = \ fshfsinfo.1 \ + fshfsmount.1 \ libfshfs.3 EXTRA_DIST = \ fshfsinfo.1 \ + fshfsmount.1 \ libfshfs.3 MAINTAINERCLEANFILES = \ @@ -661,13 +663,14 @@ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man3dir)'; $(am__uninstall_files_from_dir) +sources-local: +splint-local: tags TAGS: ctags CTAGS: cscope cscopelist: - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am @@ -801,6 +804,14 @@ ps-am: +sources: sources-am + +sources-am: sources-local + +splint: splint-am + +splint-am: splint-local + uninstall-am: uninstall-man uninstall-man: uninstall-man1 uninstall-man3 @@ -817,14 +828,15 @@ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ + mostlyclean-libtool pdf pdf-am ps ps-am sources-am \ + sources-local splint-am splint-local tags-am uninstall \ uninstall-am uninstall-man uninstall-man1 uninstall-man3 .PRECIOUS: Makefile distclean: clean - /bin/rm -f Makefile + -rm -f Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru libfshfs-20201104/manuals/fshfsinfo.1 libfshfs-20240221/manuals/fshfsinfo.1 --- libfshfs-20201104/manuals/fshfsinfo.1 2020-11-04 04:19:45.000000000 +0000 +++ libfshfs-20240221/manuals/fshfsinfo.1 2024-02-21 05:48:50.000000000 +0000 @@ -1,4 +1,4 @@ -.Dd May 4, 2015 +.Dd July 28, 2022 .Dt fshfsinfo .Os libfshfs .Sh NAME @@ -6,7 +6,11 @@ .Nd determines information about a Hierarchical File System (HFS) volume .Sh SYNOPSIS .Nm fshfsinfo -.Op Fl ahvV +.Op Fl B Ar bodyfile +.Op Fl E Ar identifier +.Op Fl F Ar path +.Op Fl o Ar offset +.Op Fl dhHvV .Ar source .Sh DESCRIPTION .Nm fshfsinfo @@ -24,10 +28,22 @@ .Pp The options are as follows: .Bl -tag -width Ds -.It Fl a -shows allocation information +.It Fl B Ar bodyfile +output file system information as a bodyfile +.It Fl d +calculate a MD5 hash of a file entry to include in the bodyfile +.It Fl E Ar identifier +show information about a specific file system entry or "all" +.It Fl f Ar file_system_index +show information about a specific file system or "all" +.It Fl F Ar path +show information about a specific file entry path .It Fl h shows this help +.It Fl H +shows the file system hierarchy +.It Fl o Ar offset +specify the volume offset .It Fl v verbose output to stderr .It Fl V @@ -39,12 +55,14 @@ None .Sh EXAMPLES .Bd -literal -# fshfsinfo /dev/sda1 -fshfsinfo 20150504 - +# fshfsinfo hfsplus.raw +fshfsinfo 20220727 +.sp +Hierarchical File System information: +.sp Volume information: -.Dl ... - + Name : hfsplus_test +.sp .Ed .Sh DIAGNOSTICS Errors, verbose and debug output are printed to stderr when verbose output \-v is enabled. @@ -55,6 +73,6 @@ .Sh AUTHOR These man pages were written by Joachim Metz. .Sh COPYRIGHT -Copyright 2009-2015, Joachim Metz . +Copyright 2009-2022, Joachim Metz . This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. .Sh SEE ALSO diff -Nru libfshfs-20201104/manuals/fshfsmount.1 libfshfs-20240221/manuals/fshfsmount.1 --- libfshfs-20201104/manuals/fshfsmount.1 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/manuals/fshfsmount.1 2024-02-21 05:48:50.000000000 +0000 @@ -0,0 +1,61 @@ +.Dd July 29, 2021 +.Dt fshfsmount +.Os libfshfs +.Sh NAME +.Nm fshfsmount +.Nd mounts a Hierarchical File System (HFS) volume +.Sh SYNOPSIS +.Nm fshfsmount +.Op Fl o Ar offset +.Op Fl hvV +.Ar source +.Sh DESCRIPTION +.Nm fshfsmount +is a utility to mount a Hierarchical File System (HFS) volume +.Pp +.Nm fshfsmount +is part of the +.Nm libfshfs +package. +.Nm libfshfs +is a library to access the Hierarchical File System (HFS) format +.Pp +.Ar source +is the source file. +.Pp +The options are as follows: +.Bl -tag -width Ds +.It Fl h +shows this help +.It Fl o Ar offset +specify the volume offset in bytes +.It Fl v +verbose output to stderr +.It Fl V +print version +.It Fl X Ar extended_options +extended options to pass to sub system +.El +.Sh ENVIRONMENT +None +.Sh FILES +None +.Sh EXAMPLES +.Bd -literal +# fshfsmount /dev/sda1 +fshfsmount 20210729 +.sp +.Ed +.Sh DIAGNOSTICS +Errors, verbose and debug output are printed to stderr when verbose output \-v is enabled. +Verbose and debug output are only printed when enabled at compilation. +.Sh BUGS +Please report bugs of any kind to or on the project website: +https://github.com/libyal/libfshfs/ +.Sh AUTHOR +These man pages were written by Joachim Metz. +.Sh COPYRIGHT +Copyright (C) 2009-2024, Joachim Metz . +This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +.Sh SEE ALSO +.Xr fshfsinfo 1 diff -Nru libfshfs-20201104/manuals/libfshfs.3 libfshfs-20240221/manuals/libfshfs.3 --- libfshfs-20201104/manuals/libfshfs.3 2020-11-04 04:19:45.000000000 +0000 +++ libfshfs-20240221/manuals/libfshfs.3 2024-02-21 05:48:50.000000000 +0000 @@ -1,4 +1,4 @@ -.Dd November 4, 2020 +.Dd August 31, 2022 .Dt libfshfs 3 .Os libfshfs .Sh NAME @@ -69,10 +69,10 @@ .Ft int .Fn libfshfs_volume_get_utf16_name "libfshfs_volume_t *volume" "uint16_t *utf16_string" "size_t utf16_string_size" "libfshfs_error_t **error" .Ft int -.Fn libfshfs_volume_get_file_entry_by_identifier "libfshfs_volume_t *volume" "uint32_t identifier" "libfshfs_file_entry_t **file_entry" "libfshfs_error_t **error" -.Ft int .Fn libfshfs_volume_get_root_directory "libfshfs_volume_t *volume" "libfshfs_file_entry_t **file_entry" "libfshfs_error_t **error" .Ft int +.Fn libfshfs_volume_get_file_entry_by_identifier "libfshfs_volume_t *volume" "uint32_t identifier" "libfshfs_file_entry_t **file_entry" "libfshfs_error_t **error" +.Ft int .Fn libfshfs_volume_get_file_entry_by_utf8_path "libfshfs_volume_t *volume" "const uint8_t *utf8_string" "size_t utf8_string_length" "libfshfs_file_entry_t **file_entry" "libfshfs_error_t **error" .Ft int .Fn libfshfs_volume_get_file_entry_by_utf16_path "libfshfs_volume_t *volume" "const uint16_t *utf16_string" "size_t utf16_string_length" "libfshfs_file_entry_t **file_entry" "libfshfs_error_t **error" @@ -93,6 +93,8 @@ .Ft int .Fn libfshfs_file_entry_get_parent_identifier "libfshfs_file_entry_t *file_entry" "uint32_t *parent_identifier" "libfshfs_error_t **error" .Ft int +.Fn libfshfs_file_entry_get_parent_file_entry "libfshfs_file_entry_t *file_entry" "libfshfs_file_entry_t **parent_file_entry" "libfshfs_error_t **error" +.Ft int .Fn libfshfs_file_entry_get_link_identifier "libfshfs_file_entry_t *file_entry" "uint32_t *link_identifier" "libfshfs_error_t **error" .Ft int .Fn libfshfs_file_entry_get_creation_time "libfshfs_file_entry_t *file_entry" "uint32_t *hfs_time" "libfshfs_error_t **error" @@ -109,10 +111,16 @@ .Ft int .Fn libfshfs_file_entry_get_file_mode "libfshfs_file_entry_t *file_entry" "uint16_t *file_mode" "libfshfs_error_t **error" .Ft int +.Fn libfshfs_file_entry_get_number_of_links "libfshfs_file_entry_t *file_entry" "uint32_t *number_of_links" "libfshfs_error_t **error" +.Ft int .Fn libfshfs_file_entry_get_owner_identifier "libfshfs_file_entry_t *file_entry" "uint32_t *owner_identifier" "libfshfs_error_t **error" .Ft int .Fn libfshfs_file_entry_get_group_identifier "libfshfs_file_entry_t *file_entry" "uint32_t *group_identifier" "libfshfs_error_t **error" .Ft int +.Fn libfshfs_file_entry_get_device_identifier "libfshfs_file_entry_t *file_entry" "uint32_t *device_identifier" "libfshfs_error_t **error" +.Ft int +.Fn libfshfs_file_entry_get_device_number "libfshfs_file_entry_t *file_entry" "uint32_t *major_device_number" "uint32_t *minor_device_number" "libfshfs_error_t **error" +.Ft int .Fn libfshfs_file_entry_get_utf8_name_size "libfshfs_file_entry_t *file_entry" "size_t *utf8_string_size" "libfshfs_error_t **error" .Ft int .Fn libfshfs_file_entry_get_utf8_name "libfshfs_file_entry_t *file_entry" "uint8_t *utf8_string" "size_t utf8_string_size" "libfshfs_error_t **error" @@ -129,6 +137,10 @@ .Ft int .Fn libfshfs_file_entry_get_utf16_symbolic_link_target "libfshfs_file_entry_t *file_entry" "uint16_t *utf16_string" "size_t utf16_string_size" "libfshfs_error_t **error" .Ft int +.Fn libfshfs_file_entry_has_resource_fork "libfshfs_file_entry_t *file_entry" "libfshfs_error_t **error" +.Ft int +.Fn libfshfs_file_entry_get_resource_fork "libfshfs_file_entry_t *file_entry" "libfshfs_data_stream_t **data_stream" "libfshfs_error_t **error" +.Ft int .Fn libfshfs_file_entry_get_number_of_extended_attributes "libfshfs_file_entry_t *file_entry" "int *number_of_extended_attributes" "libfshfs_error_t **error" .Ft int .Fn libfshfs_file_entry_get_extended_attribute_by_index "libfshfs_file_entry_t *file_entry" "int extended_attribute_index" "libfshfs_extended_attribute_t **extended_attribute" "libfshfs_error_t **error" @@ -158,6 +170,28 @@ .Fn libfshfs_file_entry_get_offset "libfshfs_file_entry_t *file_entry" "off64_t *offset" "libfshfs_error_t **error" .Ft int .Fn libfshfs_file_entry_get_size "libfshfs_file_entry_t *file_entry" "size64_t *size" "libfshfs_error_t **error" +.Ft int +.Fn libfshfs_file_entry_get_number_of_extents "libfshfs_file_entry_t *file_entry" "int *number_of_extents" "libfshfs_error_t **error" +.Ft int +.Fn libfshfs_file_entry_get_extent_by_index "libfshfs_file_entry_t *file_entry" "int extent_index" "off64_t *extent_offset" "size64_t *extent_size" "uint32_t *extent_flags" "libfshfs_error_t **error" +.Pp +Data stream functions +.Ft int +.Fn libfshfs_data_stream_free "libfshfs_data_stream_t **data_stream" "libfshfs_error_t **error" +.Ft ssize_t +.Fn libfshfs_data_stream_read_buffer "libfshfs_data_stream_t *data_stream" "void *buffer" "size_t buffer_size" "libfshfs_error_t **error" +.Ft ssize_t +.Fn libfshfs_data_stream_read_buffer_at_offset "libfshfs_data_stream_t *data_stream" "void *buffer" "size_t buffer_size" "off64_t offset" "libfshfs_error_t **error" +.Ft off64_t +.Fn libfshfs_data_stream_seek_offset "libfshfs_data_stream_t *data_stream" "off64_t offset" "int whence" "libfshfs_error_t **error" +.Ft int +.Fn libfshfs_data_stream_get_offset "libfshfs_data_stream_t *data_stream" "off64_t *offset" "libfshfs_error_t **error" +.Ft int +.Fn libfshfs_data_stream_get_size "libfshfs_data_stream_t *data_stream" "size64_t *size" "libfshfs_error_t **error" +.Ft int +.Fn libfshfs_data_stream_get_number_of_extents "libfshfs_data_stream_t *data_stream" "int *number_of_extents" "libfshfs_error_t **error" +.Ft int +.Fn libfshfs_data_stream_get_extent_by_index "libfshfs_data_stream_t *data_stream" "int extent_index" "off64_t *extent_offset" "size64_t *extent_size" "uint32_t *extent_flags" "libfshfs_error_t **error" .Pp Extended attribute functions .Ft int @@ -170,6 +204,20 @@ .Fn libfshfs_extended_attribute_get_utf16_name_size "libfshfs_extended_attribute_t *extended_attribute" "size_t *utf16_string_size" "libfshfs_error_t **error" .Ft int .Fn libfshfs_extended_attribute_get_utf16_name "libfshfs_extended_attribute_t *extended_attribute" "uint16_t *utf16_string" "size_t utf16_string_size" "libfshfs_error_t **error" +.Ft ssize_t +.Fn libfshfs_extended_attribute_read_buffer "libfshfs_extended_attribute_t *extended_attribute" "void *buffer" "size_t buffer_size" "libfshfs_error_t **error" +.Ft ssize_t +.Fn libfshfs_extended_attribute_read_buffer_at_offset "libfshfs_extended_attribute_t *extended_attribute" "void *buffer" "size_t buffer_size" "off64_t offset" "libfshfs_error_t **error" +.Ft off64_t +.Fn libfshfs_extended_attribute_seek_offset "libfshfs_extended_attribute_t *extended_attribute" "off64_t offset" "int whence" "libfshfs_error_t **error" +.Ft int +.Fn libfshfs_extended_attribute_get_offset "libfshfs_extended_attribute_t *extended_attribute" "off64_t *offset" "libfshfs_error_t **error" +.Ft int +.Fn libfshfs_extended_attribute_get_size "libfshfs_extended_attribute_t *extended_attribute" "size64_t *size" "libfshfs_error_t **error" +.Ft int +.Fn libfshfs_extended_attribute_get_number_of_extents "libfshfs_extended_attribute_t *extended_attribute" "int *number_of_extents" "libfshfs_error_t **error" +.Ft int +.Fn libfshfs_extended_attribute_get_extent_by_index "libfshfs_extended_attribute_t *extended_attribute" "int extent_index" "off64_t *extent_offset" "size64_t *extent_size" "uint32_t *extent_flags" "libfshfs_error_t **error" .Sh DESCRIPTION The .Fn libfshfs_get_version @@ -199,7 +247,7 @@ .Sh AUTHOR These man pages are generated from "libfshfs.h". .Sh COPYRIGHT -Copyright (C) 2009-2020, Joachim Metz . +Copyright (C) 2009-2024, Joachim Metz . .sp This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff -Nru libfshfs-20201104/missing libfshfs-20240221/missing --- libfshfs-20201104/missing 2020-11-04 11:56:30.000000000 +0000 +++ libfshfs-20240221/missing 2024-02-21 06:04:25.000000000 +0000 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2021 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify diff -Nru libfshfs-20201104/msvscpp/Makefile.am libfshfs-20240221/msvscpp/Makefile.am --- libfshfs-20201104/msvscpp/Makefile.am 2020-11-04 05:45:49.000000000 +0000 +++ libfshfs-20240221/msvscpp/Makefile.am 2024-02-21 05:50:08.000000000 +0000 @@ -1,5 +1,7 @@ MSVSCPP_FILES = \ + fshfs_test_attribute_record/fshfs_test_attribute_record.vcproj \ fshfs_test_attributes_btree_key/fshfs_test_attributes_btree_key.vcproj \ + fshfs_test_bit_stream/fshfs_test_bit_stream.vcproj \ fshfs_test_btree_file/fshfs_test_btree_file.vcproj \ fshfs_test_btree_header/fshfs_test_btree_header.vcproj \ fshfs_test_btree_node/fshfs_test_btree_node.vcproj \ @@ -19,16 +21,21 @@ fshfs_test_file_record/fshfs_test_file_record.vcproj \ fshfs_test_file_system/fshfs_test_file_system.vcproj \ fshfs_test_fork_descriptor/fshfs_test_fork_descriptor.vcproj \ + fshfs_test_huffman_tree/fshfs_test_huffman_tree.vcproj \ fshfs_test_io_handle/fshfs_test_io_handle.vcproj \ + fshfs_test_master_directory_block/fshfs_test_master_directory_block.vcproj \ fshfs_test_name/fshfs_test_name.vcproj \ fshfs_test_notify/fshfs_test_notify.vcproj \ + fshfs_test_profiler/fshfs_test_profiler.vcproj \ fshfs_test_support/fshfs_test_support.vcproj \ fshfs_test_thread_record/fshfs_test_thread_record.vcproj \ + fshfs_test_tools_info_handle/fshfs_test_tools_info_handle.vcproj \ fshfs_test_tools_output/fshfs_test_tools_output.vcproj \ fshfs_test_tools_signal/fshfs_test_tools_signal.vcproj \ fshfs_test_volume/fshfs_test_volume.vcproj \ fshfs_test_volume_header/fshfs_test_volume_header.vcproj \ fshfsinfo/fshfsinfo.vcproj \ + fshfsmount/fshfsmount.vcproj \ libbfio/libbfio.vcproj \ libcdata/libcdata.vcproj \ libcerror/libcerror.vcproj \ @@ -42,6 +49,7 @@ libfdata/libfdata.vcproj \ libfdatetime/libfdatetime.vcproj \ libfguid/libfguid.vcproj \ + libfmos/libfmos.vcproj \ libfshfs/libfshfs.vcproj \ libhmac/libhmac.vcproj \ libuna/libuna.vcproj \ @@ -56,5 +64,5 @@ Makefile.in distclean: clean - /bin/rm -f Makefile + -rm -f Makefile diff -Nru libfshfs-20201104/msvscpp/Makefile.in libfshfs-20240221/msvscpp/Makefile.in --- libfshfs-20201104/msvscpp/Makefile.in 2020-11-04 11:56:31.000000000 +0000 +++ libfshfs-20240221/msvscpp/Makefile.in 2024-02-21 06:04:26.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -90,25 +90,26 @@ subdir = msvscpp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcdata.m4 \ - $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \ - $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \ - $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcrypto.m4 \ - $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcthreads.m4 \ - $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ - $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ - $(top_srcdir)/m4/libhmac.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/libuna.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \ - $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \ - $(top_srcdir)/m4/zlib.m4 $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libbfio.m4 \ + $(top_srcdir)/m4/libcdata.m4 $(top_srcdir)/m4/libcerror.m4 \ + $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ + $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ + $(top_srcdir)/m4/libcrypto.m4 $(top_srcdir)/m4/libcsplit.m4 \ + $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \ + $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ + $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmos.m4 \ + $(top_srcdir)/m4/libfuse.m4 $(top_srcdir)/m4/libhmac.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/pthread.m4 \ + $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ + $(top_srcdir)/m4/types.m4 $(top_srcdir)/m4/zlib.m4 \ + $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) @@ -135,6 +136,7 @@ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -152,6 +154,8 @@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ @@ -167,8 +171,10 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -188,6 +194,8 @@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ +HAVE_LIBFMOS = @HAVE_LIBFMOS@ +HAVE_LIBFUSE = @HAVE_LIBFUSE@ HAVE_LIBHMAC = @HAVE_LIBHMAC@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ @@ -203,6 +211,7 @@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ +HAVE_LOCAL_LIBFMOS = @HAVE_LOCAL_LIBFMOS@ HAVE_LOCAL_LIBHMAC = @HAVE_LOCAL_LIBHMAC@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ @@ -256,8 +265,12 @@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ +LIBFMOS_CPPFLAGS = @LIBFMOS_CPPFLAGS@ +LIBFMOS_LIBADD = @LIBFMOS_LIBADD@ LIBFSHFS_DLL_EXPORT = @LIBFSHFS_DLL_EXPORT@ LIBFSHFS_DLL_IMPORT = @LIBFSHFS_DLL_IMPORT@ +LIBFUSE_CPPFLAGS = @LIBFUSE_CPPFLAGS@ +LIBFUSE_LIBADD = @LIBFUSE_LIBADD@ LIBHMAC_CPPFLAGS = @LIBHMAC_CPPFLAGS@ LIBHMAC_LIBADD = @LIBHMAC_LIBADD@ LIBICONV = @LIBICONV@ @@ -279,8 +292,8 @@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ @@ -303,26 +316,6 @@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ -PYTHON2 = @PYTHON2@ -PYTHON2_CONFIG = @PYTHON2_CONFIG@ -PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ -PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ -PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ -PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ -PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ -PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ -PYTHON2_PREFIX = @PYTHON2_PREFIX@ -PYTHON2_VERSION = @PYTHON2_VERSION@ -PYTHON3 = @PYTHON3@ -PYTHON3_CONFIG = @PYTHON3_CONFIG@ -PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ -PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ -PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ -PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ -PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ -PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ -PYTHON3_PREFIX = @PYTHON3_PREFIX@ -PYTHON3_VERSION = @PYTHON3_VERSION@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ @@ -400,6 +393,12 @@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ +ax_libfmos_pc_libs_private = @ax_libfmos_pc_libs_private@ +ax_libfmos_spec_build_requires = @ax_libfmos_spec_build_requires@ +ax_libfmos_spec_requires = @ax_libfmos_spec_requires@ +ax_libfuse_pc_libs_private = @ax_libfuse_pc_libs_private@ +ax_libfuse_spec_build_requires = @ax_libfuse_spec_build_requires@ +ax_libfuse_spec_requires = @ax_libfuse_spec_requires@ ax_libhmac_pc_libs_private = @ax_libhmac_pc_libs_private@ ax_libhmac_spec_build_requires = @ax_libhmac_spec_build_requires@ ax_libhmac_spec_requires = @ax_libhmac_spec_requires@ @@ -424,6 +423,8 @@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +fuse_CFLAGS = @fuse_CFLAGS@ +fuse_LIBS = @fuse_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -461,6 +462,8 @@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ +libfmos_CFLAGS = @libfmos_CFLAGS@ +libfmos_LIBS = @libfmos_LIBS@ libfshfs_spec_requires = @libfshfs_spec_requires@ libfshfs_spec_tools_build_requires = @libfshfs_spec_tools_build_requires@ libhmac_CFLAGS = @libhmac_CFLAGS@ @@ -479,11 +482,8 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ -pyexecdir2 = @pyexecdir2@ -pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ -pythondir2 = @pythondir2@ -pythondir3 = @pythondir3@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -495,7 +495,9 @@ zlib_CFLAGS = @zlib_CFLAGS@ zlib_LIBS = @zlib_LIBS@ MSVSCPP_FILES = \ + fshfs_test_attribute_record/fshfs_test_attribute_record.vcproj \ fshfs_test_attributes_btree_key/fshfs_test_attributes_btree_key.vcproj \ + fshfs_test_bit_stream/fshfs_test_bit_stream.vcproj \ fshfs_test_btree_file/fshfs_test_btree_file.vcproj \ fshfs_test_btree_header/fshfs_test_btree_header.vcproj \ fshfs_test_btree_node/fshfs_test_btree_node.vcproj \ @@ -515,16 +517,21 @@ fshfs_test_file_record/fshfs_test_file_record.vcproj \ fshfs_test_file_system/fshfs_test_file_system.vcproj \ fshfs_test_fork_descriptor/fshfs_test_fork_descriptor.vcproj \ + fshfs_test_huffman_tree/fshfs_test_huffman_tree.vcproj \ fshfs_test_io_handle/fshfs_test_io_handle.vcproj \ + fshfs_test_master_directory_block/fshfs_test_master_directory_block.vcproj \ fshfs_test_name/fshfs_test_name.vcproj \ fshfs_test_notify/fshfs_test_notify.vcproj \ + fshfs_test_profiler/fshfs_test_profiler.vcproj \ fshfs_test_support/fshfs_test_support.vcproj \ fshfs_test_thread_record/fshfs_test_thread_record.vcproj \ + fshfs_test_tools_info_handle/fshfs_test_tools_info_handle.vcproj \ fshfs_test_tools_output/fshfs_test_tools_output.vcproj \ fshfs_test_tools_signal/fshfs_test_tools_signal.vcproj \ fshfs_test_volume/fshfs_test_volume.vcproj \ fshfs_test_volume_header/fshfs_test_volume_header.vcproj \ fshfsinfo/fshfsinfo.vcproj \ + fshfsmount/fshfsmount.vcproj \ libbfio/libbfio.vcproj \ libcdata/libcdata.vcproj \ libcerror/libcerror.vcproj \ @@ -538,6 +545,7 @@ libfdata/libfdata.vcproj \ libfdatetime/libfdatetime.vcproj \ libfguid/libfguid.vcproj \ + libfmos/libfmos.vcproj \ libfshfs/libfshfs.vcproj \ libhmac/libhmac.vcproj \ libuna/libuna.vcproj \ @@ -589,13 +597,14 @@ clean-libtool: -rm -rf .libs _libs +sources-local: +splint-local: tags TAGS: ctags CTAGS: cscope cscopelist: - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am @@ -726,6 +735,14 @@ ps-am: +sources: sources-am + +sources-am: sources-local + +splint: splint-am + +splint-am: splint-local + uninstall-am: .MAKE: install-am install-strip @@ -740,13 +757,14 @@ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags-am uninstall uninstall-am + sources-am sources-local splint-am splint-local tags-am \ + uninstall uninstall-am .PRECIOUS: Makefile distclean: clean - /bin/rm -f Makefile + -rm -f Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru libfshfs-20201104/msvscpp/fshfs_test_attribute_record/fshfs_test_attribute_record.vcproj libfshfs-20240221/msvscpp/fshfs_test_attribute_record/fshfs_test_attribute_record.vcproj --- libfshfs-20201104/msvscpp/fshfs_test_attribute_record/fshfs_test_attribute_record.vcproj 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/msvscpp/fshfs_test_attribute_record/fshfs_test_attribute_record.vcproj 2024-02-21 05:50:08.000000000 +0000 @@ -0,0 +1,222 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru libfshfs-20201104/msvscpp/fshfs_test_attributes_btree_key/fshfs_test_attributes_btree_key.vcproj libfshfs-20240221/msvscpp/fshfs_test_attributes_btree_key/fshfs_test_attributes_btree_key.vcproj --- libfshfs-20201104/msvscpp/fshfs_test_attributes_btree_key/fshfs_test_attributes_btree_key.vcproj 2020-11-04 05:45:49.000000000 +0000 +++ libfshfs-20240221/msvscpp/fshfs_test_attributes_btree_key/fshfs_test_attributes_btree_key.vcproj 2024-02-21 05:50:08.000000000 +0000 @@ -41,8 +41,8 @@ /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru libfshfs-20201104/msvscpp/fshfs_test_btree_file/fshfs_test_btree_file.vcproj libfshfs-20240221/msvscpp/fshfs_test_btree_file/fshfs_test_btree_file.vcproj --- libfshfs-20201104/msvscpp/fshfs_test_btree_file/fshfs_test_btree_file.vcproj 2020-11-04 05:45:49.000000000 +0000 +++ libfshfs-20240221/msvscpp/fshfs_test_btree_file/fshfs_test_btree_file.vcproj 2024-02-21 05:50:08.000000000 +0000 @@ -41,8 +41,8 @@ /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru libfshfs-20201104/msvscpp/fshfs_test_io_handle/fshfs_test_io_handle.vcproj libfshfs-20240221/msvscpp/fshfs_test_io_handle/fshfs_test_io_handle.vcproj --- libfshfs-20201104/msvscpp/fshfs_test_io_handle/fshfs_test_io_handle.vcproj 2020-11-04 05:45:49.000000000 +0000 +++ libfshfs-20240221/msvscpp/fshfs_test_io_handle/fshfs_test_io_handle.vcproj 2024-02-21 05:50:08.000000000 +0000 @@ -41,8 +41,8 @@ /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru libfshfs-20201104/msvscpp/fshfs_test_name/fshfs_test_name.vcproj libfshfs-20240221/msvscpp/fshfs_test_name/fshfs_test_name.vcproj --- libfshfs-20201104/msvscpp/fshfs_test_name/fshfs_test_name.vcproj 2020-11-04 05:45:49.000000000 +0000 +++ libfshfs-20240221/msvscpp/fshfs_test_name/fshfs_test_name.vcproj 2024-02-21 05:50:08.000000000 +0000 @@ -41,8 +41,8 @@ /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru libfshfs-20201104/msvscpp/fshfs_test_support/fshfs_test_support.vcproj libfshfs-20240221/msvscpp/fshfs_test_support/fshfs_test_support.vcproj --- libfshfs-20201104/msvscpp/fshfs_test_support/fshfs_test_support.vcproj 2020-11-04 05:45:49.000000000 +0000 +++ libfshfs-20240221/msvscpp/fshfs_test_support/fshfs_test_support.vcproj 2024-02-21 05:50:08.000000000 +0000 @@ -41,8 +41,8 @@ /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru libfshfs-20201104/msvscpp/fshfs_test_tools_output/fshfs_test_tools_output.vcproj libfshfs-20240221/msvscpp/fshfs_test_tools_output/fshfs_test_tools_output.vcproj --- libfshfs-20201104/msvscpp/fshfs_test_tools_output/fshfs_test_tools_output.vcproj 2020-11-04 05:45:49.000000000 +0000 +++ libfshfs-20240221/msvscpp/fshfs_test_tools_output/fshfs_test_tools_output.vcproj 2024-02-21 05:50:08.000000000 +0000 @@ -41,8 +41,8 @@ /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru libfshfs-20201104/msvscpp/libfdata/libfdata.vcproj libfshfs-20240221/msvscpp/libfdata/libfdata.vcproj --- libfshfs-20201104/msvscpp/libfdata/libfdata.vcproj 2020-11-04 05:45:49.000000000 +0000 +++ libfshfs-20240221/msvscpp/libfdata/libfdata.vcproj 2024-02-21 05:49:12.000000000 +0000 @@ -199,14 +199,6 @@ > - - - - @@ -289,14 +281,6 @@ > - - - - diff -Nru libfshfs-20201104/msvscpp/libfmos/libfmos.vcproj libfshfs-20240221/msvscpp/libfmos/libfmos.vcproj --- libfshfs-20201104/msvscpp/libfmos/libfmos.vcproj 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/msvscpp/libfmos/libfmos.vcproj 2024-02-21 05:49:12.000000000 +0000 @@ -0,0 +1,257 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru libfshfs-20201104/msvscpp/libfshfs/libfshfs.vcproj libfshfs-20240221/msvscpp/libfshfs/libfshfs.vcproj --- libfshfs-20201104/msvscpp/libfshfs/libfshfs.vcproj 2020-11-04 05:45:49.000000000 +0000 +++ libfshfs-20240221/msvscpp/libfshfs/libfshfs.vcproj 2024-02-21 05:49:12.000000000 +0000 @@ -39,8 +39,8 @@ /> + + @@ -186,6 +190,10 @@ > + + @@ -202,6 +210,10 @@ > + + @@ -278,6 +290,10 @@ > + + @@ -294,11 +310,15 @@ > + + + + @@ -352,11 +376,19 @@ > + + + + + + @@ -388,6 +424,10 @@ > + + @@ -468,6 +508,10 @@ > + + @@ -488,6 +532,10 @@ > + + @@ -532,11 +580,15 @@ > + + + + diff -Nru libfshfs-20201104/msvscpp/libfshfs.sln libfshfs-20240221/msvscpp/libfshfs.sln --- libfshfs-20201104/msvscpp/libfshfs.sln 2020-11-04 05:45:49.000000000 +0000 +++ libfshfs-20240221/msvscpp/libfshfs.sln 2024-02-21 05:50:08.000000000 +0000 @@ -13,12 +13,24 @@ {58EF72D6-030A-4742-A353-21B461635A96} = {58EF72D6-030A-4742-A353-21B461635A96} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fshfs_test_attribute_record", "fshfs_test_attribute_record\fshfs_test_attribute_record.vcproj", "{50930937-F524-44FF-8AE4-0792653C6A29}" + ProjectSection(ProjectDependencies) = postProject + {13D05959-377F-408F-9A28-53DA9FA0DDEE} = {13D05959-377F-408F-9A28-53DA9FA0DDEE} + {58EF72D6-030A-4742-A353-21B461635A96} = {58EF72D6-030A-4742-A353-21B461635A96} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fshfs_test_attributes_btree_key", "fshfs_test_attributes_btree_key\fshfs_test_attributes_btree_key.vcproj", "{596DD0B6-005D-4934-899B-AD918C021EB9}" ProjectSection(ProjectDependencies) = postProject {13D05959-377F-408F-9A28-53DA9FA0DDEE} = {13D05959-377F-408F-9A28-53DA9FA0DDEE} {58EF72D6-030A-4742-A353-21B461635A96} = {58EF72D6-030A-4742-A353-21B461635A96} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fshfs_test_bit_stream", "fshfs_test_bit_stream\fshfs_test_bit_stream.vcproj", "{8924DBFC-0339-49CA-ACC3-4D0EBDC0C908}" + ProjectSection(ProjectDependencies) = postProject + {13D05959-377F-408F-9A28-53DA9FA0DDEE} = {13D05959-377F-408F-9A28-53DA9FA0DDEE} + {58EF72D6-030A-4742-A353-21B461635A96} = {58EF72D6-030A-4742-A353-21B461635A96} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fshfs_test_btree_file", "fshfs_test_btree_file\fshfs_test_btree_file.vcproj", "{4DE46E73-4576-4E5B-A242-98257EED11F5}" ProjectSection(ProjectDependencies) = postProject {68F78438-9325-4D03-B3FD-8BA057084BE7} = {68F78438-9325-4D03-B3FD-8BA057084BE7} @@ -144,12 +156,32 @@ {58EF72D6-030A-4742-A353-21B461635A96} = {58EF72D6-030A-4742-A353-21B461635A96} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fshfs_test_huffman_tree", "fshfs_test_huffman_tree\fshfs_test_huffman_tree.vcproj", "{033C5893-2A28-4951-B381-74CEDDCA49E4}" + ProjectSection(ProjectDependencies) = postProject + {13D05959-377F-408F-9A28-53DA9FA0DDEE} = {13D05959-377F-408F-9A28-53DA9FA0DDEE} + {58EF72D6-030A-4742-A353-21B461635A96} = {58EF72D6-030A-4742-A353-21B461635A96} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fshfs_test_io_handle", "fshfs_test_io_handle\fshfs_test_io_handle.vcproj", "{F4D679FC-1654-4D39-B915-D4C1BE9B149A}" ProjectSection(ProjectDependencies) = postProject {13D05959-377F-408F-9A28-53DA9FA0DDEE} = {13D05959-377F-408F-9A28-53DA9FA0DDEE} {58EF72D6-030A-4742-A353-21B461635A96} = {58EF72D6-030A-4742-A353-21B461635A96} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fshfs_test_master_directory_block", "fshfs_test_master_directory_block\fshfs_test_master_directory_block.vcproj", "{1353510E-2CC3-45F2-9802-87E95E04A73F}" + ProjectSection(ProjectDependencies) = postProject + {68F78438-9325-4D03-B3FD-8BA057084BE7} = {68F78438-9325-4D03-B3FD-8BA057084BE7} + {35AC104F-DAF9-4860-8C89-DB49D665531A} = {35AC104F-DAF9-4860-8C89-DB49D665531A} + {003388BF-2DF2-4D30-8107-1119A09902C2} = {003388BF-2DF2-4D30-8107-1119A09902C2} + {C77083B5-E248-4A8E-9F00-D533D8469A26} = {C77083B5-E248-4A8E-9F00-D533D8469A26} + {EF642470-0925-4521-8166-D4A0FCD588A4} = {EF642470-0925-4521-8166-D4A0FCD588A4} + {8ACFEE4E-DD09-45D3-8AE8-5A975EAA7C9D} = {8ACFEE4E-DD09-45D3-8AE8-5A975EAA7C9D} + {A6B87FB3-7572-4C43-B547-007E7F2114C9} = {A6B87FB3-7572-4C43-B547-007E7F2114C9} + {E5BF1DAF-6877-436A-93DD-572A3A7524F0} = {E5BF1DAF-6877-436A-93DD-572A3A7524F0} + {13D05959-377F-408F-9A28-53DA9FA0DDEE} = {13D05959-377F-408F-9A28-53DA9FA0DDEE} + {58EF72D6-030A-4742-A353-21B461635A96} = {58EF72D6-030A-4742-A353-21B461635A96} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fshfs_test_name", "fshfs_test_name\fshfs_test_name.vcproj", "{E369C31E-6282-40F8-A409-F6E2D50149F9}" ProjectSection(ProjectDependencies) = postProject {13D05959-377F-408F-9A28-53DA9FA0DDEE} = {13D05959-377F-408F-9A28-53DA9FA0DDEE} @@ -162,6 +194,12 @@ {58EF72D6-030A-4742-A353-21B461635A96} = {58EF72D6-030A-4742-A353-21B461635A96} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fshfs_test_profiler", "fshfs_test_profiler\fshfs_test_profiler.vcproj", "{F436D00D-6FDE-4952-94CF-C1142AC3982F}" + ProjectSection(ProjectDependencies) = postProject + {13D05959-377F-408F-9A28-53DA9FA0DDEE} = {13D05959-377F-408F-9A28-53DA9FA0DDEE} + {58EF72D6-030A-4742-A353-21B461635A96} = {58EF72D6-030A-4742-A353-21B461635A96} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fshfs_test_support", "fshfs_test_support\fshfs_test_support.vcproj", "{CAF51B43-FACA-46D1-B530-39CAE72E004D}" ProjectSection(ProjectDependencies) = postProject {68F78438-9325-4D03-B3FD-8BA057084BE7} = {68F78438-9325-4D03-B3FD-8BA057084BE7} @@ -182,6 +220,23 @@ {58EF72D6-030A-4742-A353-21B461635A96} = {58EF72D6-030A-4742-A353-21B461635A96} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fshfs_test_tools_info_handle", "fshfs_test_tools_info_handle\fshfs_test_tools_info_handle.vcproj", "{32D5E7F1-610B-4503-AB16-99D657A4EB32}" + ProjectSection(ProjectDependencies) = postProject + {8E3BA1F7-0786-4A4F-962F-C8FC8281A025} = {8E3BA1F7-0786-4A4F-962F-C8FC8281A025} + {CC1CBD55-D2C2-4F21-BA88-98026B6EF025} = {CC1CBD55-D2C2-4F21-BA88-98026B6EF025} + {4BBCFF06-2F09-45BC-880B-E7FD41A5589E} = {4BBCFF06-2F09-45BC-880B-E7FD41A5589E} + {68F78438-9325-4D03-B3FD-8BA057084BE7} = {68F78438-9325-4D03-B3FD-8BA057084BE7} + {35AC104F-DAF9-4860-8C89-DB49D665531A} = {35AC104F-DAF9-4860-8C89-DB49D665531A} + {003388BF-2DF2-4D30-8107-1119A09902C2} = {003388BF-2DF2-4D30-8107-1119A09902C2} + {C77083B5-E248-4A8E-9F00-D533D8469A26} = {C77083B5-E248-4A8E-9F00-D533D8469A26} + {EF642470-0925-4521-8166-D4A0FCD588A4} = {EF642470-0925-4521-8166-D4A0FCD588A4} + {8ACFEE4E-DD09-45D3-8AE8-5A975EAA7C9D} = {8ACFEE4E-DD09-45D3-8AE8-5A975EAA7C9D} + {A6B87FB3-7572-4C43-B547-007E7F2114C9} = {A6B87FB3-7572-4C43-B547-007E7F2114C9} + {E5BF1DAF-6877-436A-93DD-572A3A7524F0} = {E5BF1DAF-6877-436A-93DD-572A3A7524F0} + {13D05959-377F-408F-9A28-53DA9FA0DDEE} = {13D05959-377F-408F-9A28-53DA9FA0DDEE} + {58EF72D6-030A-4742-A353-21B461635A96} = {58EF72D6-030A-4742-A353-21B461635A96} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fshfs_test_tools_output", "fshfs_test_tools_output\fshfs_test_tools_output.vcproj", "{957630DF-E157-49C2-805B-83EE752F2BEB}" ProjectSection(ProjectDependencies) = postProject {13D05959-377F-408F-9A28-53DA9FA0DDEE} = {13D05959-377F-408F-9A28-53DA9FA0DDEE} @@ -223,6 +278,13 @@ {58EF72D6-030A-4742-A353-21B461635A96} = {58EF72D6-030A-4742-A353-21B461635A96} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libfmos", "libfmos\libfmos.vcproj", "{876F9324-1377-4CEE-B801-FE800FE4EBDA}" + ProjectSection(ProjectDependencies) = postProject + {58EF72D6-030A-4742-A353-21B461635A96} = {58EF72D6-030A-4742-A353-21B461635A96} + {E5B002B6-575D-4529-AD55-D2AFBF7D0C51} = {E5B002B6-575D-4529-AD55-D2AFBF7D0C51} + {8ACFEE4E-DD09-45D3-8AE8-5A975EAA7C9D} = {8ACFEE4E-DD09-45D3-8AE8-5A975EAA7C9D} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libclocale", "libclocale\libclocale.vcproj", "{A6B87FB3-7572-4C43-B547-007E7F2114C9}" ProjectSection(ProjectDependencies) = postProject {58EF72D6-030A-4742-A353-21B461635A96} = {58EF72D6-030A-4742-A353-21B461635A96} @@ -245,6 +307,20 @@ {58EF72D6-030A-4742-A353-21B461635A96} = {58EF72D6-030A-4742-A353-21B461635A96} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fshfsmount", "fshfsmount\fshfsmount.vcproj", "{A9828D3E-AE7B-4D3F-8FE1-A02CB471A703}" + ProjectSection(ProjectDependencies) = postProject + {68F78438-9325-4D03-B3FD-8BA057084BE7} = {68F78438-9325-4D03-B3FD-8BA057084BE7} + {35AC104F-DAF9-4860-8C89-DB49D665531A} = {35AC104F-DAF9-4860-8C89-DB49D665531A} + {003388BF-2DF2-4D30-8107-1119A09902C2} = {003388BF-2DF2-4D30-8107-1119A09902C2} + {C77083B5-E248-4A8E-9F00-D533D8469A26} = {C77083B5-E248-4A8E-9F00-D533D8469A26} + {EF642470-0925-4521-8166-D4A0FCD588A4} = {EF642470-0925-4521-8166-D4A0FCD588A4} + {8ACFEE4E-DD09-45D3-8AE8-5A975EAA7C9D} = {8ACFEE4E-DD09-45D3-8AE8-5A975EAA7C9D} + {A6B87FB3-7572-4C43-B547-007E7F2114C9} = {A6B87FB3-7572-4C43-B547-007E7F2114C9} + {E5BF1DAF-6877-436A-93DD-572A3A7524F0} = {E5BF1DAF-6877-436A-93DD-572A3A7524F0} + {13D05959-377F-408F-9A28-53DA9FA0DDEE} = {13D05959-377F-408F-9A28-53DA9FA0DDEE} + {58EF72D6-030A-4742-A353-21B461635A96} = {58EF72D6-030A-4742-A353-21B461635A96} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbfio", "libbfio\libbfio.vcproj", "{68F78438-9325-4D03-B3FD-8BA057084BE7}" ProjectSection(ProjectDependencies) = postProject {58EF72D6-030A-4742-A353-21B461635A96} = {58EF72D6-030A-4742-A353-21B461635A96} @@ -323,6 +399,7 @@ {F882ABB9-9B04-4A3C-B90B-8D10893C1E18} = {F882ABB9-9B04-4A3C-B90B-8D10893C1E18} {4BBCFF06-2F09-45BC-880B-E7FD41A5589E} = {4BBCFF06-2F09-45BC-880B-E7FD41A5589E} {CC1CBD55-D2C2-4F21-BA88-98026B6EF025} = {CC1CBD55-D2C2-4F21-BA88-98026B6EF025} + {876F9324-1377-4CEE-B801-FE800FE4EBDA} = {876F9324-1377-4CEE-B801-FE800FE4EBDA} {068E441C-8F3C-411A-A837-1E68A4C7C6C2} = {068E441C-8F3C-411A-A837-1E68A4C7C6C2} EndProjectSection EndProject @@ -369,10 +446,18 @@ {CC1CBD55-D2C2-4F21-BA88-98026B6EF025}.Release|Win32.Build.0 = Release|Win32 {CC1CBD55-D2C2-4F21-BA88-98026B6EF025}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {CC1CBD55-D2C2-4F21-BA88-98026B6EF025}.VSDebug|Win32.Build.0 = VSDebug|Win32 + {50930937-F524-44FF-8AE4-0792653C6A29}.Release|Win32.ActiveCfg = Release|Win32 + {50930937-F524-44FF-8AE4-0792653C6A29}.Release|Win32.Build.0 = Release|Win32 + {50930937-F524-44FF-8AE4-0792653C6A29}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 + {50930937-F524-44FF-8AE4-0792653C6A29}.VSDebug|Win32.Build.0 = VSDebug|Win32 {596DD0B6-005D-4934-899B-AD918C021EB9}.Release|Win32.ActiveCfg = Release|Win32 {596DD0B6-005D-4934-899B-AD918C021EB9}.Release|Win32.Build.0 = Release|Win32 {596DD0B6-005D-4934-899B-AD918C021EB9}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {596DD0B6-005D-4934-899B-AD918C021EB9}.VSDebug|Win32.Build.0 = VSDebug|Win32 + {8924DBFC-0339-49CA-ACC3-4D0EBDC0C908}.Release|Win32.ActiveCfg = Release|Win32 + {8924DBFC-0339-49CA-ACC3-4D0EBDC0C908}.Release|Win32.Build.0 = Release|Win32 + {8924DBFC-0339-49CA-ACC3-4D0EBDC0C908}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 + {8924DBFC-0339-49CA-ACC3-4D0EBDC0C908}.VSDebug|Win32.Build.0 = VSDebug|Win32 {4DE46E73-4576-4E5B-A242-98257EED11F5}.Release|Win32.ActiveCfg = Release|Win32 {4DE46E73-4576-4E5B-A242-98257EED11F5}.Release|Win32.Build.0 = Release|Win32 {4DE46E73-4576-4E5B-A242-98257EED11F5}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 @@ -449,10 +534,18 @@ {FDAF2631-5458-4B8F-BB18-F55D63C83E5F}.Release|Win32.Build.0 = Release|Win32 {FDAF2631-5458-4B8F-BB18-F55D63C83E5F}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {FDAF2631-5458-4B8F-BB18-F55D63C83E5F}.VSDebug|Win32.Build.0 = VSDebug|Win32 + {033C5893-2A28-4951-B381-74CEDDCA49E4}.Release|Win32.ActiveCfg = Release|Win32 + {033C5893-2A28-4951-B381-74CEDDCA49E4}.Release|Win32.Build.0 = Release|Win32 + {033C5893-2A28-4951-B381-74CEDDCA49E4}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 + {033C5893-2A28-4951-B381-74CEDDCA49E4}.VSDebug|Win32.Build.0 = VSDebug|Win32 {F4D679FC-1654-4D39-B915-D4C1BE9B149A}.Release|Win32.ActiveCfg = Release|Win32 {F4D679FC-1654-4D39-B915-D4C1BE9B149A}.Release|Win32.Build.0 = Release|Win32 {F4D679FC-1654-4D39-B915-D4C1BE9B149A}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {F4D679FC-1654-4D39-B915-D4C1BE9B149A}.VSDebug|Win32.Build.0 = VSDebug|Win32 + {1353510E-2CC3-45F2-9802-87E95E04A73F}.Release|Win32.ActiveCfg = Release|Win32 + {1353510E-2CC3-45F2-9802-87E95E04A73F}.Release|Win32.Build.0 = Release|Win32 + {1353510E-2CC3-45F2-9802-87E95E04A73F}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 + {1353510E-2CC3-45F2-9802-87E95E04A73F}.VSDebug|Win32.Build.0 = VSDebug|Win32 {E369C31E-6282-40F8-A409-F6E2D50149F9}.Release|Win32.ActiveCfg = Release|Win32 {E369C31E-6282-40F8-A409-F6E2D50149F9}.Release|Win32.Build.0 = Release|Win32 {E369C31E-6282-40F8-A409-F6E2D50149F9}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 @@ -461,6 +554,10 @@ {ABBD3766-F56F-44E1-AC7E-DB061EC7618C}.Release|Win32.Build.0 = Release|Win32 {ABBD3766-F56F-44E1-AC7E-DB061EC7618C}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {ABBD3766-F56F-44E1-AC7E-DB061EC7618C}.VSDebug|Win32.Build.0 = VSDebug|Win32 + {F436D00D-6FDE-4952-94CF-C1142AC3982F}.Release|Win32.ActiveCfg = Release|Win32 + {F436D00D-6FDE-4952-94CF-C1142AC3982F}.Release|Win32.Build.0 = Release|Win32 + {F436D00D-6FDE-4952-94CF-C1142AC3982F}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 + {F436D00D-6FDE-4952-94CF-C1142AC3982F}.VSDebug|Win32.Build.0 = VSDebug|Win32 {CAF51B43-FACA-46D1-B530-39CAE72E004D}.Release|Win32.ActiveCfg = Release|Win32 {CAF51B43-FACA-46D1-B530-39CAE72E004D}.Release|Win32.Build.0 = Release|Win32 {CAF51B43-FACA-46D1-B530-39CAE72E004D}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 @@ -469,6 +566,10 @@ {B05D0F0F-5FC7-490C-A1AD-4CD9DE7714A0}.Release|Win32.Build.0 = Release|Win32 {B05D0F0F-5FC7-490C-A1AD-4CD9DE7714A0}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {B05D0F0F-5FC7-490C-A1AD-4CD9DE7714A0}.VSDebug|Win32.Build.0 = VSDebug|Win32 + {32D5E7F1-610B-4503-AB16-99D657A4EB32}.Release|Win32.ActiveCfg = Release|Win32 + {32D5E7F1-610B-4503-AB16-99D657A4EB32}.Release|Win32.Build.0 = Release|Win32 + {32D5E7F1-610B-4503-AB16-99D657A4EB32}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 + {32D5E7F1-610B-4503-AB16-99D657A4EB32}.VSDebug|Win32.Build.0 = VSDebug|Win32 {957630DF-E157-49C2-805B-83EE752F2BEB}.Release|Win32.ActiveCfg = Release|Win32 {957630DF-E157-49C2-805B-83EE752F2BEB}.Release|Win32.Build.0 = Release|Win32 {957630DF-E157-49C2-805B-83EE752F2BEB}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 @@ -485,6 +586,10 @@ {AF69A278-7A51-42F4-9F2E-3736B05F0C16}.Release|Win32.Build.0 = Release|Win32 {AF69A278-7A51-42F4-9F2E-3736B05F0C16}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {AF69A278-7A51-42F4-9F2E-3736B05F0C16}.VSDebug|Win32.Build.0 = VSDebug|Win32 + {876F9324-1377-4CEE-B801-FE800FE4EBDA}.Release|Win32.ActiveCfg = Release|Win32 + {876F9324-1377-4CEE-B801-FE800FE4EBDA}.Release|Win32.Build.0 = Release|Win32 + {876F9324-1377-4CEE-B801-FE800FE4EBDA}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 + {876F9324-1377-4CEE-B801-FE800FE4EBDA}.VSDebug|Win32.Build.0 = VSDebug|Win32 {A6B87FB3-7572-4C43-B547-007E7F2114C9}.Release|Win32.ActiveCfg = Release|Win32 {A6B87FB3-7572-4C43-B547-007E7F2114C9}.Release|Win32.Build.0 = Release|Win32 {A6B87FB3-7572-4C43-B547-007E7F2114C9}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 @@ -493,6 +598,10 @@ {BF52A8D1-FA84-4885-B8A2-D9B6D338DD71}.Release|Win32.Build.0 = Release|Win32 {BF52A8D1-FA84-4885-B8A2-D9B6D338DD71}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {BF52A8D1-FA84-4885-B8A2-D9B6D338DD71}.VSDebug|Win32.Build.0 = VSDebug|Win32 + {A9828D3E-AE7B-4D3F-8FE1-A02CB471A703}.Release|Win32.ActiveCfg = Release|Win32 + {A9828D3E-AE7B-4D3F-8FE1-A02CB471A703}.Release|Win32.Build.0 = Release|Win32 + {A9828D3E-AE7B-4D3F-8FE1-A02CB471A703}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 + {A9828D3E-AE7B-4D3F-8FE1-A02CB471A703}.VSDebug|Win32.Build.0 = VSDebug|Win32 {68F78438-9325-4D03-B3FD-8BA057084BE7}.Release|Win32.ActiveCfg = Release|Win32 {68F78438-9325-4D03-B3FD-8BA057084BE7}.Release|Win32.Build.0 = Release|Win32 {68F78438-9325-4D03-B3FD-8BA057084BE7}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 diff -Nru libfshfs-20201104/msvscpp/libuna/libuna.vcproj libfshfs-20240221/msvscpp/libuna/libuna.vcproj --- libfshfs-20201104/msvscpp/libuna/libuna.vcproj 2020-11-04 05:45:49.000000000 +0000 +++ libfshfs-20240221/msvscpp/libuna/libuna.vcproj 2024-02-21 05:49:12.000000000 +0000 @@ -227,6 +227,78 @@ > + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -413,6 +485,78 @@ > + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru libfshfs-20201104/msvscpp/pyfshfs/pyfshfs.vcproj libfshfs-20240221/msvscpp/pyfshfs/pyfshfs.vcproj --- libfshfs-20201104/msvscpp/pyfshfs/pyfshfs.vcproj 2020-11-04 05:45:49.000000000 +0000 +++ libfshfs-20240221/msvscpp/pyfshfs/pyfshfs.vcproj 2024-02-21 05:50:08.000000000 +0000 @@ -174,6 +174,10 @@ > + + @@ -182,6 +186,14 @@ > + + + + @@ -212,6 +224,10 @@ > + + @@ -220,6 +236,14 @@ > + + + + diff -Nru libfshfs-20201104/ossfuzz/Makefile.am libfshfs-20240221/ossfuzz/Makefile.am --- libfshfs-20201104/ossfuzz/Makefile.am 2020-07-19 09:08:16.000000000 +0000 +++ libfshfs-20240221/ossfuzz/Makefile.am 2023-12-03 09:06:47.000000000 +0000 @@ -12,8 +12,46 @@ @LIBBFIO_CPPFLAGS@ bin_PROGRAMS = \ + extended_attribute_fuzzer \ + file_entry_fuzzer \ volume_fuzzer +extended_attribute_fuzzer_SOURCES = \ + extended_attribute_fuzzer.cc \ + ossfuzz_libbfio.h \ + ossfuzz_libfshfs.h + +extended_attribute_fuzzer_LDADD = \ + @LIB_FUZZING_ENGINE@ \ + @LIBBFIO_LIBADD@ \ + @LIBCPATH_LIBADD@ \ + @LIBCFILE_LIBADD@ \ + @LIBUNA_LIBADD@ \ + @LIBCDATA_LIBADD@ \ + ../libfshfs/libfshfs.la \ + @LIBCNOTIFY_LIBADD@ \ + @LIBCLOCALE_LIBADD@ \ + @LIBCERROR_LIBADD@ \ + @LIBINTL@ + +file_entry_fuzzer_SOURCES = \ + file_entry_fuzzer.cc \ + ossfuzz_libbfio.h \ + ossfuzz_libfshfs.h + +file_entry_fuzzer_LDADD = \ + @LIB_FUZZING_ENGINE@ \ + @LIBBFIO_LIBADD@ \ + @LIBCPATH_LIBADD@ \ + @LIBCFILE_LIBADD@ \ + @LIBUNA_LIBADD@ \ + @LIBCDATA_LIBADD@ \ + ../libfshfs/libfshfs.la \ + @LIBCNOTIFY_LIBADD@ \ + @LIBCLOCALE_LIBADD@ \ + @LIBCERROR_LIBADD@ \ + @LIBINTL@ + volume_fuzzer_SOURCES = \ ossfuzz_libbfio.h \ ossfuzz_libfshfs.h \ @@ -37,9 +75,13 @@ Makefile.in distclean: clean - /bin/rm -f Makefile + -rm -f Makefile -splint: +splint-local: + @echo "Running splint on extended_attribute_fuzzer ..." + -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(extended_attribute_fuzzer_SOURCES) + @echo "Running splint on file_entry_fuzzer ..." + -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(file_entry_fuzzer_SOURCES) @echo "Running splint on volume_fuzzer ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(volume_fuzzer_SOURCES) diff -Nru libfshfs-20201104/ossfuzz/Makefile.in libfshfs-20240221/ossfuzz/Makefile.in --- libfshfs-20201104/ossfuzz/Makefile.in 2020-11-04 11:56:31.000000000 +0000 +++ libfshfs-20240221/ossfuzz/Makefile.in 2024-02-21 06:04:26.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -88,29 +88,32 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -@HAVE_LIB_FUZZING_ENGINE_TRUE@bin_PROGRAMS = volume_fuzzer$(EXEEXT) +@HAVE_LIB_FUZZING_ENGINE_TRUE@bin_PROGRAMS = extended_attribute_fuzzer$(EXEEXT) \ +@HAVE_LIB_FUZZING_ENGINE_TRUE@ file_entry_fuzzer$(EXEEXT) \ +@HAVE_LIB_FUZZING_ENGINE_TRUE@ volume_fuzzer$(EXEEXT) subdir = ossfuzz ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcdata.m4 \ - $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \ - $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \ - $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcrypto.m4 \ - $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcthreads.m4 \ - $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ - $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ - $(top_srcdir)/m4/libhmac.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/libuna.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \ - $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \ - $(top_srcdir)/m4/zlib.m4 $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libbfio.m4 \ + $(top_srcdir)/m4/libcdata.m4 $(top_srcdir)/m4/libcerror.m4 \ + $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ + $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ + $(top_srcdir)/m4/libcrypto.m4 $(top_srcdir)/m4/libcsplit.m4 \ + $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \ + $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ + $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmos.m4 \ + $(top_srcdir)/m4/libfuse.m4 $(top_srcdir)/m4/libhmac.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/pthread.m4 \ + $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ + $(top_srcdir)/m4/types.m4 $(top_srcdir)/m4/zlib.m4 \ + $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) @@ -120,6 +123,25 @@ CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) +am__extended_attribute_fuzzer_SOURCES_DIST = \ + extended_attribute_fuzzer.cc ossfuzz_libbfio.h \ + ossfuzz_libfshfs.h +@HAVE_LIB_FUZZING_ENGINE_TRUE@am_extended_attribute_fuzzer_OBJECTS = extended_attribute_fuzzer.$(OBJEXT) +extended_attribute_fuzzer_OBJECTS = \ + $(am_extended_attribute_fuzzer_OBJECTS) +@HAVE_LIB_FUZZING_ENGINE_TRUE@extended_attribute_fuzzer_DEPENDENCIES = \ +@HAVE_LIB_FUZZING_ENGINE_TRUE@ ../libfshfs/libfshfs.la +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +am__file_entry_fuzzer_SOURCES_DIST = file_entry_fuzzer.cc \ + ossfuzz_libbfio.h ossfuzz_libfshfs.h +@HAVE_LIB_FUZZING_ENGINE_TRUE@am_file_entry_fuzzer_OBJECTS = \ +@HAVE_LIB_FUZZING_ENGINE_TRUE@ file_entry_fuzzer.$(OBJEXT) +file_entry_fuzzer_OBJECTS = $(am_file_entry_fuzzer_OBJECTS) +@HAVE_LIB_FUZZING_ENGINE_TRUE@file_entry_fuzzer_DEPENDENCIES = \ +@HAVE_LIB_FUZZING_ENGINE_TRUE@ ../libfshfs/libfshfs.la am__volume_fuzzer_SOURCES_DIST = ossfuzz_libbfio.h ossfuzz_libfshfs.h \ volume_fuzzer.cc @HAVE_LIB_FUZZING_ENGINE_TRUE@am_volume_fuzzer_OBJECTS = \ @@ -127,10 +149,6 @@ volume_fuzzer_OBJECTS = $(am_volume_fuzzer_OBJECTS) @HAVE_LIB_FUZZING_ENGINE_TRUE@volume_fuzzer_DEPENDENCIES = \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ ../libfshfs/libfshfs.la -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false @@ -146,7 +164,8 @@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles -am__depfiles_remade = ./$(DEPDIR)/volume_fuzzer.Po +am__depfiles_remade = ./$(DEPDIR)/extended_attribute_fuzzer.Po \ + ./$(DEPDIR)/file_entry_fuzzer.Po ./$(DEPDIR)/volume_fuzzer.Po am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) @@ -184,13 +203,17 @@ am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = -SOURCES = $(volume_fuzzer_SOURCES) -DIST_SOURCES = $(am__volume_fuzzer_SOURCES_DIST) +SOURCES = $(extended_attribute_fuzzer_SOURCES) \ + $(file_entry_fuzzer_SOURCES) $(volume_fuzzer_SOURCES) +DIST_SOURCES = $(am__extended_attribute_fuzzer_SOURCES_DIST) \ + $(am__file_entry_fuzzer_SOURCES_DIST) \ + $(am__volume_fuzzer_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -208,8 +231,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ @@ -226,6 +247,8 @@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ @@ -241,8 +264,10 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -262,6 +287,8 @@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ +HAVE_LIBFMOS = @HAVE_LIBFMOS@ +HAVE_LIBFUSE = @HAVE_LIBFUSE@ HAVE_LIBHMAC = @HAVE_LIBHMAC@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ @@ -277,6 +304,7 @@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ +HAVE_LOCAL_LIBFMOS = @HAVE_LOCAL_LIBFMOS@ HAVE_LOCAL_LIBHMAC = @HAVE_LOCAL_LIBHMAC@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ @@ -330,8 +358,12 @@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ +LIBFMOS_CPPFLAGS = @LIBFMOS_CPPFLAGS@ +LIBFMOS_LIBADD = @LIBFMOS_LIBADD@ LIBFSHFS_DLL_EXPORT = @LIBFSHFS_DLL_EXPORT@ LIBFSHFS_DLL_IMPORT = @LIBFSHFS_DLL_IMPORT@ +LIBFUSE_CPPFLAGS = @LIBFUSE_CPPFLAGS@ +LIBFUSE_LIBADD = @LIBFUSE_LIBADD@ LIBHMAC_CPPFLAGS = @LIBHMAC_CPPFLAGS@ LIBHMAC_LIBADD = @LIBHMAC_LIBADD@ LIBICONV = @LIBICONV@ @@ -353,8 +385,8 @@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ @@ -377,26 +409,6 @@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ -PYTHON2 = @PYTHON2@ -PYTHON2_CONFIG = @PYTHON2_CONFIG@ -PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ -PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ -PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ -PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ -PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ -PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ -PYTHON2_PREFIX = @PYTHON2_PREFIX@ -PYTHON2_VERSION = @PYTHON2_VERSION@ -PYTHON3 = @PYTHON3@ -PYTHON3_CONFIG = @PYTHON3_CONFIG@ -PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ -PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ -PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ -PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ -PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ -PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ -PYTHON3_PREFIX = @PYTHON3_PREFIX@ -PYTHON3_VERSION = @PYTHON3_VERSION@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ @@ -474,6 +486,12 @@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ +ax_libfmos_pc_libs_private = @ax_libfmos_pc_libs_private@ +ax_libfmos_spec_build_requires = @ax_libfmos_spec_build_requires@ +ax_libfmos_spec_requires = @ax_libfmos_spec_requires@ +ax_libfuse_pc_libs_private = @ax_libfuse_pc_libs_private@ +ax_libfuse_spec_build_requires = @ax_libfuse_spec_build_requires@ +ax_libfuse_spec_requires = @ax_libfuse_spec_requires@ ax_libhmac_pc_libs_private = @ax_libhmac_pc_libs_private@ ax_libhmac_spec_build_requires = @ax_libhmac_spec_build_requires@ ax_libhmac_spec_requires = @ax_libhmac_spec_requires@ @@ -498,6 +516,8 @@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +fuse_CFLAGS = @fuse_CFLAGS@ +fuse_LIBS = @fuse_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -535,6 +555,8 @@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ +libfmos_CFLAGS = @libfmos_CFLAGS@ +libfmos_LIBS = @libfmos_LIBS@ libfshfs_spec_requires = @libfshfs_spec_requires@ libfshfs_spec_tools_build_requires = @libfshfs_spec_tools_build_requires@ libhmac_CFLAGS = @libhmac_CFLAGS@ @@ -553,11 +575,8 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ -pyexecdir2 = @pyexecdir2@ -pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ -pythondir2 = @pythondir2@ -pythondir3 = @pythondir3@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -580,6 +599,42 @@ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCPATH_CPPFLAGS@ \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBBFIO_CPPFLAGS@ +@HAVE_LIB_FUZZING_ENGINE_TRUE@extended_attribute_fuzzer_SOURCES = \ +@HAVE_LIB_FUZZING_ENGINE_TRUE@ extended_attribute_fuzzer.cc \ +@HAVE_LIB_FUZZING_ENGINE_TRUE@ ossfuzz_libbfio.h \ +@HAVE_LIB_FUZZING_ENGINE_TRUE@ ossfuzz_libfshfs.h + +@HAVE_LIB_FUZZING_ENGINE_TRUE@extended_attribute_fuzzer_LDADD = \ +@HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIB_FUZZING_ENGINE@ \ +@HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBBFIO_LIBADD@ \ +@HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCPATH_LIBADD@ \ +@HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCFILE_LIBADD@ \ +@HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBUNA_LIBADD@ \ +@HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCDATA_LIBADD@ \ +@HAVE_LIB_FUZZING_ENGINE_TRUE@ ../libfshfs/libfshfs.la \ +@HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCNOTIFY_LIBADD@ \ +@HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCLOCALE_LIBADD@ \ +@HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCERROR_LIBADD@ \ +@HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBINTL@ + +@HAVE_LIB_FUZZING_ENGINE_TRUE@file_entry_fuzzer_SOURCES = \ +@HAVE_LIB_FUZZING_ENGINE_TRUE@ file_entry_fuzzer.cc \ +@HAVE_LIB_FUZZING_ENGINE_TRUE@ ossfuzz_libbfio.h \ +@HAVE_LIB_FUZZING_ENGINE_TRUE@ ossfuzz_libfshfs.h + +@HAVE_LIB_FUZZING_ENGINE_TRUE@file_entry_fuzzer_LDADD = \ +@HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIB_FUZZING_ENGINE@ \ +@HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBBFIO_LIBADD@ \ +@HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCPATH_LIBADD@ \ +@HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCFILE_LIBADD@ \ +@HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBUNA_LIBADD@ \ +@HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCDATA_LIBADD@ \ +@HAVE_LIB_FUZZING_ENGINE_TRUE@ ../libfshfs/libfshfs.la \ +@HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCNOTIFY_LIBADD@ \ +@HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCLOCALE_LIBADD@ \ +@HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCERROR_LIBADD@ \ +@HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBINTL@ + @HAVE_LIB_FUZZING_ENGINE_TRUE@volume_fuzzer_SOURCES = \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ ossfuzz_libbfio.h \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ ossfuzz_libfshfs.h \ @@ -684,6 +739,14 @@ echo " rm -f" $$list; \ rm -f $$list +extended_attribute_fuzzer$(EXEEXT): $(extended_attribute_fuzzer_OBJECTS) $(extended_attribute_fuzzer_DEPENDENCIES) $(EXTRA_extended_attribute_fuzzer_DEPENDENCIES) + @rm -f extended_attribute_fuzzer$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(extended_attribute_fuzzer_OBJECTS) $(extended_attribute_fuzzer_LDADD) $(LIBS) + +file_entry_fuzzer$(EXEEXT): $(file_entry_fuzzer_OBJECTS) $(file_entry_fuzzer_DEPENDENCIES) $(EXTRA_file_entry_fuzzer_DEPENDENCIES) + @rm -f file_entry_fuzzer$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(file_entry_fuzzer_OBJECTS) $(file_entry_fuzzer_LDADD) $(LIBS) + volume_fuzzer$(EXEEXT): $(volume_fuzzer_OBJECTS) $(volume_fuzzer_DEPENDENCIES) $(EXTRA_volume_fuzzer_DEPENDENCIES) @rm -f volume_fuzzer$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(volume_fuzzer_OBJECTS) $(volume_fuzzer_LDADD) $(LIBS) @@ -694,6 +757,8 @@ distclean-compile: -rm -f *.tab.c +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extended_attribute_fuzzer.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file_entry_fuzzer.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/volume_fuzzer.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @@ -728,6 +793,8 @@ clean-libtool: -rm -rf .libs _libs +sources-local: +splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique @@ -780,7 +847,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am @@ -900,7 +966,9 @@ installcheck-am: maintainer-clean: maintainer-clean-am - -rm -f ./$(DEPDIR)/volume_fuzzer.Po + -rm -f ./$(DEPDIR)/extended_attribute_fuzzer.Po + -rm -f ./$(DEPDIR)/file_entry_fuzzer.Po + -rm -f ./$(DEPDIR)/volume_fuzzer.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -917,6 +985,14 @@ ps-am: +sources: sources-am + +sources-am: sources-local + +splint: splint-am + +splint-am: splint-local + uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip @@ -933,15 +1009,20 @@ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am uninstall-binPROGRAMS + sources-am sources-local splint-am splint-local tags tags-am \ + uninstall uninstall-am uninstall-binPROGRAMS .PRECIOUS: Makefile distclean: clean - /bin/rm -f Makefile + -rm -f Makefile -splint: +splint-local: + @echo "Running splint on extended_attribute_fuzzer ..." + -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(extended_attribute_fuzzer_SOURCES) + @echo "Running splint on file_entry_fuzzer ..." + -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(file_entry_fuzzer_SOURCES) @echo "Running splint on volume_fuzzer ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(volume_fuzzer_SOURCES) diff -Nru libfshfs-20201104/ossfuzz/extended_attribute_fuzzer.cc libfshfs-20240221/ossfuzz/extended_attribute_fuzzer.cc --- libfshfs-20201104/ossfuzz/extended_attribute_fuzzer.cc 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/ossfuzz/extended_attribute_fuzzer.cc 2024-02-21 05:48:50.000000000 +0000 @@ -0,0 +1,138 @@ +/* + * OSS-Fuzz target for libfshfs extended_attribute type + * + * Copyright (C) 2009-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include + +/* Note that some of the OSS-Fuzz engines use C++ + */ +extern "C" { + +#include "ossfuzz_libbfio.h" +#include "ossfuzz_libfshfs.h" + +#if !defined( LIBFSHFS_HAVE_BFIO ) + +/* Opens a volume using a Basic File IO (bfio) handle + * Returns 1 if successful or -1 on error + */ +LIBFSHFS_EXTERN \ +int libfshfs_volume_open_file_io_handle( + libfshfs_volume_t *volume, + libbfio_handle_t *file_io_handle, + int access_flags, + libfshfs_error_t **error ); + +#endif /* !defined( LIBFSHFS_HAVE_BFIO ) */ + +int LLVMFuzzerTestOneInput( + const uint8_t *data, + size_t size ) +{ + libbfio_handle_t *file_io_handle = NULL; + libfshfs_extended_attribute_t *extended_attribute = NULL; + libfshfs_file_entry_t *file_entry = NULL; + libfshfs_volume_t *volume = NULL; + int number_of_extended_attributes = 0; + int result = 0; + + if( libbfio_memory_range_initialize( + &file_io_handle, + NULL ) != 1 ) + { + return( 0 ); + } + if( libbfio_memory_range_set( + file_io_handle, + (uint8_t *) data, + size, + NULL ) != 1 ) + { + goto on_error_libbfio; + } + if( libfshfs_volume_initialize( + &volume, + NULL ) != 1 ) + { + goto on_error_libbfio; + } + if( libfshfs_volume_open_file_io_handle( + volume, + file_io_handle, + LIBFSHFS_OPEN_READ, + NULL ) != 1 ) + { + goto on_error_libfshfs_volume; + } + result = libfshfs_volume_get_file_entry_by_utf8_path( + volume, + (uint8_t *) "/a_directory/a_file", + 19, + &file_entry, + NULL ); + + if( result == 1 ) + { + if( libfshfs_file_entry_get_number_of_extended_attributes( + file_entry, + &number_of_extended_attributes, + NULL ) != 1 ) + { + goto on_error_libfshfs_file_entry; + } + if( number_of_extended_attributes > 0 ) + { + if( libfshfs_file_entry_get_extended_attribute_by_index( + file_entry, + 0, + &extended_attribute, + NULL ) != 1 ) + { + goto on_error_libfshfs_file_entry; + } + libfshfs_extended_attribute_free( + &extended_attribute, + NULL ); + } +on_error_libfshfs_file_entry: + libfshfs_file_entry_free( + &file_entry, + NULL ); + } + libfshfs_volume_close( + volume, + NULL ); + +on_error_libfshfs_volume: + libfshfs_volume_free( + &volume, + NULL ); + +on_error_libbfio: + libbfio_handle_free( + &file_io_handle, + NULL ); + + return( 0 ); +} + +} /* extern "C" */ + diff -Nru libfshfs-20201104/ossfuzz/file_entry_fuzzer.cc libfshfs-20240221/ossfuzz/file_entry_fuzzer.cc --- libfshfs-20201104/ossfuzz/file_entry_fuzzer.cc 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/ossfuzz/file_entry_fuzzer.cc 2024-02-21 05:48:50.000000000 +0000 @@ -0,0 +1,253 @@ +/* + * OSS-Fuzz target for libfshfs file_entry type + * + * Copyright (C) 2009-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include + +/* Note that some of the OSS-Fuzz engines use C++ + */ +extern "C" { + +#include "ossfuzz_libbfio.h" +#include "ossfuzz_libfshfs.h" + +#if !defined( LIBFSHFS_HAVE_BFIO ) + +/* Opens a volume using a Basic File IO (bfio) handle + * Returns 1 if successful or -1 on error + */ +LIBFSHFS_EXTERN \ +int libfshfs_volume_open_file_io_handle( + libfshfs_volume_t *volume, + libbfio_handle_t *file_io_handle, + int access_flags, + libfshfs_error_t **error ); + +#endif /* !defined( LIBFSHFS_HAVE_BFIO ) */ + +int LLVMFuzzerTestOneInput( + const uint8_t *data, + size_t size ) +{ + uint8_t string_value[ 64 ]; + + libbfio_handle_t *file_io_handle = NULL; + libfshfs_file_entry_t *root_directory = NULL; + libfshfs_file_entry_t *sub_file_entry = NULL; + libfshfs_volume_t *volume = NULL; + size64_t file_size = 0; + size_t string_size = 0; + off64_t file_offset = 0; + uint32_t hfs_time = 0; + uint32_t major_device_number = 0; + uint32_t minor_device_number = 0; + uint32_t value_32bit = 0; + int32_t posix_time = 0; + uint16_t value_16bit = 0; + int number_of_extents = 0; + int number_of_sub_file_entries = 0; + int result = 0; + + if( libbfio_memory_range_initialize( + &file_io_handle, + NULL ) != 1 ) + { + return( 0 ); + } + if( libbfio_memory_range_set( + file_io_handle, + (uint8_t *) data, + size, + NULL ) != 1 ) + { + goto on_error_libbfio; + } + if( libfshfs_volume_initialize( + &volume, + NULL ) != 1 ) + { + goto on_error_libbfio; + } + if( libfshfs_volume_open_file_io_handle( + volume, + file_io_handle, + LIBFSHFS_OPEN_READ, + NULL ) != 1 ) + { + goto on_error_libfshfs_volume; + } + if( libfshfs_volume_get_root_directory( + volume, + &root_directory, + NULL ) == 1 ) + { + if( libfshfs_file_entry_get_number_of_sub_file_entries( + root_directory, + &number_of_sub_file_entries, + NULL ) != 1 ) + { + goto on_error_libfshfs_root_directory; + } + if( number_of_sub_file_entries > 0 ) + { + result = libfshfs_file_entry_get_sub_file_entry_by_index( + root_directory, + 0, + &sub_file_entry, + NULL ); + + if( result != -1 ) + { + libfshfs_file_entry_get_identifier( + sub_file_entry, + &value_32bit, + NULL ); + + libfshfs_file_entry_get_parent_identifier( + sub_file_entry, + &value_32bit, + NULL ); + + libfshfs_file_entry_get_link_identifier( + sub_file_entry, + &value_32bit, + NULL ); + + libfshfs_file_entry_get_creation_time( + sub_file_entry, + &hfs_time, + NULL ); + + libfshfs_file_entry_get_access_time( + sub_file_entry, + &hfs_time, + NULL ); + + libfshfs_file_entry_get_backup_time( + sub_file_entry, + &hfs_time, + NULL ); + + libfshfs_file_entry_get_added_time( + sub_file_entry, + &posix_time, + NULL ); + + libfshfs_file_entry_get_file_mode( + sub_file_entry, + &value_16bit, + NULL ); + + libfshfs_file_entry_get_number_of_links( + sub_file_entry, + &value_32bit, + NULL ); + + libfshfs_file_entry_get_owner_identifier( + sub_file_entry, + &value_32bit, + NULL ); + + libfshfs_file_entry_get_group_identifier( + sub_file_entry, + &value_32bit, + NULL ); + + libfshfs_file_entry_get_device_identifier( + sub_file_entry, + &value_32bit, + NULL ); + + libfshfs_file_entry_get_device_number( + sub_file_entry, + &major_device_number, + &minor_device_number, + NULL ); + + libfshfs_file_entry_get_utf8_name_size( + sub_file_entry, + &string_size, + NULL ); + + libfshfs_file_entry_get_utf8_name( + sub_file_entry, + string_value, + 64, + NULL ); + + libfshfs_file_entry_get_utf8_symbolic_link_target_size( + sub_file_entry, + &string_size, + NULL ); + + libfshfs_file_entry_get_utf8_symbolic_link_target( + sub_file_entry, + string_value, + 64, + NULL ); + + libfshfs_file_entry_has_resource_fork( + sub_file_entry, + NULL ); + + libfshfs_file_entry_get_offset( + sub_file_entry, + &file_offset, + NULL ); + + libfshfs_file_entry_get_size( + sub_file_entry, + &file_size, + NULL ); + + libfshfs_file_entry_get_number_of_extents( + sub_file_entry, + &number_of_extents, + NULL ); + } + libfshfs_file_entry_free( + &sub_file_entry, + NULL ); + } +on_error_libfshfs_root_directory: + libfshfs_file_entry_free( + &root_directory, + NULL ); + } + libfshfs_volume_close( + volume, + NULL ); + +on_error_libfshfs_volume: + libfshfs_volume_free( + &volume, + NULL ); + +on_error_libbfio: + libbfio_handle_free( + &file_io_handle, + NULL ); + + return( 0 ); +} + +} /* extern "C" */ + diff -Nru libfshfs-20201104/ossfuzz/ossfuzz_libbfio.h libfshfs-20240221/ossfuzz/ossfuzz_libbfio.h --- libfshfs-20201104/ossfuzz/ossfuzz_libbfio.h 2020-07-19 09:08:33.000000000 +0000 +++ libfshfs-20240221/ossfuzz/ossfuzz_libbfio.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libbfio header wrapper * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/ossfuzz/ossfuzz_libfshfs.h libfshfs-20240221/ossfuzz/ossfuzz_libfshfs.h --- libfshfs-20201104/ossfuzz/ossfuzz_libfshfs.h 2020-07-19 09:08:56.000000000 +0000 +++ libfshfs-20240221/ossfuzz/ossfuzz_libfshfs.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libfshfs header wrapper * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/ossfuzz/volume_fuzzer.cc libfshfs-20240221/ossfuzz/volume_fuzzer.cc --- libfshfs-20201104/ossfuzz/volume_fuzzer.cc 2020-08-09 09:38:13.000000000 +0000 +++ libfshfs-20240221/ossfuzz/volume_fuzzer.cc 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * OSS-Fuzz target for libfshfs volume type * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -47,8 +47,12 @@ const uint8_t *data, size_t size ) { + uint8_t string_value[ 64 ]; + libbfio_handle_t *file_io_handle = NULL; libfshfs_volume_t *volume = NULL; + size_t string_size = 0; + int result = 0; if( libbfio_memory_range_initialize( &file_io_handle, @@ -70,19 +74,29 @@ { goto on_error_libbfio; } - if( libfshfs_volume_open_file_io_handle( - volume, - file_io_handle, - LIBFSHFS_OPEN_READ, - NULL ) != 1 ) + result = libfshfs_volume_open_file_io_handle( + volume, + file_io_handle, + LIBFSHFS_OPEN_READ, + NULL ); + + if( result != -1 ) { - goto on_error_libfshfs; + libfshfs_volume_get_utf8_name_size( + volume, + &string_size, + NULL ); + + libfshfs_volume_get_utf8_name( + volume, + string_value, + 64, + NULL ); + + libfshfs_volume_close( + volume, + NULL ); } - libfshfs_volume_close( - volume, - NULL ); - -on_error_libfshfs: libfshfs_volume_free( &volume, NULL ); diff -Nru libfshfs-20201104/po/Makefile.in.in libfshfs-20240221/po/Makefile.in.in --- libfshfs-20201104/po/Makefile.in.in 2016-02-17 07:53:59.000000000 +0000 +++ libfshfs-20240221/po/Makefile.in.in 2023-12-03 09:06:54.000000000 +0000 @@ -1,20 +1,20 @@ # Makefile for PO directory in any package using GNU gettext. -# Copyright (C) 1995-1997, 2000-2007, 2009-2010 by Ulrich Drepper +# Copyright (C) 1995-2000 Ulrich Drepper +# Copyright (C) 2000-2020 Free Software Foundation, Inc. # -# This file can be copied and used freely without restrictions. It can -# be used in projects which are not available under the GNU General Public -# License but which still want to provide support for the GNU gettext -# functionality. -# Please note that the actual code of GNU gettext is covered by the GNU -# General Public License and is *not* in the public domain. +# Copying and distribution of this file, with or without modification, +# are permitted in any medium without royalty provided the copyright +# notice and this notice are preserved. This file is offered as-is, +# without any warranty. # -# Origin: gettext-0.18 -GETTEXT_MACRO_VERSION = 0.18 +# Origin: gettext-0.21 +GETTEXT_MACRO_VERSION = 0.20 PACKAGE = @PACKAGE@ VERSION = @VERSION@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +SED = @SED@ SHELL = /bin/sh @SET_MAKE@ @@ -44,20 +44,22 @@ MKDIR_P = @MKDIR_P@ mkdir_p = @mkdir_p@ +# When building gettext-tools, we prefer to use the built programs +# rather than installed programs. However, we can't do that when we +# are cross compiling. +CROSS_COMPILING = @CROSS_COMPILING@ + GMSGFMT_ = @GMSGFMT@ GMSGFMT_no = @GMSGFMT@ GMSGFMT_yes = @GMSGFMT_015@ GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT)) -MSGFMT_ = @MSGFMT@ -MSGFMT_no = @MSGFMT@ -MSGFMT_yes = @MSGFMT_015@ -MSGFMT = $(MSGFMT_$(USE_MSGCTXT)) XGETTEXT_ = @XGETTEXT@ XGETTEXT_no = @XGETTEXT@ XGETTEXT_yes = @XGETTEXT_015@ XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT)) -MSGMERGE = msgmerge +MSGMERGE = @MSGMERGE@ MSGMERGE_UPDATE = @MSGMERGE@ --update +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ MSGINIT = msginit MSGCONV = msgconv MSGFILTER = msgfilter @@ -76,34 +78,61 @@ CATALOGS = @CATALOGS@ +POFILESDEPS_ = $(srcdir)/$(DOMAIN).pot +POFILESDEPS_yes = $(POFILESDEPS_) +POFILESDEPS_no = +POFILESDEPS = $(POFILESDEPS_$(PO_DEPENDS_ON_POT)) + +DISTFILESDEPS_ = update-po +DISTFILESDEPS_yes = $(DISTFILESDEPS_) +DISTFILESDEPS_no = +DISTFILESDEPS = $(DISTFILESDEPS_$(DIST_DEPENDS_ON_UPDATE_PO)) + # Makevars gets inserted here. (Don't remove this line!) -.SUFFIXES: -.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update +all: all-@USE_NLS@ -.po.mo: - @echo "$(MSGFMT) -c -o $@ $<"; \ - $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@ +.SUFFIXES: +.SUFFIXES: .po .gmo .sed .sin .nop .po-create .po-update + +# The .pot file, stamp-po, .po files, and .gmo files appear in release tarballs. +# The GNU Coding Standards say in +# : +# "GNU distributions usually contain some files which are not source files +# ... . Since these files normally appear in the source directory, they +# should always appear in the source directory, not in the build directory. +# So Makefile rules to update them should put the updated files in the +# source directory." +# Therefore we put these files in the source directory, not the build directory. + +# During .po -> .gmo conversion, take into account the most recent changes to +# the .pot file. This eliminates the need to update the .po files when the +# .pot file has changed, which would be troublesome if the .po files are put +# under version control. +$(GMOFILES): $(srcdir)/$(DOMAIN).pot .po.gmo: @lang=`echo $* | sed -e 's,.*/,,'`; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \ - cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo + echo "$${cdcmd}rm -f $${lang}.gmo && $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.1po && rm -f $${lang}.1po"; \ + cd $(srcdir) && \ + rm -f $${lang}.gmo && \ + $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && \ + $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.1po && \ + mv t-$${lang}.gmo $${lang}.gmo && \ + rm -f $${lang}.1po .sin.sed: sed -e '/^#/d' $< > t-$@ mv t-$@ $@ -all: check-macro-version all-@USE_NLS@ - -all-yes: stamp-po +all-yes: $(srcdir)/stamp-po all-no: # Ensure that the gettext macros and this Makefile.in.in are in sync. -check-macro-version: - @test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \ +CHECK_MACRO_VERSION = \ + test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \ || { echo "*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version @GETTEXT_MACRO_VERSION@" 1>&2; \ exit 1; \ } @@ -112,23 +141,24 @@ # internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because # we don't want to bother translators with empty POT files). We assume that # LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty. -# In this case, stamp-po is a nop (i.e. a phony target). +# In this case, $(srcdir)/stamp-po is a nop (i.e. a phony target). -# stamp-po is a timestamp denoting the last time at which the CATALOGS have -# been loosely updated. Its purpose is that when a developer or translator -# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS, -# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent -# invocations of "make" will do nothing. This timestamp would not be necessary -# if updating the $(CATALOGS) would always touch them; however, the rule for -# $(POFILES) has been designed to not touch files that don't need to be -# changed. -stamp-po: $(srcdir)/$(DOMAIN).pot +# $(srcdir)/stamp-po is a timestamp denoting the last time at which the CATALOGS +# have been loosely updated. Its purpose is that when a developer or translator +# checks out the package from a version control system, and the $(DOMAIN).pot +# file is not under version control, "make" will update the $(DOMAIN).pot and +# the $(CATALOGS), but subsequent invocations of "make" will do nothing. This +# timestamp would not be necessary if updating the $(CATALOGS) would always +# touch them; however, the rule for $(POFILES) has been designed to not touch +# files that don't need to be changed. +$(srcdir)/stamp-po: $(srcdir)/$(DOMAIN).pot + @$(CHECK_MACRO_VERSION) test ! -f $(srcdir)/$(DOMAIN).pot || \ test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) @test ! -f $(srcdir)/$(DOMAIN).pot || { \ - echo "touch stamp-po" && \ - echo timestamp > stamp-poT && \ - mv stamp-poT stamp-po; \ + echo "touch $(srcdir)/stamp-po" && \ + echo timestamp > $(srcdir)/stamp-poT && \ + mv $(srcdir)/stamp-poT $(srcdir)/stamp-po; \ } # Note: Target 'all' must not depend on target '$(DOMAIN).pot-update', @@ -137,11 +167,27 @@ # This target rebuilds $(DOMAIN).pot; it is an expensive operation. # Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. +# The determination of whether the package xyz is a GNU one is based on the +# heuristic whether some file in the top level directory mentions "GNU xyz". +# If GNU 'find' is available, we avoid grepping through monster files. $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed - if LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null | grep -v 'libtool:' >/dev/null; then \ - package_gnu='GNU '; \ + package_gnu="$(PACKAGE_GNU)"; \ + test -n "$$package_gnu" || { \ + if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ + LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep -i 'GNU @PACKAGE@' /dev/null '{}' ';' 2>/dev/null; \ + else \ + LC_ALL=C grep -i 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null; \ + fi; \ + } | grep -v 'libtool:' >/dev/null; then \ + package_gnu=yes; \ + else \ + package_gnu=no; \ + fi; \ + }; \ + if test "$$package_gnu" = "yes"; then \ + package_prefix='GNU '; \ else \ - package_gnu=''; \ + package_prefix=''; \ fi; \ if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \ msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ @@ -151,22 +197,30 @@ case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \ $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ - --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ + --add-comments=TRANSLATORS: \ --files-from=$(srcdir)/POTFILES.in \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ --msgid-bugs-address="$$msgid_bugs_address" \ + $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ ;; \ *) \ $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ - --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ + --add-comments=TRANSLATORS: \ --files-from=$(srcdir)/POTFILES.in \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ - --package-name="$${package_gnu}@PACKAGE@" \ + --package-name="$${package_prefix}@PACKAGE@" \ --package-version='@VERSION@' \ --msgid-bugs-address="$$msgid_bugs_address" \ + $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ ;; \ esac test ! -f $(DOMAIN).po || { \ + if test -f $(srcdir)/$(DOMAIN).pot-header; then \ + sed -e '1,/^#$$/d' < $(DOMAIN).po > $(DOMAIN).1po && \ + cat $(srcdir)/$(DOMAIN).pot-header $(DOMAIN).1po > $(DOMAIN).po && \ + rm -f $(DOMAIN).1po \ + || exit 1; \ + fi; \ if test -f $(srcdir)/$(DOMAIN).pot; then \ sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ @@ -189,17 +243,20 @@ # This target rebuilds a PO file if $(DOMAIN).pot has changed. # Note that a PO file is not touched if it doesn't need to be changed. -$(POFILES): $(srcdir)/$(DOMAIN).pot +$(POFILES): $(POFILESDEPS) + @test -f $(srcdir)/$(DOMAIN).pot || $(MAKE) $(srcdir)/$(DOMAIN).pot @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ if test -f "$(srcdir)/$${lang}.po"; then \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \ + echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} --previous $${lang}.po $(DOMAIN).pot"; \ cd $(srcdir) \ && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ - '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].*) \ $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \ + 0.1[6-7] | 0.1[6-7].*) \ + $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --previous $${lang}.po $(DOMAIN).pot;; \ *) \ - $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \ + $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} --previous $${lang}.po $(DOMAIN).pot;; \ esac; \ }; \ else \ @@ -334,34 +391,41 @@ info dvi ps pdf html tags TAGS ctags CTAGS ID: +install-dvi install-ps install-pdf install-html: + mostlyclean: rm -f remove-potcdate.sed - rm -f stamp-poT + rm -f $(srcdir)/stamp-poT rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po rm -fr *.o clean: mostlyclean distclean: clean - rm -f Makefile Makefile.in POTFILES *.mo + rm -f Makefile Makefile.in POTFILES maintainer-clean: distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." - rm -f stamp-po $(GMOFILES) + rm -f $(srcdir)/$(DOMAIN).pot $(srcdir)/stamp-po $(GMOFILES) distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) dist distdir: - $(MAKE) update-po + test -z "$(DISTFILESDEPS)" || $(MAKE) $(DISTFILESDEPS) @$(MAKE) dist2 # This is a separate target because 'update-po' must be executed before. -dist2: stamp-po $(DISTFILES) - dists="$(DISTFILES)"; \ +dist2: $(srcdir)/stamp-po $(DISTFILES) + @dists="$(DISTFILES)"; \ if test "$(PACKAGE)" = "gettext-tools"; then \ dists="$$dists Makevars.template"; \ fi; \ if test -f $(srcdir)/$(DOMAIN).pot; then \ dists="$$dists $(DOMAIN).pot stamp-po"; \ + else \ + case $(XGETTEXT) in \ + :) echo "Warning: Creating a tarball without '$(DOMAIN).pot', because a suitable 'xgettext' program was not found in PATH." 1>&2;; \ + *) echo "Warning: Creating a tarball without '$(DOMAIN).pot', because 'xgettext' found no strings to extract. Check the contents of the POTFILES.in file and the XGETTEXT_OPTIONS in the Makevars file." 1>&2;; \ + esac; \ fi; \ if test -f $(srcdir)/ChangeLog; then \ dists="$$dists ChangeLog"; \ @@ -396,17 +460,19 @@ .nop.po-update: @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ - if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \ + if test "$(PACKAGE)" = "gettext-tools" && test "$(CROSS_COMPILING)" != "yes"; then PATH=`pwd`/../src:$$PATH; fi; \ tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ + echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang --previous $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ cd $(srcdir); \ if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ - '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].*) \ $(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + 0.1[6-7] | 0.1[6-7].*) \ + $(MSGMERGE) $(MSGMERGE_OPTIONS) --previous -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ *) \ - $(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + $(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang --previous -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ esac; \ }; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ diff -Nru libfshfs-20201104/po/Makevars libfshfs-20240221/po/Makevars --- libfshfs-20201104/po/Makevars 2020-11-04 11:56:45.000000000 +0000 +++ libfshfs-20240221/po/Makevars 2024-02-21 06:04:37.000000000 +0000 @@ -40,3 +40,6 @@ # message catalogs shall be used. It is usually empty. EXTRA_LOCALE_CATEGORIES = +# Additional make targets. +sources splint: + diff -Nru libfshfs-20201104/po/Makevars.in libfshfs-20240221/po/Makevars.in --- libfshfs-20201104/po/Makevars.in 2016-02-17 07:53:59.000000000 +0000 +++ libfshfs-20240221/po/Makevars.in 2023-12-03 09:06:54.000000000 +0000 @@ -40,3 +40,6 @@ # message catalogs shall be used. It is usually empty. EXTRA_LOCALE_CATEGORIES = +# Additional make targets. +sources splint: + diff -Nru libfshfs-20201104/po/Rules-quot libfshfs-20240221/po/Rules-quot --- libfshfs-20201104/po/Rules-quot 2016-02-17 07:53:59.000000000 +0000 +++ libfshfs-20240221/po/Rules-quot 2023-12-03 09:06:54.000000000 +0000 @@ -1,4 +1,9 @@ # Special Makefile rules for English message catalogs with quotation marks. +# +# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# This file, Rules-quot, and its auxiliary files (listed under +# DISTFILES.common.extra1) are free software; the Free Software Foundation +# gives unlimited permission to use, copy, distribute, and modify them. DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot @@ -14,13 +19,23 @@ .insert-header.po-update-en: @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \ - if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \ + if test "$(PACKAGE)" = "gettext-tools" && test "$(CROSS_COMPILING)" != "yes"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \ tmpdir=`pwd`; \ echo "$$lang:"; \ ll=`echo $$lang | sed -e 's/@.*//'`; \ LC_ALL=C; export LC_ALL; \ cd $(srcdir); \ - if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$lang -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \ + if $(MSGINIT) $(MSGINIT_OPTIONS) -i $(DOMAIN).pot --no-translator -l $$lang -o - 2>/dev/null \ + | $(SED) -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | \ + { case `$(MSGFILTER) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-8] | 0.1[0-8].*) \ + $(MSGFILTER) $(SED) -f `echo $$lang | sed -e 's/.*@//'`.sed \ + ;; \ + *) \ + $(MSGFILTER) `echo $$lang | sed -e 's/.*@//'` \ + ;; \ + esac } 2>/dev/null > $$tmpdir/$$lang.new.po \ + ; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ diff -Nru libfshfs-20201104/po/en@boldquot.header libfshfs-20240221/po/en@boldquot.header --- libfshfs-20201104/po/en@boldquot.header 2016-02-17 07:53:59.000000000 +0000 +++ libfshfs-20240221/po/en@boldquot.header 2023-12-03 09:06:54.000000000 +0000 @@ -2,7 +2,7 @@ # The msgids must be ASCII and therefore cannot contain real quotation # characters, only substitutes like grave accent (0x60), apostrophe (0x27) # and double quote (0x22). These substitutes look strange; see -# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html +# https://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html # # This catalog translates grave accent (0x60) and apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019). diff -Nru libfshfs-20201104/po/en@quot.header libfshfs-20240221/po/en@quot.header --- libfshfs-20201104/po/en@quot.header 2016-02-17 07:53:59.000000000 +0000 +++ libfshfs-20240221/po/en@quot.header 2023-12-03 09:06:54.000000000 +0000 @@ -2,7 +2,7 @@ # The msgids must be ASCII and therefore cannot contain real quotation # characters, only substitutes like grave accent (0x60), apostrophe (0x27) # and double quote (0x22). These substitutes look strange; see -# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html +# https://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html # # This catalog translates grave accent (0x60) and apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019). diff -Nru libfshfs-20201104/po/insert-header.sin libfshfs-20240221/po/insert-header.sin --- libfshfs-20201104/po/insert-header.sin 2016-02-17 07:53:59.000000000 +0000 +++ libfshfs-20240221/po/insert-header.sin 2023-12-03 09:06:54.000000000 +0000 @@ -1,5 +1,10 @@ # Sed script that inserts the file called HEADER before the header entry. # +# Copyright (C) 2001 Free Software Foundation, Inc. +# Written by Bruno Haible , 2001. +# This file is free software; the Free Software Foundation gives +# unlimited permission to use, copy, distribute, and modify it. +# # At each occurrence of a line starting with "msgid ", we execute the following # commands. At the first occurrence, insert the file. At the following # occurrences, do nothing. The distinction between the first and the following diff -Nru libfshfs-20201104/po/remove-potcdate.sin libfshfs-20240221/po/remove-potcdate.sin --- libfshfs-20201104/po/remove-potcdate.sin 2016-02-17 07:53:59.000000000 +0000 +++ libfshfs-20240221/po/remove-potcdate.sin 2023-12-03 09:06:54.000000000 +0000 @@ -1,6 +1,12 @@ -# Sed script that remove the POT-Creation-Date line in the header entry +# Sed script that removes the POT-Creation-Date line in the header entry # from a POT file. # +# Copyright (C) 2002 Free Software Foundation, Inc. +# Copying and distribution of this file, with or without modification, +# are permitted in any medium without royalty provided the copyright +# notice and this notice are preserved. This file is offered as-is, +# without any warranty. +# # The distinction between the first and the following occurrences of the # pattern is achieved by looking at the hold space. /^"POT-Creation-Date: .*"$/{ diff -Nru libfshfs-20201104/pyfshfs/Makefile.am libfshfs-20240221/pyfshfs/Makefile.am --- libfshfs-20201104/pyfshfs/Makefile.am 2020-10-17 08:50:49.000000000 +0000 +++ libfshfs-20240221/pyfshfs/Makefile.am 2023-12-03 09:06:54.000000000 +0000 @@ -16,8 +16,11 @@ pyfshfs_la_SOURCES = \ pyfshfs.c pyfshfs.h \ + pyfshfs_data_stream.c pyfshfs_data_stream.h \ pyfshfs_datetime.c pyfshfs_datetime.h \ pyfshfs_error.c pyfshfs_error.h \ + pyfshfs_extended_attribute.c pyfshfs_extended_attribute.h \ + pyfshfs_extended_attributes.c pyfshfs_extended_attributes.h \ pyfshfs_file_entry.c pyfshfs_file_entry.h \ pyfshfs_file_entries.c pyfshfs_file_entries.h \ pyfshfs_file_object_io_handle.c pyfshfs_file_object_io_handle.h \ @@ -49,6 +52,6 @@ Makefile.in distclean: clean - /bin/rm -f setup.py - /bin/rm -f Makefile + -rm -f setup.py + -rm -f Makefile diff -Nru libfshfs-20201104/pyfshfs/Makefile.in libfshfs-20240221/pyfshfs/Makefile.in --- libfshfs-20201104/pyfshfs/Makefile.in 2020-11-04 11:56:32.000000000 +0000 +++ libfshfs-20240221/pyfshfs/Makefile.in 2024-02-21 06:04:26.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -91,25 +91,26 @@ subdir = pyfshfs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcdata.m4 \ - $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \ - $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \ - $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcrypto.m4 \ - $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcthreads.m4 \ - $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ - $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ - $(top_srcdir)/m4/libhmac.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/libuna.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \ - $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \ - $(top_srcdir)/m4/zlib.m4 $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libbfio.m4 \ + $(top_srcdir)/m4/libcdata.m4 $(top_srcdir)/m4/libcerror.m4 \ + $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ + $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ + $(top_srcdir)/m4/libcrypto.m4 $(top_srcdir)/m4/libcsplit.m4 \ + $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \ + $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ + $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmos.m4 \ + $(top_srcdir)/m4/libfuse.m4 $(top_srcdir)/m4/libhmac.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/pthread.m4 \ + $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ + $(top_srcdir)/m4/types.m4 $(top_srcdir)/m4/zlib.m4 \ + $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) @@ -147,8 +148,11 @@ am__installdirs = "$(DESTDIR)$(pyexecdir)" LTLIBRARIES = $(pyexec_LTLIBRARIES) @HAVE_PYTHON_TRUE@pyfshfs_la_DEPENDENCIES = ../libfshfs/libfshfs.la -am__pyfshfs_la_SOURCES_DIST = pyfshfs.c pyfshfs.h pyfshfs_datetime.c \ +am__pyfshfs_la_SOURCES_DIST = pyfshfs.c pyfshfs.h \ + pyfshfs_data_stream.c pyfshfs_data_stream.h pyfshfs_datetime.c \ pyfshfs_datetime.h pyfshfs_error.c pyfshfs_error.h \ + pyfshfs_extended_attribute.c pyfshfs_extended_attribute.h \ + pyfshfs_extended_attributes.c pyfshfs_extended_attributes.h \ pyfshfs_file_entry.c pyfshfs_file_entry.h \ pyfshfs_file_entries.c pyfshfs_file_entries.h \ pyfshfs_file_object_io_handle.c \ @@ -157,8 +161,11 @@ pyfshfs_libfshfs.h pyfshfs_python.h pyfshfs_unused.h \ pyfshfs_volume.c pyfshfs_volume.h @HAVE_PYTHON_TRUE@am_pyfshfs_la_OBJECTS = pyfshfs_la-pyfshfs.lo \ +@HAVE_PYTHON_TRUE@ pyfshfs_la-pyfshfs_data_stream.lo \ @HAVE_PYTHON_TRUE@ pyfshfs_la-pyfshfs_datetime.lo \ @HAVE_PYTHON_TRUE@ pyfshfs_la-pyfshfs_error.lo \ +@HAVE_PYTHON_TRUE@ pyfshfs_la-pyfshfs_extended_attribute.lo \ +@HAVE_PYTHON_TRUE@ pyfshfs_la-pyfshfs_extended_attributes.lo \ @HAVE_PYTHON_TRUE@ pyfshfs_la-pyfshfs_file_entry.lo \ @HAVE_PYTHON_TRUE@ pyfshfs_la-pyfshfs_file_entries.lo \ @HAVE_PYTHON_TRUE@ pyfshfs_la-pyfshfs_file_object_io_handle.lo \ @@ -189,8 +196,11 @@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/pyfshfs_la-pyfshfs.Plo \ + ./$(DEPDIR)/pyfshfs_la-pyfshfs_data_stream.Plo \ ./$(DEPDIR)/pyfshfs_la-pyfshfs_datetime.Plo \ ./$(DEPDIR)/pyfshfs_la-pyfshfs_error.Plo \ + ./$(DEPDIR)/pyfshfs_la-pyfshfs_extended_attribute.Plo \ + ./$(DEPDIR)/pyfshfs_la-pyfshfs_extended_attributes.Plo \ ./$(DEPDIR)/pyfshfs_la-pyfshfs_file_entries.Plo \ ./$(DEPDIR)/pyfshfs_la-pyfshfs_file_entry.Plo \ ./$(DEPDIR)/pyfshfs_la-pyfshfs_file_object_io_handle.Plo \ @@ -222,6 +232,7 @@ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -239,8 +250,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ @@ -257,6 +266,8 @@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ @@ -272,8 +283,10 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -293,6 +306,8 @@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ +HAVE_LIBFMOS = @HAVE_LIBFMOS@ +HAVE_LIBFUSE = @HAVE_LIBFUSE@ HAVE_LIBHMAC = @HAVE_LIBHMAC@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ @@ -308,6 +323,7 @@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ +HAVE_LOCAL_LIBFMOS = @HAVE_LOCAL_LIBFMOS@ HAVE_LOCAL_LIBHMAC = @HAVE_LOCAL_LIBHMAC@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ @@ -361,8 +377,12 @@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ +LIBFMOS_CPPFLAGS = @LIBFMOS_CPPFLAGS@ +LIBFMOS_LIBADD = @LIBFMOS_LIBADD@ LIBFSHFS_DLL_EXPORT = @LIBFSHFS_DLL_EXPORT@ LIBFSHFS_DLL_IMPORT = @LIBFSHFS_DLL_IMPORT@ +LIBFUSE_CPPFLAGS = @LIBFUSE_CPPFLAGS@ +LIBFUSE_LIBADD = @LIBFUSE_LIBADD@ LIBHMAC_CPPFLAGS = @LIBHMAC_CPPFLAGS@ LIBHMAC_LIBADD = @LIBHMAC_LIBADD@ LIBICONV = @LIBICONV@ @@ -384,8 +404,8 @@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ @@ -408,26 +428,6 @@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ -PYTHON2 = @PYTHON2@ -PYTHON2_CONFIG = @PYTHON2_CONFIG@ -PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ -PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ -PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ -PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ -PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ -PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ -PYTHON2_PREFIX = @PYTHON2_PREFIX@ -PYTHON2_VERSION = @PYTHON2_VERSION@ -PYTHON3 = @PYTHON3@ -PYTHON3_CONFIG = @PYTHON3_CONFIG@ -PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ -PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ -PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ -PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ -PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ -PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ -PYTHON3_PREFIX = @PYTHON3_PREFIX@ -PYTHON3_VERSION = @PYTHON3_VERSION@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ @@ -505,6 +505,12 @@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ +ax_libfmos_pc_libs_private = @ax_libfmos_pc_libs_private@ +ax_libfmos_spec_build_requires = @ax_libfmos_spec_build_requires@ +ax_libfmos_spec_requires = @ax_libfmos_spec_requires@ +ax_libfuse_pc_libs_private = @ax_libfuse_pc_libs_private@ +ax_libfuse_spec_build_requires = @ax_libfuse_spec_build_requires@ +ax_libfuse_spec_requires = @ax_libfuse_spec_requires@ ax_libhmac_pc_libs_private = @ax_libhmac_pc_libs_private@ ax_libhmac_spec_build_requires = @ax_libhmac_spec_build_requires@ ax_libhmac_spec_requires = @ax_libhmac_spec_requires@ @@ -529,6 +535,8 @@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +fuse_CFLAGS = @fuse_CFLAGS@ +fuse_LIBS = @fuse_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -566,6 +574,8 @@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ +libfmos_CFLAGS = @libfmos_CFLAGS@ +libfmos_LIBS = @libfmos_LIBS@ libfshfs_spec_requires = @libfshfs_spec_requires@ libfshfs_spec_tools_build_requires = @libfshfs_spec_tools_build_requires@ libhmac_CFLAGS = @libhmac_CFLAGS@ @@ -584,11 +594,8 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ -pyexecdir2 = @pyexecdir2@ -pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ -pythondir2 = @pythondir2@ -pythondir3 = @pythondir3@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -615,8 +622,11 @@ @HAVE_PYTHON_TRUE@pyexec_LTLIBRARIES = pyfshfs.la @HAVE_PYTHON_TRUE@pyfshfs_la_SOURCES = \ @HAVE_PYTHON_TRUE@ pyfshfs.c pyfshfs.h \ +@HAVE_PYTHON_TRUE@ pyfshfs_data_stream.c pyfshfs_data_stream.h \ @HAVE_PYTHON_TRUE@ pyfshfs_datetime.c pyfshfs_datetime.h \ @HAVE_PYTHON_TRUE@ pyfshfs_error.c pyfshfs_error.h \ +@HAVE_PYTHON_TRUE@ pyfshfs_extended_attribute.c pyfshfs_extended_attribute.h \ +@HAVE_PYTHON_TRUE@ pyfshfs_extended_attributes.c pyfshfs_extended_attributes.h \ @HAVE_PYTHON_TRUE@ pyfshfs_file_entry.c pyfshfs_file_entry.h \ @HAVE_PYTHON_TRUE@ pyfshfs_file_entries.c pyfshfs_file_entries.h \ @HAVE_PYTHON_TRUE@ pyfshfs_file_object_io_handle.c pyfshfs_file_object_io_handle.h \ @@ -723,8 +733,11 @@ -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyfshfs_la-pyfshfs.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyfshfs_la-pyfshfs_data_stream.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyfshfs_la-pyfshfs_datetime.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyfshfs_la-pyfshfs_error.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyfshfs_la-pyfshfs_extended_attribute.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyfshfs_la-pyfshfs_extended_attributes.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyfshfs_la-pyfshfs_file_entries.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyfshfs_la-pyfshfs_file_entry.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyfshfs_la-pyfshfs_file_object_io_handle.Plo@am__quote@ # am--include-marker @@ -765,6 +778,13 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyfshfs_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyfshfs_la-pyfshfs.lo `test -f 'pyfshfs.c' || echo '$(srcdir)/'`pyfshfs.c +pyfshfs_la-pyfshfs_data_stream.lo: pyfshfs_data_stream.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyfshfs_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyfshfs_la-pyfshfs_data_stream.lo -MD -MP -MF $(DEPDIR)/pyfshfs_la-pyfshfs_data_stream.Tpo -c -o pyfshfs_la-pyfshfs_data_stream.lo `test -f 'pyfshfs_data_stream.c' || echo '$(srcdir)/'`pyfshfs_data_stream.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyfshfs_la-pyfshfs_data_stream.Tpo $(DEPDIR)/pyfshfs_la-pyfshfs_data_stream.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyfshfs_data_stream.c' object='pyfshfs_la-pyfshfs_data_stream.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyfshfs_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyfshfs_la-pyfshfs_data_stream.lo `test -f 'pyfshfs_data_stream.c' || echo '$(srcdir)/'`pyfshfs_data_stream.c + pyfshfs_la-pyfshfs_datetime.lo: pyfshfs_datetime.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyfshfs_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyfshfs_la-pyfshfs_datetime.lo -MD -MP -MF $(DEPDIR)/pyfshfs_la-pyfshfs_datetime.Tpo -c -o pyfshfs_la-pyfshfs_datetime.lo `test -f 'pyfshfs_datetime.c' || echo '$(srcdir)/'`pyfshfs_datetime.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyfshfs_la-pyfshfs_datetime.Tpo $(DEPDIR)/pyfshfs_la-pyfshfs_datetime.Plo @@ -779,6 +799,20 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyfshfs_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyfshfs_la-pyfshfs_error.lo `test -f 'pyfshfs_error.c' || echo '$(srcdir)/'`pyfshfs_error.c +pyfshfs_la-pyfshfs_extended_attribute.lo: pyfshfs_extended_attribute.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyfshfs_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyfshfs_la-pyfshfs_extended_attribute.lo -MD -MP -MF $(DEPDIR)/pyfshfs_la-pyfshfs_extended_attribute.Tpo -c -o pyfshfs_la-pyfshfs_extended_attribute.lo `test -f 'pyfshfs_extended_attribute.c' || echo '$(srcdir)/'`pyfshfs_extended_attribute.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyfshfs_la-pyfshfs_extended_attribute.Tpo $(DEPDIR)/pyfshfs_la-pyfshfs_extended_attribute.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyfshfs_extended_attribute.c' object='pyfshfs_la-pyfshfs_extended_attribute.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyfshfs_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyfshfs_la-pyfshfs_extended_attribute.lo `test -f 'pyfshfs_extended_attribute.c' || echo '$(srcdir)/'`pyfshfs_extended_attribute.c + +pyfshfs_la-pyfshfs_extended_attributes.lo: pyfshfs_extended_attributes.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyfshfs_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyfshfs_la-pyfshfs_extended_attributes.lo -MD -MP -MF $(DEPDIR)/pyfshfs_la-pyfshfs_extended_attributes.Tpo -c -o pyfshfs_la-pyfshfs_extended_attributes.lo `test -f 'pyfshfs_extended_attributes.c' || echo '$(srcdir)/'`pyfshfs_extended_attributes.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyfshfs_la-pyfshfs_extended_attributes.Tpo $(DEPDIR)/pyfshfs_la-pyfshfs_extended_attributes.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyfshfs_extended_attributes.c' object='pyfshfs_la-pyfshfs_extended_attributes.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyfshfs_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyfshfs_la-pyfshfs_extended_attributes.lo `test -f 'pyfshfs_extended_attributes.c' || echo '$(srcdir)/'`pyfshfs_extended_attributes.c + pyfshfs_la-pyfshfs_file_entry.lo: pyfshfs_file_entry.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyfshfs_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyfshfs_la-pyfshfs_file_entry.lo -MD -MP -MF $(DEPDIR)/pyfshfs_la-pyfshfs_file_entry.Tpo -c -o pyfshfs_la-pyfshfs_file_entry.lo `test -f 'pyfshfs_file_entry.c' || echo '$(srcdir)/'`pyfshfs_file_entry.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyfshfs_la-pyfshfs_file_entry.Tpo $(DEPDIR)/pyfshfs_la-pyfshfs_file_entry.Plo @@ -819,6 +853,8 @@ clean-libtool: -rm -rf .libs _libs +sources-local: +splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique @@ -871,7 +907,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am @@ -993,8 +1028,11 @@ maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/pyfshfs_la-pyfshfs.Plo + -rm -f ./$(DEPDIR)/pyfshfs_la-pyfshfs_data_stream.Plo -rm -f ./$(DEPDIR)/pyfshfs_la-pyfshfs_datetime.Plo -rm -f ./$(DEPDIR)/pyfshfs_la-pyfshfs_error.Plo + -rm -f ./$(DEPDIR)/pyfshfs_la-pyfshfs_extended_attribute.Plo + -rm -f ./$(DEPDIR)/pyfshfs_la-pyfshfs_extended_attributes.Plo -rm -f ./$(DEPDIR)/pyfshfs_la-pyfshfs_file_entries.Plo -rm -f ./$(DEPDIR)/pyfshfs_la-pyfshfs_file_entry.Plo -rm -f ./$(DEPDIR)/pyfshfs_la-pyfshfs_file_object_io_handle.Plo @@ -1016,6 +1054,14 @@ ps-am: +sources: sources-am + +sources-am: sources-local + +splint: splint-am + +splint-am: splint-local + uninstall-am: uninstall-pyexecLTLIBRARIES .MAKE: install-am install-strip @@ -1033,15 +1079,15 @@ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am \ - uninstall-pyexecLTLIBRARIES + sources-am sources-local splint-am splint-local tags tags-am \ + uninstall uninstall-am uninstall-pyexecLTLIBRARIES .PRECIOUS: Makefile distclean: clean - /bin/rm -f setup.py - /bin/rm -f Makefile + -rm -f setup.py + -rm -f Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru libfshfs-20201104/pyfshfs/pyfshfs.c libfshfs-20240221/pyfshfs/pyfshfs.c --- libfshfs-20201104/pyfshfs/pyfshfs.c 2020-11-04 04:22:35.000000000 +0000 +++ libfshfs-20240221/pyfshfs/pyfshfs.c 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Python bindings module for libfshfs (pyfshfs) * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -28,7 +28,10 @@ #endif #include "pyfshfs.h" +#include "pyfshfs_data_stream.h" #include "pyfshfs_error.h" +#include "pyfshfs_extended_attribute.h" +#include "pyfshfs_extended_attributes.h" #include "pyfshfs_file_entries.h" #include "pyfshfs_file_entry.h" #include "pyfshfs_file_object_io_handle.h" @@ -97,7 +100,6 @@ PyObject *self PYFSHFS_ATTRIBUTE_UNUSED, PyObject *arguments PYFSHFS_ATTRIBUTE_UNUSED ) { - const char *errors = NULL; const char *version_string = NULL; size_t version_string_length = 0; @@ -120,7 +122,7 @@ return( PyUnicode_DecodeUTF8( version_string, (Py_ssize_t) version_string_length, - errors ) ); + NULL ) ); } /* Checks if a volume has a Hierarchical File System (HFS) volume signature @@ -180,8 +182,14 @@ PyErr_Clear(); #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) +#if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 3 + filename_wide = (wchar_t *) PyUnicode_AsWideCharString( + string_object, + NULL ); +#else filename_wide = (wchar_t *) PyUnicode_AsUnicode( string_object ); +#endif Py_BEGIN_ALLOW_THREADS result = libfshfs_check_volume_signature_wide( @@ -189,6 +197,11 @@ &error ); Py_END_ALLOW_THREADS + +#if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 3 + PyMem_Free( + filename_wide ); +#endif #else utf8_string_object = PyUnicode_AsUTF8String( string_object ); @@ -339,7 +352,7 @@ if( PyArg_ParseTupleAndKeywords( arguments, keywords, - "|O", + "O|", keyword_list, &file_object ) == 0 ) { @@ -590,10 +603,62 @@ return; #endif } +#if PY_VERSION_HEX < 0x03070000 PyEval_InitThreads(); - +#endif gil_state = PyGILState_Ensure(); + /* Setup the data_stream type object + */ + pyfshfs_data_stream_type_object.tp_new = PyType_GenericNew; + + if( PyType_Ready( + &pyfshfs_data_stream_type_object ) < 0 ) + { + goto on_error; + } + Py_IncRef( + (PyObject *) &pyfshfs_data_stream_type_object ); + + PyModule_AddObject( + module, + "data_stream", + (PyObject *) &pyfshfs_data_stream_type_object ); + + /* Setup the extended_attribute type object + */ + pyfshfs_extended_attribute_type_object.tp_new = PyType_GenericNew; + + if( PyType_Ready( + &pyfshfs_extended_attribute_type_object ) < 0 ) + { + goto on_error; + } + Py_IncRef( + (PyObject *) &pyfshfs_extended_attribute_type_object ); + + PyModule_AddObject( + module, + "extended_attribute", + (PyObject *) &pyfshfs_extended_attribute_type_object ); + + /* Setup the extended_attributes type object + */ + pyfshfs_extended_attributes_type_object.tp_new = PyType_GenericNew; + + if( PyType_Ready( + &pyfshfs_extended_attributes_type_object ) < 0 ) + { + goto on_error; + } + Py_IncRef( + (PyObject *) &pyfshfs_extended_attributes_type_object ); + + PyModule_AddObject( + module, + "extended_attributes", + (PyObject *) &pyfshfs_extended_attributes_type_object ); + /* Setup the file_entries type object */ pyfshfs_file_entries_type_object.tp_new = PyType_GenericNew; diff -Nru libfshfs-20201104/pyfshfs/pyfshfs.h libfshfs-20240221/pyfshfs/pyfshfs.h --- libfshfs-20201104/pyfshfs/pyfshfs.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/pyfshfs/pyfshfs.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Python bindings module for libfshfs (pyfshfs) * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/pyfshfs/pyfshfs_data_stream.c libfshfs-20240221/pyfshfs/pyfshfs_data_stream.c --- libfshfs-20201104/pyfshfs/pyfshfs_data_stream.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/pyfshfs/pyfshfs_data_stream.c 2024-02-21 05:50:44.000000000 +0000 @@ -0,0 +1,1195 @@ +/* + * Python object wrapper of libfshfs_data_stream_t + * + * Copyright (C) 2009-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include + +#if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI ) +#include +#endif + +#include "pyfshfs_data_stream.h" +#include "pyfshfs_error.h" +#include "pyfshfs_integer.h" +#include "pyfshfs_libcerror.h" +#include "pyfshfs_libfshfs.h" +#include "pyfshfs_python.h" +#include "pyfshfs_unused.h" + +PyMethodDef pyfshfs_data_stream_object_methods[] = { + + /* Functions to access the data stream data */ + + { "read_buffer", + (PyCFunction) pyfshfs_data_stream_read_buffer, + METH_VARARGS | METH_KEYWORDS, + "read_buffer(size) -> String\n" + "\n" + "Reads a buffer of data stream data." }, + + { "read_buffer_at_offset", + (PyCFunction) pyfshfs_data_stream_read_buffer_at_offset, + METH_VARARGS | METH_KEYWORDS, + "read_buffer_at_offset(size, offset) -> String\n" + "\n" + "Reads a buffer of data stream data at a specific offset." }, + + { "seek_offset", + (PyCFunction) pyfshfs_data_stream_seek_offset, + METH_VARARGS | METH_KEYWORDS, + "seek_offset(offset, whence) -> None\n" + "\n" + "Seeks an offset within the data stream data." }, + + { "get_offset", + (PyCFunction) pyfshfs_data_stream_get_offset, + METH_NOARGS, + "get_offset() -> Integer\n" + "\n" + "Returns the current offset within the data stream data." }, + + /* Some Pythonesque aliases */ + + { "read", + (PyCFunction) pyfshfs_data_stream_read_buffer, + METH_VARARGS | METH_KEYWORDS, + "read(size) -> String\n" + "\n" + "Reads a buffer of data stream data." }, + + { "seek", + (PyCFunction) pyfshfs_data_stream_seek_offset, + METH_VARARGS | METH_KEYWORDS, + "seek(offset, whence) -> None\n" + "\n" + "Seeks an offset within the data stream data." }, + + { "tell", + (PyCFunction) pyfshfs_data_stream_get_offset, + METH_NOARGS, + "tell() -> Integer\n" + "\n" + "Returns the current offset within the data stream data." }, + + /* Functions to access the metadata */ + + { "get_size", + (PyCFunction) pyfshfs_data_stream_get_size, + METH_NOARGS, + "get_size() -> Integer\n" + "\n" + "Returns the size data." }, + + /* Functions to access the extents */ + + { "get_number_of_extents", + (PyCFunction) pyfshfs_data_stream_get_number_of_extents, + METH_NOARGS, + "get_number_of_extents() -> Integer\n" + "\n" + "Retrieves the number of extents." }, + + { "get_extent", + (PyCFunction) pyfshfs_data_stream_get_extent, + METH_VARARGS | METH_KEYWORDS, + "get_extent(extent_index) -> Tuple( Integer, Integer, Integer )\n" + "\n" + "Retrieves a specific extent.\t" + "The extent is a tuple of offset, size and flags." }, + + /* Sentinel */ + { NULL, NULL, 0, NULL } +}; + +PyGetSetDef pyfshfs_data_stream_object_get_set_definitions[] = { + + { "size", + (getter) pyfshfs_data_stream_get_size, + (setter) 0, + "The size of the data.", + NULL }, + + { "number_of_extents", + (getter) pyfshfs_data_stream_get_number_of_extents, + (setter) 0, + "The number of extents.", + NULL }, + + /* Sentinel */ + { NULL, NULL, NULL, NULL, NULL } +}; + +PyTypeObject pyfshfs_data_stream_type_object = { + PyVarObject_HEAD_INIT( NULL, 0 ) + + /* tp_name */ + "pyfshfs.data_stream", + /* tp_basicsize */ + sizeof( pyfshfs_data_stream_t ), + /* tp_itemsize */ + 0, + /* tp_dealloc */ + (destructor) pyfshfs_data_stream_free, + /* tp_print */ + 0, + /* tp_getattr */ + 0, + /* tp_setattr */ + 0, + /* tp_compare */ + 0, + /* tp_repr */ + 0, + /* tp_as_number */ + 0, + /* tp_as_sequence */ + 0, + /* tp_as_mapping */ + 0, + /* tp_hash */ + 0, + /* tp_call */ + 0, + /* tp_str */ + 0, + /* tp_getattro */ + 0, + /* tp_setattro */ + 0, + /* tp_as_buffer */ + 0, + /* tp_flags */ + Py_TPFLAGS_DEFAULT, + /* tp_doc */ + "pyfshfs data stream object (wraps libfshfs_data_stream_t)", + /* tp_traverse */ + 0, + /* tp_clear */ + 0, + /* tp_richcompare */ + 0, + /* tp_weaklistoffset */ + 0, + /* tp_iter */ + 0, + /* tp_iternext */ + 0, + /* tp_methods */ + pyfshfs_data_stream_object_methods, + /* tp_members */ + 0, + /* tp_getset */ + pyfshfs_data_stream_object_get_set_definitions, + /* tp_base */ + 0, + /* tp_dict */ + 0, + /* tp_descr_get */ + 0, + /* tp_descr_set */ + 0, + /* tp_dictoffset */ + 0, + /* tp_init */ + (initproc) pyfshfs_data_stream_init, + /* tp_alloc */ + 0, + /* tp_new */ + 0, + /* tp_free */ + 0, + /* tp_is_gc */ + 0, + /* tp_bases */ + NULL, + /* tp_mro */ + NULL, + /* tp_cache */ + NULL, + /* tp_subclasses */ + NULL, + /* tp_weaklist */ + NULL, + /* tp_del */ + 0 +}; + +/* Creates a new data stream object + * Returns a Python object if successful or NULL on error + */ +PyObject *pyfshfs_data_stream_new( + libfshfs_data_stream_t *data_stream, + PyObject *parent_object ) +{ + pyfshfs_data_stream_t *pyfshfs_data_stream = NULL; + static char *function = "pyfshfs_data_stream_new"; + + if( data_stream == NULL ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid data stream.", + function ); + + return( NULL ); + } + /* PyObject_New does not invoke tp_init + */ + pyfshfs_data_stream = PyObject_New( + struct pyfshfs_data_stream, + &pyfshfs_data_stream_type_object ); + + if( pyfshfs_data_stream == NULL ) + { + PyErr_Format( + PyExc_MemoryError, + "%s: unable to initialize data stream.", + function ); + + goto on_error; + } + pyfshfs_data_stream->data_stream = data_stream; + pyfshfs_data_stream->parent_object = parent_object; + + if( pyfshfs_data_stream->parent_object != NULL ) + { + Py_IncRef( + pyfshfs_data_stream->parent_object ); + } + return( (PyObject *) pyfshfs_data_stream ); + +on_error: + if( pyfshfs_data_stream != NULL ) + { + Py_DecRef( + (PyObject *) pyfshfs_data_stream ); + } + return( NULL ); +} + +/* Initializes a data stream object + * Returns 0 if successful or -1 on error + */ +int pyfshfs_data_stream_init( + pyfshfs_data_stream_t *pyfshfs_data_stream ) +{ + static char *function = "pyfshfs_data_stream_init"; + + if( pyfshfs_data_stream == NULL ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid data stream.", + function ); + + return( -1 ); + } + /* Make sure libfshfs data stream is set to NULL + */ + pyfshfs_data_stream->data_stream = NULL; + + PyErr_Format( + PyExc_NotImplementedError, + "%s: initialize of data stream not supported.", + function ); + + return( -1 ); +} + +/* Frees a data stream object + */ +void pyfshfs_data_stream_free( + pyfshfs_data_stream_t *pyfshfs_data_stream ) +{ + struct _typeobject *ob_type = NULL; + libcerror_error_t *error = NULL; + static char *function = "pyfshfs_data_stream_free"; + int result = 0; + + if( pyfshfs_data_stream == NULL ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid data stream.", + function ); + + return; + } + ob_type = Py_TYPE( + pyfshfs_data_stream ); + + if( ob_type == NULL ) + { + PyErr_Format( + PyExc_ValueError, + "%s: missing ob_type.", + function ); + + return; + } + if( ob_type->tp_free == NULL ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid ob_type - missing tp_free.", + function ); + + return; + } + if( pyfshfs_data_stream->data_stream != NULL ) + { + Py_BEGIN_ALLOW_THREADS + + result = libfshfs_data_stream_free( + &( pyfshfs_data_stream->data_stream ), + &error ); + + Py_END_ALLOW_THREADS + + if( result != 1 ) + { + pyfshfs_error_raise( + error, + PyExc_MemoryError, + "%s: unable to free libfshfs data stream.", + function ); + + libcerror_error_free( + &error ); + } + } + if( pyfshfs_data_stream->parent_object != NULL ) + { + Py_DecRef( + pyfshfs_data_stream->parent_object ); + } + ob_type->tp_free( + (PyObject*) pyfshfs_data_stream ); +} + +/* Reads a buffer of data from the data stream + * Returns a Python object holding the data if successful or NULL on error + */ +PyObject *pyfshfs_data_stream_read_buffer( + pyfshfs_data_stream_t *pyfshfs_data_stream, + PyObject *arguments, + PyObject *keywords ) +{ + libcerror_error_t *error = NULL; + PyObject *integer_object = NULL; + PyObject *string_object = NULL; + static char *function = "pyfshfs_data_stream_read_buffer"; + static char *keyword_list[] = { "size", NULL }; + char *buffer = NULL; + size64_t read_size = 0; + ssize_t read_count = 0; + int result = 0; + + if( pyfshfs_data_stream == NULL ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid pyfshfs data stream.", + function ); + + return( NULL ); + } + if( pyfshfs_data_stream->data_stream == NULL ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid pyfshfs data stream - missing libfshfs data stream.", + function ); + + return( NULL ); + } + if( PyArg_ParseTupleAndKeywords( + arguments, + keywords, + "|O", + keyword_list, + &integer_object ) == 0 ) + { + return( NULL ); + } + if( integer_object != NULL ) + { + PyErr_Clear(); + + result = PyObject_IsInstance( + integer_object, + (PyObject *) &PyLong_Type ); + + if( result == -1 ) + { + pyfshfs_error_fetch_and_raise( + PyExc_RuntimeError, + "%s: unable to determine if integer object is of type long.", + function ); + + return( NULL ); + } +#if PY_MAJOR_VERSION < 3 + else if( result == 0 ) + { + PyErr_Clear(); + + result = PyObject_IsInstance( + integer_object, + (PyObject *) &PyInt_Type ); + + if( result == -1 ) + { + pyfshfs_error_fetch_and_raise( + PyExc_RuntimeError, + "%s: unable to determine if integer object is of type int.", + function ); + + return( NULL ); + } + } +#endif + } + if( result != 0 ) + { + if( pyfshfs_integer_unsigned_copy_to_64bit( + integer_object, + (uint64_t *) &read_size, + &error ) != 1 ) + { + pyfshfs_error_raise( + error, + PyExc_IOError, + "%s: unable to convert integer object into read size.", + function ); + + libcerror_error_free( + &error ); + + return( NULL ); + } + } + else if( ( integer_object == NULL ) + || ( integer_object == Py_None ) ) + { + Py_BEGIN_ALLOW_THREADS + + result = libfshfs_data_stream_get_size( + pyfshfs_data_stream->data_stream, + &read_size, + &error ); + + Py_END_ALLOW_THREADS + + if( result != 1 ) + { + pyfshfs_error_raise( + error, + PyExc_IOError, + "%s: unable to retrieve size.", + function ); + + libcerror_error_free( + &error ); + + return( NULL ); + } + } + else + { + PyErr_Format( + PyExc_ValueError, + "%s: unsupported integer object type.", + function ); + + return( NULL ); + } + if( read_size == 0 ) + { +#if PY_MAJOR_VERSION >= 3 + string_object = PyBytes_FromString( + "" ); +#else + string_object = PyString_FromString( + "" ); +#endif + return( string_object ); + } + /* Make sure the data fits into a memory buffer + */ + if( ( read_size > (size64_t) INT_MAX ) + || ( read_size > (size64_t) SSIZE_MAX ) ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid argument read size value exceeds maximum.", + function ); + + return( NULL ); + } +#if PY_MAJOR_VERSION >= 3 + string_object = PyBytes_FromStringAndSize( + NULL, + read_size ); + + buffer = PyBytes_AsString( + string_object ); +#else + /* Note that a size of 0 is not supported + */ + string_object = PyString_FromStringAndSize( + NULL, + read_size ); + + buffer = PyString_AsString( + string_object ); +#endif + Py_BEGIN_ALLOW_THREADS + + read_count = libfshfs_data_stream_read_buffer( + pyfshfs_data_stream->data_stream, + (uint8_t *) buffer, + (size_t) read_size, + &error ); + + Py_END_ALLOW_THREADS + + if( read_count <= -1 ) + { + pyfshfs_error_raise( + error, + PyExc_IOError, + "%s: unable to read data.", + function ); + + libcerror_error_free( + &error ); + + Py_DecRef( + (PyObject *) string_object ); + + return( NULL ); + } + /* Need to resize the string here in case read_size was not fully read. + */ +#if PY_MAJOR_VERSION >= 3 + if( _PyBytes_Resize( + &string_object, + (Py_ssize_t) read_count ) != 0 ) +#else + if( _PyString_Resize( + &string_object, + (Py_ssize_t) read_count ) != 0 ) +#endif + { + Py_DecRef( + (PyObject *) string_object ); + + return( NULL ); + } + return( string_object ); +} + +/* Reads a buffer of data at a specific offset from the data stream + * Returns a Python object holding the data if successful or NULL on error + */ +PyObject *pyfshfs_data_stream_read_buffer_at_offset( + pyfshfs_data_stream_t *pyfshfs_data_stream, + PyObject *arguments, + PyObject *keywords ) +{ + libcerror_error_t *error = NULL; + PyObject *integer_object = NULL; + PyObject *string_object = NULL; + static char *function = "pyfshfs_data_stream_read_buffer_at_offset"; + static char *keyword_list[] = { "size", "offset", NULL }; + char *buffer = NULL; + off64_t read_offset = 0; + size64_t read_size = 0; + ssize_t read_count = 0; + int result = 0; + + if( pyfshfs_data_stream == NULL ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid pyfshfs data stream.", + function ); + + return( NULL ); + } + if( pyfshfs_data_stream->data_stream == NULL ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid pyfshfs data stream - missing libfshfs data stream.", + function ); + + return( NULL ); + } + if( PyArg_ParseTupleAndKeywords( + arguments, + keywords, + "OL", + keyword_list, + &integer_object, + &read_offset ) == 0 ) + { + return( NULL ); + } + result = PyObject_IsInstance( + integer_object, + (PyObject *) &PyLong_Type ); + + if( result == -1 ) + { + pyfshfs_error_fetch_and_raise( + PyExc_RuntimeError, + "%s: unable to determine if integer object is of type long.", + function ); + + return( NULL ); + } +#if PY_MAJOR_VERSION < 3 + else if( result == 0 ) + { + PyErr_Clear(); + + result = PyObject_IsInstance( + integer_object, + (PyObject *) &PyInt_Type ); + + if( result == -1 ) + { + pyfshfs_error_fetch_and_raise( + PyExc_RuntimeError, + "%s: unable to determine if integer object is of type int.", + function ); + + return( NULL ); + } + } +#endif + if( result != 0 ) + { + if( pyfshfs_integer_unsigned_copy_to_64bit( + integer_object, + (uint64_t *) &read_size, + &error ) != 1 ) + { + pyfshfs_error_raise( + error, + PyExc_IOError, + "%s: unable to convert integer object into read size.", + function ); + + libcerror_error_free( + &error ); + + return( NULL ); + } + } + else if( integer_object == Py_None ) + { + Py_BEGIN_ALLOW_THREADS + + result = libfshfs_data_stream_get_size( + pyfshfs_data_stream->data_stream, + &read_size, + &error ); + + Py_END_ALLOW_THREADS + + if( result != 1 ) + { + pyfshfs_error_raise( + error, + PyExc_IOError, + "%s: unable to retrieve size.", + function ); + + libcerror_error_free( + &error ); + + return( NULL ); + } + } + else + { + PyErr_Format( + PyExc_TypeError, + "%s: unsupported integer object type.", + function ); + + return( NULL ); + } + if( read_size == 0 ) + { +#if PY_MAJOR_VERSION >= 3 + string_object = PyBytes_FromString( + "" ); +#else + string_object = PyString_FromString( + "" ); +#endif + return( string_object ); + } + /* Make sure the data fits into a memory buffer + */ + if( ( read_size > (size64_t) INT_MAX ) + || ( read_size > (size64_t) SSIZE_MAX ) ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid argument read size value exceeds maximum.", + function ); + + return( NULL ); + } +#if PY_MAJOR_VERSION >= 3 + string_object = PyBytes_FromStringAndSize( + NULL, + read_size ); + + buffer = PyBytes_AsString( + string_object ); +#else + /* Note that a size of 0 is not supported + */ + string_object = PyString_FromStringAndSize( + NULL, + read_size ); + + buffer = PyString_AsString( + string_object ); +#endif + Py_BEGIN_ALLOW_THREADS + + read_count = libfshfs_data_stream_read_buffer_at_offset( + pyfshfs_data_stream->data_stream, + (uint8_t *) buffer, + (size_t) read_size, + (off64_t) read_offset, + &error ); + + Py_END_ALLOW_THREADS + + if( read_count <= -1 ) + { + pyfshfs_error_raise( + error, + PyExc_IOError, + "%s: unable to read data.", + function ); + + libcerror_error_free( + &error ); + + Py_DecRef( + (PyObject *) string_object ); + + return( NULL ); + } + /* Need to resize the string here in case read_size was not fully read. + */ +#if PY_MAJOR_VERSION >= 3 + if( _PyBytes_Resize( + &string_object, + (Py_ssize_t) read_count ) != 0 ) +#else + if( _PyString_Resize( + &string_object, + (Py_ssize_t) read_count ) != 0 ) +#endif + { + Py_DecRef( + (PyObject *) string_object ); + + return( NULL ); + } + return( string_object ); +} + +/* Seeks a certain offset in the data stream data + * Returns a Python object holding the offset if successful or NULL on error + */ +PyObject *pyfshfs_data_stream_seek_offset( + pyfshfs_data_stream_t *pyfshfs_data_stream, + PyObject *arguments, + PyObject *keywords ) +{ + libcerror_error_t *error = NULL; + static char *function = "pyfshfs_data_stream_seek_offset"; + static char *keyword_list[] = { "offset", "whence", NULL }; + off64_t offset = 0; + int whence = 0; + + if( pyfshfs_data_stream == NULL ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid pyfshfs data stream.", + function ); + + return( NULL ); + } + if( pyfshfs_data_stream->data_stream == NULL ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid pyfshfs data stream - missing libfshfs data stream.", + function ); + + return( NULL ); + } + if( PyArg_ParseTupleAndKeywords( + arguments, + keywords, + "L|i", + keyword_list, + &offset, + &whence ) == 0 ) + { + return( NULL ); + } + Py_BEGIN_ALLOW_THREADS + + offset = libfshfs_data_stream_seek_offset( + pyfshfs_data_stream->data_stream, + offset, + whence, + &error ); + + Py_END_ALLOW_THREADS + + if( offset == -1 ) + { + pyfshfs_error_raise( + error, + PyExc_IOError, + "%s: unable to seek offset.", + function ); + + libcerror_error_free( + &error ); + + return( NULL ); + } + Py_IncRef( + Py_None ); + + return( Py_None ); +} + +/* Retrieves the offset + * Returns a Python object if successful or NULL on error + */ +PyObject *pyfshfs_data_stream_get_offset( + pyfshfs_data_stream_t *pyfshfs_data_stream, + PyObject *arguments PYFSHFS_ATTRIBUTE_UNUSED ) +{ + libcerror_error_t *error = NULL; + PyObject *integer_object = NULL; + static char *function = "pyfshfs_data_stream_get_offset"; + off64_t offset = 0; + int result = 0; + + PYFSHFS_UNREFERENCED_PARAMETER( arguments ) + + if( pyfshfs_data_stream == NULL ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid data stream.", + function ); + + return( NULL ); + } + Py_BEGIN_ALLOW_THREADS + + result = libfshfs_data_stream_get_offset( + pyfshfs_data_stream->data_stream, + &offset, + &error ); + + Py_END_ALLOW_THREADS + + if( result != 1 ) + { + pyfshfs_error_raise( + error, + PyExc_IOError, + "%s: unable to retrieve offset.", + function ); + + libcerror_error_free( + &error ); + + return( NULL ); + } + integer_object = pyfshfs_integer_signed_new_from_64bit( + (int64_t) offset ); + + return( integer_object ); +} + +/* Retrieves the size + * Returns a Python object if successful or NULL on error + */ +PyObject *pyfshfs_data_stream_get_size( + pyfshfs_data_stream_t *pyfshfs_data_stream, + PyObject *arguments PYFSHFS_ATTRIBUTE_UNUSED ) +{ + libcerror_error_t *error = NULL; + PyObject *integer_object = NULL; + static char *function = "pyfshfs_data_stream_get_size"; + size64_t size = 0; + int result = 0; + + PYFSHFS_UNREFERENCED_PARAMETER( arguments ) + + if( pyfshfs_data_stream == NULL ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid data stream.", + function ); + + return( NULL ); + } + Py_BEGIN_ALLOW_THREADS + + result = libfshfs_data_stream_get_size( + pyfshfs_data_stream->data_stream, + &size, + &error ); + + Py_END_ALLOW_THREADS + + if( result != 1 ) + { + pyfshfs_error_raise( + error, + PyExc_IOError, + "%s: unable to retrieve size.", + function ); + + libcerror_error_free( + &error ); + + return( NULL ); + } + integer_object = pyfshfs_integer_unsigned_new_from_64bit( + (uint64_t) size ); + + return( integer_object ); +} + +/* Retrieves the number of extents + * Returns a Python object if successful or NULL on error + */ +PyObject *pyfshfs_data_stream_get_number_of_extents( + pyfshfs_data_stream_t *pyfshfs_data_stream, + PyObject *arguments PYFSHFS_ATTRIBUTE_UNUSED ) +{ + libcerror_error_t *error = NULL; + PyObject *integer_object = NULL; + static char *function = "pyfshfs_data_stream_get_number_of_extents"; + int number_of_extents = 0; + int result = 0; + + PYFSHFS_UNREFERENCED_PARAMETER( arguments ) + + if( pyfshfs_data_stream == NULL ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid data stream.", + function ); + + return( NULL ); + } + Py_BEGIN_ALLOW_THREADS + + result = libfshfs_data_stream_get_number_of_extents( + pyfshfs_data_stream->data_stream, + &number_of_extents, + &error ); + + Py_END_ALLOW_THREADS + + if( result != 1 ) + { + pyfshfs_error_raise( + error, + PyExc_IOError, + "%s: unable to retrieve number of extents.", + function ); + + libcerror_error_free( + &error ); + + return( NULL ); + } +#if PY_MAJOR_VERSION >= 3 + integer_object = PyLong_FromLong( + (long) number_of_extents ); +#else + integer_object = PyInt_FromLong( + (long) number_of_extents ); +#endif + return( integer_object ); +} + +/* Retrieves a specific extent by index + * Returns a Python object if successful or NULL on error + */ +PyObject *pyfshfs_data_stream_get_extent_by_index( + pyfshfs_data_stream_t *pyfshfs_data_stream, + int extent_index ) +{ + libcerror_error_t *error = NULL; + PyObject *integer_object = NULL; + PyObject *tuple_object = NULL; + static char *function = "pyfshfs_data_stream_get_extent_by_index"; + off64_t extent_offset = 0; + size64_t extent_size = 0; + uint32_t extent_flags = 0; + int result = 0; + + if( pyfshfs_data_stream == NULL ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid data stream.", + function ); + + return( NULL ); + } + Py_BEGIN_ALLOW_THREADS + + result = libfshfs_data_stream_get_extent_by_index( + pyfshfs_data_stream->data_stream, + extent_index, + &extent_offset, + &extent_size, + &extent_flags, + &error ); + + Py_END_ALLOW_THREADS + + if( result != 1 ) + { + pyfshfs_error_raise( + error, + PyExc_IOError, + "%s: unable to retrieve extent: %d.", + function, + extent_index ); + + libcerror_error_free( + &error ); + + goto on_error; + } + tuple_object = PyTuple_New( + 3 ); + + integer_object = pyfshfs_integer_signed_new_from_64bit( + (int64_t) extent_offset ); + + /* Tuple set item does not increment the reference count of the integer object + */ + if( PyTuple_SetItem( + tuple_object, + 0, + integer_object ) != 0 ) + { + goto on_error; + } + integer_object = pyfshfs_integer_unsigned_new_from_64bit( + (uint64_t) extent_size ); + + /* Tuple set item does not increment the reference count of the integer object + */ + if( PyTuple_SetItem( + tuple_object, + 1, + integer_object ) != 0 ) + { + goto on_error; + } + integer_object = pyfshfs_integer_unsigned_new_from_64bit( + (uint64_t) extent_flags ); + + /* Tuple set item does not increment the reference count of the integer object + */ + if( PyTuple_SetItem( + tuple_object, + 2, + integer_object ) != 0 ) + { + goto on_error; + } + return( tuple_object ); + +on_error: + if( integer_object != NULL ) + { + Py_DecRef( + (PyObject *) integer_object ); + } + if( tuple_object != NULL ) + { + Py_DecRef( + (PyObject *) tuple_object ); + } + return( NULL ); +} + +/* Retrieves a specific extent + * Returns a Python object if successful or NULL on error + */ +PyObject *pyfshfs_data_stream_get_extent( + pyfshfs_data_stream_t *pyfshfs_data_stream, + PyObject *arguments, + PyObject *keywords ) +{ + PyObject *sequence_object = NULL; + static char *keyword_list[] = { "extent_index", NULL }; + int extent_index = 0; + + if( PyArg_ParseTupleAndKeywords( + arguments, + keywords, + "i", + keyword_list, + &extent_index ) == 0 ) + { + return( NULL ); + } + sequence_object = pyfshfs_data_stream_get_extent_by_index( + pyfshfs_data_stream, + extent_index ); + + return( sequence_object ); +} + diff -Nru libfshfs-20201104/pyfshfs/pyfshfs_data_stream.h libfshfs-20240221/pyfshfs/pyfshfs_data_stream.h --- libfshfs-20201104/pyfshfs/pyfshfs_data_stream.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/pyfshfs/pyfshfs_data_stream.h 2024-02-21 05:50:44.000000000 +0000 @@ -0,0 +1,106 @@ +/* + * Python object wrapper of libfshfs_data_stream_t + * + * Copyright (C) 2009-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _PYFSHFS_DATA_STREAM_H ) +#define _PYFSHFS_DATA_STREAM_H + +#include +#include + +#include "pyfshfs_libfshfs.h" +#include "pyfshfs_python.h" + +#if defined( __cplusplus ) +extern "C" { +#endif + +typedef struct pyfshfs_data_stream pyfshfs_data_stream_t; + +struct pyfshfs_data_stream +{ + /* Python object initialization + */ + PyObject_HEAD + + /* The libfshfs data stream + */ + libfshfs_data_stream_t *data_stream; + + /* The parent object + */ + PyObject *parent_object; +}; + +extern PyMethodDef pyfshfs_data_stream_object_methods[]; +extern PyTypeObject pyfshfs_data_stream_type_object; + +PyObject *pyfshfs_data_stream_new( + libfshfs_data_stream_t *data_stream, + PyObject *parent_object ); + +int pyfshfs_data_stream_init( + pyfshfs_data_stream_t *pyfshfs_data_stream ); + +void pyfshfs_data_stream_free( + pyfshfs_data_stream_t *pyfshfs_data_stream ); + +PyObject *pyfshfs_data_stream_read_buffer( + pyfshfs_data_stream_t *pyfshfs_data_stream, + PyObject *arguments, + PyObject *keywords ); + +PyObject *pyfshfs_data_stream_read_buffer_at_offset( + pyfshfs_data_stream_t *pyfshfs_data_stream, + PyObject *arguments, + PyObject *keywords ); + +PyObject *pyfshfs_data_stream_seek_offset( + pyfshfs_data_stream_t *pyfshfs_data_stream, + PyObject *arguments, + PyObject *keywords ); + +PyObject *pyfshfs_data_stream_get_offset( + pyfshfs_data_stream_t *pyfshfs_data_stream, + PyObject *arguments ); + +PyObject *pyfshfs_data_stream_get_size( + pyfshfs_data_stream_t *pyfshfs_data_stream, + PyObject *arguments ); + +PyObject *pyfshfs_data_stream_get_number_of_extents( + pyfshfs_data_stream_t *pyfshfs_data_stream, + PyObject *arguments ); + +PyObject *pyfshfs_data_stream_get_extent_by_index( + pyfshfs_data_stream_t *pyfshfs_data_stream, + int extent_index ); + +PyObject *pyfshfs_data_stream_get_extent( + pyfshfs_data_stream_t *pyfshfs_data_stream, + PyObject *arguments, + PyObject *keywords ); + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _PYFSHFS_DATA_STREAM_H ) */ + diff -Nru libfshfs-20201104/pyfshfs/pyfshfs_datetime.c libfshfs-20240221/pyfshfs/pyfshfs_datetime.c --- libfshfs-20201104/pyfshfs/pyfshfs_datetime.c 2020-11-04 04:22:35.000000000 +0000 +++ libfshfs-20240221/pyfshfs/pyfshfs_datetime.c 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Date and time functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -37,7 +37,7 @@ uint8_t hours, uint8_t minutes, uint8_t seconds, - uint8_t micro_seconds ) + uint32_t micro_seconds ) { PyObject *datetime_object = NULL; static char *function = "pyfshfs_datetime_new_from_time_elements"; @@ -118,7 +118,7 @@ { days_in_month = 30; } - /* Januari (1), March (3), May (5), July (7), August (8), October (10), December (12) + /* January (1), March (3), May (5), July (7), August (8), October (10), December (12) */ else if( ( month == 1 ) || ( month == 3 ) @@ -163,7 +163,7 @@ (int) hours, (int) minutes, (int) seconds, - 0 ); + (int) micro_seconds ); return( datetime_object ); } @@ -238,7 +238,7 @@ { days_in_month = 30; } - /* Januari (1), March (3), May (5), July (7), August (8), October (10), December (12) + /* January (1), March (3), May (5), July (7), August (8), October (10), December (12) */ else if( ( month == 1 ) || ( month == 3 ) @@ -449,7 +449,7 @@ { days_in_month = 30; } - /* Januari (1), March (3), May (5), July (7), August (8), October (10), December (12) + /* January (1), March (3), May (5), July (7), August (8), October (10), December (12) */ else if( ( month == 1 ) || ( month == 3 ) diff -Nru libfshfs-20201104/pyfshfs/pyfshfs_datetime.h libfshfs-20240221/pyfshfs/pyfshfs_datetime.h --- libfshfs-20201104/pyfshfs/pyfshfs_datetime.h 2020-11-04 04:22:35.000000000 +0000 +++ libfshfs-20240221/pyfshfs/pyfshfs_datetime.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Date and time functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -37,7 +37,7 @@ uint8_t hours, uint8_t minutes, uint8_t seconds, - uint8_t micro_seconds ); + uint32_t micro_seconds ); PyObject *pyfshfs_datetime_new_from_fat_date_time( uint32_t fat_date_time ); diff -Nru libfshfs-20201104/pyfshfs/pyfshfs_error.c libfshfs-20240221/pyfshfs/pyfshfs_error.c --- libfshfs-20201104/pyfshfs/pyfshfs_error.c 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/pyfshfs/pyfshfs_error.c 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Error functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/pyfshfs/pyfshfs_error.h libfshfs-20240221/pyfshfs/pyfshfs_error.h --- libfshfs-20201104/pyfshfs/pyfshfs_error.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/pyfshfs/pyfshfs_error.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Error functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/pyfshfs/pyfshfs_extended_attribute.c libfshfs-20240221/pyfshfs/pyfshfs_extended_attribute.c --- libfshfs-20201104/pyfshfs/pyfshfs_extended_attribute.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/pyfshfs/pyfshfs_extended_attribute.c 2024-02-21 05:50:44.000000000 +0000 @@ -0,0 +1,1299 @@ +/* + * Python object wrapper of libfshfs_extended_attribute_t + * + * Copyright (C) 2009-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include + +#if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI ) +#include +#endif + +#include "pyfshfs_error.h" +#include "pyfshfs_extended_attribute.h" +#include "pyfshfs_integer.h" +#include "pyfshfs_libcerror.h" +#include "pyfshfs_libfshfs.h" +#include "pyfshfs_python.h" +#include "pyfshfs_unused.h" + +PyMethodDef pyfshfs_extended_attribute_object_methods[] = { + + { "get_name", + (PyCFunction) pyfshfs_extended_attribute_get_name, + METH_NOARGS, + "get_name() -> Unicode string\n" + "\n" + "Retrieves the name." }, + + { "read_buffer", + (PyCFunction) pyfshfs_extended_attribute_read_buffer, + METH_VARARGS | METH_KEYWORDS, + "read_buffer(size) -> Binary string\n" + "\n" + "Reads a buffer of data." }, + + { "read_buffer_at_offset", + (PyCFunction) pyfshfs_extended_attribute_read_buffer_at_offset, + METH_VARARGS | METH_KEYWORDS, + "read_buffer_at_offset(size, offset) -> Binary string\n" + "\n" + "Reads a buffer of data at a specific offset." }, + + { "seek_offset", + (PyCFunction) pyfshfs_extended_attribute_seek_offset, + METH_VARARGS | METH_KEYWORDS, + "seek_offset(offset, whence) -> None\n" + "\n" + "Seeks an offset within the data." }, + + { "get_offset", + (PyCFunction) pyfshfs_extended_attribute_get_offset, + METH_NOARGS, + "get_offset() -> Integer\n" + "\n" + "Retrieves the current offset within the data." }, + + { "read", + (PyCFunction) pyfshfs_extended_attribute_read_buffer, + METH_VARARGS | METH_KEYWORDS, + "read(size) -> Binary string\n" + "\n" + "Reads a buffer of data." }, + + { "seek", + (PyCFunction) pyfshfs_extended_attribute_seek_offset, + METH_VARARGS | METH_KEYWORDS, + "seek(offset, whence) -> None\n" + "\n" + "Seeks an offset within the data." }, + + { "tell", + (PyCFunction) pyfshfs_extended_attribute_get_offset, + METH_NOARGS, + "tell() -> Integer\n" + "\n" + "Retrieves the current offset within the data." }, + + { "get_size", + (PyCFunction) pyfshfs_extended_attribute_get_size, + METH_NOARGS, + "get_size() -> Integer\n" + "\n" + "Retrieves the size of the data stream object." }, + + { "get_number_of_extents", + (PyCFunction) pyfshfs_extended_attribute_get_number_of_extents, + METH_NOARGS, + "get_number_of_extents() -> Integer\n" + "\n" + "Retrieves the number of extents." }, + + { "get_extent", + (PyCFunction) pyfshfs_extended_attribute_get_extent, + METH_VARARGS | METH_KEYWORDS, + "get_extent(extent_index) -> Tuple(Integer, Integer, Integer)\n" + "\n" + "Retrieves a specific extent.\n" + "The extent is a tuple of offset, size and flags." }, + + /* Sentinel */ + { NULL, NULL, 0, NULL } +}; + +PyGetSetDef pyfshfs_extended_attribute_object_get_set_definitions[] = { + + { "name", + (getter) pyfshfs_extended_attribute_get_name, + (setter) 0, + "The name.", + NULL }, + + { "size", + (getter) pyfshfs_extended_attribute_get_size, + (setter) 0, + "The size of the data stream object.", + NULL }, + + /* Sentinel */ + { NULL, NULL, NULL, NULL, NULL } +}; + +PyTypeObject pyfshfs_extended_attribute_type_object = { + PyVarObject_HEAD_INIT( NULL, 0 ) + + /* tp_name */ + "pyfshfs.extended_attribute", + /* tp_basicsize */ + sizeof( pyfshfs_extended_attribute_t ), + /* tp_itemsize */ + 0, + /* tp_dealloc */ + (destructor) pyfshfs_extended_attribute_free, + /* tp_print */ + 0, + /* tp_getattr */ + 0, + /* tp_setattr */ + 0, + /* tp_compare */ + 0, + /* tp_repr */ + 0, + /* tp_as_number */ + 0, + /* tp_as_sequence */ + 0, + /* tp_as_mapping */ + 0, + /* tp_hash */ + 0, + /* tp_call */ + 0, + /* tp_str */ + 0, + /* tp_getattro */ + 0, + /* tp_setattro */ + 0, + /* tp_as_buffer */ + 0, + /* tp_flags */ + Py_TPFLAGS_DEFAULT, + /* tp_doc */ + "pyfshfs extended attribute object (wraps libfshfs_extended_attribute_t)", + /* tp_traverse */ + 0, + /* tp_clear */ + 0, + /* tp_richcompare */ + 0, + /* tp_weaklistoffset */ + 0, + /* tp_iter */ + 0, + /* tp_iternext */ + 0, + /* tp_methods */ + pyfshfs_extended_attribute_object_methods, + /* tp_members */ + 0, + /* tp_getset */ + pyfshfs_extended_attribute_object_get_set_definitions, + /* tp_base */ + 0, + /* tp_dict */ + 0, + /* tp_descr_get */ + 0, + /* tp_descr_set */ + 0, + /* tp_dictoffset */ + 0, + /* tp_init */ + (initproc) pyfshfs_extended_attribute_init, + /* tp_alloc */ + 0, + /* tp_new */ + 0, + /* tp_free */ + 0, + /* tp_is_gc */ + 0, + /* tp_bases */ + NULL, + /* tp_mro */ + NULL, + /* tp_cache */ + NULL, + /* tp_subclasses */ + NULL, + /* tp_weaklist */ + NULL, + /* tp_del */ + 0 +}; + +/* Creates a new extended attribute object + * Returns a Python object if successful or NULL on error + */ +PyObject *pyfshfs_extended_attribute_new( + libfshfs_extended_attribute_t *extended_attribute, + PyObject *parent_object ) +{ + pyfshfs_extended_attribute_t *pyfshfs_extended_attribute = NULL; + static char *function = "pyfshfs_extended_attribute_new"; + + if( extended_attribute == NULL ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid extended attribute.", + function ); + + return( NULL ); + } + /* PyObject_New does not invoke tp_init + */ + pyfshfs_extended_attribute = PyObject_New( + struct pyfshfs_extended_attribute, + &pyfshfs_extended_attribute_type_object ); + + if( pyfshfs_extended_attribute == NULL ) + { + PyErr_Format( + PyExc_MemoryError, + "%s: unable to initialize extended attribute.", + function ); + + goto on_error; + } + pyfshfs_extended_attribute->extended_attribute = extended_attribute; + pyfshfs_extended_attribute->parent_object = parent_object; + + if( pyfshfs_extended_attribute->parent_object != NULL ) + { + Py_IncRef( + pyfshfs_extended_attribute->parent_object ); + } + return( (PyObject *) pyfshfs_extended_attribute ); + +on_error: + if( pyfshfs_extended_attribute != NULL ) + { + Py_DecRef( + (PyObject *) pyfshfs_extended_attribute ); + } + return( NULL ); +} + +/* Initializes an extended attribute object + * Returns 0 if successful or -1 on error + */ +int pyfshfs_extended_attribute_init( + pyfshfs_extended_attribute_t *pyfshfs_extended_attribute ) +{ + static char *function = "pyfshfs_extended_attribute_init"; + + if( pyfshfs_extended_attribute == NULL ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid extended attribute.", + function ); + + return( -1 ); + } + /* Make sure libfshfs extended attribute is set to NULL + */ + pyfshfs_extended_attribute->extended_attribute = NULL; + + PyErr_Format( + PyExc_NotImplementedError, + "%s: initialize of extended attribute not supported.", + function ); + + return( -1 ); +} + +/* Frees an extended attribute object + */ +void pyfshfs_extended_attribute_free( + pyfshfs_extended_attribute_t *pyfshfs_extended_attribute ) +{ + struct _typeobject *ob_type = NULL; + libcerror_error_t *error = NULL; + static char *function = "pyfshfs_extended_attribute_free"; + int result = 0; + + if( pyfshfs_extended_attribute == NULL ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid extended attribute.", + function ); + + return; + } + ob_type = Py_TYPE( + pyfshfs_extended_attribute ); + + if( ob_type == NULL ) + { + PyErr_Format( + PyExc_ValueError, + "%s: missing ob_type.", + function ); + + return; + } + if( ob_type->tp_free == NULL ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid ob_type - missing tp_free.", + function ); + + return; + } + if( pyfshfs_extended_attribute->extended_attribute != NULL ) + { + Py_BEGIN_ALLOW_THREADS + + result = libfshfs_extended_attribute_free( + &( pyfshfs_extended_attribute->extended_attribute ), + &error ); + + Py_END_ALLOW_THREADS + + if( result != 1 ) + { + pyfshfs_error_raise( + error, + PyExc_MemoryError, + "%s: unable to free libfshfs extended attribute.", + function ); + + libcerror_error_free( + &error ); + } + } + if( pyfshfs_extended_attribute->parent_object != NULL ) + { + Py_DecRef( + pyfshfs_extended_attribute->parent_object ); + } + ob_type->tp_free( + (PyObject*) pyfshfs_extended_attribute ); +} + +/* Retrieves the name + * Returns a Python object if successful or NULL on error + */ +PyObject *pyfshfs_extended_attribute_get_name( + pyfshfs_extended_attribute_t *pyfshfs_extended_attribute, + PyObject *arguments PYFSHFS_ATTRIBUTE_UNUSED ) +{ + PyObject *string_object = NULL; + libcerror_error_t *error = NULL; + static char *function = "pyfshfs_extended_attribute_get_name"; + char *utf8_string = NULL; + size_t utf8_string_size = 0; + int result = 0; + + PYFSHFS_UNREFERENCED_PARAMETER( arguments ) + + if( pyfshfs_extended_attribute == NULL ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid extended attribute.", + function ); + + return( NULL ); + } + Py_BEGIN_ALLOW_THREADS + + result = libfshfs_extended_attribute_get_utf8_name_size( + pyfshfs_extended_attribute->extended_attribute, + &utf8_string_size, + &error ); + + Py_END_ALLOW_THREADS + + if( result == -1 ) + { + pyfshfs_error_raise( + error, + PyExc_IOError, + "%s: unable to determine size of as UTF-8 string.", + function ); + + libcerror_error_free( + &error ); + + goto on_error; + } + else if( ( result == 0 ) + || ( utf8_string_size == 0 ) ) + { + Py_IncRef( + Py_None ); + + return( Py_None ); + } + utf8_string = (char *) PyMem_Malloc( + sizeof( char ) * utf8_string_size ); + + if( utf8_string == NULL ) + { + PyErr_Format( + PyExc_MemoryError, + "%s: unable to create UTF-8 string.", + function ); + + goto on_error; + } + Py_BEGIN_ALLOW_THREADS + + result = libfshfs_extended_attribute_get_utf8_name( + pyfshfs_extended_attribute->extended_attribute, + (uint8_t *) utf8_string, + utf8_string_size, + &error ); + + Py_END_ALLOW_THREADS + + if( result != 1 ) + { + pyfshfs_error_raise( + error, + PyExc_IOError, + "%s: unable to retrieve as UTF-8 string.", + function ); + + libcerror_error_free( + &error ); + + goto on_error; + } + /* Pass the string length to PyUnicode_DecodeUTF8 otherwise it makes + * the end of string character is part of the string. + */ + string_object = PyUnicode_DecodeUTF8( + utf8_string, + (Py_ssize_t) utf8_string_size - 1, + NULL ); + + if( string_object == NULL ) + { + PyErr_Format( + PyExc_IOError, + "%s: unable to convert UTF-8 string into Unicode object.", + function ); + + goto on_error; + } + PyMem_Free( + utf8_string ); + + return( string_object ); + +on_error: + if( utf8_string != NULL ) + { + PyMem_Free( + utf8_string ); + } + return( NULL ); +} + +/* Reads data at the current offset into a buffer + * Returns a Python object if successful or NULL on error + */ +PyObject *pyfshfs_extended_attribute_read_buffer( + pyfshfs_extended_attribute_t *pyfshfs_extended_attribute, + PyObject *arguments, + PyObject *keywords ) +{ + PyObject *integer_object = NULL; + PyObject *string_object = NULL; + libcerror_error_t *error = NULL; + char *buffer = NULL; + static char *function = "pyfshfs_extended_attribute_read_buffer"; + static char *keyword_list[] = { "size", NULL }; + ssize_t read_count = 0; + int64_t read_size = 0; + int result = 0; + + if( pyfshfs_extended_attribute == NULL ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid extended attribute.", + function ); + + return( NULL ); + } + if( PyArg_ParseTupleAndKeywords( + arguments, + keywords, + "|O", + keyword_list, + &integer_object ) == 0 ) + { + return( NULL ); + } + if( integer_object == NULL ) + { + result = 0; + } + else + { + result = PyObject_IsInstance( + integer_object, + (PyObject *) &PyLong_Type ); + + if( result == -1 ) + { + pyfshfs_error_fetch_and_raise( + PyExc_RuntimeError, + "%s: unable to determine if integer object is of type long.", + function ); + + return( NULL ); + } +#if PY_MAJOR_VERSION < 3 + else if( result == 0 ) + { + PyErr_Clear(); + + result = PyObject_IsInstance( + integer_object, + (PyObject *) &PyInt_Type ); + + if( result == -1 ) + { + pyfshfs_error_fetch_and_raise( + PyExc_RuntimeError, + "%s: unable to determine if integer object is of type int.", + function ); + + return( NULL ); + } + } +#endif + } + if( result != 0 ) + { + if( pyfshfs_integer_signed_copy_to_64bit( + integer_object, + &read_size, + &error ) != 1 ) + { + pyfshfs_error_raise( + error, + PyExc_IOError, + "%s: unable to convert integer object into read size.", + function ); + + libcerror_error_free( + &error ); + + return( NULL ); + } + } + else if( ( integer_object == NULL ) + || ( integer_object == Py_None ) ) + { + Py_BEGIN_ALLOW_THREADS + + result = libfshfs_extended_attribute_get_size( + pyfshfs_extended_attribute->extended_attribute, + (size64_t *) &read_size, + &error ); + + Py_END_ALLOW_THREADS + + if( result != 1 ) + { + pyfshfs_error_raise( + error, + PyExc_IOError, + "%s: unable to retrieve size.", + function ); + + libcerror_error_free( + &error ); + + return( NULL ); + } + } + else + { + PyErr_Format( + PyExc_TypeError, + "%s: unsupported integer object type.", + function ); + + return( NULL ); + } + if( read_size == 0 ) + { +#if PY_MAJOR_VERSION >= 3 + string_object = PyBytes_FromString( + "" ); +#else + string_object = PyString_FromString( + "" ); +#endif + return( string_object ); + } + if( read_size < 0 ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid read size value less than zero.", + function ); + + return( NULL ); + } + /* Make sure the data fits into a memory buffer + */ + if( ( read_size > (int64_t) INT_MAX ) + || ( read_size > (int64_t) SSIZE_MAX ) ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid argument read size value exceeds maximum.", + function ); + + return( NULL ); + } +#if PY_MAJOR_VERSION >= 3 + string_object = PyBytes_FromStringAndSize( + NULL, + (Py_ssize_t) read_size ); + + buffer = PyBytes_AsString( + string_object ); +#else + /* Note that a size of 0 is not supported + */ + string_object = PyString_FromStringAndSize( + NULL, + (Py_ssize_t) read_size ); + + buffer = PyString_AsString( + string_object ); +#endif + Py_BEGIN_ALLOW_THREADS + + read_count = libfshfs_extended_attribute_read_buffer( + pyfshfs_extended_attribute->extended_attribute, + (uint8_t *) buffer, + (size_t) read_size, + &error ); + + Py_END_ALLOW_THREADS + + if( read_count == -1 ) + { + pyfshfs_error_raise( + error, + PyExc_IOError, + "%s: unable to read data.", + function ); + + libcerror_error_free( + &error ); + + Py_DecRef( + (PyObject *) string_object ); + + return( NULL ); + } + /* Need to resize the string here in case read_size was not fully read. + */ +#if PY_MAJOR_VERSION >= 3 + if( _PyBytes_Resize( + &string_object, + (Py_ssize_t) read_count ) != 0 ) +#else + if( _PyString_Resize( + &string_object, + (Py_ssize_t) read_count ) != 0 ) +#endif + { + Py_DecRef( + (PyObject *) string_object ); + + return( NULL ); + } + return( string_object ); +} + +/* Reads data at a specific offset into a buffer + * Returns a Python object if successful or NULL on error + */ +PyObject *pyfshfs_extended_attribute_read_buffer_at_offset( + pyfshfs_extended_attribute_t *pyfshfs_extended_attribute, + PyObject *arguments, + PyObject *keywords ) +{ + PyObject *integer_object = NULL; + PyObject *string_object = NULL; + libcerror_error_t *error = NULL; + char *buffer = NULL; + static char *function = "pyfshfs_extended_attribute_read_buffer_at_offset"; + static char *keyword_list[] = { "size", "offset", NULL }; + ssize_t read_count = 0; + off64_t read_offset = 0; + int64_t read_size = 0; + int result = 0; + + if( pyfshfs_extended_attribute == NULL ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid extended attribute.", + function ); + + return( NULL ); + } + if( PyArg_ParseTupleAndKeywords( + arguments, + keywords, + "OL", + keyword_list, + &integer_object, + &read_offset ) == 0 ) + { + return( NULL ); + } + result = PyObject_IsInstance( + integer_object, + (PyObject *) &PyLong_Type ); + + if( result == -1 ) + { + pyfshfs_error_fetch_and_raise( + PyExc_RuntimeError, + "%s: unable to determine if integer object is of type long.", + function ); + + return( NULL ); + } +#if PY_MAJOR_VERSION < 3 + else if( result == 0 ) + { + PyErr_Clear(); + + result = PyObject_IsInstance( + integer_object, + (PyObject *) &PyInt_Type ); + + if( result == -1 ) + { + pyfshfs_error_fetch_and_raise( + PyExc_RuntimeError, + "%s: unable to determine if integer object is of type int.", + function ); + + return( NULL ); + } + } +#endif + if( result != 0 ) + { + if( pyfshfs_integer_signed_copy_to_64bit( + integer_object, + &read_size, + &error ) != 1 ) + { + pyfshfs_error_raise( + error, + PyExc_IOError, + "%s: unable to convert integer object into read size.", + function ); + + libcerror_error_free( + &error ); + + return( NULL ); + } + } + else + { + PyErr_Format( + PyExc_TypeError, + "%s: unsupported integer object type.", + function ); + + return( NULL ); + } + if( read_size == 0 ) + { +#if PY_MAJOR_VERSION >= 3 + string_object = PyBytes_FromString( + "" ); +#else + string_object = PyString_FromString( + "" ); +#endif + return( string_object ); + } + if( read_size < 0 ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid read size value less than zero.", + function ); + + return( NULL ); + } + /* Make sure the data fits into a memory buffer + */ + if( ( read_size > (int64_t) INT_MAX ) + || ( read_size > (int64_t) SSIZE_MAX ) ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid argument read size value exceeds maximum.", + function ); + + return( NULL ); + } + if( read_offset < 0 ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid read offset value less than zero.", + function ); + + return( NULL ); + } +#if PY_MAJOR_VERSION >= 3 + string_object = PyBytes_FromStringAndSize( + NULL, + (Py_ssize_t) read_size ); + + buffer = PyBytes_AsString( + string_object ); +#else + /* Note that a size of 0 is not supported + */ + string_object = PyString_FromStringAndSize( + NULL, + (Py_ssize_t) read_size ); + + buffer = PyString_AsString( + string_object ); +#endif + Py_BEGIN_ALLOW_THREADS + + read_count = libfshfs_extended_attribute_read_buffer_at_offset( + pyfshfs_extended_attribute->extended_attribute, + (uint8_t *) buffer, + (size_t) read_size, + (off64_t) read_offset, + &error ); + + Py_END_ALLOW_THREADS + + if( read_count == -1 ) + { + pyfshfs_error_raise( + error, + PyExc_IOError, + "%s: unable to read data.", + function ); + + libcerror_error_free( + &error ); + + Py_DecRef( + (PyObject *) string_object ); + + return( NULL ); + } + /* Need to resize the string here in case read_size was not fully read. + */ +#if PY_MAJOR_VERSION >= 3 + if( _PyBytes_Resize( + &string_object, + (Py_ssize_t) read_count ) != 0 ) +#else + if( _PyString_Resize( + &string_object, + (Py_ssize_t) read_count ) != 0 ) +#endif + { + Py_DecRef( + (PyObject *) string_object ); + + return( NULL ); + } + return( string_object ); +} + +/* Seeks a certain offset + * Returns a Python object if successful or NULL on error + */ +PyObject *pyfshfs_extended_attribute_seek_offset( + pyfshfs_extended_attribute_t *pyfshfs_extended_attribute, + PyObject *arguments, + PyObject *keywords ) +{ + libcerror_error_t *error = NULL; + static char *function = "pyfshfs_extended_attribute_seek_offset"; + static char *keyword_list[] = { "offset", "whence", NULL }; + off64_t offset = 0; + int whence = 0; + + if( pyfshfs_extended_attribute == NULL ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid extended attribute.", + function ); + + return( NULL ); + } + if( PyArg_ParseTupleAndKeywords( + arguments, + keywords, + "L|i", + keyword_list, + &offset, + &whence ) == 0 ) + { + return( NULL ); + } + Py_BEGIN_ALLOW_THREADS + + offset = libfshfs_extended_attribute_seek_offset( + pyfshfs_extended_attribute->extended_attribute, + offset, + whence, + &error ); + + Py_END_ALLOW_THREADS + + if( offset == -1 ) + { + pyfshfs_error_raise( + error, + PyExc_IOError, + "%s: unable to seek offset.", + function ); + + libcerror_error_free( + &error ); + + return( NULL ); + } + Py_IncRef( + Py_None ); + + return( Py_None ); +} + +/* Retrieves the current offset + * Returns a Python object if successful or NULL on error + */ +PyObject *pyfshfs_extended_attribute_get_offset( + pyfshfs_extended_attribute_t *pyfshfs_extended_attribute, + PyObject *arguments PYFSHFS_ATTRIBUTE_UNUSED ) +{ + PyObject *integer_object = NULL; + libcerror_error_t *error = NULL; + static char *function = "pyfshfs_extended_attribute_get_offset"; + off64_t offset = 0; + int result = 0; + + PYFSHFS_UNREFERENCED_PARAMETER( arguments ) + + if( pyfshfs_extended_attribute == NULL ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid extended attribute.", + function ); + + return( NULL ); + } + Py_BEGIN_ALLOW_THREADS + + result = libfshfs_extended_attribute_get_offset( + pyfshfs_extended_attribute->extended_attribute, + &offset, + &error ); + + Py_END_ALLOW_THREADS + + if( result == -1 ) + { + pyfshfs_error_raise( + error, + PyExc_IOError, + "%s: unable to retrieve current offset.", + function ); + + libcerror_error_free( + &error ); + + return( NULL ); + } + else if( result == 0 ) + { + Py_IncRef( + Py_None ); + + return( Py_None ); + } + integer_object = pyfshfs_integer_signed_new_from_64bit( + (int64_t) offset ); + + return( integer_object ); +} + +/* Retrieves the size of the data stream object + * Returns a Python object if successful or NULL on error + */ +PyObject *pyfshfs_extended_attribute_get_size( + pyfshfs_extended_attribute_t *pyfshfs_extended_attribute, + PyObject *arguments PYFSHFS_ATTRIBUTE_UNUSED ) +{ + PyObject *integer_object = NULL; + libcerror_error_t *error = NULL; + static char *function = "pyfshfs_extended_attribute_get_size"; + size64_t size = 0; + int result = 0; + + PYFSHFS_UNREFERENCED_PARAMETER( arguments ) + + if( pyfshfs_extended_attribute == NULL ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid extended attribute.", + function ); + + return( NULL ); + } + Py_BEGIN_ALLOW_THREADS + + result = libfshfs_extended_attribute_get_size( + pyfshfs_extended_attribute->extended_attribute, + &size, + &error ); + + Py_END_ALLOW_THREADS + + if( result != 1 ) + { + pyfshfs_error_raise( + error, + PyExc_IOError, + "%s: failed to retrieve size of the data stream object.", + function ); + + libcerror_error_free( + &error ); + + return( NULL ); + } + integer_object = pyfshfs_integer_unsigned_new_from_64bit( + (uint64_t) size ); + + return( integer_object ); +} + +/* Retrieves the number of extents + * Returns a Python object if successful or NULL on error + */ +PyObject *pyfshfs_extended_attribute_get_number_of_extents( + pyfshfs_extended_attribute_t *pyfshfs_extended_attribute, + PyObject *arguments PYFSHFS_ATTRIBUTE_UNUSED ) +{ + PyObject *integer_object = NULL; + libcerror_error_t *error = NULL; + static char *function = "pyfshfs_extended_attribute_get_number_of_extents"; + int number_of_extents = 0; + int result = 0; + + PYFSHFS_UNREFERENCED_PARAMETER( arguments ) + + if( pyfshfs_extended_attribute == NULL ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid extended attribute.", + function ); + + return( NULL ); + } + Py_BEGIN_ALLOW_THREADS + + result = libfshfs_extended_attribute_get_number_of_extents( + pyfshfs_extended_attribute->extended_attribute, + &number_of_extents, + &error ); + + Py_END_ALLOW_THREADS + + if( result != 1 ) + { + pyfshfs_error_raise( + error, + PyExc_IOError, + "%s: unable to retrieve number of extents.", + function ); + + libcerror_error_free( + &error ); + + return( NULL ); + } +#if PY_MAJOR_VERSION >= 3 + integer_object = PyLong_FromLong( + (long) number_of_extents ); +#else + integer_object = PyInt_FromLong( + (long) number_of_extents ); +#endif + return( integer_object ); +} + +/* Retrieves a specific extent by index + * Returns a Python object if successful or NULL on error + */ +PyObject *pyfshfs_extended_attribute_get_extent_by_index( + pyfshfs_extended_attribute_t *pyfshfs_extended_attribute, + int extent_index ) +{ + libcerror_error_t *error = NULL; + PyObject *integer_object = NULL; + PyObject *tuple_object = NULL; + static char *function = "pyfshfs_extended_attribute_get_extent_by_index"; + off64_t extent_offset = 0; + size64_t extent_size = 0; + uint32_t extent_flags = 0; + int result = 0; + + if( pyfshfs_extended_attribute == NULL ) + { + PyErr_Format( + PyExc_TypeError, + "%s: invalid extended attribute.", + function ); + + return( NULL ); + } + Py_BEGIN_ALLOW_THREADS + + result = libfshfs_extended_attribute_get_extent_by_index( + pyfshfs_extended_attribute->extended_attribute, + extent_index, + &extent_offset, + &extent_size, + &extent_flags, + &error ); + + Py_END_ALLOW_THREADS + + if( result != 1 ) + { + pyfshfs_error_raise( + error, + PyExc_IOError, + "%s: unable to retrieve extent: %d.", + function, + extent_index ); + + libcerror_error_free( + &error ); + + goto on_error; + } + tuple_object = PyTuple_New( + 3 ); + + integer_object = pyfshfs_integer_signed_new_from_64bit( + (int64_t) extent_offset ); + + /* Tuple set item does not increment the reference count of the integer object + */ + if( PyTuple_SetItem( + tuple_object, + 0, + integer_object ) != 0 ) + { + goto on_error; + } + integer_object = pyfshfs_integer_unsigned_new_from_64bit( + (uint64_t) extent_size ); + + /* Tuple set item does not increment the reference count of the integer object + */ + if( PyTuple_SetItem( + tuple_object, + 1, + integer_object ) != 0 ) + { + goto on_error; + } + integer_object = pyfshfs_integer_unsigned_new_from_64bit( + (uint64_t) extent_flags ); + + /* Tuple set item does not increment the reference count of the integer object + */ + if( PyTuple_SetItem( + tuple_object, + 2, + integer_object ) != 0 ) + { + goto on_error; + } + return( tuple_object ); + +on_error: + if( integer_object != NULL ) + { + Py_DecRef( + (PyObject *) integer_object ); + } + if( tuple_object != NULL ) + { + Py_DecRef( + (PyObject *) tuple_object ); + } + return( NULL ); +} + +/* Retrieves a specific extent + * Returns a Python object if successful or NULL on error + */ +PyObject *pyfshfs_extended_attribute_get_extent( + pyfshfs_extended_attribute_t *pyfshfs_extended_attribute, + PyObject *arguments, + PyObject *keywords ) +{ + PyObject *sequence_object = NULL; + static char *keyword_list[] = { "extent_index", NULL }; + int extent_index = 0; + + if( PyArg_ParseTupleAndKeywords( + arguments, + keywords, + "i", + keyword_list, + &extent_index ) == 0 ) + { + return( NULL ); + } + sequence_object = pyfshfs_extended_attribute_get_extent_by_index( + pyfshfs_extended_attribute, + extent_index ); + + return( sequence_object ); +} + diff -Nru libfshfs-20201104/pyfshfs/pyfshfs_extended_attribute.h libfshfs-20240221/pyfshfs/pyfshfs_extended_attribute.h --- libfshfs-20201104/pyfshfs/pyfshfs_extended_attribute.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/pyfshfs/pyfshfs_extended_attribute.h 2024-02-21 05:50:44.000000000 +0000 @@ -0,0 +1,110 @@ +/* + * Python object wrapper of libfshfs_extended_attribute_t + * + * Copyright (C) 2009-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _PYFSHFS_EXTENDED_ATTRIBUTE_H ) +#define _PYFSHFS_EXTENDED_ATTRIBUTE_H + +#include +#include + +#include "pyfshfs_libfshfs.h" +#include "pyfshfs_python.h" + +#if defined( __cplusplus ) +extern "C" { +#endif + +typedef struct pyfshfs_extended_attribute pyfshfs_extended_attribute_t; + +struct pyfshfs_extended_attribute +{ + /* Python object initialization + */ + PyObject_HEAD + + /* The libfshfs extended attribute + */ + libfshfs_extended_attribute_t *extended_attribute; + + /* The parent object + */ + PyObject *parent_object; +}; + +extern PyMethodDef pyfshfs_extended_attribute_object_methods[]; +extern PyTypeObject pyfshfs_extended_attribute_type_object; + +PyObject *pyfshfs_extended_attribute_new( + libfshfs_extended_attribute_t *extended_attribute, + PyObject *parent_object ); + +int pyfshfs_extended_attribute_init( + pyfshfs_extended_attribute_t *pyfshfs_extended_attribute ); + +void pyfshfs_extended_attribute_free( + pyfshfs_extended_attribute_t *pyfshfs_extended_attribute ); + +PyObject *pyfshfs_extended_attribute_get_name( + pyfshfs_extended_attribute_t *pyfshfs_extended_attribute, + PyObject *arguments ); + +PyObject *pyfshfs_extended_attribute_read_buffer( + pyfshfs_extended_attribute_t *pyfshfs_extended_attribute, + PyObject *arguments, + PyObject *keywords ); + +PyObject *pyfshfs_extended_attribute_read_buffer_at_offset( + pyfshfs_extended_attribute_t *pyfshfs_extended_attribute, + PyObject *arguments, + PyObject *keywords ); + +PyObject *pyfshfs_extended_attribute_seek_offset( + pyfshfs_extended_attribute_t *pyfshfs_extended_attribute, + PyObject *arguments, + PyObject *keywords ); + +PyObject *pyfshfs_extended_attribute_get_offset( + pyfshfs_extended_attribute_t *pyfshfs_extended_attribute, + PyObject *arguments ); + +PyObject *pyfshfs_extended_attribute_get_size( + pyfshfs_extended_attribute_t *pyfshfs_extended_attribute, + PyObject *arguments ); + +PyObject *pyfshfs_extended_attribute_get_number_of_extents( + pyfshfs_extended_attribute_t *pyfshfs_extended_attribute, + PyObject *arguments ); + +PyObject *pyfshfs_extended_attribute_get_extent_by_index( + pyfshfs_extended_attribute_t *pyfshfs_extended_attribute, + int extent_index ); + +PyObject *pyfshfs_extended_attribute_get_extent( + pyfshfs_extended_attribute_t *pyfshfs_extended_attribute, + PyObject *arguments, + PyObject *keywords ); + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _PYFSHFS_EXTENDED_ATTRIBUTE_H ) */ + diff -Nru libfshfs-20201104/pyfshfs/pyfshfs_extended_attributes.c libfshfs-20240221/pyfshfs/pyfshfs_extended_attributes.c --- libfshfs-20201104/pyfshfs/pyfshfs_extended_attributes.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/pyfshfs/pyfshfs_extended_attributes.c 2024-02-21 05:50:44.000000000 +0000 @@ -0,0 +1,452 @@ +/* + * Python object definition of the sequence and iterator object of extended attributes + * + * Copyright (C) 2009-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include + +#if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI ) +#include +#endif + +#include "pyfshfs_extended_attribute.h" +#include "pyfshfs_extended_attributes.h" +#include "pyfshfs_libcerror.h" +#include "pyfshfs_libfshfs.h" +#include "pyfshfs_python.h" + +PySequenceMethods pyfshfs_extended_attributes_sequence_methods = { + /* sq_length */ + (lenfunc) pyfshfs_extended_attributes_len, + /* sq_concat */ + 0, + /* sq_repeat */ + 0, + /* sq_item */ + (ssizeargfunc) pyfshfs_extended_attributes_getitem, + /* sq_slice */ + 0, + /* sq_ass_item */ + 0, + /* sq_ass_slice */ + 0, + /* sq_contains */ + 0, + /* sq_inplace_concat */ + 0, + /* sq_inplace_repeat */ + 0 +}; + +PyTypeObject pyfshfs_extended_attributes_type_object = { + PyVarObject_HEAD_INIT( NULL, 0 ) + + /* tp_name */ + "pyfshfs.extended_attributes", + /* tp_basicsize */ + sizeof( pyfshfs_extended_attributes_t ), + /* tp_itemsize */ + 0, + /* tp_dealloc */ + (destructor) pyfshfs_extended_attributes_free, + /* tp_print */ + 0, + /* tp_getattr */ + 0, + /* tp_setattr */ + 0, + /* tp_compare */ + 0, + /* tp_repr */ + 0, + /* tp_as_number */ + 0, + /* tp_as_sequence */ + &pyfshfs_extended_attributes_sequence_methods, + /* tp_as_mapping */ + 0, + /* tp_hash */ + 0, + /* tp_call */ + 0, + /* tp_str */ + 0, + /* tp_getattro */ + 0, + /* tp_setattro */ + 0, + /* tp_as_buffer */ + 0, + /* tp_flags */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_ITER, + /* tp_doc */ + "pyfshfs sequence and iterator object of extended attributes", + /* tp_traverse */ + 0, + /* tp_clear */ + 0, + /* tp_richcompare */ + 0, + /* tp_weaklistoffset */ + 0, + /* tp_iter */ + (getiterfunc) pyfshfs_extended_attributes_iter, + /* tp_iternext */ + (iternextfunc) pyfshfs_extended_attributes_iternext, + /* tp_methods */ + 0, + /* tp_members */ + 0, + /* tp_getset */ + 0, + /* tp_base */ + 0, + /* tp_dict */ + 0, + /* tp_descr_get */ + 0, + /* tp_descr_set */ + 0, + /* tp_dictoffset */ + 0, + /* tp_init */ + (initproc) pyfshfs_extended_attributes_init, + /* tp_alloc */ + 0, + /* tp_new */ + 0, + /* tp_free */ + 0, + /* tp_is_gc */ + 0, + /* tp_bases */ + NULL, + /* tp_mro */ + NULL, + /* tp_cache */ + NULL, + /* tp_subclasses */ + NULL, + /* tp_weaklist */ + NULL, + /* tp_del */ + 0 +}; + +/* Creates a new extended attributes sequence and iterator object + * Returns a Python object if successful or NULL on error + */ +PyObject *pyfshfs_extended_attributes_new( + PyObject *parent_object, + PyObject* (*get_item_by_index)( + PyObject *parent_object, + int index ), + int number_of_items ) +{ + pyfshfs_extended_attributes_t *sequence_object = NULL; + static char *function = "pyfshfs_extended_attributes_new"; + + if( parent_object == NULL ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid parent object.", + function ); + + return( NULL ); + } + if( get_item_by_index == NULL ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid get item by index function.", + function ); + + return( NULL ); + } + /* Make sure the extended attributes values are initialized + */ + sequence_object = PyObject_New( + struct pyfshfs_extended_attributes, + &pyfshfs_extended_attributes_type_object ); + + if( sequence_object == NULL ) + { + PyErr_Format( + PyExc_MemoryError, + "%s: unable to create sequence object.", + function ); + + goto on_error; + } + sequence_object->parent_object = parent_object; + sequence_object->get_item_by_index = get_item_by_index; + sequence_object->current_index = 0; + sequence_object->number_of_items = number_of_items; + + Py_IncRef( + (PyObject *) sequence_object->parent_object ); + + return( (PyObject *) sequence_object ); + +on_error: + if( sequence_object != NULL ) + { + Py_DecRef( + (PyObject *) sequence_object ); + } + return( NULL ); +} + +/* Initializes an extended attributes sequence and iterator object + * Returns 0 if successful or -1 on error + */ +int pyfshfs_extended_attributes_init( + pyfshfs_extended_attributes_t *sequence_object ) +{ + static char *function = "pyfshfs_extended_attributes_init"; + + if( sequence_object == NULL ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid sequence object.", + function ); + + return( -1 ); + } + /* Make sure the extended attributes values are initialized + */ + sequence_object->parent_object = NULL; + sequence_object->get_item_by_index = NULL; + sequence_object->current_index = 0; + sequence_object->number_of_items = 0; + + PyErr_Format( + PyExc_NotImplementedError, + "%s: initialize of extended attributes not supported.", + function ); + + return( -1 ); +} + +/* Frees an extended attributes sequence object + */ +void pyfshfs_extended_attributes_free( + pyfshfs_extended_attributes_t *sequence_object ) +{ + struct _typeobject *ob_type = NULL; + static char *function = "pyfshfs_extended_attributes_free"; + + if( sequence_object == NULL ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid sequence object.", + function ); + + return; + } + ob_type = Py_TYPE( + sequence_object ); + + if( ob_type == NULL ) + { + PyErr_Format( + PyExc_ValueError, + "%s: missing ob_type.", + function ); + + return; + } + if( ob_type->tp_free == NULL ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid ob_type - missing tp_free.", + function ); + + return; + } + if( sequence_object->parent_object != NULL ) + { + Py_DecRef( + (PyObject *) sequence_object->parent_object ); + } + ob_type->tp_free( + (PyObject*) sequence_object ); +} + +/* The extended attributes len() function + */ +Py_ssize_t pyfshfs_extended_attributes_len( + pyfshfs_extended_attributes_t *sequence_object ) +{ + static char *function = "pyfshfs_extended_attributes_len"; + + if( sequence_object == NULL ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid sequence object.", + function ); + + return( -1 ); + } + return( (Py_ssize_t) sequence_object->number_of_items ); +} + +/* The extended attributes getitem() function + */ +PyObject *pyfshfs_extended_attributes_getitem( + pyfshfs_extended_attributes_t *sequence_object, + Py_ssize_t item_index ) +{ + PyObject *extended_attribute_object = NULL; + static char *function = "pyfshfs_extended_attributes_getitem"; + + if( sequence_object == NULL ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid sequence object.", + function ); + + return( NULL ); + } + if( sequence_object->get_item_by_index == NULL ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid sequence object - missing get item by index function.", + function ); + + return( NULL ); + } + if( sequence_object->number_of_items < 0 ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid sequence object - invalid number of items.", + function ); + + return( NULL ); + } + if( ( item_index < 0 ) + || ( item_index >= (Py_ssize_t) sequence_object->number_of_items ) ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid invalid item index value out of bounds.", + function ); + + return( NULL ); + } + extended_attribute_object = sequence_object->get_item_by_index( + sequence_object->parent_object, + (int) item_index ); + + return( extended_attribute_object ); +} + +/* The extended attributes iter() function + */ +PyObject *pyfshfs_extended_attributes_iter( + pyfshfs_extended_attributes_t *sequence_object ) +{ + static char *function = "pyfshfs_extended_attributes_iter"; + + if( sequence_object == NULL ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid sequence object.", + function ); + + return( NULL ); + } + Py_IncRef( + (PyObject *) sequence_object ); + + return( (PyObject *) sequence_object ); +} + +/* The extended attributes iternext() function + */ +PyObject *pyfshfs_extended_attributes_iternext( + pyfshfs_extended_attributes_t *sequence_object ) +{ + PyObject *extended_attribute_object = NULL; + static char *function = "pyfshfs_extended_attributes_iternext"; + + if( sequence_object == NULL ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid sequence object.", + function ); + + return( NULL ); + } + if( sequence_object->get_item_by_index == NULL ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid sequence object - missing get item by index function.", + function ); + + return( NULL ); + } + if( sequence_object->current_index < 0 ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid sequence object - invalid current index.", + function ); + + return( NULL ); + } + if( sequence_object->number_of_items < 0 ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid sequence object - invalid number of items.", + function ); + + return( NULL ); + } + if( sequence_object->current_index >= sequence_object->number_of_items ) + { + PyErr_SetNone( + PyExc_StopIteration ); + + return( NULL ); + } + extended_attribute_object = sequence_object->get_item_by_index( + sequence_object->parent_object, + sequence_object->current_index ); + + if( extended_attribute_object != NULL ) + { + sequence_object->current_index++; + } + return( extended_attribute_object ); +} + diff -Nru libfshfs-20201104/pyfshfs/pyfshfs_extended_attributes.h libfshfs-20240221/pyfshfs/pyfshfs_extended_attributes.h --- libfshfs-20201104/pyfshfs/pyfshfs_extended_attributes.h 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/pyfshfs/pyfshfs_extended_attributes.h 2024-02-21 05:48:50.000000000 +0000 @@ -0,0 +1,95 @@ +/* + * Python object definition of the sequence and iterator object of extended attributes + * + * Copyright (C) 2009-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#if !defined( _PYFSHFS_EXTENDED_ATTRIBUTES_H ) +#define _PYFSHFS_EXTENDED_ATTRIBUTES_H + +#include +#include + +#include "pyfshfs_libfshfs.h" +#include "pyfshfs_python.h" + +#if defined( __cplusplus ) +extern "C" { +#endif + +typedef struct pyfshfs_extended_attributes pyfshfs_extended_attributes_t; + +struct pyfshfs_extended_attributes +{ + /* Python object initialization + */ + PyObject_HEAD + + /* The parent object + */ + PyObject *parent_object; + + /* The get item by index callback function + */ + PyObject* (*get_item_by_index)( + PyObject *parent_object, + int index ); + + /* The current index + */ + int current_index; + + /* The number of items + */ + int number_of_items; +}; + +extern PyTypeObject pyfshfs_extended_attributes_type_object; + +PyObject *pyfshfs_extended_attributes_new( + PyObject *parent_object, + PyObject* (*get_item_by_index)( + PyObject *parent_object, + int index ), + int number_of_items ); + +int pyfshfs_extended_attributes_init( + pyfshfs_extended_attributes_t *sequence_object ); + +void pyfshfs_extended_attributes_free( + pyfshfs_extended_attributes_t *sequence_object ); + +Py_ssize_t pyfshfs_extended_attributes_len( + pyfshfs_extended_attributes_t *sequence_object ); + +PyObject *pyfshfs_extended_attributes_getitem( + pyfshfs_extended_attributes_t *sequence_object, + Py_ssize_t item_index ); + +PyObject *pyfshfs_extended_attributes_iter( + pyfshfs_extended_attributes_t *sequence_object ); + +PyObject *pyfshfs_extended_attributes_iternext( + pyfshfs_extended_attributes_t *sequence_object ); + +#if defined( __cplusplus ) +} +#endif + +#endif /* !defined( _PYFSHFS_EXTENDED_ATTRIBUTES_H ) */ + diff -Nru libfshfs-20201104/pyfshfs/pyfshfs_file_entries.c libfshfs-20240221/pyfshfs/pyfshfs_file_entries.c --- libfshfs-20201104/pyfshfs/pyfshfs_file_entries.c 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/pyfshfs/pyfshfs_file_entries.c 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Python object definition of the sequence and iterator object of file entries * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/pyfshfs/pyfshfs_file_entries.h libfshfs-20240221/pyfshfs/pyfshfs_file_entries.h --- libfshfs-20201104/pyfshfs/pyfshfs_file_entries.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/pyfshfs/pyfshfs_file_entries.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Python object definition of the sequence and iterator object of file entries * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/pyfshfs/pyfshfs_file_entry.c libfshfs-20240221/pyfshfs/pyfshfs_file_entry.c --- libfshfs-20201104/pyfshfs/pyfshfs_file_entry.c 2020-11-04 04:22:35.000000000 +0000 +++ libfshfs-20240221/pyfshfs/pyfshfs_file_entry.c 2024-02-21 05:50:44.000000000 +0000 @@ -1,7 +1,7 @@ /* * Python object wrapper of libfshfs_file_entry_t * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -27,8 +27,11 @@ #include #endif +#include "pyfshfs_data_stream.h" #include "pyfshfs_datetime.h" #include "pyfshfs_error.h" +#include "pyfshfs_extended_attribute.h" +#include "pyfshfs_extended_attributes.h" #include "pyfshfs_file_entries.h" #include "pyfshfs_file_entry.h" #include "pyfshfs_integer.h" @@ -151,6 +154,13 @@ "\n" "Retrieves the file mode." }, + { "get_number_of_links", + (PyCFunction) pyfshfs_file_entry_get_number_of_links, + METH_NOARGS, + "get_number_of_links() -> Integer\n" + "\n" + "Retrieves the number of (hard) links." }, + { "get_owner_identifier", (PyCFunction) pyfshfs_file_entry_get_owner_identifier, METH_NOARGS, @@ -165,6 +175,13 @@ "\n" "Retrieves the group identifier." }, + { "get_device_number", + (PyCFunction) pyfshfs_file_entry_get_device_number, + METH_NOARGS, + "get_device_number() -> Tuple(Integer, Integer)\n" + "\n" + "Retrieves the device number." }, + { "get_name", (PyCFunction) pyfshfs_file_entry_get_name, METH_NOARGS, @@ -179,6 +196,48 @@ "\n" "Returns the symbolic link target." }, + { "has_resource_fork", + (PyCFunction) pyfshfs_file_entry_has_resource_fork, + METH_NOARGS, + "has_resource_fork() -> Boolean\n" + "\n" + "Determines if the file entry has a resource fork." }, + + { "get_resource_fork", + (PyCFunction) pyfshfs_file_entry_get_resource_fork, + METH_VARARGS | METH_KEYWORDS, + "get_resource_fork() -> Object or None\n" + "\n" + "Retrieves the resource fork." }, + + { "get_number_of_extended_attributes", + (PyCFunction) pyfshfs_file_entry_get_number_of_extended_attributes, + METH_NOARGS, + "get_number_of_extended_attributes() -> Integer\n" + "\n" + "Retrieves the number of extended attributes." }, + + { "get_extended_attribute", + (PyCFunction) pyfshfs_file_entry_get_extended_attribute, + METH_VARARGS | METH_KEYWORDS, + "get_extended_attribute(extended_attribute_index) -> Object\n" + "\n" + "Retrieves the extended attribute specified by the index." }, + + { "has_extended_attribute_by_name", + (PyCFunction) pyfshfs_file_entry_has_extended_attribute_by_name, + METH_VARARGS | METH_KEYWORDS, + "has_extended_attribute_by_name(name) -> Boolean\n" + "\n" + "Determines if there is an extended attribute specified by the name." }, + + { "get_extended_attribute_by_name", + (PyCFunction) pyfshfs_file_entry_get_extended_attribute_by_name, + METH_VARARGS | METH_KEYWORDS, + "get_extended_attribute_by_name(name) -> Object or None\n" + "\n" + "Retrieves an extended attribute specified by the name." }, + { "get_number_of_sub_file_entries", (PyCFunction) pyfshfs_file_entry_get_number_of_sub_file_entries, METH_NOARGS, @@ -256,6 +315,21 @@ "\n" "Retrieves the size of the data." }, + { "get_number_of_extents", + (PyCFunction) pyfshfs_file_entry_get_number_of_extents, + METH_NOARGS, + "get_number_of_extents() -> Integer\n" + "\n" + "Retrieves the number of extents of the data." }, + + { "get_extent", + (PyCFunction) pyfshfs_file_entry_get_extent, + METH_VARARGS | METH_KEYWORDS, + "get_extent(extent_index) -> Tuple(Integer, Integer, Integer)\n" + "\n" + "Retrieves a specific extent.\n" + "The extent is a tuple of offset, size and flags." }, + /* Sentinel */ { NULL, NULL, 0, NULL } }; @@ -322,6 +396,12 @@ "The file mode.", NULL }, + { "number_of_links", + (getter) pyfshfs_file_entry_get_number_of_links, + (setter) 0, + "The number of (hard) links.", + NULL }, + { "owner_identifier", (getter) pyfshfs_file_entry_get_owner_identifier, (setter) 0, @@ -334,6 +414,12 @@ "The group identifier.", NULL }, + { "device_number", + (getter) pyfshfs_file_entry_get_device_number, + (setter) 0, + "The device number.", + NULL }, + { "name", (getter) pyfshfs_file_entry_get_name, (setter) 0, @@ -346,6 +432,18 @@ "The symbolic link target.", NULL }, + { "number_of_extended_attributes", + (getter) pyfshfs_file_entry_get_number_of_extended_attributes, + (setter) 0, + "The number of extended attributes.", + NULL }, + + { "extended_attributes", + (getter) pyfshfs_file_entry_get_extended_attributes, + (setter) 0, + "The extended attributes.", + NULL }, + { "number_of_sub_file_entries", (getter) pyfshfs_file_entry_get_number_of_sub_file_entries, (setter) 0, @@ -364,6 +462,12 @@ "The size of the data.", NULL }, + { "number_of_extents", + (getter) pyfshfs_file_entry_get_number_of_extents, + (setter) 0, + "The number of extents of the data.", + NULL }, + /* Sentinel */ { NULL, NULL, NULL, NULL, NULL } }; @@ -1508,6 +1612,58 @@ return( integer_object ); } +/* Retrieves the number of (hard) links + * Returns a Python object if successful or NULL on error + */ +PyObject *pyfshfs_file_entry_get_number_of_links( + pyfshfs_file_entry_t *pyfshfs_file_entry, + PyObject *arguments PYFSHFS_ATTRIBUTE_UNUSED ) +{ + PyObject *integer_object = NULL; + libcerror_error_t *error = NULL; + static char *function = "pyfshfs_file_entry_get_number_of_links"; + uint32_t value_32bit = 0; + int result = 0; + + PYFSHFS_UNREFERENCED_PARAMETER( arguments ) + + if( pyfshfs_file_entry == NULL ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid file entry.", + function ); + + return( NULL ); + } + Py_BEGIN_ALLOW_THREADS + + result = libfshfs_file_entry_get_number_of_links( + pyfshfs_file_entry->file_entry, + &value_32bit, + &error ); + + Py_END_ALLOW_THREADS + + if( result != 1 ) + { + pyfshfs_error_raise( + error, + PyExc_IOError, + "%s: unable to retrieve number of (hard) links.", + function ); + + libcerror_error_free( + &error ); + + return( NULL ); + } + integer_object = PyLong_FromUnsignedLong( + (unsigned long) value_32bit ); + + return( integer_object ); +} + /* Retrieves the owner identifier * Returns a Python object if successful or NULL on error */ @@ -1626,6 +1782,113 @@ return( integer_object ); } +/* Retrieves the device number + * Returns a Python object if successful or NULL on error + */ +PyObject *pyfshfs_file_entry_get_device_number( + pyfshfs_file_entry_t *pyfshfs_file_entry, + PyObject *arguments PYFSHFS_ATTRIBUTE_UNUSED ) +{ + PyObject *integer_object = NULL; + PyObject *tuple_object = NULL; + libcerror_error_t *error = NULL; + static char *function = "pyfshfs_file_entry_get_device_number"; + uint32_t major_device_number = 0; + uint32_t minor_device_number = 0; + int result = 0; + + PYFSHFS_UNREFERENCED_PARAMETER( arguments ) + + if( pyfshfs_file_entry == NULL ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid file entry.", + function ); + + return( NULL ); + } + Py_BEGIN_ALLOW_THREADS + + result = libfshfs_file_entry_get_device_number( + pyfshfs_file_entry->file_entry, + &major_device_number, + &minor_device_number, + &error ); + + Py_END_ALLOW_THREADS + + if( result == -1 ) + { + pyfshfs_error_raise( + error, + PyExc_IOError, + "%s: unable to retrieve device number.", + function ); + + libcerror_error_free( + &error ); + + return( NULL ); + } + else if( result == 0 ) + { + Py_IncRef( + Py_None ); + + return( Py_None ); + } + tuple_object = PyTuple_New( + 2 ); + +#if PY_MAJOR_VERSION >= 3 + integer_object = PyLong_FromLong( + (long) major_device_number ); +#else + integer_object = PyInt_FromLong( + (long) major_device_number ); +#endif + /* Tuple set item does not increment the reference count of the integer object + */ + if( PyTuple_SetItem( + tuple_object, + 0, + integer_object ) != 0 ) + { + goto on_error; + } +#if PY_MAJOR_VERSION >= 3 + integer_object = PyLong_FromLong( + (long) minor_device_number ); +#else + integer_object = PyInt_FromLong( + (long) minor_device_number ); +#endif + /* Tuple set item does not increment the reference count of the integer object + */ + if( PyTuple_SetItem( + tuple_object, + 1, + integer_object ) != 0 ) + { + goto on_error; + } + return( tuple_object ); + +on_error: + if( integer_object != NULL ) + { + Py_DecRef( + (PyObject *) integer_object ); + } + if( tuple_object != NULL ) + { + Py_DecRef( + (PyObject *) tuple_object ); + } + return( NULL ); +} + /* Retrieves the name * Returns a Python object if successful or NULL on error */ @@ -1636,7 +1899,6 @@ PyObject *string_object = NULL; libcerror_error_t *error = NULL; uint8_t *name = NULL; - const char *errors = NULL; static char *function = "pyfshfs_file_entry_get_name"; size_t name_size = 0; int result = 0; @@ -1688,7 +1950,7 @@ if( name == NULL ) { PyErr_Format( - PyExc_IOError, + PyExc_MemoryError, "%s: unable to create name.", function ); @@ -1724,7 +1986,7 @@ string_object = PyUnicode_DecodeUTF8( (char *) name, (Py_ssize_t) name_size - 1, - errors ); + NULL ); PyMem_Free( name ); @@ -1749,7 +2011,6 @@ { libcerror_error_t *error = NULL; PyObject *string_object = NULL; - const char *errors = NULL; uint8_t *target = NULL; static char *function = "pyfshfs_file_entry_get_symbolic_link_target"; size_t target_size = 0; @@ -1802,7 +2063,7 @@ if( target == NULL ) { PyErr_Format( - PyExc_IOError, + PyExc_MemoryError, "%s: unable to create target.", function ); @@ -1838,7 +2099,7 @@ string_object = PyUnicode_DecodeUTF8( (char *) target, (Py_ssize_t) target_size - 1, - errors ); + NULL ); PyMem_Free( target ); @@ -1854,6 +2115,529 @@ return( NULL ); } +/* Determines if the file entry has a resource fork + * Returns a Python object if successful or NULL on error + */ +PyObject *pyfshfs_file_entry_has_resource_fork( + pyfshfs_file_entry_t *pyfshfs_file_entry, + PyObject *arguments PYFSHFS_ATTRIBUTE_UNUSED ) +{ + libcerror_error_t *error = NULL; + static char *function = "pyfshfs_file_entry_has_resource_fork"; + int result = 0; + + PYFSHFS_UNREFERENCED_PARAMETER( arguments ) + + if( pyfshfs_file_entry == NULL ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid file entry.", + function ); + + return( NULL ); + } + Py_BEGIN_ALLOW_THREADS + + result = libfshfs_file_entry_has_resource_fork( + pyfshfs_file_entry->file_entry, + &error ); + + Py_END_ALLOW_THREADS + + if( result == -1 ) + { + pyfshfs_error_raise( + error, + PyExc_IOError, + "%s: unable to determine if file entry has a resource fork.", + function ); + + libcerror_error_free( + &error ); + + return( NULL ); + } + else if( result != 0 ) + { + Py_IncRef( + (PyObject *) Py_True ); + + return( Py_True ); + } + Py_IncRef( + (PyObject *) Py_False ); + + return( Py_False ); +} + +/* Retrieves the resource fork + * Returns a Python object if successful or NULL on error + */ +PyObject *pyfshfs_file_entry_get_resource_fork( + pyfshfs_file_entry_t *pyfshfs_file_entry, + PyObject *arguments PYFSHFS_ATTRIBUTE_UNUSED ) +{ + PyObject *data_stream_object = NULL; + libcerror_error_t *error = NULL; + libfshfs_data_stream_t *data_stream = NULL; + static char *function = "pyfshfs_file_entry_get_resource_fork"; + int result = 0; + + PYFSHFS_UNREFERENCED_PARAMETER( arguments ) + + if( pyfshfs_file_entry == NULL ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid file entry.", + function ); + + return( NULL ); + } + Py_BEGIN_ALLOW_THREADS + + result = libfshfs_file_entry_get_resource_fork( + ( (pyfshfs_file_entry_t *) pyfshfs_file_entry )->file_entry, + &data_stream, + &error ); + + Py_END_ALLOW_THREADS + + if( result == -1 ) + { + pyfshfs_error_raise( + error, + PyExc_IOError, + "%s: unable to retrieve resource fork.", + function ); + + libcerror_error_free( + &error ); + + goto on_error; + } + else if( result == 0 ) + { + Py_IncRef( + Py_None ); + + return( Py_None ); + } + data_stream_object = pyfshfs_data_stream_new( + data_stream, + (PyObject *) pyfshfs_file_entry ); + + if( data_stream_object == NULL ) + { + PyErr_Format( + PyExc_MemoryError, + "%s: unable to create data stream object.", + function ); + + goto on_error; + } + return( data_stream_object ); + +on_error: + if( data_stream != NULL ) + { + libfshfs_data_stream_free( + &data_stream, + NULL ); + } + return( NULL ); +} + +/* Retrieves the number of extended attributes + * Returns a Python object if successful or NULL on error + */ +PyObject *pyfshfs_file_entry_get_number_of_extended_attributes( + pyfshfs_file_entry_t *pyfshfs_file_entry, + PyObject *arguments PYFSHFS_ATTRIBUTE_UNUSED ) +{ + PyObject *integer_object = NULL; + libcerror_error_t *error = NULL; + static char *function = "pyfshfs_file_entry_get_number_of_extended_attributes"; + int number_of_extended_attributes = 0; + int result = 0; + + PYFSHFS_UNREFERENCED_PARAMETER( arguments ) + + if( pyfshfs_file_entry == NULL ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid file entry.", + function ); + + return( NULL ); + } + Py_BEGIN_ALLOW_THREADS + + result = libfshfs_file_entry_get_number_of_extended_attributes( + pyfshfs_file_entry->file_entry, + &number_of_extended_attributes, + &error ); + + Py_END_ALLOW_THREADS + + if( result != 1 ) + { + pyfshfs_error_raise( + error, + PyExc_IOError, + "%s: unable to retrieve .", + function ); + + libcerror_error_free( + &error ); + + return( NULL ); + } +#if PY_MAJOR_VERSION >= 3 + integer_object = PyLong_FromLong( + (long) number_of_extended_attributes ); +#else + integer_object = PyInt_FromLong( + (long) number_of_extended_attributes ); +#endif + return( integer_object ); +} + +/* Retrieves a specific extended attribute by index + * Returns a Python object if successful or NULL on error + */ +PyObject *pyfshfs_file_entry_get_extended_attribute_by_index( + PyObject *pyfshfs_file_entry, + int extended_attribute_index ) +{ + PyObject *extended_attribute_object = NULL; + libcerror_error_t *error = NULL; + libfshfs_extended_attribute_t *extended_attribute = NULL; + static char *function = "pyfshfs_file_entry_get_extended_attribute_by_index"; + int result = 0; + + if( pyfshfs_file_entry == NULL ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid file entry.", + function ); + + return( NULL ); + } + Py_BEGIN_ALLOW_THREADS + + result = libfshfs_file_entry_get_extended_attribute_by_index( + ( (pyfshfs_file_entry_t *) pyfshfs_file_entry )->file_entry, + extended_attribute_index, + &extended_attribute, + &error ); + + Py_END_ALLOW_THREADS + + if( result != 1 ) + { + pyfshfs_error_raise( + error, + PyExc_IOError, + "%s: unable to retrieve : %d.", + function, + extended_attribute_index ); + + libcerror_error_free( + &error ); + + goto on_error; + } + extended_attribute_object = pyfshfs_extended_attribute_new( + extended_attribute, + pyfshfs_file_entry ); + + if( extended_attribute_object == NULL ) + { + PyErr_Format( + PyExc_MemoryError, + "%s: unable to create extended attribute object.", + function ); + + goto on_error; + } + return( extended_attribute_object ); + +on_error: + if( extended_attribute != NULL ) + { + libfshfs_extended_attribute_free( + &extended_attribute, + NULL ); + } + return( NULL ); +} + +/* Retrieves a specific extended attribute + * Returns a Python object if successful or NULL on error + */ +PyObject *pyfshfs_file_entry_get_extended_attribute( + pyfshfs_file_entry_t *pyfshfs_file_entry, + PyObject *arguments, + PyObject *keywords ) +{ + PyObject *extended_attribute_object = NULL; + static char *keyword_list[] = { "extended_attribute_index", NULL }; + int extended_attribute_index = 0; + + if( PyArg_ParseTupleAndKeywords( + arguments, + keywords, + "i", + keyword_list, + &extended_attribute_index ) == 0 ) + { + return( NULL ); + } + extended_attribute_object = pyfshfs_file_entry_get_extended_attribute_by_index( + (PyObject *) pyfshfs_file_entry, + extended_attribute_index ); + + return( extended_attribute_object ); +} + +/* Retrieves a sequence and iterator object for the extended attributes + * Returns a Python object if successful or NULL on error + */ +PyObject *pyfshfs_file_entry_get_extended_attributes( + pyfshfs_file_entry_t *pyfshfs_file_entry, + PyObject *arguments PYFSHFS_ATTRIBUTE_UNUSED ) +{ + PyObject *sequence_object = NULL; + libcerror_error_t *error = NULL; + static char *function = "pyfshfs_file_entry_get_extended_attributes"; + int number_of_extended_attributes = 0; + int result = 0; + + PYFSHFS_UNREFERENCED_PARAMETER( arguments ) + + if( pyfshfs_file_entry == NULL ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid file entry.", + function ); + + return( NULL ); + } + Py_BEGIN_ALLOW_THREADS + + result = libfshfs_file_entry_get_number_of_extended_attributes( + pyfshfs_file_entry->file_entry, + &number_of_extended_attributes, + &error ); + + Py_END_ALLOW_THREADS + + if( result != 1 ) + { + pyfshfs_error_raise( + error, + PyExc_IOError, + "%s: unable to retrieve number of extended attributes.", + function ); + + libcerror_error_free( + &error ); + + return( NULL ); + } + sequence_object = pyfshfs_extended_attributes_new( + (PyObject *) pyfshfs_file_entry, + &pyfshfs_file_entry_get_extended_attribute_by_index, + number_of_extended_attributes ); + + if( sequence_object == NULL ) + { + pyfshfs_error_raise( + error, + PyExc_MemoryError, + "%s: unable to create sequence object.", + function ); + + return( NULL ); + } + return( sequence_object ); +} + +/* Determines if there is an extended attribute specified by the name + * Returns a Python object if successful or NULL on error + */ +PyObject *pyfshfs_file_entry_has_extended_attribute_by_name( + pyfshfs_file_entry_t *pyfshfs_file_entry, + PyObject *arguments, + PyObject *keywords ) +{ + libcerror_error_t *error = NULL; + char *extended_attribute_name = NULL; + static char *keyword_list[] = { "extended_attribute_name", NULL }; + static char *function = "pyfshfs_file_entry_has_extended_attribute_by_name"; + size_t extended_attribute_name_length = 0; + int result = 0; + + if( pyfshfs_file_entry == NULL ) + { + PyErr_Format( + PyExc_TypeError, + "%s: invalid file entry.", + function ); + + return( NULL ); + } + if( PyArg_ParseTupleAndKeywords( + arguments, + keywords, + "s", + keyword_list, + &extended_attribute_name ) == 0 ) + { + return( NULL ); + } + extended_attribute_name_length = narrow_string_length( + extended_attribute_name ); + + Py_BEGIN_ALLOW_THREADS + + result = libfshfs_file_entry_has_extended_attribute_by_utf8_name( + pyfshfs_file_entry->file_entry, + (uint8_t *) extended_attribute_name, + extended_attribute_name_length, + &error ); + + Py_END_ALLOW_THREADS + + if( result == -1 ) + { + pyfshfs_error_raise( + error, + PyExc_IOError, + "%s: unable to determine if extended attribute exists.", + function ); + + libcerror_error_free( + &error ); + + return( NULL ); + } + /* Check if the extended attribute is present + */ + if( result != 0 ) + { + Py_IncRef( + (PyObject *) Py_True ); + + return( Py_True ); + } + Py_IncRef( + (PyObject *) Py_False ); + + return( Py_False ); +} + +/* Retrieves the extended attribute specified by the name + * Returns a Python object if successful or NULL on error + */ +PyObject *pyfshfs_file_entry_get_extended_attribute_by_name( + pyfshfs_file_entry_t *pyfshfs_file_entry, + PyObject *arguments, + PyObject *keywords ) +{ + libcerror_error_t *error = NULL; + libfshfs_extended_attribute_t *extended_attribute = NULL; + PyObject *extended_attribute_object = NULL; + char *extended_attribute_name = NULL; + static char *keyword_list[] = { "extended_attribute_name", NULL }; + static char *function = "pyfshfs_file_entry_get_extended_attribute_by_name"; + size_t extended_attribute_name_length = 0; + int result = 0; + + if( pyfshfs_file_entry == NULL ) + { + PyErr_Format( + PyExc_TypeError, + "%s: invalid file entry.", + function ); + + return( NULL ); + } + if( PyArg_ParseTupleAndKeywords( + arguments, + keywords, + "s", + keyword_list, + &extended_attribute_name ) == 0 ) + { + goto on_error; + } + extended_attribute_name_length = narrow_string_length( + extended_attribute_name ); + + Py_BEGIN_ALLOW_THREADS + + result = libfshfs_file_entry_get_extended_attribute_by_utf8_name( + pyfshfs_file_entry->file_entry, + (uint8_t *) extended_attribute_name, + extended_attribute_name_length, + &extended_attribute, + &error ); + + Py_END_ALLOW_THREADS + + if( result == -1 ) + { + pyfshfs_error_raise( + error, + PyExc_IOError, + "%s: unable to retrieve extended attribute.", + function ); + + libcerror_error_free( + &error ); + + goto on_error; + } + /* Check if the extended attribute is present + */ + else if( result == 0 ) + { + Py_IncRef( + Py_None ); + + return( Py_None ); + } + extended_attribute_object = pyfshfs_extended_attribute_new( + extended_attribute, + (PyObject *) pyfshfs_file_entry ); + + if( extended_attribute_object == NULL ) + { + PyErr_Format( + PyExc_MemoryError, + "%s: unable to create extended attribute object.", + function ); + + goto on_error; + } + return( extended_attribute_object ); + +on_error: + if( extended_attribute != NULL ) + { + libfshfs_extended_attribute_free( + &extended_attribute, + NULL ); + } + return( NULL ); +} + /* Retrieves the number of sub file entries * Returns a Python object if successful or NULL on error */ @@ -2769,3 +3553,193 @@ return( integer_object ); } +/* Retrieves the number of extents of the data + * Returns a Python object if successful or NULL on error + */ +PyObject *pyfshfs_file_entry_get_number_of_extents( + pyfshfs_file_entry_t *pyfshfs_file_entry, + PyObject *arguments PYFSHFS_ATTRIBUTE_UNUSED ) +{ + PyObject *integer_object = NULL; + libcerror_error_t *error = NULL; + static char *function = "pyfshfs_file_entry_get_number_of_extents"; + int number_of_extents = 0; + int result = 0; + + PYFSHFS_UNREFERENCED_PARAMETER( arguments ) + + if( pyfshfs_file_entry == NULL ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid file entry.", + function ); + + return( NULL ); + } + Py_BEGIN_ALLOW_THREADS + + result = libfshfs_file_entry_get_number_of_extents( + pyfshfs_file_entry->file_entry, + &number_of_extents, + &error ); + + Py_END_ALLOW_THREADS + + if( result != 1 ) + { + pyfshfs_error_raise( + error, + PyExc_IOError, + "%s: unable to retrieve number of extents of the data.", + function ); + + libcerror_error_free( + &error ); + + return( NULL ); + } +#if PY_MAJOR_VERSION >= 3 + integer_object = PyLong_FromLong( + (long) number_of_extents ); +#else + integer_object = PyInt_FromLong( + (long) number_of_extents ); +#endif + return( integer_object ); +} + +/* Retrieves a specific extent by index + * Returns a Python object if successful or NULL on error + */ +PyObject *pyfshfs_file_entry_get_extent_by_index( + pyfshfs_file_entry_t *pyfshfs_file_entry, + int extent_index ) +{ + libcerror_error_t *error = NULL; + PyObject *integer_object = NULL; + PyObject *tuple_object = NULL; + static char *function = "pyfshfs_file_entry_get_extent_by_index"; + off64_t extent_offset = 0; + size64_t extent_size = 0; + uint32_t extent_flags = 0; + int result = 0; + + if( pyfshfs_file_entry == NULL ) + { + PyErr_Format( + PyExc_ValueError, + "%s: invalid file entry.", + function ); + + return( NULL ); + } + Py_BEGIN_ALLOW_THREADS + + result = libfshfs_file_entry_get_extent_by_index( + pyfshfs_file_entry->file_entry, + extent_index, + &extent_offset, + &extent_size, + &extent_flags, + &error ); + + Py_END_ALLOW_THREADS + + if( result != 1 ) + { + pyfshfs_error_raise( + error, + PyExc_IOError, + "%s: unable to retrieve extent: %d.", + function, + extent_index ); + + libcerror_error_free( + &error ); + + goto on_error; + } + tuple_object = PyTuple_New( + 3 ); + + integer_object = pyfshfs_integer_signed_new_from_64bit( + (int64_t) extent_offset ); + + /* Tuple set item does not increment the reference count of the integer object + */ + if( PyTuple_SetItem( + tuple_object, + 0, + integer_object ) != 0 ) + { + goto on_error; + } + integer_object = pyfshfs_integer_unsigned_new_from_64bit( + (uint64_t) extent_size ); + + /* Tuple set item does not increment the reference count of the integer object + */ + if( PyTuple_SetItem( + tuple_object, + 1, + integer_object ) != 0 ) + { + goto on_error; + } + integer_object = pyfshfs_integer_unsigned_new_from_64bit( + (uint64_t) extent_flags ); + + /* Tuple set item does not increment the reference count of the integer object + */ + if( PyTuple_SetItem( + tuple_object, + 2, + integer_object ) != 0 ) + { + goto on_error; + } + return( tuple_object ); + +on_error: + if( integer_object != NULL ) + { + Py_DecRef( + (PyObject *) integer_object ); + } + if( tuple_object != NULL ) + { + Py_DecRef( + (PyObject *) tuple_object ); + } + return( NULL ); +} + +/* Retrieves a specific extent + * Returns a Python object if successful or NULL on error + */ +PyObject *pyfshfs_file_entry_get_extent( + pyfshfs_file_entry_t *pyfshfs_file_entry, + PyObject *arguments, + PyObject *keywords ) +{ + PyObject *sequence_object = NULL; + static char *keyword_list[] = { "extent_index", NULL }; + int extent_index = 0; + + if( PyArg_ParseTupleAndKeywords( + arguments, + keywords, + "i", + keyword_list, + &extent_index ) == 0 ) + { + return( NULL ); + } + sequence_object = pyfshfs_file_entry_get_extent_by_index( + pyfshfs_file_entry, + extent_index ); + + return( sequence_object ); +} + diff -Nru libfshfs-20201104/pyfshfs/pyfshfs_file_entry.h libfshfs-20240221/pyfshfs/pyfshfs_file_entry.h --- libfshfs-20201104/pyfshfs/pyfshfs_file_entry.h 2020-11-04 04:22:35.000000000 +0000 +++ libfshfs-20240221/pyfshfs/pyfshfs_file_entry.h 2024-02-21 05:50:44.000000000 +0000 @@ -1,7 +1,7 @@ /* * Python object wrapper of libfshfs_file_entry_t * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -126,6 +126,10 @@ pyfshfs_file_entry_t *pyfshfs_file_entry, PyObject *arguments ); +PyObject *pyfshfs_file_entry_get_number_of_links( + pyfshfs_file_entry_t *pyfshfs_file_entry, + PyObject *arguments ); + PyObject *pyfshfs_file_entry_get_owner_identifier( pyfshfs_file_entry_t *pyfshfs_file_entry, PyObject *arguments ); @@ -134,6 +138,10 @@ pyfshfs_file_entry_t *pyfshfs_file_entry, PyObject *arguments ); +PyObject *pyfshfs_file_entry_get_device_number( + pyfshfs_file_entry_t *pyfshfs_file_entry, + PyObject *arguments ); + PyObject *pyfshfs_file_entry_get_name( pyfshfs_file_entry_t *pyfshfs_file_entry, PyObject *arguments ); @@ -142,6 +150,41 @@ pyfshfs_file_entry_t *pyfshfs_file_entry, PyObject *arguments ); +PyObject *pyfshfs_file_entry_has_resource_fork( + pyfshfs_file_entry_t *pyfshfs_file_entry, + PyObject *arguments ); + +PyObject *pyfshfs_file_entry_get_resource_fork( + pyfshfs_file_entry_t *pyfshfs_file_entry, + PyObject *arguments ); + +PyObject *pyfshfs_file_entry_get_number_of_extended_attributes( + pyfshfs_file_entry_t *pyfshfs_file_entry, + PyObject *arguments ); + +PyObject *pyfshfs_file_entry_get_extended_attribute_by_index( + PyObject *pyfshfs_file_entry, + int extended_attribute_index ); + +PyObject *pyfshfs_file_entry_get_extended_attribute( + pyfshfs_file_entry_t *pyfshfs_file_entry, + PyObject *arguments, + PyObject *keywords ); + +PyObject *pyfshfs_file_entry_get_extended_attributes( + pyfshfs_file_entry_t *pyfshfs_file_entry, + PyObject *arguments ); + +PyObject *pyfshfs_file_entry_has_extended_attribute_by_name( + pyfshfs_file_entry_t *pyfshfs_file_entry, + PyObject *arguments, + PyObject *keywords ); + +PyObject *pyfshfs_file_entry_get_extended_attribute_by_name( + pyfshfs_file_entry_t *pyfshfs_file_entry, + PyObject *arguments, + PyObject *keywords ); + PyObject *pyfshfs_file_entry_get_number_of_sub_file_entries( pyfshfs_file_entry_t *pyfshfs_file_entry, PyObject *arguments ); @@ -187,6 +230,19 @@ pyfshfs_file_entry_t *pyfshfs_file_entry, PyObject *arguments ); +PyObject *pyfshfs_file_entry_get_number_of_extents( + pyfshfs_file_entry_t *pyfshfs_file_entry, + PyObject *arguments ); + +PyObject *pyfshfs_file_entry_get_extent_by_index( + pyfshfs_file_entry_t *pyfshfs_file_entry, + int extent_index ); + +PyObject *pyfshfs_file_entry_get_extent( + pyfshfs_file_entry_t *pyfshfs_file_entry, + PyObject *arguments, + PyObject *keywords ); + #if defined( __cplusplus ) } #endif diff -Nru libfshfs-20201104/pyfshfs/pyfshfs_file_object_io_handle.c libfshfs-20240221/pyfshfs/pyfshfs_file_object_io_handle.c --- libfshfs-20201104/pyfshfs/pyfshfs_file_object_io_handle.c 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/pyfshfs/pyfshfs_file_object_io_handle.c 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Python file object IO handle functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -232,13 +232,13 @@ Py_DecRef( ( *file_object_io_handle )->file_object ); - PyGILState_Release( - gil_state ); - PyMem_Free( *file_object_io_handle ); *file_object_io_handle = NULL; + + PyGILState_Release( + gil_state ); } return( 1 ); } @@ -578,7 +578,7 @@ error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, - "%s: unable to data to buffer.", + "%s: unable to copy data to buffer.", function ); goto on_error; diff -Nru libfshfs-20201104/pyfshfs/pyfshfs_file_object_io_handle.h libfshfs-20240221/pyfshfs/pyfshfs_file_object_io_handle.h --- libfshfs-20201104/pyfshfs/pyfshfs_file_object_io_handle.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/pyfshfs/pyfshfs_file_object_io_handle.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Python file object IO handle functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/pyfshfs/pyfshfs_integer.c libfshfs-20240221/pyfshfs/pyfshfs_integer.c --- libfshfs-20201104/pyfshfs/pyfshfs_integer.c 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/pyfshfs/pyfshfs_integer.c 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Integer functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/pyfshfs/pyfshfs_integer.h libfshfs-20240221/pyfshfs/pyfshfs_integer.h --- libfshfs-20201104/pyfshfs/pyfshfs_integer.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/pyfshfs/pyfshfs_integer.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Integer functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/pyfshfs/pyfshfs_libbfio.h libfshfs-20240221/pyfshfs/pyfshfs_libbfio.h --- libfshfs-20201104/pyfshfs/pyfshfs_libbfio.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/pyfshfs/pyfshfs_libbfio.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libbfio header wrapper * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/pyfshfs/pyfshfs_libcerror.h libfshfs-20240221/pyfshfs/pyfshfs_libcerror.h --- libfshfs-20201104/pyfshfs/pyfshfs_libcerror.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/pyfshfs/pyfshfs_libcerror.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libcerror header wrapper * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/pyfshfs/pyfshfs_libfshfs.h libfshfs-20240221/pyfshfs/pyfshfs_libfshfs.h --- libfshfs-20201104/pyfshfs/pyfshfs_libfshfs.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/pyfshfs/pyfshfs_libfshfs.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The internal libfshfs header * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/pyfshfs/pyfshfs_python.h libfshfs-20240221/pyfshfs/pyfshfs_python.h --- libfshfs-20201104/pyfshfs/pyfshfs_python.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/pyfshfs/pyfshfs_python.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The python header wrapper * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -43,6 +43,13 @@ #endif /* PY_MAJOR_VERSION < 3 */ +/* Define PY_SSIZE_T_CLEAN to silence: + * DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats + * + * PY_SSIZE_T_CLEAN was introduced in Python 2.5 + */ +#define PY_SSIZE_T_CLEAN + #include /* Python compatibility macros diff -Nru libfshfs-20201104/pyfshfs/pyfshfs_unused.h libfshfs-20240221/pyfshfs/pyfshfs_unused.h --- libfshfs-20201104/pyfshfs/pyfshfs_unused.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/pyfshfs/pyfshfs_unused.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Definitions to silence compiler warnings about unused function attributes/parameters. * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/pyfshfs/pyfshfs_volume.c libfshfs-20240221/pyfshfs/pyfshfs_volume.c --- libfshfs-20201104/pyfshfs/pyfshfs_volume.c 2020-11-04 04:22:35.000000000 +0000 +++ libfshfs-20240221/pyfshfs/pyfshfs_volume.c 2024-02-21 05:50:44.000000000 +0000 @@ -1,7 +1,7 @@ /* * Python object wrapper of libfshfs_volume_t * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -304,6 +304,15 @@ return; } + if( pyfshfs_volume->file_io_handle != NULL ) + { + if( pyfshfs_volume_close( + pyfshfs_volume, + NULL ) == NULL ) + { + return; + } + } if( pyfshfs_volume->volume != NULL ) { Py_BEGIN_ALLOW_THREADS @@ -456,8 +465,14 @@ PyErr_Clear(); #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) +#if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 3 + filename_wide = (wchar_t *) PyUnicode_AsWideCharString( + string_object, + NULL ); +#else filename_wide = (wchar_t *) PyUnicode_AsUnicode( string_object ); +#endif Py_BEGIN_ALLOW_THREADS result = libfshfs_volume_open_wide( @@ -467,6 +482,11 @@ &error ); Py_END_ALLOW_THREADS + +#if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 3 + PyMem_Free( + filename_wide ); +#endif #else utf8_string_object = PyUnicode_AsUTF8String( string_object ); @@ -806,7 +826,6 @@ { PyObject *string_object = NULL; libcerror_error_t *error = NULL; - const char *errors = NULL; static char *function = "pyfshfs_volume_get_name"; char *utf8_string = NULL; size_t utf8_string_size = 0; @@ -894,7 +913,7 @@ string_object = PyUnicode_DecodeUTF8( utf8_string, (Py_ssize_t) utf8_string_size - 1, - errors ); + NULL ); if( string_object == NULL ) { diff -Nru libfshfs-20201104/pyfshfs/pyfshfs_volume.h libfshfs-20240221/pyfshfs/pyfshfs_volume.h --- libfshfs-20201104/pyfshfs/pyfshfs_volume.h 2020-11-04 04:19:44.000000000 +0000 +++ libfshfs-20240221/pyfshfs/pyfshfs_volume.h 2024-02-21 05:50:44.000000000 +0000 @@ -1,7 +1,7 @@ /* * Python object wrapper of libfshfs_volume_t * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/pyfshfs-python2/Makefile.am libfshfs-20240221/pyfshfs-python2/Makefile.am --- libfshfs-20201104/pyfshfs-python2/Makefile.am 2020-11-04 04:19:40.000000000 +0000 +++ libfshfs-20240221/pyfshfs-python2/Makefile.am 1970-01-01 00:00:00.000000000 +0000 @@ -1,71 +0,0 @@ -# Note that we cannot use: AUTOMAKE_OPTIONS = subdir-objects -# subdir-objects will compile the source files to a single version of Python. -# Since subdir-objects is being deprecated we copy the source files instead. -am__installdirs = "$(DESTDIR)$(pyexecdir2)" -pyexecdir = $(pyexecdir2) - -if HAVE_PYTHON2 -AM_CFLAGS = \ - -I$(top_srcdir)/include \ - -I$(top_srcdir)/common \ - @LIBCERROR_CPPFLAGS@ \ - @LIBCDATA_CPPFLAGS@ \ - @LIBCLOCALE_CPPFLAGS@ \ - @LIBCSPLIT_CPPFLAGS@ \ - @LIBUNA_CPPFLAGS@ \ - @LIBCFILE_CPPFLAGS@ \ - @LIBCPATH_CPPFLAGS@ \ - @LIBBFIO_CPPFLAGS@ \ - @LIBFGUID_CPPFLAGS@ \ - @LIBFSHFS_DLL_IMPORT@ - -am_pyfshfs_la_rpath = -rpath $(pyexecdir2) - -BUILT_SOURCES = \ - pyfshfs.c pyfshfs.h \ - pyfshfs_datetime.c pyfshfs_datetime.h \ - pyfshfs_error.c pyfshfs_error.h \ - pyfshfs_file_entry.c pyfshfs_file_entry.h \ - pyfshfs_file_entries.c pyfshfs_file_entries.h \ - pyfshfs_file_object_io_handle.c pyfshfs_file_object_io_handle.h \ - pyfshfs_integer.c pyfshfs_integer.h \ - pyfshfs_libbfio.h \ - pyfshfs_libcerror.h \ - pyfshfs_libfshfs.h \ - pyfshfs_python.h \ - pyfshfs_unused.h \ - pyfshfs_volume.c pyfshfs_volume.h - -pyexec_LTLIBRARIES = pyfshfs.la - -nodist_pyfshfs_la_SOURCES = $(BUILT_SOURCES) - -pyfshfs_la_LIBADD = \ - @LIBCERROR_LIBADD@ \ - ../libfshfs/libfshfs.la \ - @LIBCDATA_LIBADD@ \ - @LIBCLOCALE_LIBADD@ \ - @LIBCSPLIT_LIBADD@ \ - @LIBUNA_LIBADD@ \ - @LIBCFILE_LIBADD@ \ - @LIBCPATH_LIBADD@ \ - @LIBBFIO_LIBADD@ \ - @LIBFGUID_LIBADD@ - -pyfshfs_la_CPPFLAGS = $(PYTHON2_CPPFLAGS) -pyfshfs_la_LDFLAGS = -module -avoid-version $(PYTHON2_LDFLAGS) - -$(BUILT_SOURCES): - /bin/cp -f $(top_srcdir)/pyfshfs/$@ $@ - -endif - -MAINTAINERCLEANFILES = \ - Makefile.in - -clean-local: - /bin/rm -f pyfshfs*.[ch] - -distclean: clean - /bin/rm -f Makefile - diff -Nru libfshfs-20201104/pyfshfs-python2/Makefile.in libfshfs-20240221/pyfshfs-python2/Makefile.in --- libfshfs-20201104/pyfshfs-python2/Makefile.in 2020-11-04 11:56:31.000000000 +0000 +++ libfshfs-20240221/pyfshfs-python2/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,1056 +0,0 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2018 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = pyfshfs-python2 -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcdata.m4 \ - $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \ - $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \ - $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcrypto.m4 \ - $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcthreads.m4 \ - $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ - $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ - $(top_srcdir)/m4/libhmac.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/libuna.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \ - $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \ - $(top_srcdir)/m4/zlib.m4 $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/common/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -LTLIBRARIES = $(pyexec_LTLIBRARIES) -@HAVE_PYTHON2_TRUE@pyfshfs_la_DEPENDENCIES = ../libfshfs/libfshfs.la -@HAVE_PYTHON2_TRUE@am__objects_1 = pyfshfs_la-pyfshfs.lo \ -@HAVE_PYTHON2_TRUE@ pyfshfs_la-pyfshfs_datetime.lo \ -@HAVE_PYTHON2_TRUE@ pyfshfs_la-pyfshfs_error.lo \ -@HAVE_PYTHON2_TRUE@ pyfshfs_la-pyfshfs_file_entry.lo \ -@HAVE_PYTHON2_TRUE@ pyfshfs_la-pyfshfs_file_entries.lo \ -@HAVE_PYTHON2_TRUE@ pyfshfs_la-pyfshfs_file_object_io_handle.lo \ -@HAVE_PYTHON2_TRUE@ pyfshfs_la-pyfshfs_integer.lo \ -@HAVE_PYTHON2_TRUE@ pyfshfs_la-pyfshfs_volume.lo -@HAVE_PYTHON2_TRUE@nodist_pyfshfs_la_OBJECTS = $(am__objects_1) -pyfshfs_la_OBJECTS = $(nodist_pyfshfs_la_OBJECTS) -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -am__v_lt_1 = -pyfshfs_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(pyfshfs_la_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__maybe_remake_depfiles = depfiles -am__depfiles_remade = ./$(DEPDIR)/pyfshfs_la-pyfshfs.Plo \ - ./$(DEPDIR)/pyfshfs_la-pyfshfs_datetime.Plo \ - ./$(DEPDIR)/pyfshfs_la-pyfshfs_error.Plo \ - ./$(DEPDIR)/pyfshfs_la-pyfshfs_file_entries.Plo \ - ./$(DEPDIR)/pyfshfs_la-pyfshfs_file_entry.Plo \ - ./$(DEPDIR)/pyfshfs_la-pyfshfs_file_object_io_handle.Plo \ - ./$(DEPDIR)/pyfshfs_la-pyfshfs_integer.Plo \ - ./$(DEPDIR)/pyfshfs_la-pyfshfs_volume.Plo -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_@AM_V@) -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -am__v_CC_1 = -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = -SOURCES = $(nodist_pyfshfs_la_SOURCES) -DIST_SOURCES = -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DPKG_DATE = @DPKG_DATE@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ -GMSGFMT = @GMSGFMT@ -GMSGFMT_015 = @GMSGFMT_015@ -GREP = @GREP@ -HAVE_DLLMAIN = @HAVE_DLLMAIN@ -HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ -HAVE_LIBBFIO = @HAVE_LIBBFIO@ -HAVE_LIBCDATA = @HAVE_LIBCDATA@ -HAVE_LIBCERROR = @HAVE_LIBCERROR@ -HAVE_LIBCFILE = @HAVE_LIBCFILE@ -HAVE_LIBCLOCALE = @HAVE_LIBCLOCALE@ -HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@ -HAVE_LIBCPATH = @HAVE_LIBCPATH@ -HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@ -HAVE_LIBCTHREADS = @HAVE_LIBCTHREADS@ -HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ -HAVE_LIBFDATA = @HAVE_LIBFDATA@ -HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ -HAVE_LIBFGUID = @HAVE_LIBFGUID@ -HAVE_LIBHMAC = @HAVE_LIBHMAC@ -HAVE_LIBUNA = @HAVE_LIBUNA@ -HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ -HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ -HAVE_LOCAL_LIBCERROR = @HAVE_LOCAL_LIBCERROR@ -HAVE_LOCAL_LIBCFILE = @HAVE_LOCAL_LIBCFILE@ -HAVE_LOCAL_LIBCLOCALE = @HAVE_LOCAL_LIBCLOCALE@ -HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@ -HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@ -HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@ -HAVE_LOCAL_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@ -HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@ -HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ -HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ -HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ -HAVE_LOCAL_LIBHMAC = @HAVE_LOCAL_LIBHMAC@ -HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ -HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ -HAVE_OFF64_T = @HAVE_OFF64_T@ -HAVE_OPENSSL_EVP_H = @HAVE_OPENSSL_EVP_H@ -HAVE_PTHREAD = @HAVE_PTHREAD@ -HAVE_SIZE32_T = @HAVE_SIZE32_T@ -HAVE_SIZE64_T = @HAVE_SIZE64_T@ -HAVE_SSIZE32_T = @HAVE_SSIZE32_T@ -HAVE_SSIZE64_T = @HAVE_SSIZE64_T@ -HAVE_STDINT_H = @HAVE_STDINT_H@ -HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ -HAVE_WCHAR_H = @HAVE_WCHAR_H@ -HAVE_WIDE_CHARACTER_TYPE = @HAVE_WIDE_CHARACTER_TYPE@ -HAVE_ZLIB = @HAVE_ZLIB@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INTLLIBS = @INTLLIBS@ -INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ -LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ -LIBCDATA_CPPFLAGS = @LIBCDATA_CPPFLAGS@ -LIBCDATA_LIBADD = @LIBCDATA_LIBADD@ -LIBCERROR_CPPFLAGS = @LIBCERROR_CPPFLAGS@ -LIBCERROR_LIBADD = @LIBCERROR_LIBADD@ -LIBCFILE_CPPFLAGS = @LIBCFILE_CPPFLAGS@ -LIBCFILE_LIBADD = @LIBCFILE_LIBADD@ -LIBCLOCALE_CPPFLAGS = @LIBCLOCALE_CPPFLAGS@ -LIBCLOCALE_LIBADD = @LIBCLOCALE_LIBADD@ -LIBCNOTIFY_CPPFLAGS = @LIBCNOTIFY_CPPFLAGS@ -LIBCNOTIFY_LIBADD = @LIBCNOTIFY_LIBADD@ -LIBCPATH_CPPFLAGS = @LIBCPATH_CPPFLAGS@ -LIBCPATH_LIBADD = @LIBCPATH_LIBADD@ -LIBCRYPTO_CPPFLAGS = @LIBCRYPTO_CPPFLAGS@ -LIBCRYPTO_LIBADD = @LIBCRYPTO_LIBADD@ -LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@ -LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@ -LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@ -LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@ -LIBDL_LIBADD = @LIBDL_LIBADD@ -LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ -LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ -LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ -LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ -LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ -LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ -LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ -LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ -LIBFSHFS_DLL_EXPORT = @LIBFSHFS_DLL_EXPORT@ -LIBFSHFS_DLL_IMPORT = @LIBFSHFS_DLL_IMPORT@ -LIBHMAC_CPPFLAGS = @LIBHMAC_CPPFLAGS@ -LIBHMAC_LIBADD = @LIBHMAC_LIBADD@ -LIBICONV = @LIBICONV@ -LIBINTL = @LIBINTL@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBTOOL_DEPS = @LIBTOOL_DEPS@ -LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ -LIBUNA_LIBADD = @LIBUNA_LIBADD@ -LIB_FUZZING_ENGINE = @LIB_FUZZING_ENGINE@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBICONV = @LTLIBICONV@ -LTLIBINTL = @LTLIBINTL@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ -MSGMERGE = @MSGMERGE@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKGCONFIG = @PKGCONFIG@ -PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ -POSUB = @POSUB@ -PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ -PTHREAD_LIBADD = @PTHREAD_LIBADD@ -PYTHON = @PYTHON@ -PYTHON2 = @PYTHON2@ -PYTHON2_CONFIG = @PYTHON2_CONFIG@ -PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ -PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ -PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ -PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ -PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ -PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ -PYTHON2_PREFIX = @PYTHON2_PREFIX@ -PYTHON2_VERSION = @PYTHON2_VERSION@ -PYTHON3 = @PYTHON3@ -PYTHON3_CONFIG = @PYTHON3_CONFIG@ -PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ -PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ -PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ -PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ -PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ -PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ -PYTHON3_PREFIX = @PYTHON3_PREFIX@ -PYTHON3_VERSION = @PYTHON3_VERSION@ -PYTHON_CONFIG = @PYTHON_CONFIG@ -PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ -PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ -PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ -PYTHON_LIBRARY_DIR = @PYTHON_LIBRARY_DIR@ -PYTHON_PACKAGE_DIR = @PYTHON_PACKAGE_DIR@ -PYTHON_PLATFORM = @PYTHON_PLATFORM@ -PYTHON_PREFIX = @PYTHON_PREFIX@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SPEC_DATE = @SPEC_DATE@ -STATIC_LDFLAGS = @STATIC_LDFLAGS@ -STRIP = @STRIP@ -USE_NLS = @USE_NLS@ -VERSION = @VERSION@ -XGETTEXT = @XGETTEXT@ -XGETTEXT_015 = @XGETTEXT_015@ -XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -ZLIB_CPPFLAGS = @ZLIB_CPPFLAGS@ -ZLIB_LIBADD = @ZLIB_LIBADD@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -ax_libbfio_pc_libs_private = @ax_libbfio_pc_libs_private@ -ax_libbfio_spec_build_requires = @ax_libbfio_spec_build_requires@ -ax_libbfio_spec_requires = @ax_libbfio_spec_requires@ -ax_libcdata_pc_libs_private = @ax_libcdata_pc_libs_private@ -ax_libcdata_spec_build_requires = @ax_libcdata_spec_build_requires@ -ax_libcdata_spec_requires = @ax_libcdata_spec_requires@ -ax_libcerror_pc_libs_private = @ax_libcerror_pc_libs_private@ -ax_libcerror_spec_build_requires = @ax_libcerror_spec_build_requires@ -ax_libcerror_spec_requires = @ax_libcerror_spec_requires@ -ax_libcfile_pc_libs_private = @ax_libcfile_pc_libs_private@ -ax_libcfile_spec_build_requires = @ax_libcfile_spec_build_requires@ -ax_libcfile_spec_requires = @ax_libcfile_spec_requires@ -ax_libclocale_pc_libs_private = @ax_libclocale_pc_libs_private@ -ax_libclocale_spec_build_requires = @ax_libclocale_spec_build_requires@ -ax_libclocale_spec_requires = @ax_libclocale_spec_requires@ -ax_libcnotify_pc_libs_private = @ax_libcnotify_pc_libs_private@ -ax_libcnotify_spec_build_requires = @ax_libcnotify_spec_build_requires@ -ax_libcnotify_spec_requires = @ax_libcnotify_spec_requires@ -ax_libcpath_pc_libs_private = @ax_libcpath_pc_libs_private@ -ax_libcpath_spec_build_requires = @ax_libcpath_spec_build_requires@ -ax_libcpath_spec_requires = @ax_libcpath_spec_requires@ -ax_libcrypto_pc_libs_private = @ax_libcrypto_pc_libs_private@ -ax_libcrypto_spec_build_requires = @ax_libcrypto_spec_build_requires@ -ax_libcrypto_spec_requires = @ax_libcrypto_spec_requires@ -ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@ -ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@ -ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@ -ax_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@ -ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@ -ax_libcthreads_spec_requires = @ax_libcthreads_spec_requires@ -ax_libfcache_pc_libs_private = @ax_libfcache_pc_libs_private@ -ax_libfcache_spec_build_requires = @ax_libfcache_spec_build_requires@ -ax_libfcache_spec_requires = @ax_libfcache_spec_requires@ -ax_libfdata_pc_libs_private = @ax_libfdata_pc_libs_private@ -ax_libfdata_spec_build_requires = @ax_libfdata_spec_build_requires@ -ax_libfdata_spec_requires = @ax_libfdata_spec_requires@ -ax_libfdatetime_pc_libs_private = @ax_libfdatetime_pc_libs_private@ -ax_libfdatetime_spec_build_requires = @ax_libfdatetime_spec_build_requires@ -ax_libfdatetime_spec_requires = @ax_libfdatetime_spec_requires@ -ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ -ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ -ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ -ax_libhmac_pc_libs_private = @ax_libhmac_pc_libs_private@ -ax_libhmac_spec_build_requires = @ax_libhmac_spec_build_requires@ -ax_libhmac_spec_requires = @ax_libhmac_spec_requires@ -ax_libuna_pc_libs_private = @ax_libuna_pc_libs_private@ -ax_libuna_spec_build_requires = @ax_libuna_spec_build_requires@ -ax_libuna_spec_requires = @ax_libuna_spec_requires@ -ax_pthread_pc_libs_private = @ax_pthread_pc_libs_private@ -ax_zlib_pc_libs_private = @ax_zlib_pc_libs_private@ -ax_zlib_spec_build_requires = @ax_zlib_spec_build_requires@ -ax_zlib_spec_requires = @ax_zlib_spec_requires@ -ax_zlib_static_spec_build_requires = @ax_zlib_static_spec_build_requires@ -ax_zlib_static_spec_requires = @ax_zlib_static_spec_requires@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libbfio_CFLAGS = @libbfio_CFLAGS@ -libbfio_LIBS = @libbfio_LIBS@ -libcdata_CFLAGS = @libcdata_CFLAGS@ -libcdata_LIBS = @libcdata_LIBS@ -libcerror_CFLAGS = @libcerror_CFLAGS@ -libcerror_LIBS = @libcerror_LIBS@ -libcfile_CFLAGS = @libcfile_CFLAGS@ -libcfile_LIBS = @libcfile_LIBS@ -libclocale_CFLAGS = @libclocale_CFLAGS@ -libclocale_LIBS = @libclocale_LIBS@ -libcnotify_CFLAGS = @libcnotify_CFLAGS@ -libcnotify_LIBS = @libcnotify_LIBS@ -libcpath_CFLAGS = @libcpath_CFLAGS@ -libcpath_LIBS = @libcpath_LIBS@ -libcsplit_CFLAGS = @libcsplit_CFLAGS@ -libcsplit_LIBS = @libcsplit_LIBS@ -libcthreads_CFLAGS = @libcthreads_CFLAGS@ -libcthreads_LIBS = @libcthreads_LIBS@ -libdir = @libdir@ -libexecdir = @libexecdir@ -libfcache_CFLAGS = @libfcache_CFLAGS@ -libfcache_LIBS = @libfcache_LIBS@ -libfdata_CFLAGS = @libfdata_CFLAGS@ -libfdata_LIBS = @libfdata_LIBS@ -libfdatetime_CFLAGS = @libfdatetime_CFLAGS@ -libfdatetime_LIBS = @libfdatetime_LIBS@ -libfguid_CFLAGS = @libfguid_CFLAGS@ -libfguid_LIBS = @libfguid_LIBS@ -libfshfs_spec_requires = @libfshfs_spec_requires@ -libfshfs_spec_tools_build_requires = @libfshfs_spec_tools_build_requires@ -libhmac_CFLAGS = @libhmac_CFLAGS@ -libhmac_LIBS = @libhmac_LIBS@ -libuna_CFLAGS = @libuna_CFLAGS@ -libuna_LIBS = @libuna_LIBS@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -openssl_CFLAGS = @openssl_CFLAGS@ -openssl_LIBS = @openssl_LIBS@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -pyexecdir = $(pyexecdir2) -pyexecdir2 = @pyexecdir2@ -pyexecdir3 = @pyexecdir3@ -pythondir = @pythondir@ -pythondir2 = @pythondir2@ -pythondir3 = @pythondir3@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -zlib_CFLAGS = @zlib_CFLAGS@ -zlib_LIBS = @zlib_LIBS@ - -# Note that we cannot use: AUTOMAKE_OPTIONS = subdir-objects -# subdir-objects will compile the source files to a single version of Python. -# Since subdir-objects is being deprecated we copy the source files instead. -am__installdirs = "$(DESTDIR)$(pyexecdir2)" -@HAVE_PYTHON2_TRUE@AM_CFLAGS = \ -@HAVE_PYTHON2_TRUE@ -I$(top_srcdir)/include \ -@HAVE_PYTHON2_TRUE@ -I$(top_srcdir)/common \ -@HAVE_PYTHON2_TRUE@ @LIBCERROR_CPPFLAGS@ \ -@HAVE_PYTHON2_TRUE@ @LIBCDATA_CPPFLAGS@ \ -@HAVE_PYTHON2_TRUE@ @LIBCLOCALE_CPPFLAGS@ \ -@HAVE_PYTHON2_TRUE@ @LIBCSPLIT_CPPFLAGS@ \ -@HAVE_PYTHON2_TRUE@ @LIBUNA_CPPFLAGS@ \ -@HAVE_PYTHON2_TRUE@ @LIBCFILE_CPPFLAGS@ \ -@HAVE_PYTHON2_TRUE@ @LIBCPATH_CPPFLAGS@ \ -@HAVE_PYTHON2_TRUE@ @LIBBFIO_CPPFLAGS@ \ -@HAVE_PYTHON2_TRUE@ @LIBFGUID_CPPFLAGS@ \ -@HAVE_PYTHON2_TRUE@ @LIBFSHFS_DLL_IMPORT@ - -@HAVE_PYTHON2_TRUE@am_pyfshfs_la_rpath = -rpath $(pyexecdir2) -@HAVE_PYTHON2_TRUE@BUILT_SOURCES = \ -@HAVE_PYTHON2_TRUE@ pyfshfs.c pyfshfs.h \ -@HAVE_PYTHON2_TRUE@ pyfshfs_datetime.c pyfshfs_datetime.h \ -@HAVE_PYTHON2_TRUE@ pyfshfs_error.c pyfshfs_error.h \ -@HAVE_PYTHON2_TRUE@ pyfshfs_file_entry.c pyfshfs_file_entry.h \ -@HAVE_PYTHON2_TRUE@ pyfshfs_file_entries.c pyfshfs_file_entries.h \ -@HAVE_PYTHON2_TRUE@ pyfshfs_file_object_io_handle.c pyfshfs_file_object_io_handle.h \ -@HAVE_PYTHON2_TRUE@ pyfshfs_integer.c pyfshfs_integer.h \ -@HAVE_PYTHON2_TRUE@ pyfshfs_libbfio.h \ -@HAVE_PYTHON2_TRUE@ pyfshfs_libcerror.h \ -@HAVE_PYTHON2_TRUE@ pyfshfs_libfshfs.h \ -@HAVE_PYTHON2_TRUE@ pyfshfs_python.h \ -@HAVE_PYTHON2_TRUE@ pyfshfs_unused.h \ -@HAVE_PYTHON2_TRUE@ pyfshfs_volume.c pyfshfs_volume.h - -@HAVE_PYTHON2_TRUE@pyexec_LTLIBRARIES = pyfshfs.la -@HAVE_PYTHON2_TRUE@nodist_pyfshfs_la_SOURCES = $(BUILT_SOURCES) -@HAVE_PYTHON2_TRUE@pyfshfs_la_LIBADD = \ -@HAVE_PYTHON2_TRUE@ @LIBCERROR_LIBADD@ \ -@HAVE_PYTHON2_TRUE@ ../libfshfs/libfshfs.la \ -@HAVE_PYTHON2_TRUE@ @LIBCDATA_LIBADD@ \ -@HAVE_PYTHON2_TRUE@ @LIBCLOCALE_LIBADD@ \ -@HAVE_PYTHON2_TRUE@ @LIBCSPLIT_LIBADD@ \ -@HAVE_PYTHON2_TRUE@ @LIBUNA_LIBADD@ \ -@HAVE_PYTHON2_TRUE@ @LIBCFILE_LIBADD@ \ -@HAVE_PYTHON2_TRUE@ @LIBCPATH_LIBADD@ \ -@HAVE_PYTHON2_TRUE@ @LIBBFIO_LIBADD@ \ -@HAVE_PYTHON2_TRUE@ @LIBFGUID_LIBADD@ - -@HAVE_PYTHON2_TRUE@pyfshfs_la_CPPFLAGS = $(PYTHON2_CPPFLAGS) -@HAVE_PYTHON2_TRUE@pyfshfs_la_LDFLAGS = -module -avoid-version $(PYTHON2_LDFLAGS) -MAINTAINERCLEANFILES = \ - Makefile.in - -all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu pyfshfs-python2/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu pyfshfs-python2/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -install-pyexecLTLIBRARIES: $(pyexec_LTLIBRARIES) - @$(NORMAL_INSTALL) - @list='$(pyexec_LTLIBRARIES)'; test -n "$(pyexecdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(MKDIR_P) '$(DESTDIR)$(pyexecdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(pyexecdir)" || exit 1; \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pyexecdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pyexecdir)"; \ - } - -uninstall-pyexecLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(pyexec_LTLIBRARIES)'; test -n "$(pyexecdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pyexecdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pyexecdir)/$$f"; \ - done - -clean-pyexecLTLIBRARIES: - -test -z "$(pyexec_LTLIBRARIES)" || rm -f $(pyexec_LTLIBRARIES) - @list='$(pyexec_LTLIBRARIES)'; \ - locs=`for p in $$list; do echo $$p; done | \ - sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ - sort -u`; \ - test -z "$$locs" || { \ - echo rm -f $${locs}; \ - rm -f $${locs}; \ - } - -pyfshfs.la: $(pyfshfs_la_OBJECTS) $(pyfshfs_la_DEPENDENCIES) $(EXTRA_pyfshfs_la_DEPENDENCIES) - $(AM_V_CCLD)$(pyfshfs_la_LINK) $(am_pyfshfs_la_rpath) $(pyfshfs_la_OBJECTS) $(pyfshfs_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyfshfs_la-pyfshfs.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyfshfs_la-pyfshfs_datetime.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyfshfs_la-pyfshfs_error.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyfshfs_la-pyfshfs_file_entries.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyfshfs_la-pyfshfs_file_entry.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyfshfs_la-pyfshfs_file_object_io_handle.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyfshfs_la-pyfshfs_integer.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyfshfs_la-pyfshfs_volume.Plo@am__quote@ # am--include-marker - -$(am__depfiles_remade): - @$(MKDIR_P) $(@D) - @echo '# dummy' >$@-t && $(am__mv) $@-t $@ - -am--depfiles: $(am__depfiles_remade) - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< - -pyfshfs_la-pyfshfs.lo: pyfshfs.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyfshfs_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyfshfs_la-pyfshfs.lo -MD -MP -MF $(DEPDIR)/pyfshfs_la-pyfshfs.Tpo -c -o pyfshfs_la-pyfshfs.lo `test -f 'pyfshfs.c' || echo '$(srcdir)/'`pyfshfs.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyfshfs_la-pyfshfs.Tpo $(DEPDIR)/pyfshfs_la-pyfshfs.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyfshfs.c' object='pyfshfs_la-pyfshfs.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyfshfs_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyfshfs_la-pyfshfs.lo `test -f 'pyfshfs.c' || echo '$(srcdir)/'`pyfshfs.c - -pyfshfs_la-pyfshfs_datetime.lo: pyfshfs_datetime.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyfshfs_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyfshfs_la-pyfshfs_datetime.lo -MD -MP -MF $(DEPDIR)/pyfshfs_la-pyfshfs_datetime.Tpo -c -o pyfshfs_la-pyfshfs_datetime.lo `test -f 'pyfshfs_datetime.c' || echo '$(srcdir)/'`pyfshfs_datetime.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyfshfs_la-pyfshfs_datetime.Tpo $(DEPDIR)/pyfshfs_la-pyfshfs_datetime.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyfshfs_datetime.c' object='pyfshfs_la-pyfshfs_datetime.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyfshfs_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyfshfs_la-pyfshfs_datetime.lo `test -f 'pyfshfs_datetime.c' || echo '$(srcdir)/'`pyfshfs_datetime.c - -pyfshfs_la-pyfshfs_error.lo: pyfshfs_error.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyfshfs_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyfshfs_la-pyfshfs_error.lo -MD -MP -MF $(DEPDIR)/pyfshfs_la-pyfshfs_error.Tpo -c -o pyfshfs_la-pyfshfs_error.lo `test -f 'pyfshfs_error.c' || echo '$(srcdir)/'`pyfshfs_error.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyfshfs_la-pyfshfs_error.Tpo $(DEPDIR)/pyfshfs_la-pyfshfs_error.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyfshfs_error.c' object='pyfshfs_la-pyfshfs_error.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyfshfs_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyfshfs_la-pyfshfs_error.lo `test -f 'pyfshfs_error.c' || echo '$(srcdir)/'`pyfshfs_error.c - -pyfshfs_la-pyfshfs_file_entry.lo: pyfshfs_file_entry.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyfshfs_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyfshfs_la-pyfshfs_file_entry.lo -MD -MP -MF $(DEPDIR)/pyfshfs_la-pyfshfs_file_entry.Tpo -c -o pyfshfs_la-pyfshfs_file_entry.lo `test -f 'pyfshfs_file_entry.c' || echo '$(srcdir)/'`pyfshfs_file_entry.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyfshfs_la-pyfshfs_file_entry.Tpo $(DEPDIR)/pyfshfs_la-pyfshfs_file_entry.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyfshfs_file_entry.c' object='pyfshfs_la-pyfshfs_file_entry.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyfshfs_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyfshfs_la-pyfshfs_file_entry.lo `test -f 'pyfshfs_file_entry.c' || echo '$(srcdir)/'`pyfshfs_file_entry.c - -pyfshfs_la-pyfshfs_file_entries.lo: pyfshfs_file_entries.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyfshfs_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyfshfs_la-pyfshfs_file_entries.lo -MD -MP -MF $(DEPDIR)/pyfshfs_la-pyfshfs_file_entries.Tpo -c -o pyfshfs_la-pyfshfs_file_entries.lo `test -f 'pyfshfs_file_entries.c' || echo '$(srcdir)/'`pyfshfs_file_entries.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyfshfs_la-pyfshfs_file_entries.Tpo $(DEPDIR)/pyfshfs_la-pyfshfs_file_entries.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyfshfs_file_entries.c' object='pyfshfs_la-pyfshfs_file_entries.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyfshfs_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyfshfs_la-pyfshfs_file_entries.lo `test -f 'pyfshfs_file_entries.c' || echo '$(srcdir)/'`pyfshfs_file_entries.c - -pyfshfs_la-pyfshfs_file_object_io_handle.lo: pyfshfs_file_object_io_handle.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyfshfs_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyfshfs_la-pyfshfs_file_object_io_handle.lo -MD -MP -MF $(DEPDIR)/pyfshfs_la-pyfshfs_file_object_io_handle.Tpo -c -o pyfshfs_la-pyfshfs_file_object_io_handle.lo `test -f 'pyfshfs_file_object_io_handle.c' || echo '$(srcdir)/'`pyfshfs_file_object_io_handle.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyfshfs_la-pyfshfs_file_object_io_handle.Tpo $(DEPDIR)/pyfshfs_la-pyfshfs_file_object_io_handle.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyfshfs_file_object_io_handle.c' object='pyfshfs_la-pyfshfs_file_object_io_handle.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyfshfs_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyfshfs_la-pyfshfs_file_object_io_handle.lo `test -f 'pyfshfs_file_object_io_handle.c' || echo '$(srcdir)/'`pyfshfs_file_object_io_handle.c - -pyfshfs_la-pyfshfs_integer.lo: pyfshfs_integer.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyfshfs_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyfshfs_la-pyfshfs_integer.lo -MD -MP -MF $(DEPDIR)/pyfshfs_la-pyfshfs_integer.Tpo -c -o pyfshfs_la-pyfshfs_integer.lo `test -f 'pyfshfs_integer.c' || echo '$(srcdir)/'`pyfshfs_integer.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyfshfs_la-pyfshfs_integer.Tpo $(DEPDIR)/pyfshfs_la-pyfshfs_integer.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyfshfs_integer.c' object='pyfshfs_la-pyfshfs_integer.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyfshfs_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyfshfs_la-pyfshfs_integer.lo `test -f 'pyfshfs_integer.c' || echo '$(srcdir)/'`pyfshfs_integer.c - -pyfshfs_la-pyfshfs_volume.lo: pyfshfs_volume.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyfshfs_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyfshfs_la-pyfshfs_volume.lo -MD -MP -MF $(DEPDIR)/pyfshfs_la-pyfshfs_volume.Tpo -c -o pyfshfs_la-pyfshfs_volume.lo `test -f 'pyfshfs_volume.c' || echo '$(srcdir)/'`pyfshfs_volume.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyfshfs_la-pyfshfs_volume.Tpo $(DEPDIR)/pyfshfs_la-pyfshfs_volume.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyfshfs_volume.c' object='pyfshfs_la-pyfshfs_volume.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyfshfs_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyfshfs_la-pyfshfs_volume.lo `test -f 'pyfshfs_volume.c' || echo '$(srcdir)/'`pyfshfs_volume.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-am -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-am - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" -cscopelist: cscopelist-am - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) distdir-am - -distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: - for dir in "$(DESTDIR)$(pyexecdir2)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -clean: clean-am - -clean-am: clean-generic clean-libtool clean-local \ - clean-pyexecLTLIBRARIES mostlyclean-am - -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-pyexecLTLIBRARIES - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f ./$(DEPDIR)/pyfshfs_la-pyfshfs.Plo - -rm -f ./$(DEPDIR)/pyfshfs_la-pyfshfs_datetime.Plo - -rm -f ./$(DEPDIR)/pyfshfs_la-pyfshfs_error.Plo - -rm -f ./$(DEPDIR)/pyfshfs_la-pyfshfs_file_entries.Plo - -rm -f ./$(DEPDIR)/pyfshfs_la-pyfshfs_file_entry.Plo - -rm -f ./$(DEPDIR)/pyfshfs_la-pyfshfs_file_object_io_handle.Plo - -rm -f ./$(DEPDIR)/pyfshfs_la-pyfshfs_integer.Plo - -rm -f ./$(DEPDIR)/pyfshfs_la-pyfshfs_volume.Plo - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-pyexecLTLIBRARIES - -.MAKE: all check install install-am install-strip - -.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ - clean-generic clean-libtool clean-local \ - clean-pyexecLTLIBRARIES cscopelist-am ctags ctags-am distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-pyexecLTLIBRARIES install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am \ - uninstall-pyexecLTLIBRARIES - -.PRECIOUS: Makefile - - -@HAVE_PYTHON2_TRUE@$(BUILT_SOURCES): -@HAVE_PYTHON2_TRUE@ /bin/cp -f $(top_srcdir)/pyfshfs/$@ $@ - -clean-local: - /bin/rm -f pyfshfs*.[ch] - -distclean: clean - /bin/rm -f Makefile - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff -Nru libfshfs-20201104/pyfshfs-python3/Makefile.am libfshfs-20240221/pyfshfs-python3/Makefile.am --- libfshfs-20201104/pyfshfs-python3/Makefile.am 2020-11-04 04:19:40.000000000 +0000 +++ libfshfs-20240221/pyfshfs-python3/Makefile.am 1970-01-01 00:00:00.000000000 +0000 @@ -1,71 +0,0 @@ -# Note that we cannot use: AUTOMAKE_OPTIONS = subdir-objects -# subdir-objects will compile the source files to a single version of Python. -# Since subdir-objects is being deprecated we copy the source files instead. -am__installdirs = "$(DESTDIR)$(pyexecdir3)" -pyexecdir = $(pyexecdir3) - -if HAVE_PYTHON3 -AM_CFLAGS = \ - -I$(top_srcdir)/include \ - -I$(top_srcdir)/common \ - @LIBCERROR_CPPFLAGS@ \ - @LIBCDATA_CPPFLAGS@ \ - @LIBCLOCALE_CPPFLAGS@ \ - @LIBCSPLIT_CPPFLAGS@ \ - @LIBUNA_CPPFLAGS@ \ - @LIBCFILE_CPPFLAGS@ \ - @LIBCPATH_CPPFLAGS@ \ - @LIBBFIO_CPPFLAGS@ \ - @LIBFGUID_CPPFLAGS@ \ - @LIBFSHFS_DLL_IMPORT@ - -am_pyfshfs_la_rpath = -rpath $(pyexecdir3) - -BUILT_SOURCES = \ - pyfshfs.c pyfshfs.h \ - pyfshfs_datetime.c pyfshfs_datetime.h \ - pyfshfs_error.c pyfshfs_error.h \ - pyfshfs_file_entry.c pyfshfs_file_entry.h \ - pyfshfs_file_entries.c pyfshfs_file_entries.h \ - pyfshfs_file_object_io_handle.c pyfshfs_file_object_io_handle.h \ - pyfshfs_integer.c pyfshfs_integer.h \ - pyfshfs_libbfio.h \ - pyfshfs_libcerror.h \ - pyfshfs_libfshfs.h \ - pyfshfs_python.h \ - pyfshfs_unused.h \ - pyfshfs_volume.c pyfshfs_volume.h - -pyexec_LTLIBRARIES = pyfshfs.la - -nodist_pyfshfs_la_SOURCES = $(BUILT_SOURCES) - -pyfshfs_la_LIBADD = \ - @LIBCERROR_LIBADD@ \ - ../libfshfs/libfshfs.la \ - @LIBCDATA_LIBADD@ \ - @LIBCLOCALE_LIBADD@ \ - @LIBCSPLIT_LIBADD@ \ - @LIBUNA_LIBADD@ \ - @LIBCFILE_LIBADD@ \ - @LIBCPATH_LIBADD@ \ - @LIBBFIO_LIBADD@ \ - @LIBFGUID_LIBADD@ - -pyfshfs_la_CPPFLAGS = $(PYTHON3_CPPFLAGS) -pyfshfs_la_LDFLAGS = -module -avoid-version $(PYTHON3_LDFLAGS) - -$(BUILT_SOURCES): - /bin/cp -f $(top_srcdir)/pyfshfs/$@ $@ - -endif - -MAINTAINERCLEANFILES = \ - Makefile.in - -clean-local: - /bin/rm -f pyfshfs*.[ch] - -distclean: clean - /bin/rm -f Makefile - diff -Nru libfshfs-20201104/pyfshfs-python3/Makefile.in libfshfs-20240221/pyfshfs-python3/Makefile.in --- libfshfs-20201104/pyfshfs-python3/Makefile.in 2020-11-04 11:56:32.000000000 +0000 +++ libfshfs-20240221/pyfshfs-python3/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,1056 +0,0 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2018 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = pyfshfs-python3 -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcdata.m4 \ - $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \ - $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \ - $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcrypto.m4 \ - $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcthreads.m4 \ - $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ - $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ - $(top_srcdir)/m4/libhmac.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/libuna.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \ - $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \ - $(top_srcdir)/m4/zlib.m4 $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/common/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -LTLIBRARIES = $(pyexec_LTLIBRARIES) -@HAVE_PYTHON3_TRUE@pyfshfs_la_DEPENDENCIES = ../libfshfs/libfshfs.la -@HAVE_PYTHON3_TRUE@am__objects_1 = pyfshfs_la-pyfshfs.lo \ -@HAVE_PYTHON3_TRUE@ pyfshfs_la-pyfshfs_datetime.lo \ -@HAVE_PYTHON3_TRUE@ pyfshfs_la-pyfshfs_error.lo \ -@HAVE_PYTHON3_TRUE@ pyfshfs_la-pyfshfs_file_entry.lo \ -@HAVE_PYTHON3_TRUE@ pyfshfs_la-pyfshfs_file_entries.lo \ -@HAVE_PYTHON3_TRUE@ pyfshfs_la-pyfshfs_file_object_io_handle.lo \ -@HAVE_PYTHON3_TRUE@ pyfshfs_la-pyfshfs_integer.lo \ -@HAVE_PYTHON3_TRUE@ pyfshfs_la-pyfshfs_volume.lo -@HAVE_PYTHON3_TRUE@nodist_pyfshfs_la_OBJECTS = $(am__objects_1) -pyfshfs_la_OBJECTS = $(nodist_pyfshfs_la_OBJECTS) -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -am__v_lt_1 = -pyfshfs_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(pyfshfs_la_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__maybe_remake_depfiles = depfiles -am__depfiles_remade = ./$(DEPDIR)/pyfshfs_la-pyfshfs.Plo \ - ./$(DEPDIR)/pyfshfs_la-pyfshfs_datetime.Plo \ - ./$(DEPDIR)/pyfshfs_la-pyfshfs_error.Plo \ - ./$(DEPDIR)/pyfshfs_la-pyfshfs_file_entries.Plo \ - ./$(DEPDIR)/pyfshfs_la-pyfshfs_file_entry.Plo \ - ./$(DEPDIR)/pyfshfs_la-pyfshfs_file_object_io_handle.Plo \ - ./$(DEPDIR)/pyfshfs_la-pyfshfs_integer.Plo \ - ./$(DEPDIR)/pyfshfs_la-pyfshfs_volume.Plo -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_@AM_V@) -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -am__v_CC_1 = -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = -SOURCES = $(nodist_pyfshfs_la_SOURCES) -DIST_SOURCES = -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DPKG_DATE = @DPKG_DATE@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ -GMSGFMT = @GMSGFMT@ -GMSGFMT_015 = @GMSGFMT_015@ -GREP = @GREP@ -HAVE_DLLMAIN = @HAVE_DLLMAIN@ -HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ -HAVE_LIBBFIO = @HAVE_LIBBFIO@ -HAVE_LIBCDATA = @HAVE_LIBCDATA@ -HAVE_LIBCERROR = @HAVE_LIBCERROR@ -HAVE_LIBCFILE = @HAVE_LIBCFILE@ -HAVE_LIBCLOCALE = @HAVE_LIBCLOCALE@ -HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@ -HAVE_LIBCPATH = @HAVE_LIBCPATH@ -HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@ -HAVE_LIBCTHREADS = @HAVE_LIBCTHREADS@ -HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ -HAVE_LIBFDATA = @HAVE_LIBFDATA@ -HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ -HAVE_LIBFGUID = @HAVE_LIBFGUID@ -HAVE_LIBHMAC = @HAVE_LIBHMAC@ -HAVE_LIBUNA = @HAVE_LIBUNA@ -HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ -HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ -HAVE_LOCAL_LIBCERROR = @HAVE_LOCAL_LIBCERROR@ -HAVE_LOCAL_LIBCFILE = @HAVE_LOCAL_LIBCFILE@ -HAVE_LOCAL_LIBCLOCALE = @HAVE_LOCAL_LIBCLOCALE@ -HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@ -HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@ -HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@ -HAVE_LOCAL_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@ -HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@ -HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ -HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ -HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ -HAVE_LOCAL_LIBHMAC = @HAVE_LOCAL_LIBHMAC@ -HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ -HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ -HAVE_OFF64_T = @HAVE_OFF64_T@ -HAVE_OPENSSL_EVP_H = @HAVE_OPENSSL_EVP_H@ -HAVE_PTHREAD = @HAVE_PTHREAD@ -HAVE_SIZE32_T = @HAVE_SIZE32_T@ -HAVE_SIZE64_T = @HAVE_SIZE64_T@ -HAVE_SSIZE32_T = @HAVE_SSIZE32_T@ -HAVE_SSIZE64_T = @HAVE_SSIZE64_T@ -HAVE_STDINT_H = @HAVE_STDINT_H@ -HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ -HAVE_WCHAR_H = @HAVE_WCHAR_H@ -HAVE_WIDE_CHARACTER_TYPE = @HAVE_WIDE_CHARACTER_TYPE@ -HAVE_ZLIB = @HAVE_ZLIB@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INTLLIBS = @INTLLIBS@ -INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ -LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ -LIBCDATA_CPPFLAGS = @LIBCDATA_CPPFLAGS@ -LIBCDATA_LIBADD = @LIBCDATA_LIBADD@ -LIBCERROR_CPPFLAGS = @LIBCERROR_CPPFLAGS@ -LIBCERROR_LIBADD = @LIBCERROR_LIBADD@ -LIBCFILE_CPPFLAGS = @LIBCFILE_CPPFLAGS@ -LIBCFILE_LIBADD = @LIBCFILE_LIBADD@ -LIBCLOCALE_CPPFLAGS = @LIBCLOCALE_CPPFLAGS@ -LIBCLOCALE_LIBADD = @LIBCLOCALE_LIBADD@ -LIBCNOTIFY_CPPFLAGS = @LIBCNOTIFY_CPPFLAGS@ -LIBCNOTIFY_LIBADD = @LIBCNOTIFY_LIBADD@ -LIBCPATH_CPPFLAGS = @LIBCPATH_CPPFLAGS@ -LIBCPATH_LIBADD = @LIBCPATH_LIBADD@ -LIBCRYPTO_CPPFLAGS = @LIBCRYPTO_CPPFLAGS@ -LIBCRYPTO_LIBADD = @LIBCRYPTO_LIBADD@ -LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@ -LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@ -LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@ -LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@ -LIBDL_LIBADD = @LIBDL_LIBADD@ -LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ -LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ -LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ -LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ -LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ -LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ -LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ -LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ -LIBFSHFS_DLL_EXPORT = @LIBFSHFS_DLL_EXPORT@ -LIBFSHFS_DLL_IMPORT = @LIBFSHFS_DLL_IMPORT@ -LIBHMAC_CPPFLAGS = @LIBHMAC_CPPFLAGS@ -LIBHMAC_LIBADD = @LIBHMAC_LIBADD@ -LIBICONV = @LIBICONV@ -LIBINTL = @LIBINTL@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBTOOL_DEPS = @LIBTOOL_DEPS@ -LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ -LIBUNA_LIBADD = @LIBUNA_LIBADD@ -LIB_FUZZING_ENGINE = @LIB_FUZZING_ENGINE@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBICONV = @LTLIBICONV@ -LTLIBINTL = @LTLIBINTL@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ -MSGMERGE = @MSGMERGE@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKGCONFIG = @PKGCONFIG@ -PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ -POSUB = @POSUB@ -PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ -PTHREAD_LIBADD = @PTHREAD_LIBADD@ -PYTHON = @PYTHON@ -PYTHON2 = @PYTHON2@ -PYTHON2_CONFIG = @PYTHON2_CONFIG@ -PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ -PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ -PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ -PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ -PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ -PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ -PYTHON2_PREFIX = @PYTHON2_PREFIX@ -PYTHON2_VERSION = @PYTHON2_VERSION@ -PYTHON3 = @PYTHON3@ -PYTHON3_CONFIG = @PYTHON3_CONFIG@ -PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ -PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ -PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ -PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ -PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ -PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ -PYTHON3_PREFIX = @PYTHON3_PREFIX@ -PYTHON3_VERSION = @PYTHON3_VERSION@ -PYTHON_CONFIG = @PYTHON_CONFIG@ -PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ -PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ -PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ -PYTHON_LIBRARY_DIR = @PYTHON_LIBRARY_DIR@ -PYTHON_PACKAGE_DIR = @PYTHON_PACKAGE_DIR@ -PYTHON_PLATFORM = @PYTHON_PLATFORM@ -PYTHON_PREFIX = @PYTHON_PREFIX@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SPEC_DATE = @SPEC_DATE@ -STATIC_LDFLAGS = @STATIC_LDFLAGS@ -STRIP = @STRIP@ -USE_NLS = @USE_NLS@ -VERSION = @VERSION@ -XGETTEXT = @XGETTEXT@ -XGETTEXT_015 = @XGETTEXT_015@ -XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -ZLIB_CPPFLAGS = @ZLIB_CPPFLAGS@ -ZLIB_LIBADD = @ZLIB_LIBADD@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -ax_libbfio_pc_libs_private = @ax_libbfio_pc_libs_private@ -ax_libbfio_spec_build_requires = @ax_libbfio_spec_build_requires@ -ax_libbfio_spec_requires = @ax_libbfio_spec_requires@ -ax_libcdata_pc_libs_private = @ax_libcdata_pc_libs_private@ -ax_libcdata_spec_build_requires = @ax_libcdata_spec_build_requires@ -ax_libcdata_spec_requires = @ax_libcdata_spec_requires@ -ax_libcerror_pc_libs_private = @ax_libcerror_pc_libs_private@ -ax_libcerror_spec_build_requires = @ax_libcerror_spec_build_requires@ -ax_libcerror_spec_requires = @ax_libcerror_spec_requires@ -ax_libcfile_pc_libs_private = @ax_libcfile_pc_libs_private@ -ax_libcfile_spec_build_requires = @ax_libcfile_spec_build_requires@ -ax_libcfile_spec_requires = @ax_libcfile_spec_requires@ -ax_libclocale_pc_libs_private = @ax_libclocale_pc_libs_private@ -ax_libclocale_spec_build_requires = @ax_libclocale_spec_build_requires@ -ax_libclocale_spec_requires = @ax_libclocale_spec_requires@ -ax_libcnotify_pc_libs_private = @ax_libcnotify_pc_libs_private@ -ax_libcnotify_spec_build_requires = @ax_libcnotify_spec_build_requires@ -ax_libcnotify_spec_requires = @ax_libcnotify_spec_requires@ -ax_libcpath_pc_libs_private = @ax_libcpath_pc_libs_private@ -ax_libcpath_spec_build_requires = @ax_libcpath_spec_build_requires@ -ax_libcpath_spec_requires = @ax_libcpath_spec_requires@ -ax_libcrypto_pc_libs_private = @ax_libcrypto_pc_libs_private@ -ax_libcrypto_spec_build_requires = @ax_libcrypto_spec_build_requires@ -ax_libcrypto_spec_requires = @ax_libcrypto_spec_requires@ -ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@ -ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@ -ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@ -ax_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@ -ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@ -ax_libcthreads_spec_requires = @ax_libcthreads_spec_requires@ -ax_libfcache_pc_libs_private = @ax_libfcache_pc_libs_private@ -ax_libfcache_spec_build_requires = @ax_libfcache_spec_build_requires@ -ax_libfcache_spec_requires = @ax_libfcache_spec_requires@ -ax_libfdata_pc_libs_private = @ax_libfdata_pc_libs_private@ -ax_libfdata_spec_build_requires = @ax_libfdata_spec_build_requires@ -ax_libfdata_spec_requires = @ax_libfdata_spec_requires@ -ax_libfdatetime_pc_libs_private = @ax_libfdatetime_pc_libs_private@ -ax_libfdatetime_spec_build_requires = @ax_libfdatetime_spec_build_requires@ -ax_libfdatetime_spec_requires = @ax_libfdatetime_spec_requires@ -ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ -ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ -ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ -ax_libhmac_pc_libs_private = @ax_libhmac_pc_libs_private@ -ax_libhmac_spec_build_requires = @ax_libhmac_spec_build_requires@ -ax_libhmac_spec_requires = @ax_libhmac_spec_requires@ -ax_libuna_pc_libs_private = @ax_libuna_pc_libs_private@ -ax_libuna_spec_build_requires = @ax_libuna_spec_build_requires@ -ax_libuna_spec_requires = @ax_libuna_spec_requires@ -ax_pthread_pc_libs_private = @ax_pthread_pc_libs_private@ -ax_zlib_pc_libs_private = @ax_zlib_pc_libs_private@ -ax_zlib_spec_build_requires = @ax_zlib_spec_build_requires@ -ax_zlib_spec_requires = @ax_zlib_spec_requires@ -ax_zlib_static_spec_build_requires = @ax_zlib_static_spec_build_requires@ -ax_zlib_static_spec_requires = @ax_zlib_static_spec_requires@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libbfio_CFLAGS = @libbfio_CFLAGS@ -libbfio_LIBS = @libbfio_LIBS@ -libcdata_CFLAGS = @libcdata_CFLAGS@ -libcdata_LIBS = @libcdata_LIBS@ -libcerror_CFLAGS = @libcerror_CFLAGS@ -libcerror_LIBS = @libcerror_LIBS@ -libcfile_CFLAGS = @libcfile_CFLAGS@ -libcfile_LIBS = @libcfile_LIBS@ -libclocale_CFLAGS = @libclocale_CFLAGS@ -libclocale_LIBS = @libclocale_LIBS@ -libcnotify_CFLAGS = @libcnotify_CFLAGS@ -libcnotify_LIBS = @libcnotify_LIBS@ -libcpath_CFLAGS = @libcpath_CFLAGS@ -libcpath_LIBS = @libcpath_LIBS@ -libcsplit_CFLAGS = @libcsplit_CFLAGS@ -libcsplit_LIBS = @libcsplit_LIBS@ -libcthreads_CFLAGS = @libcthreads_CFLAGS@ -libcthreads_LIBS = @libcthreads_LIBS@ -libdir = @libdir@ -libexecdir = @libexecdir@ -libfcache_CFLAGS = @libfcache_CFLAGS@ -libfcache_LIBS = @libfcache_LIBS@ -libfdata_CFLAGS = @libfdata_CFLAGS@ -libfdata_LIBS = @libfdata_LIBS@ -libfdatetime_CFLAGS = @libfdatetime_CFLAGS@ -libfdatetime_LIBS = @libfdatetime_LIBS@ -libfguid_CFLAGS = @libfguid_CFLAGS@ -libfguid_LIBS = @libfguid_LIBS@ -libfshfs_spec_requires = @libfshfs_spec_requires@ -libfshfs_spec_tools_build_requires = @libfshfs_spec_tools_build_requires@ -libhmac_CFLAGS = @libhmac_CFLAGS@ -libhmac_LIBS = @libhmac_LIBS@ -libuna_CFLAGS = @libuna_CFLAGS@ -libuna_LIBS = @libuna_LIBS@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -openssl_CFLAGS = @openssl_CFLAGS@ -openssl_LIBS = @openssl_LIBS@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -pyexecdir = $(pyexecdir3) -pyexecdir2 = @pyexecdir2@ -pyexecdir3 = @pyexecdir3@ -pythondir = @pythondir@ -pythondir2 = @pythondir2@ -pythondir3 = @pythondir3@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -zlib_CFLAGS = @zlib_CFLAGS@ -zlib_LIBS = @zlib_LIBS@ - -# Note that we cannot use: AUTOMAKE_OPTIONS = subdir-objects -# subdir-objects will compile the source files to a single version of Python. -# Since subdir-objects is being deprecated we copy the source files instead. -am__installdirs = "$(DESTDIR)$(pyexecdir3)" -@HAVE_PYTHON3_TRUE@AM_CFLAGS = \ -@HAVE_PYTHON3_TRUE@ -I$(top_srcdir)/include \ -@HAVE_PYTHON3_TRUE@ -I$(top_srcdir)/common \ -@HAVE_PYTHON3_TRUE@ @LIBCERROR_CPPFLAGS@ \ -@HAVE_PYTHON3_TRUE@ @LIBCDATA_CPPFLAGS@ \ -@HAVE_PYTHON3_TRUE@ @LIBCLOCALE_CPPFLAGS@ \ -@HAVE_PYTHON3_TRUE@ @LIBCSPLIT_CPPFLAGS@ \ -@HAVE_PYTHON3_TRUE@ @LIBUNA_CPPFLAGS@ \ -@HAVE_PYTHON3_TRUE@ @LIBCFILE_CPPFLAGS@ \ -@HAVE_PYTHON3_TRUE@ @LIBCPATH_CPPFLAGS@ \ -@HAVE_PYTHON3_TRUE@ @LIBBFIO_CPPFLAGS@ \ -@HAVE_PYTHON3_TRUE@ @LIBFGUID_CPPFLAGS@ \ -@HAVE_PYTHON3_TRUE@ @LIBFSHFS_DLL_IMPORT@ - -@HAVE_PYTHON3_TRUE@am_pyfshfs_la_rpath = -rpath $(pyexecdir3) -@HAVE_PYTHON3_TRUE@BUILT_SOURCES = \ -@HAVE_PYTHON3_TRUE@ pyfshfs.c pyfshfs.h \ -@HAVE_PYTHON3_TRUE@ pyfshfs_datetime.c pyfshfs_datetime.h \ -@HAVE_PYTHON3_TRUE@ pyfshfs_error.c pyfshfs_error.h \ -@HAVE_PYTHON3_TRUE@ pyfshfs_file_entry.c pyfshfs_file_entry.h \ -@HAVE_PYTHON3_TRUE@ pyfshfs_file_entries.c pyfshfs_file_entries.h \ -@HAVE_PYTHON3_TRUE@ pyfshfs_file_object_io_handle.c pyfshfs_file_object_io_handle.h \ -@HAVE_PYTHON3_TRUE@ pyfshfs_integer.c pyfshfs_integer.h \ -@HAVE_PYTHON3_TRUE@ pyfshfs_libbfio.h \ -@HAVE_PYTHON3_TRUE@ pyfshfs_libcerror.h \ -@HAVE_PYTHON3_TRUE@ pyfshfs_libfshfs.h \ -@HAVE_PYTHON3_TRUE@ pyfshfs_python.h \ -@HAVE_PYTHON3_TRUE@ pyfshfs_unused.h \ -@HAVE_PYTHON3_TRUE@ pyfshfs_volume.c pyfshfs_volume.h - -@HAVE_PYTHON3_TRUE@pyexec_LTLIBRARIES = pyfshfs.la -@HAVE_PYTHON3_TRUE@nodist_pyfshfs_la_SOURCES = $(BUILT_SOURCES) -@HAVE_PYTHON3_TRUE@pyfshfs_la_LIBADD = \ -@HAVE_PYTHON3_TRUE@ @LIBCERROR_LIBADD@ \ -@HAVE_PYTHON3_TRUE@ ../libfshfs/libfshfs.la \ -@HAVE_PYTHON3_TRUE@ @LIBCDATA_LIBADD@ \ -@HAVE_PYTHON3_TRUE@ @LIBCLOCALE_LIBADD@ \ -@HAVE_PYTHON3_TRUE@ @LIBCSPLIT_LIBADD@ \ -@HAVE_PYTHON3_TRUE@ @LIBUNA_LIBADD@ \ -@HAVE_PYTHON3_TRUE@ @LIBCFILE_LIBADD@ \ -@HAVE_PYTHON3_TRUE@ @LIBCPATH_LIBADD@ \ -@HAVE_PYTHON3_TRUE@ @LIBBFIO_LIBADD@ \ -@HAVE_PYTHON3_TRUE@ @LIBFGUID_LIBADD@ - -@HAVE_PYTHON3_TRUE@pyfshfs_la_CPPFLAGS = $(PYTHON3_CPPFLAGS) -@HAVE_PYTHON3_TRUE@pyfshfs_la_LDFLAGS = -module -avoid-version $(PYTHON3_LDFLAGS) -MAINTAINERCLEANFILES = \ - Makefile.in - -all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu pyfshfs-python3/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu pyfshfs-python3/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -install-pyexecLTLIBRARIES: $(pyexec_LTLIBRARIES) - @$(NORMAL_INSTALL) - @list='$(pyexec_LTLIBRARIES)'; test -n "$(pyexecdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(MKDIR_P) '$(DESTDIR)$(pyexecdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(pyexecdir)" || exit 1; \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pyexecdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pyexecdir)"; \ - } - -uninstall-pyexecLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(pyexec_LTLIBRARIES)'; test -n "$(pyexecdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pyexecdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pyexecdir)/$$f"; \ - done - -clean-pyexecLTLIBRARIES: - -test -z "$(pyexec_LTLIBRARIES)" || rm -f $(pyexec_LTLIBRARIES) - @list='$(pyexec_LTLIBRARIES)'; \ - locs=`for p in $$list; do echo $$p; done | \ - sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ - sort -u`; \ - test -z "$$locs" || { \ - echo rm -f $${locs}; \ - rm -f $${locs}; \ - } - -pyfshfs.la: $(pyfshfs_la_OBJECTS) $(pyfshfs_la_DEPENDENCIES) $(EXTRA_pyfshfs_la_DEPENDENCIES) - $(AM_V_CCLD)$(pyfshfs_la_LINK) $(am_pyfshfs_la_rpath) $(pyfshfs_la_OBJECTS) $(pyfshfs_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyfshfs_la-pyfshfs.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyfshfs_la-pyfshfs_datetime.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyfshfs_la-pyfshfs_error.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyfshfs_la-pyfshfs_file_entries.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyfshfs_la-pyfshfs_file_entry.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyfshfs_la-pyfshfs_file_object_io_handle.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyfshfs_la-pyfshfs_integer.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyfshfs_la-pyfshfs_volume.Plo@am__quote@ # am--include-marker - -$(am__depfiles_remade): - @$(MKDIR_P) $(@D) - @echo '# dummy' >$@-t && $(am__mv) $@-t $@ - -am--depfiles: $(am__depfiles_remade) - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< - -pyfshfs_la-pyfshfs.lo: pyfshfs.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyfshfs_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyfshfs_la-pyfshfs.lo -MD -MP -MF $(DEPDIR)/pyfshfs_la-pyfshfs.Tpo -c -o pyfshfs_la-pyfshfs.lo `test -f 'pyfshfs.c' || echo '$(srcdir)/'`pyfshfs.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyfshfs_la-pyfshfs.Tpo $(DEPDIR)/pyfshfs_la-pyfshfs.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyfshfs.c' object='pyfshfs_la-pyfshfs.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyfshfs_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyfshfs_la-pyfshfs.lo `test -f 'pyfshfs.c' || echo '$(srcdir)/'`pyfshfs.c - -pyfshfs_la-pyfshfs_datetime.lo: pyfshfs_datetime.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyfshfs_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyfshfs_la-pyfshfs_datetime.lo -MD -MP -MF $(DEPDIR)/pyfshfs_la-pyfshfs_datetime.Tpo -c -o pyfshfs_la-pyfshfs_datetime.lo `test -f 'pyfshfs_datetime.c' || echo '$(srcdir)/'`pyfshfs_datetime.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyfshfs_la-pyfshfs_datetime.Tpo $(DEPDIR)/pyfshfs_la-pyfshfs_datetime.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyfshfs_datetime.c' object='pyfshfs_la-pyfshfs_datetime.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyfshfs_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyfshfs_la-pyfshfs_datetime.lo `test -f 'pyfshfs_datetime.c' || echo '$(srcdir)/'`pyfshfs_datetime.c - -pyfshfs_la-pyfshfs_error.lo: pyfshfs_error.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyfshfs_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyfshfs_la-pyfshfs_error.lo -MD -MP -MF $(DEPDIR)/pyfshfs_la-pyfshfs_error.Tpo -c -o pyfshfs_la-pyfshfs_error.lo `test -f 'pyfshfs_error.c' || echo '$(srcdir)/'`pyfshfs_error.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyfshfs_la-pyfshfs_error.Tpo $(DEPDIR)/pyfshfs_la-pyfshfs_error.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyfshfs_error.c' object='pyfshfs_la-pyfshfs_error.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyfshfs_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyfshfs_la-pyfshfs_error.lo `test -f 'pyfshfs_error.c' || echo '$(srcdir)/'`pyfshfs_error.c - -pyfshfs_la-pyfshfs_file_entry.lo: pyfshfs_file_entry.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyfshfs_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyfshfs_la-pyfshfs_file_entry.lo -MD -MP -MF $(DEPDIR)/pyfshfs_la-pyfshfs_file_entry.Tpo -c -o pyfshfs_la-pyfshfs_file_entry.lo `test -f 'pyfshfs_file_entry.c' || echo '$(srcdir)/'`pyfshfs_file_entry.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyfshfs_la-pyfshfs_file_entry.Tpo $(DEPDIR)/pyfshfs_la-pyfshfs_file_entry.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyfshfs_file_entry.c' object='pyfshfs_la-pyfshfs_file_entry.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyfshfs_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyfshfs_la-pyfshfs_file_entry.lo `test -f 'pyfshfs_file_entry.c' || echo '$(srcdir)/'`pyfshfs_file_entry.c - -pyfshfs_la-pyfshfs_file_entries.lo: pyfshfs_file_entries.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyfshfs_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyfshfs_la-pyfshfs_file_entries.lo -MD -MP -MF $(DEPDIR)/pyfshfs_la-pyfshfs_file_entries.Tpo -c -o pyfshfs_la-pyfshfs_file_entries.lo `test -f 'pyfshfs_file_entries.c' || echo '$(srcdir)/'`pyfshfs_file_entries.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyfshfs_la-pyfshfs_file_entries.Tpo $(DEPDIR)/pyfshfs_la-pyfshfs_file_entries.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyfshfs_file_entries.c' object='pyfshfs_la-pyfshfs_file_entries.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyfshfs_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyfshfs_la-pyfshfs_file_entries.lo `test -f 'pyfshfs_file_entries.c' || echo '$(srcdir)/'`pyfshfs_file_entries.c - -pyfshfs_la-pyfshfs_file_object_io_handle.lo: pyfshfs_file_object_io_handle.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyfshfs_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyfshfs_la-pyfshfs_file_object_io_handle.lo -MD -MP -MF $(DEPDIR)/pyfshfs_la-pyfshfs_file_object_io_handle.Tpo -c -o pyfshfs_la-pyfshfs_file_object_io_handle.lo `test -f 'pyfshfs_file_object_io_handle.c' || echo '$(srcdir)/'`pyfshfs_file_object_io_handle.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyfshfs_la-pyfshfs_file_object_io_handle.Tpo $(DEPDIR)/pyfshfs_la-pyfshfs_file_object_io_handle.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyfshfs_file_object_io_handle.c' object='pyfshfs_la-pyfshfs_file_object_io_handle.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyfshfs_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyfshfs_la-pyfshfs_file_object_io_handle.lo `test -f 'pyfshfs_file_object_io_handle.c' || echo '$(srcdir)/'`pyfshfs_file_object_io_handle.c - -pyfshfs_la-pyfshfs_integer.lo: pyfshfs_integer.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyfshfs_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyfshfs_la-pyfshfs_integer.lo -MD -MP -MF $(DEPDIR)/pyfshfs_la-pyfshfs_integer.Tpo -c -o pyfshfs_la-pyfshfs_integer.lo `test -f 'pyfshfs_integer.c' || echo '$(srcdir)/'`pyfshfs_integer.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyfshfs_la-pyfshfs_integer.Tpo $(DEPDIR)/pyfshfs_la-pyfshfs_integer.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyfshfs_integer.c' object='pyfshfs_la-pyfshfs_integer.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyfshfs_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyfshfs_la-pyfshfs_integer.lo `test -f 'pyfshfs_integer.c' || echo '$(srcdir)/'`pyfshfs_integer.c - -pyfshfs_la-pyfshfs_volume.lo: pyfshfs_volume.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyfshfs_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyfshfs_la-pyfshfs_volume.lo -MD -MP -MF $(DEPDIR)/pyfshfs_la-pyfshfs_volume.Tpo -c -o pyfshfs_la-pyfshfs_volume.lo `test -f 'pyfshfs_volume.c' || echo '$(srcdir)/'`pyfshfs_volume.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyfshfs_la-pyfshfs_volume.Tpo $(DEPDIR)/pyfshfs_la-pyfshfs_volume.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyfshfs_volume.c' object='pyfshfs_la-pyfshfs_volume.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyfshfs_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyfshfs_la-pyfshfs_volume.lo `test -f 'pyfshfs_volume.c' || echo '$(srcdir)/'`pyfshfs_volume.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-am -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-am - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" -cscopelist: cscopelist-am - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) distdir-am - -distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: - for dir in "$(DESTDIR)$(pyexecdir3)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -clean: clean-am - -clean-am: clean-generic clean-libtool clean-local \ - clean-pyexecLTLIBRARIES mostlyclean-am - -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-pyexecLTLIBRARIES - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f ./$(DEPDIR)/pyfshfs_la-pyfshfs.Plo - -rm -f ./$(DEPDIR)/pyfshfs_la-pyfshfs_datetime.Plo - -rm -f ./$(DEPDIR)/pyfshfs_la-pyfshfs_error.Plo - -rm -f ./$(DEPDIR)/pyfshfs_la-pyfshfs_file_entries.Plo - -rm -f ./$(DEPDIR)/pyfshfs_la-pyfshfs_file_entry.Plo - -rm -f ./$(DEPDIR)/pyfshfs_la-pyfshfs_file_object_io_handle.Plo - -rm -f ./$(DEPDIR)/pyfshfs_la-pyfshfs_integer.Plo - -rm -f ./$(DEPDIR)/pyfshfs_la-pyfshfs_volume.Plo - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-pyexecLTLIBRARIES - -.MAKE: all check install install-am install-strip - -.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ - clean-generic clean-libtool clean-local \ - clean-pyexecLTLIBRARIES cscopelist-am ctags ctags-am distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-pyexecLTLIBRARIES install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am \ - uninstall-pyexecLTLIBRARIES - -.PRECIOUS: Makefile - - -@HAVE_PYTHON3_TRUE@$(BUILT_SOURCES): -@HAVE_PYTHON3_TRUE@ /bin/cp -f $(top_srcdir)/pyfshfs/$@ $@ - -clean-local: - /bin/rm -f pyfshfs*.[ch] - -distclean: clean - /bin/rm -f Makefile - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff -Nru libfshfs-20201104/pyproject.toml libfshfs-20240221/pyproject.toml --- libfshfs-20201104/pyproject.toml 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/pyproject.toml 2024-02-21 05:48:48.000000000 +0000 @@ -0,0 +1,4 @@ +[build-system] +requires = ["setuptools", "wheel"] +build-backend = "setuptools.build_meta" + diff -Nru libfshfs-20201104/setup.cfg libfshfs-20240221/setup.cfg --- libfshfs-20201104/setup.cfg 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/setup.cfg 2024-02-21 06:04:37.000000000 +0000 @@ -0,0 +1,16 @@ +[metadata] +name = libfshfs-python +version = 20240221 +description = Python bindings module for libfshfs +long_description = Python bindings module for libfshfs +long_description_content_type = text/plain +author = Joachim Metz +author_email = joachim.metz@gmail.com +license = GNU Lesser General Public License v3 or later (LGPLv3+) +license_files = COPYING COPYING.LESSER +classifiers = + Development Status :: 2 - Pre-Alpha + Programming Language :: Python + +[options] +python_requires = >=3.7 diff -Nru libfshfs-20201104/setup.cfg.in libfshfs-20240221/setup.cfg.in --- libfshfs-20201104/setup.cfg.in 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/setup.cfg.in 2024-02-21 05:48:48.000000000 +0000 @@ -0,0 +1,16 @@ +[metadata] +name = libfshfs-python +version = @VERSION@ +description = Python bindings module for libfshfs +long_description = Python bindings module for libfshfs +long_description_content_type = text/plain +author = Joachim Metz +author_email = joachim.metz@gmail.com +license = GNU Lesser General Public License v3 or later (LGPLv3+) +license_files = COPYING COPYING.LESSER +classifiers = + Development Status :: 2 - Pre-Alpha + Programming Language :: Python + +[options] +python_requires = >=3.7 diff -Nru libfshfs-20201104/setup.py libfshfs-20240221/setup.py --- libfshfs-20201104/setup.py 2020-11-04 04:20:26.000000000 +0000 +++ libfshfs-20240221/setup.py 2024-02-21 05:48:48.000000000 +0000 @@ -1,11 +1,12 @@ #!/usr/bin/env python # # Script to build and install Python-bindings. -# Version: 20191025 +# Version: 20230909 from __future__ import print_function import copy +import datetime import glob import gzip import platform @@ -15,49 +16,20 @@ import subprocess import sys import tarfile +import zipfile -from distutils import sysconfig from distutils.ccompiler import new_compiler -from distutils.command.bdist import bdist -from setuptools import dist + from setuptools import Extension from setuptools import setup from setuptools.command.build_ext import build_ext from setuptools.command.sdist import sdist -try: - from distutils.command.bdist_msi import bdist_msi -except ImportError: - bdist_msi = None - - -if not bdist_msi: - custom_bdist_msi = None -else: - class custom_bdist_msi(bdist_msi): - """Custom handler for the bdist_msi command.""" - - def run(self): - """Builds an MSI.""" - # Make a deepcopy of distribution so the following version changes - # only apply to bdist_msi. - self.distribution = copy.deepcopy(self.distribution) - - # bdist_msi does not support the library version so we add ".1" - # as a work around. - self.distribution.metadata.version = "{0:s}.1".format( - self.distribution.metadata.version) - - bdist_msi.run(self) - -class custom_bdist_rpm(bdist): - """Custom handler for the bdist_rpm command.""" - - def run(self): - """Builds a RPM.""" - print("'setup.py bdist_rpm' command not supported use 'rpmbuild' instead.") - sys.exit(1) +if (sys.version_info[0], sys.version_info[1]) < (3, 7): + print(("Unsupported Python version: {0:s}, version 3.7 or higher " + "required.").format(sys.version)) + sys.exit(1) class custom_build_ext(build_ext): @@ -90,11 +62,12 @@ compiler = new_compiler(compiler=self.compiler) if compiler.compiler_type == "msvc": self.define = [ + ("_CRT_SECURE_NO_WARNINGS", ""), ("UNICODE", ""), ] else: - command = "sh configure --disable-shared-libs" + command = "sh configure --disable-nls --disable-shared-libs" output = self._RunCommand(command) print_line = False @@ -108,7 +81,6 @@ self.define = [ ("HAVE_CONFIG_H", ""), - ("LOCALEDIR", "\"/usr/share/locale\""), ] build_ext.run(self) @@ -119,7 +91,7 @@ def run(self): """Builds a source distribution (sdist) package.""" - if self.formats != ["gztar"]: + if self.formats != ["gztar"] and self.formats != ["zip"]: print("'setup.py sdist' unsupported format.") sys.exit(1) @@ -133,20 +105,20 @@ if exit_code != 0: raise RuntimeError("Running: {0:s} failed.".format(command)) - if not os.path.exists("dist"): - os.mkdir("dist") + if not os.path.exists(self.dist_dir): + os.mkdir(self.dist_dir) source_package_file = glob.glob("*.tar.gz")[0] source_package_prefix, _, source_package_suffix = ( source_package_file.partition("-")) sdist_package_file = "{0:s}-python-{1:s}".format( source_package_prefix, source_package_suffix) - sdist_package_file = os.path.join("dist", sdist_package_file) + sdist_package_file = os.path.join(self.dist_dir, sdist_package_file) os.rename(source_package_file, sdist_package_file) # Create and add the PKG-INFO file to the source package. - with gzip.open(sdist_package_file, 'rb') as input_file: - with open(sdist_package_file[:-3], 'wb') as output_file: + with gzip.open(sdist_package_file, "rb") as input_file: + with open(sdist_package_file[:-3], "wb") as output_file: shutil.copyfileobj(input_file, output_file) os.remove(sdist_package_file) @@ -157,11 +129,38 @@ tar_file.add("PKG-INFO", arcname=pkg_info_path) os.remove("PKG-INFO") - with open(sdist_package_file[:-3], 'rb') as input_file: - with gzip.open(sdist_package_file, 'wb') as output_file: + with open(sdist_package_file[:-3], "rb") as input_file: + with gzip.open(sdist_package_file, "wb") as output_file: shutil.copyfileobj(input_file, output_file) os.remove(sdist_package_file[:-3]) + # Convert the .tar.gz into a .zip + if self.formats == ["zip"]: + zip_sdist_package_file = "{0:s}.zip".format(sdist_package_file[:-7]) + + with tarfile.open(sdist_package_file, "r|gz") as tar_file: + with zipfile.ZipFile( + zip_sdist_package_file, "w", zipfile.ZIP_DEFLATED) as zip_file: + for tar_file_entry in tar_file: + file_entry = tar_file.extractfile(tar_file_entry) + if tar_file_entry.isfile(): + modification_time = datetime.datetime.fromtimestamp( + tar_file_entry.mtime) + zip_modification_time = ( + modification_time.year, modification_time.month, + modification_time.day, modification_time.hour, + modification_time.minute, modification_time.second) + zip_info = zipfile.ZipInfo( + date_time=zip_modification_time, + filename=tar_file_entry.name) + zip_info.external_attr = (tar_file_entry.mode & 0xff) << 16 + + file_data = file_entry.read() + zip_file.writestr(zip_info, file_data) + + os.remove(sdist_package_file) + sdist_package_file = zip_sdist_package_file + # Inform distutils what files were created. dist_files = getattr(self.distribution, "dist_files", []) dist_files.append(("sdist", "", sdist_package_file)) @@ -186,49 +185,25 @@ """The Python module name.""" return "py{0:s}".format(self.library_name[3:]) - @property - def package_name(self): - """The package name.""" - return "{0:s}-python".format(self.library_name) - - @property - def package_description(self): - """The package description.""" - return "Python bindings module for {0:s}".format(self.library_name) - - @property - def project_url(self): - """The project URL.""" - return "https://github.com/libyal/{0:s}/".format(self.library_name) - def _ReadConfigureAc(self): """Reads configure.ac to initialize the project information.""" - file_object = open("configure.ac", "rb") - if not file_object: - raise IOError("Unable to open: configure.ac") - - found_ac_init = False - found_library_name = False - for line in file_object.readlines(): - line = line.strip() - if found_library_name: - library_version = line[1:-2] - if sys.version_info[0] >= 3: - library_version = library_version.decode("ascii") - self.library_version = library_version - break - - elif found_ac_init: - library_name = line[1:-2] - if sys.version_info[0] >= 3: - library_name = library_name.decode("ascii") - self.library_name = library_name - found_library_name = True + with open("configure.ac", "r", encoding="utf-8") as file_object: + found_ac_init = False + found_library_name = False + for line in file_object.readlines(): + line = line.strip() + if found_library_name: + library_version = line[1:-2] + self.library_version = library_version + break - elif line.startswith(b"AC_INIT"): - found_ac_init = True + elif found_ac_init: + library_name = line[1:-2] + self.library_name = library_name + found_library_name = True - file_object.close() + elif line.startswith("AC_INIT"): + found_ac_init = True if not self.library_name or not self.library_version: raise RuntimeError( @@ -239,30 +214,23 @@ if not self.library_name: raise RuntimeError("Missing library name") - file_object = open("Makefile.am", "rb") - if not file_object: - raise IOError("Unable to open: Makefile.am") - - found_subdirs = False - for line in file_object.readlines(): - line = line.strip() - if found_subdirs: - library_name, _, _ = line.partition(b" ") - if sys.version_info[0] >= 3: - library_name = library_name.decode("ascii") + with open("Makefile.am", "r", encoding="utf-8") as file_object: + found_subdirs = False + for line in file_object.readlines(): + line = line.strip() + if found_subdirs: + library_name, _, _ = line.partition(" ") + + self.include_directories.append(library_name) - self.include_directories.append(library_name) + if library_name.startswith("lib"): + self.library_names.append(library_name) - if library_name.startswith("lib"): - self.library_names.append(library_name) + if library_name == self.library_name: + break - if library_name == self.library_name: - break - - elif line.startswith(b"SUBDIRS"): - found_subdirs = True - - file_object.close() + elif line.startswith("SUBDIRS"): + found_subdirs = True if not self.include_directories or not self.library_names: raise RuntimeError( @@ -272,6 +240,10 @@ project_information = ProjectInformation() +CMDCLASS = { + "build_ext": custom_build_ext, + "sdist": custom_sdist} + SOURCES = [] # TODO: replace by detection of MSC @@ -304,23 +276,8 @@ # TODO: find a way to detect missing python.h # e.g. on Ubuntu python-dev is not installed by python-pip -# TODO: what about description and platform in egg file - -setup( - name=project_information.package_name, - url=project_information.project_url, - version=project_information.library_version, - description=project_information.package_description, - long_description=project_information.package_description, - author="Joachim Metz", - author_email="joachim.metz@gmail.com", - license="GNU Lesser General Public License v3 or later (LGPLv3+)", - cmdclass={ - "build_ext": custom_build_ext, - "bdist_msi": custom_bdist_msi, - "bdist_rpm": custom_bdist_rpm, - "sdist": custom_sdist, - }, +setup_args = dict( + cmdclass=CMDCLASS, ext_modules=[ Extension( project_information.module_name, @@ -328,8 +285,9 @@ include_dirs=project_information.include_directories, libraries=[], library_dirs=[], - sources=SOURCES, - ), - ], + sources=SOURCES + ) + ] ) +setup(**setup_args) diff -Nru libfshfs-20201104/test-driver libfshfs-20240221/test-driver --- libfshfs-20201104/test-driver 2020-11-04 11:56:32.000000000 +0000 +++ libfshfs-20240221/test-driver 2024-02-21 06:04:26.000000000 +0000 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 2011-2018 Free Software Foundation, Inc. +# Copyright (C) 2011-2021 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -42,11 +42,13 @@ { cat <$log_file 2>&1 +# Test script is run here. We create the file first, then append to it, +# to ameliorate tests themselves also writing to the log file. Our tests +# don't, but others can (automake bug#35762). +: >"$log_file" +"$@" >>"$log_file" 2>&1 estatus=$? if test $enable_hard_errors = no && test $estatus -eq 99; then @@ -126,7 +131,7 @@ # know whether the test passed or failed simply by looking at the '.log' # file, without the need of also peaking into the corresponding '.trs' # file (automake bug#11814). -echo "$res $test_name (exit status: $estatus)" >>$log_file +echo "$res $test_name (exit status: $estatus)" >>"$log_file" # Report outcome to console. echo "${col}${res}${std}: $test_name" diff -Nru libfshfs-20201104/tests/Makefile.am libfshfs-20240221/tests/Makefile.am --- libfshfs-20201104/tests/Makefile.am 2020-11-04 04:22:26.000000000 +0000 +++ libfshfs-20240221/tests/Makefile.am 2024-02-21 05:50:08.000000000 +0000 @@ -17,6 +17,9 @@ @LIBFDATA_CPPFLAGS@ \ @LIBFDATETIME_CPPFLAGS@ \ @LIBFGUID_CPPFLAGS@ \ + @LIBFMOS_CPPFLAGS@ \ + @LIBCRYPTO_CPPFLAGS@ \ + @LIBHMAC_CPPFLAGS@ \ @ZLIB_CPPFLAGS@ \ @PTHREAD_CPPFLAGS@ \ @LIBFSHFS_DLL_IMPORT@ @@ -45,7 +48,9 @@ $(check_SCRIPTS) check_PROGRAMS = \ + fshfs_test_attribute_record \ fshfs_test_attributes_btree_key \ + fshfs_test_bit_stream \ fshfs_test_btree_file \ fshfs_test_btree_header \ fshfs_test_btree_node \ @@ -65,16 +70,32 @@ fshfs_test_file_record \ fshfs_test_file_system \ fshfs_test_fork_descriptor \ + fshfs_test_huffman_tree \ fshfs_test_io_handle \ + fshfs_test_master_directory_block \ fshfs_test_name \ fshfs_test_notify \ + fshfs_test_profiler \ fshfs_test_support \ fshfs_test_thread_record \ + fshfs_test_tools_info_handle \ fshfs_test_tools_output \ fshfs_test_tools_signal \ fshfs_test_volume \ fshfs_test_volume_header +fshfs_test_attribute_record_SOURCES = \ + fshfs_test_attribute_record.c \ + fshfs_test_libcerror.h \ + fshfs_test_libfshfs.h \ + fshfs_test_macros.h \ + fshfs_test_memory.c fshfs_test_memory.h \ + fshfs_test_unused.h + +fshfs_test_attribute_record_LDADD = \ + ../libfshfs/libfshfs.la \ + @LIBCERROR_LIBADD@ + fshfs_test_attributes_btree_key_SOURCES = \ fshfs_test_attributes_btree_key.c \ fshfs_test_libcerror.h \ @@ -87,6 +108,18 @@ ../libfshfs/libfshfs.la \ @LIBCERROR_LIBADD@ +fshfs_test_bit_stream_SOURCES = \ + fshfs_test_bit_stream.c \ + fshfs_test_libcerror.h \ + fshfs_test_libfshfs.h \ + fshfs_test_macros.h \ + fshfs_test_memory.c fshfs_test_memory.h \ + fshfs_test_unused.h + +fshfs_test_bit_stream_LDADD = \ + ../libfshfs/libfshfs.la \ + @LIBCERROR_LIBADD@ + fshfs_test_btree_file_SOURCES = \ fshfs_test_functions.c fshfs_test_functions.h \ fshfs_test_libbfio.h \ @@ -327,6 +360,18 @@ ../libfshfs/libfshfs.la \ @LIBCERROR_LIBADD@ +fshfs_test_huffman_tree_SOURCES = \ + fshfs_test_huffman_tree.c \ + fshfs_test_libcerror.h \ + fshfs_test_libfshfs.h \ + fshfs_test_macros.h \ + fshfs_test_memory.c fshfs_test_memory.h \ + fshfs_test_unused.h + +fshfs_test_huffman_tree_LDADD = \ + ../libfshfs/libfshfs.la \ + @LIBCERROR_LIBADD@ + fshfs_test_io_handle_SOURCES = \ fshfs_test_io_handle.c \ fshfs_test_libcerror.h \ @@ -339,6 +384,28 @@ ../libfshfs/libfshfs.la \ @LIBCERROR_LIBADD@ +fshfs_test_master_directory_block_SOURCES = \ + fshfs_test_functions.c fshfs_test_functions.h \ + fshfs_test_libbfio.h \ + fshfs_test_libcerror.h \ + fshfs_test_libfshfs.h \ + fshfs_test_macros.h \ + fshfs_test_master_directory_block.c \ + fshfs_test_memory.c fshfs_test_memory.h \ + fshfs_test_unused.h + +fshfs_test_master_directory_block_LDADD = \ + @LIBBFIO_LIBADD@ \ + @LIBCPATH_LIBADD@ \ + @LIBCFILE_LIBADD@ \ + @LIBUNA_LIBADD@ \ + @LIBCSPLIT_LIBADD@ \ + @LIBCNOTIFY_LIBADD@ \ + @LIBCLOCALE_LIBADD@ \ + @LIBCDATA_LIBADD@ \ + ../libfshfs/libfshfs.la \ + @LIBCERROR_LIBADD@ + fshfs_test_name_SOURCES = \ fshfs_test_libcerror.h \ fshfs_test_libfshfs.h \ @@ -365,6 +432,18 @@ ../libfshfs/libfshfs.la \ @LIBCERROR_LIBADD@ +fshfs_test_profiler_SOURCES = \ + fshfs_test_libcerror.h \ + fshfs_test_libfshfs.h \ + fshfs_test_macros.h \ + fshfs_test_memory.c fshfs_test_memory.h \ + fshfs_test_profiler.c \ + fshfs_test_unused.h + +fshfs_test_profiler_LDADD = \ + ../libfshfs/libfshfs.la \ + @LIBCERROR_LIBADD@ + fshfs_test_support_SOURCES = \ fshfs_test_functions.c fshfs_test_functions.h \ fshfs_test_getopt.c fshfs_test_getopt.h \ @@ -403,6 +482,32 @@ ../libfshfs/libfshfs.la \ @LIBCERROR_LIBADD@ +fshfs_test_tools_info_handle_SOURCES = \ + ../fshfstools/digest_hash.c ../fshfstools/digest_hash.h \ + ../fshfstools/info_handle.c ../fshfstools/info_handle.h \ + fshfs_test_libcerror.h \ + fshfs_test_macros.h \ + fshfs_test_memory.c fshfs_test_memory.h \ + fshfs_test_tools_info_handle.c \ + fshfs_test_unused.h + +fshfs_test_tools_info_handle_LDADD = \ + @LIBHMAC_LIBADD@ \ + @LIBFGUID_LIBADD@ \ + @LIBFDATETIME_LIBADD@ \ + @LIBBFIO_LIBADD@ \ + @LIBCPATH_LIBADD@ \ + @LIBCFILE_LIBADD@ \ + @LIBUNA_LIBADD@ \ + @LIBCSPLIT_LIBADD@ \ + @LIBCNOTIFY_LIBADD@ \ + @LIBCLOCALE_LIBADD@ \ + @LIBCDATA_LIBADD@ \ + ../libfshfs/libfshfs.la \ + @LIBCERROR_LIBADD@ \ + @LIBCRYPTO_LIBADD@ \ + @LIBDL_LIBADD@ + fshfs_test_tools_output_SOURCES = \ ../fshfstools/fshfstools_output.c ../fshfstools/fshfstools_output.h \ fshfs_test_libcerror.h \ @@ -479,5 +584,5 @@ Makefile.in distclean: clean - /bin/rm -f Makefile + -rm -f Makefile diff -Nru libfshfs-20201104/tests/Makefile.in libfshfs-20240221/tests/Makefile.in --- libfshfs-20201104/tests/Makefile.in 2020-11-04 11:56:32.000000000 +0000 +++ libfshfs-20240221/tests/Makefile.in 2024-02-21 06:04:26.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -87,8 +87,9 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -check_PROGRAMS = fshfs_test_attributes_btree_key$(EXEEXT) \ - fshfs_test_btree_file$(EXEEXT) \ +check_PROGRAMS = fshfs_test_attribute_record$(EXEEXT) \ + fshfs_test_attributes_btree_key$(EXEEXT) \ + fshfs_test_bit_stream$(EXEEXT) fshfs_test_btree_file$(EXEEXT) \ fshfs_test_btree_header$(EXEEXT) \ fshfs_test_btree_node$(EXEEXT) \ fshfs_test_btree_node_descriptor$(EXEEXT) \ @@ -104,34 +105,38 @@ fshfs_test_file_entry$(EXEEXT) fshfs_test_file_record$(EXEEXT) \ fshfs_test_file_system$(EXEEXT) \ fshfs_test_fork_descriptor$(EXEEXT) \ - fshfs_test_io_handle$(EXEEXT) fshfs_test_name$(EXEEXT) \ - fshfs_test_notify$(EXEEXT) fshfs_test_support$(EXEEXT) \ + fshfs_test_huffman_tree$(EXEEXT) fshfs_test_io_handle$(EXEEXT) \ + fshfs_test_master_directory_block$(EXEEXT) \ + fshfs_test_name$(EXEEXT) fshfs_test_notify$(EXEEXT) \ + fshfs_test_profiler$(EXEEXT) fshfs_test_support$(EXEEXT) \ fshfs_test_thread_record$(EXEEXT) \ + fshfs_test_tools_info_handle$(EXEEXT) \ fshfs_test_tools_output$(EXEEXT) \ fshfs_test_tools_signal$(EXEEXT) fshfs_test_volume$(EXEEXT) \ fshfs_test_volume_header$(EXEEXT) subdir = tests ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcdata.m4 \ - $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \ - $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \ - $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcrypto.m4 \ - $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcthreads.m4 \ - $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ - $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ - $(top_srcdir)/m4/libhmac.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/libuna.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \ - $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \ - $(top_srcdir)/m4/zlib.m4 $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libbfio.m4 \ + $(top_srcdir)/m4/libcdata.m4 $(top_srcdir)/m4/libcerror.m4 \ + $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ + $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ + $(top_srcdir)/m4/libcrypto.m4 $(top_srcdir)/m4/libcsplit.m4 \ + $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \ + $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ + $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmos.m4 \ + $(top_srcdir)/m4/libfuse.m4 $(top_srcdir)/m4/libhmac.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/pthread.m4 \ + $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ + $(top_srcdir)/m4/types.m4 $(top_srcdir)/m4/zlib.m4 \ + $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) @@ -139,6 +144,16 @@ CONFIG_HEADER = $(top_builddir)/common/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = +am_fshfs_test_attribute_record_OBJECTS = \ + fshfs_test_attribute_record.$(OBJEXT) \ + fshfs_test_memory.$(OBJEXT) +fshfs_test_attribute_record_OBJECTS = \ + $(am_fshfs_test_attribute_record_OBJECTS) +fshfs_test_attribute_record_DEPENDENCIES = ../libfshfs/libfshfs.la +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = am_fshfs_test_attributes_btree_key_OBJECTS = \ fshfs_test_attributes_btree_key.$(OBJEXT) \ fshfs_test_memory.$(OBJEXT) @@ -146,10 +161,10 @@ $(am_fshfs_test_attributes_btree_key_OBJECTS) fshfs_test_attributes_btree_key_DEPENDENCIES = \ ../libfshfs/libfshfs.la -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -am__v_lt_1 = +am_fshfs_test_bit_stream_OBJECTS = fshfs_test_bit_stream.$(OBJEXT) \ + fshfs_test_memory.$(OBJEXT) +fshfs_test_bit_stream_OBJECTS = $(am_fshfs_test_bit_stream_OBJECTS) +fshfs_test_bit_stream_DEPENDENCIES = ../libfshfs/libfshfs.la am_fshfs_test_btree_file_OBJECTS = fshfs_test_functions.$(OBJEXT) \ fshfs_test_btree_file.$(OBJEXT) fshfs_test_memory.$(OBJEXT) fshfs_test_btree_file_OBJECTS = $(am_fshfs_test_btree_file_OBJECTS) @@ -245,10 +260,23 @@ fshfs_test_fork_descriptor_OBJECTS = \ $(am_fshfs_test_fork_descriptor_OBJECTS) fshfs_test_fork_descriptor_DEPENDENCIES = ../libfshfs/libfshfs.la +am_fshfs_test_huffman_tree_OBJECTS = \ + fshfs_test_huffman_tree.$(OBJEXT) fshfs_test_memory.$(OBJEXT) +fshfs_test_huffman_tree_OBJECTS = \ + $(am_fshfs_test_huffman_tree_OBJECTS) +fshfs_test_huffman_tree_DEPENDENCIES = ../libfshfs/libfshfs.la am_fshfs_test_io_handle_OBJECTS = fshfs_test_io_handle.$(OBJEXT) \ fshfs_test_memory.$(OBJEXT) fshfs_test_io_handle_OBJECTS = $(am_fshfs_test_io_handle_OBJECTS) fshfs_test_io_handle_DEPENDENCIES = ../libfshfs/libfshfs.la +am_fshfs_test_master_directory_block_OBJECTS = \ + fshfs_test_functions.$(OBJEXT) \ + fshfs_test_master_directory_block.$(OBJEXT) \ + fshfs_test_memory.$(OBJEXT) +fshfs_test_master_directory_block_OBJECTS = \ + $(am_fshfs_test_master_directory_block_OBJECTS) +fshfs_test_master_directory_block_DEPENDENCIES = \ + ../libfshfs/libfshfs.la am_fshfs_test_name_OBJECTS = fshfs_test_memory.$(OBJEXT) \ fshfs_test_name.$(OBJEXT) fshfs_test_name_OBJECTS = $(am_fshfs_test_name_OBJECTS) @@ -256,6 +284,10 @@ am_fshfs_test_notify_OBJECTS = fshfs_test_notify.$(OBJEXT) fshfs_test_notify_OBJECTS = $(am_fshfs_test_notify_OBJECTS) fshfs_test_notify_DEPENDENCIES = ../libfshfs/libfshfs.la +am_fshfs_test_profiler_OBJECTS = fshfs_test_memory.$(OBJEXT) \ + fshfs_test_profiler.$(OBJEXT) +fshfs_test_profiler_OBJECTS = $(am_fshfs_test_profiler_OBJECTS) +fshfs_test_profiler_DEPENDENCIES = ../libfshfs/libfshfs.la am_fshfs_test_support_OBJECTS = fshfs_test_functions.$(OBJEXT) \ fshfs_test_getopt.$(OBJEXT) fshfs_test_memory.$(OBJEXT) \ fshfs_test_support.$(OBJEXT) @@ -267,6 +299,14 @@ $(am_fshfs_test_thread_record_OBJECTS) fshfs_test_thread_record_DEPENDENCIES = ../libfshfs/libfshfs.la am__dirstamp = $(am__leading_dot)dirstamp +am_fshfs_test_tools_info_handle_OBJECTS = \ + ../fshfstools/digest_hash.$(OBJEXT) \ + ../fshfstools/info_handle.$(OBJEXT) \ + fshfs_test_memory.$(OBJEXT) \ + fshfs_test_tools_info_handle.$(OBJEXT) +fshfs_test_tools_info_handle_OBJECTS = \ + $(am_fshfs_test_tools_info_handle_OBJECTS) +fshfs_test_tools_info_handle_DEPENDENCIES = ../libfshfs/libfshfs.la am_fshfs_test_tools_output_OBJECTS = \ ../fshfstools/fshfstools_output.$(OBJEXT) \ fshfs_test_tools_output.$(OBJEXT) @@ -304,9 +344,13 @@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles -am__depfiles_remade = ../fshfstools/$(DEPDIR)/fshfstools_output.Po \ +am__depfiles_remade = ../fshfstools/$(DEPDIR)/digest_hash.Po \ + ../fshfstools/$(DEPDIR)/fshfstools_output.Po \ ../fshfstools/$(DEPDIR)/fshfstools_signal.Po \ + ../fshfstools/$(DEPDIR)/info_handle.Po \ + ./$(DEPDIR)/fshfs_test_attribute_record.Po \ ./$(DEPDIR)/fshfs_test_attributes_btree_key.Po \ + ./$(DEPDIR)/fshfs_test_bit_stream.Po \ ./$(DEPDIR)/fshfs_test_btree_file.Po \ ./$(DEPDIR)/fshfs_test_btree_header.Po \ ./$(DEPDIR)/fshfs_test_btree_node.Po \ @@ -328,12 +372,16 @@ ./$(DEPDIR)/fshfs_test_fork_descriptor.Po \ ./$(DEPDIR)/fshfs_test_functions.Po \ ./$(DEPDIR)/fshfs_test_getopt.Po \ + ./$(DEPDIR)/fshfs_test_huffman_tree.Po \ ./$(DEPDIR)/fshfs_test_io_handle.Po \ + ./$(DEPDIR)/fshfs_test_master_directory_block.Po \ ./$(DEPDIR)/fshfs_test_memory.Po \ ./$(DEPDIR)/fshfs_test_name.Po \ ./$(DEPDIR)/fshfs_test_notify.Po \ + ./$(DEPDIR)/fshfs_test_profiler.Po \ ./$(DEPDIR)/fshfs_test_support.Po \ ./$(DEPDIR)/fshfs_test_thread_record.Po \ + ./$(DEPDIR)/fshfs_test_tools_info_handle.Po \ ./$(DEPDIR)/fshfs_test_tools_output.Po \ ./$(DEPDIR)/fshfs_test_tools_signal.Po \ ./$(DEPDIR)/fshfs_test_volume.Po \ @@ -357,7 +405,9 @@ am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = -SOURCES = $(fshfs_test_attributes_btree_key_SOURCES) \ +SOURCES = $(fshfs_test_attribute_record_SOURCES) \ + $(fshfs_test_attributes_btree_key_SOURCES) \ + $(fshfs_test_bit_stream_SOURCES) \ $(fshfs_test_btree_file_SOURCES) \ $(fshfs_test_btree_header_SOURCES) \ $(fshfs_test_btree_node_SOURCES) \ @@ -376,14 +426,20 @@ $(fshfs_test_file_record_SOURCES) \ $(fshfs_test_file_system_SOURCES) \ $(fshfs_test_fork_descriptor_SOURCES) \ - $(fshfs_test_io_handle_SOURCES) $(fshfs_test_name_SOURCES) \ - $(fshfs_test_notify_SOURCES) $(fshfs_test_support_SOURCES) \ + $(fshfs_test_huffman_tree_SOURCES) \ + $(fshfs_test_io_handle_SOURCES) \ + $(fshfs_test_master_directory_block_SOURCES) \ + $(fshfs_test_name_SOURCES) $(fshfs_test_notify_SOURCES) \ + $(fshfs_test_profiler_SOURCES) $(fshfs_test_support_SOURCES) \ $(fshfs_test_thread_record_SOURCES) \ + $(fshfs_test_tools_info_handle_SOURCES) \ $(fshfs_test_tools_output_SOURCES) \ $(fshfs_test_tools_signal_SOURCES) \ $(fshfs_test_volume_SOURCES) \ $(fshfs_test_volume_header_SOURCES) -DIST_SOURCES = $(fshfs_test_attributes_btree_key_SOURCES) \ +DIST_SOURCES = $(fshfs_test_attribute_record_SOURCES) \ + $(fshfs_test_attributes_btree_key_SOURCES) \ + $(fshfs_test_bit_stream_SOURCES) \ $(fshfs_test_btree_file_SOURCES) \ $(fshfs_test_btree_header_SOURCES) \ $(fshfs_test_btree_node_SOURCES) \ @@ -402,9 +458,13 @@ $(fshfs_test_file_record_SOURCES) \ $(fshfs_test_file_system_SOURCES) \ $(fshfs_test_fork_descriptor_SOURCES) \ - $(fshfs_test_io_handle_SOURCES) $(fshfs_test_name_SOURCES) \ - $(fshfs_test_notify_SOURCES) $(fshfs_test_support_SOURCES) \ + $(fshfs_test_huffman_tree_SOURCES) \ + $(fshfs_test_io_handle_SOURCES) \ + $(fshfs_test_master_directory_block_SOURCES) \ + $(fshfs_test_name_SOURCES) $(fshfs_test_notify_SOURCES) \ + $(fshfs_test_profiler_SOURCES) $(fshfs_test_support_SOURCES) \ $(fshfs_test_thread_record_SOURCES) \ + $(fshfs_test_tools_info_handle_SOURCES) \ $(fshfs_test_tools_output_SOURCES) \ $(fshfs_test_tools_signal_SOURCES) \ $(fshfs_test_volume_SOURCES) \ @@ -414,6 +474,7 @@ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -431,8 +492,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no @@ -615,6 +674,7 @@ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` +AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log @@ -654,6 +714,8 @@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ @@ -669,8 +731,10 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -690,6 +754,8 @@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ +HAVE_LIBFMOS = @HAVE_LIBFMOS@ +HAVE_LIBFUSE = @HAVE_LIBFUSE@ HAVE_LIBHMAC = @HAVE_LIBHMAC@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ @@ -705,6 +771,7 @@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ +HAVE_LOCAL_LIBFMOS = @HAVE_LOCAL_LIBFMOS@ HAVE_LOCAL_LIBHMAC = @HAVE_LOCAL_LIBHMAC@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ @@ -758,8 +825,12 @@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ +LIBFMOS_CPPFLAGS = @LIBFMOS_CPPFLAGS@ +LIBFMOS_LIBADD = @LIBFMOS_LIBADD@ LIBFSHFS_DLL_EXPORT = @LIBFSHFS_DLL_EXPORT@ LIBFSHFS_DLL_IMPORT = @LIBFSHFS_DLL_IMPORT@ +LIBFUSE_CPPFLAGS = @LIBFUSE_CPPFLAGS@ +LIBFUSE_LIBADD = @LIBFUSE_LIBADD@ LIBHMAC_CPPFLAGS = @LIBHMAC_CPPFLAGS@ LIBHMAC_LIBADD = @LIBHMAC_LIBADD@ LIBICONV = @LIBICONV@ @@ -781,8 +852,8 @@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ @@ -805,26 +876,6 @@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ -PYTHON2 = @PYTHON2@ -PYTHON2_CONFIG = @PYTHON2_CONFIG@ -PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ -PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ -PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ -PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ -PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ -PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ -PYTHON2_PREFIX = @PYTHON2_PREFIX@ -PYTHON2_VERSION = @PYTHON2_VERSION@ -PYTHON3 = @PYTHON3@ -PYTHON3_CONFIG = @PYTHON3_CONFIG@ -PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ -PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ -PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ -PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ -PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ -PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ -PYTHON3_PREFIX = @PYTHON3_PREFIX@ -PYTHON3_VERSION = @PYTHON3_VERSION@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ @@ -902,6 +953,12 @@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ +ax_libfmos_pc_libs_private = @ax_libfmos_pc_libs_private@ +ax_libfmos_spec_build_requires = @ax_libfmos_spec_build_requires@ +ax_libfmos_spec_requires = @ax_libfmos_spec_requires@ +ax_libfuse_pc_libs_private = @ax_libfuse_pc_libs_private@ +ax_libfuse_spec_build_requires = @ax_libfuse_spec_build_requires@ +ax_libfuse_spec_requires = @ax_libfuse_spec_requires@ ax_libhmac_pc_libs_private = @ax_libhmac_pc_libs_private@ ax_libhmac_spec_build_requires = @ax_libhmac_spec_build_requires@ ax_libhmac_spec_requires = @ax_libhmac_spec_requires@ @@ -926,6 +983,8 @@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +fuse_CFLAGS = @fuse_CFLAGS@ +fuse_LIBS = @fuse_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -963,6 +1022,8 @@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ +libfmos_CFLAGS = @libfmos_CFLAGS@ +libfmos_LIBS = @libfmos_LIBS@ libfshfs_spec_requires = @libfshfs_spec_requires@ libfshfs_spec_tools_build_requires = @libfshfs_spec_tools_build_requires@ libhmac_CFLAGS = @libhmac_CFLAGS@ @@ -981,11 +1042,8 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ -pyexecdir2 = @pyexecdir2@ -pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ -pythondir2 = @pythondir2@ -pythondir3 = @pythondir3@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -1014,6 +1072,9 @@ @LIBFDATA_CPPFLAGS@ \ @LIBFDATETIME_CPPFLAGS@ \ @LIBFGUID_CPPFLAGS@ \ + @LIBFMOS_CPPFLAGS@ \ + @LIBCRYPTO_CPPFLAGS@ \ + @LIBHMAC_CPPFLAGS@ \ @ZLIB_CPPFLAGS@ \ @PTHREAD_CPPFLAGS@ \ @LIBFSHFS_DLL_IMPORT@ @@ -1039,6 +1100,18 @@ EXTRA_DIST = \ $(check_SCRIPTS) +fshfs_test_attribute_record_SOURCES = \ + fshfs_test_attribute_record.c \ + fshfs_test_libcerror.h \ + fshfs_test_libfshfs.h \ + fshfs_test_macros.h \ + fshfs_test_memory.c fshfs_test_memory.h \ + fshfs_test_unused.h + +fshfs_test_attribute_record_LDADD = \ + ../libfshfs/libfshfs.la \ + @LIBCERROR_LIBADD@ + fshfs_test_attributes_btree_key_SOURCES = \ fshfs_test_attributes_btree_key.c \ fshfs_test_libcerror.h \ @@ -1051,6 +1124,18 @@ ../libfshfs/libfshfs.la \ @LIBCERROR_LIBADD@ +fshfs_test_bit_stream_SOURCES = \ + fshfs_test_bit_stream.c \ + fshfs_test_libcerror.h \ + fshfs_test_libfshfs.h \ + fshfs_test_macros.h \ + fshfs_test_memory.c fshfs_test_memory.h \ + fshfs_test_unused.h + +fshfs_test_bit_stream_LDADD = \ + ../libfshfs/libfshfs.la \ + @LIBCERROR_LIBADD@ + fshfs_test_btree_file_SOURCES = \ fshfs_test_functions.c fshfs_test_functions.h \ fshfs_test_libbfio.h \ @@ -1291,6 +1376,18 @@ ../libfshfs/libfshfs.la \ @LIBCERROR_LIBADD@ +fshfs_test_huffman_tree_SOURCES = \ + fshfs_test_huffman_tree.c \ + fshfs_test_libcerror.h \ + fshfs_test_libfshfs.h \ + fshfs_test_macros.h \ + fshfs_test_memory.c fshfs_test_memory.h \ + fshfs_test_unused.h + +fshfs_test_huffman_tree_LDADD = \ + ../libfshfs/libfshfs.la \ + @LIBCERROR_LIBADD@ + fshfs_test_io_handle_SOURCES = \ fshfs_test_io_handle.c \ fshfs_test_libcerror.h \ @@ -1303,6 +1400,28 @@ ../libfshfs/libfshfs.la \ @LIBCERROR_LIBADD@ +fshfs_test_master_directory_block_SOURCES = \ + fshfs_test_functions.c fshfs_test_functions.h \ + fshfs_test_libbfio.h \ + fshfs_test_libcerror.h \ + fshfs_test_libfshfs.h \ + fshfs_test_macros.h \ + fshfs_test_master_directory_block.c \ + fshfs_test_memory.c fshfs_test_memory.h \ + fshfs_test_unused.h + +fshfs_test_master_directory_block_LDADD = \ + @LIBBFIO_LIBADD@ \ + @LIBCPATH_LIBADD@ \ + @LIBCFILE_LIBADD@ \ + @LIBUNA_LIBADD@ \ + @LIBCSPLIT_LIBADD@ \ + @LIBCNOTIFY_LIBADD@ \ + @LIBCLOCALE_LIBADD@ \ + @LIBCDATA_LIBADD@ \ + ../libfshfs/libfshfs.la \ + @LIBCERROR_LIBADD@ + fshfs_test_name_SOURCES = \ fshfs_test_libcerror.h \ fshfs_test_libfshfs.h \ @@ -1329,6 +1448,18 @@ ../libfshfs/libfshfs.la \ @LIBCERROR_LIBADD@ +fshfs_test_profiler_SOURCES = \ + fshfs_test_libcerror.h \ + fshfs_test_libfshfs.h \ + fshfs_test_macros.h \ + fshfs_test_memory.c fshfs_test_memory.h \ + fshfs_test_profiler.c \ + fshfs_test_unused.h + +fshfs_test_profiler_LDADD = \ + ../libfshfs/libfshfs.la \ + @LIBCERROR_LIBADD@ + fshfs_test_support_SOURCES = \ fshfs_test_functions.c fshfs_test_functions.h \ fshfs_test_getopt.c fshfs_test_getopt.h \ @@ -1367,6 +1498,32 @@ ../libfshfs/libfshfs.la \ @LIBCERROR_LIBADD@ +fshfs_test_tools_info_handle_SOURCES = \ + ../fshfstools/digest_hash.c ../fshfstools/digest_hash.h \ + ../fshfstools/info_handle.c ../fshfstools/info_handle.h \ + fshfs_test_libcerror.h \ + fshfs_test_macros.h \ + fshfs_test_memory.c fshfs_test_memory.h \ + fshfs_test_tools_info_handle.c \ + fshfs_test_unused.h + +fshfs_test_tools_info_handle_LDADD = \ + @LIBHMAC_LIBADD@ \ + @LIBFGUID_LIBADD@ \ + @LIBFDATETIME_LIBADD@ \ + @LIBBFIO_LIBADD@ \ + @LIBCPATH_LIBADD@ \ + @LIBCFILE_LIBADD@ \ + @LIBUNA_LIBADD@ \ + @LIBCSPLIT_LIBADD@ \ + @LIBCNOTIFY_LIBADD@ \ + @LIBCLOCALE_LIBADD@ \ + @LIBCDATA_LIBADD@ \ + ../libfshfs/libfshfs.la \ + @LIBCERROR_LIBADD@ \ + @LIBCRYPTO_LIBADD@ \ + @LIBDL_LIBADD@ + fshfs_test_tools_output_SOURCES = \ ../fshfstools/fshfstools_output.c ../fshfstools/fshfstools_output.h \ fshfs_test_libcerror.h \ @@ -1485,10 +1642,18 @@ echo " rm -f" $$list; \ rm -f $$list +fshfs_test_attribute_record$(EXEEXT): $(fshfs_test_attribute_record_OBJECTS) $(fshfs_test_attribute_record_DEPENDENCIES) $(EXTRA_fshfs_test_attribute_record_DEPENDENCIES) + @rm -f fshfs_test_attribute_record$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fshfs_test_attribute_record_OBJECTS) $(fshfs_test_attribute_record_LDADD) $(LIBS) + fshfs_test_attributes_btree_key$(EXEEXT): $(fshfs_test_attributes_btree_key_OBJECTS) $(fshfs_test_attributes_btree_key_DEPENDENCIES) $(EXTRA_fshfs_test_attributes_btree_key_DEPENDENCIES) @rm -f fshfs_test_attributes_btree_key$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fshfs_test_attributes_btree_key_OBJECTS) $(fshfs_test_attributes_btree_key_LDADD) $(LIBS) +fshfs_test_bit_stream$(EXEEXT): $(fshfs_test_bit_stream_OBJECTS) $(fshfs_test_bit_stream_DEPENDENCIES) $(EXTRA_fshfs_test_bit_stream_DEPENDENCIES) + @rm -f fshfs_test_bit_stream$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fshfs_test_bit_stream_OBJECTS) $(fshfs_test_bit_stream_LDADD) $(LIBS) + fshfs_test_btree_file$(EXEEXT): $(fshfs_test_btree_file_OBJECTS) $(fshfs_test_btree_file_DEPENDENCIES) $(EXTRA_fshfs_test_btree_file_DEPENDENCIES) @rm -f fshfs_test_btree_file$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fshfs_test_btree_file_OBJECTS) $(fshfs_test_btree_file_LDADD) $(LIBS) @@ -1565,10 +1730,18 @@ @rm -f fshfs_test_fork_descriptor$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fshfs_test_fork_descriptor_OBJECTS) $(fshfs_test_fork_descriptor_LDADD) $(LIBS) +fshfs_test_huffman_tree$(EXEEXT): $(fshfs_test_huffman_tree_OBJECTS) $(fshfs_test_huffman_tree_DEPENDENCIES) $(EXTRA_fshfs_test_huffman_tree_DEPENDENCIES) + @rm -f fshfs_test_huffman_tree$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fshfs_test_huffman_tree_OBJECTS) $(fshfs_test_huffman_tree_LDADD) $(LIBS) + fshfs_test_io_handle$(EXEEXT): $(fshfs_test_io_handle_OBJECTS) $(fshfs_test_io_handle_DEPENDENCIES) $(EXTRA_fshfs_test_io_handle_DEPENDENCIES) @rm -f fshfs_test_io_handle$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fshfs_test_io_handle_OBJECTS) $(fshfs_test_io_handle_LDADD) $(LIBS) +fshfs_test_master_directory_block$(EXEEXT): $(fshfs_test_master_directory_block_OBJECTS) $(fshfs_test_master_directory_block_DEPENDENCIES) $(EXTRA_fshfs_test_master_directory_block_DEPENDENCIES) + @rm -f fshfs_test_master_directory_block$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fshfs_test_master_directory_block_OBJECTS) $(fshfs_test_master_directory_block_LDADD) $(LIBS) + fshfs_test_name$(EXEEXT): $(fshfs_test_name_OBJECTS) $(fshfs_test_name_DEPENDENCIES) $(EXTRA_fshfs_test_name_DEPENDENCIES) @rm -f fshfs_test_name$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fshfs_test_name_OBJECTS) $(fshfs_test_name_LDADD) $(LIBS) @@ -1577,6 +1750,10 @@ @rm -f fshfs_test_notify$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fshfs_test_notify_OBJECTS) $(fshfs_test_notify_LDADD) $(LIBS) +fshfs_test_profiler$(EXEEXT): $(fshfs_test_profiler_OBJECTS) $(fshfs_test_profiler_DEPENDENCIES) $(EXTRA_fshfs_test_profiler_DEPENDENCIES) + @rm -f fshfs_test_profiler$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fshfs_test_profiler_OBJECTS) $(fshfs_test_profiler_LDADD) $(LIBS) + fshfs_test_support$(EXEEXT): $(fshfs_test_support_OBJECTS) $(fshfs_test_support_DEPENDENCIES) $(EXTRA_fshfs_test_support_DEPENDENCIES) @rm -f fshfs_test_support$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fshfs_test_support_OBJECTS) $(fshfs_test_support_LDADD) $(LIBS) @@ -1590,6 +1767,14 @@ ../fshfstools/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ../fshfstools/$(DEPDIR) @: > ../fshfstools/$(DEPDIR)/$(am__dirstamp) +../fshfstools/digest_hash.$(OBJEXT): ../fshfstools/$(am__dirstamp) \ + ../fshfstools/$(DEPDIR)/$(am__dirstamp) +../fshfstools/info_handle.$(OBJEXT): ../fshfstools/$(am__dirstamp) \ + ../fshfstools/$(DEPDIR)/$(am__dirstamp) + +fshfs_test_tools_info_handle$(EXEEXT): $(fshfs_test_tools_info_handle_OBJECTS) $(fshfs_test_tools_info_handle_DEPENDENCIES) $(EXTRA_fshfs_test_tools_info_handle_DEPENDENCIES) + @rm -f fshfs_test_tools_info_handle$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fshfs_test_tools_info_handle_OBJECTS) $(fshfs_test_tools_info_handle_LDADD) $(LIBS) ../fshfstools/fshfstools_output.$(OBJEXT): \ ../fshfstools/$(am__dirstamp) \ ../fshfstools/$(DEPDIR)/$(am__dirstamp) @@ -1620,9 +1805,13 @@ distclean-compile: -rm -f *.tab.c +@AMDEP_TRUE@@am__include@ @am__quote@../fshfstools/$(DEPDIR)/digest_hash.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@../fshfstools/$(DEPDIR)/fshfstools_output.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@../fshfstools/$(DEPDIR)/fshfstools_signal.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@../fshfstools/$(DEPDIR)/info_handle.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fshfs_test_attribute_record.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fshfs_test_attributes_btree_key.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fshfs_test_bit_stream.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fshfs_test_btree_file.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fshfs_test_btree_header.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fshfs_test_btree_node.Po@am__quote@ # am--include-marker @@ -1644,12 +1833,16 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fshfs_test_fork_descriptor.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fshfs_test_functions.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fshfs_test_getopt.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fshfs_test_huffman_tree.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fshfs_test_io_handle.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fshfs_test_master_directory_block.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fshfs_test_memory.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fshfs_test_name.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fshfs_test_notify.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fshfs_test_profiler.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fshfs_test_support.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fshfs_test_thread_record.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fshfs_test_tools_info_handle.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fshfs_test_tools_output.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fshfs_test_tools_signal.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fshfs_test_volume.Po@am__quote@ # am--include-marker @@ -1690,6 +1883,8 @@ clean-libtool: -rm -rf .libs _libs +sources-local: +splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique @@ -1850,7 +2045,7 @@ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ @@ -1926,7 +2121,6 @@ @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am @@ -2051,9 +2245,13 @@ installcheck-am: maintainer-clean: maintainer-clean-am - -rm -f ../fshfstools/$(DEPDIR)/fshfstools_output.Po + -rm -f ../fshfstools/$(DEPDIR)/digest_hash.Po + -rm -f ../fshfstools/$(DEPDIR)/fshfstools_output.Po -rm -f ../fshfstools/$(DEPDIR)/fshfstools_signal.Po + -rm -f ../fshfstools/$(DEPDIR)/info_handle.Po + -rm -f ./$(DEPDIR)/fshfs_test_attribute_record.Po -rm -f ./$(DEPDIR)/fshfs_test_attributes_btree_key.Po + -rm -f ./$(DEPDIR)/fshfs_test_bit_stream.Po -rm -f ./$(DEPDIR)/fshfs_test_btree_file.Po -rm -f ./$(DEPDIR)/fshfs_test_btree_header.Po -rm -f ./$(DEPDIR)/fshfs_test_btree_node.Po @@ -2075,12 +2273,16 @@ -rm -f ./$(DEPDIR)/fshfs_test_fork_descriptor.Po -rm -f ./$(DEPDIR)/fshfs_test_functions.Po -rm -f ./$(DEPDIR)/fshfs_test_getopt.Po + -rm -f ./$(DEPDIR)/fshfs_test_huffman_tree.Po -rm -f ./$(DEPDIR)/fshfs_test_io_handle.Po + -rm -f ./$(DEPDIR)/fshfs_test_master_directory_block.Po -rm -f ./$(DEPDIR)/fshfs_test_memory.Po -rm -f ./$(DEPDIR)/fshfs_test_name.Po -rm -f ./$(DEPDIR)/fshfs_test_notify.Po + -rm -f ./$(DEPDIR)/fshfs_test_profiler.Po -rm -f ./$(DEPDIR)/fshfs_test_support.Po -rm -f ./$(DEPDIR)/fshfs_test_thread_record.Po + -rm -f ./$(DEPDIR)/fshfs_test_tools_info_handle.Po -rm -f ./$(DEPDIR)/fshfs_test_tools_output.Po -rm -f ./$(DEPDIR)/fshfs_test_tools_signal.Po -rm -f ./$(DEPDIR)/fshfs_test_volume.Po @@ -2101,6 +2303,14 @@ ps-am: +sources: sources-am + +sources-am: sources-local + +splint: splint-am + +splint-am: splint-local + uninstall-am: .MAKE: check-am install-am install-strip @@ -2117,13 +2327,14 @@ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - recheck tags tags-am uninstall uninstall-am + recheck sources-am sources-local splint-am splint-local tags \ + tags-am uninstall uninstall-am .PRECIOUS: Makefile distclean: clean - /bin/rm -f Makefile + -rm -f Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru libfshfs-20201104/tests/fshfs_test_attribute_record.c libfshfs-20240221/tests/fshfs_test_attribute_record.c --- libfshfs-20201104/tests/fshfs_test_attribute_record.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_attribute_record.c 2024-02-21 05:50:08.000000000 +0000 @@ -0,0 +1,955 @@ +/* + * Library attribute_record type test program + * + * Copyright (C) 2020-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include +#include + +#if defined( HAVE_STDLIB_H ) || defined( WINAPI ) +#include +#endif + +#include "fshfs_test_libcerror.h" +#include "fshfs_test_libfshfs.h" +#include "fshfs_test_libuna.h" +#include "fshfs_test_macros.h" +#include "fshfs_test_memory.h" +#include "fshfs_test_unused.h" + +#include "../libfshfs/libfshfs_attribute_record.h" + +#if defined( __GNUC__ ) && !defined( LIBFSHFS_DLL_IMPORT ) + +/* Tests the libfshfs_attribute_record_initialize function + * Returns 1 if successful or 0 if not + */ +int fshfs_test_attribute_record_initialize( + void ) +{ + libcerror_error_t *error = NULL; + libfshfs_attribute_record_t *attribute_record = NULL; + int result = 0; + +#if defined( HAVE_FSHFS_TEST_MEMORY ) + int number_of_malloc_fail_tests = 1; + int number_of_memset_fail_tests = 1; + int test_number = 0; +#endif + + /* Test regular cases + */ + result = libfshfs_attribute_record_initialize( + &attribute_record, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "attribute_record", + attribute_record ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + result = libfshfs_attribute_record_free( + &attribute_record, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "attribute_record", + attribute_record ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + /* Test error cases + */ + result = libfshfs_attribute_record_initialize( + NULL, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + attribute_record = (libfshfs_attribute_record_t *) 0x12345678UL; + + result = libfshfs_attribute_record_initialize( + &attribute_record, + &error ); + + attribute_record = NULL; + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + +#if defined( HAVE_FSHFS_TEST_MEMORY ) + + for( test_number = 0; + test_number < number_of_malloc_fail_tests; + test_number++ ) + { + /* Test libfshfs_attribute_record_initialize with malloc failing + */ + fshfs_test_malloc_attempts_before_fail = test_number; + + result = libfshfs_attribute_record_initialize( + &attribute_record, + &error ); + + if( fshfs_test_malloc_attempts_before_fail != -1 ) + { + fshfs_test_malloc_attempts_before_fail = -1; + + if( attribute_record != NULL ) + { + libfshfs_attribute_record_free( + &attribute_record, + NULL ); + } + } + else + { + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "attribute_record", + attribute_record ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + } + } + for( test_number = 0; + test_number < number_of_memset_fail_tests; + test_number++ ) + { + /* Test libfshfs_attribute_record_initialize with memset failing + */ + fshfs_test_memset_attempts_before_fail = test_number; + + result = libfshfs_attribute_record_initialize( + &attribute_record, + &error ); + + if( fshfs_test_memset_attempts_before_fail != -1 ) + { + fshfs_test_memset_attempts_before_fail = -1; + + if( attribute_record != NULL ) + { + libfshfs_attribute_record_free( + &attribute_record, + NULL ); + } + } + else + { + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "attribute_record", + attribute_record ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + } + } +#endif /* defined( HAVE_FSHFS_TEST_MEMORY ) */ + + return( 1 ); + +on_error: + if( error != NULL ) + { + libcerror_error_free( + &error ); + } + if( attribute_record != NULL ) + { + libfshfs_attribute_record_free( + &attribute_record, + NULL ); + } + return( 0 ); +} + +/* Tests the libfshfs_attribute_record_free function + * Returns 1 if successful or 0 if not + */ +int fshfs_test_attribute_record_free( + void ) +{ + libcerror_error_t *error = NULL; + int result = 0; + + /* Test error cases + */ + result = libfshfs_attribute_record_free( + NULL, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + return( 1 ); + +on_error: + if( error != NULL ) + { + libcerror_error_free( + &error ); + } + return( 0 ); +} + +/* Tests the libfshfs_attribute_record_compare_name_with_utf8_string function + * Returns 1 if successful or 0 if not + */ +int fsapfs_test_attribute_record_compare_name_with_utf8_string( + libfshfs_attribute_record_t *attribute_record ) +{ + uint8_t utf8_string[ 9 ] = { 'm', 'y', 'x', 'a', 't', 't', 'r', '1', 0 }; + libcerror_error_t *error = NULL; + int result = 0; + + /* Test regular cases + */ + result = libfshfs_attribute_record_compare_name_with_utf8_string( + attribute_record, + utf8_string, + 8, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + LIBUNA_COMPARE_EQUAL ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + /* Test error cases + */ + result = libfshfs_attribute_record_compare_name_with_utf8_string( + NULL, + utf8_string, + 8, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_attribute_record_compare_name_with_utf8_string( + attribute_record, + NULL, + 8, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + return( 1 ); + +on_error: + if( error != NULL ) + { + libcerror_error_free( + &error ); + } + return( 0 ); +} + +/* Tests the libfshfs_attribute_record_get_utf8_name_size function + * Returns 1 if successful or 0 if not + */ +int fshfs_test_attribute_record_get_utf8_name_size( + libfshfs_attribute_record_t *attribute_record ) +{ + libcerror_error_t *error = NULL; + size_t utf8_name_size = 0; + int result = 0; + + /* Test regular cases + */ + result = libfshfs_attribute_record_get_utf8_name_size( + attribute_record, + &utf8_name_size, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + /* Test error cases + */ + result = libfshfs_attribute_record_get_utf8_name_size( + NULL, + &utf8_name_size, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_attribute_record_get_utf8_name_size( + attribute_record, + NULL, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + return( 1 ); + +on_error: + if( error != NULL ) + { + libcerror_error_free( + &error ); + } + return( 0 ); +} + +/* Tests the libfshfs_attribute_record_get_utf8_name function + * Returns 1 if successful or 0 if not + */ +int fshfs_test_attribute_record_get_utf8_name( + libfshfs_attribute_record_t *attribute_record ) +{ + uint8_t utf8_name[ 256 ]; + + libcerror_error_t *error = NULL; + int result = 0; + + /* Test regular cases + */ + result = libfshfs_attribute_record_get_utf8_name( + attribute_record, + utf8_name, + 256, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + /* Test error cases + */ + result = libfshfs_attribute_record_get_utf8_name( + NULL, + utf8_name, + 256, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_attribute_record_get_utf8_name( + attribute_record, + NULL, + 256, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_attribute_record_get_utf8_name( + attribute_record, + utf8_name, + 0, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_attribute_record_get_utf8_name( + attribute_record, + utf8_name, + (size_t) SSIZE_MAX + 1, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + return( 1 ); + +on_error: + if( error != NULL ) + { + libcerror_error_free( + &error ); + } + return( 0 ); +} + +/* Tests the libfshfs_attribute_record_compare_name_with_utf16_string function + * Returns 1 if successful or 0 if not + */ +int fsapfs_test_attribute_record_compare_name_with_utf16_string( + libfshfs_attribute_record_t *attribute_record ) +{ + uint16_t utf16_string[ 9 ] = { 'm', 'y', 'x', 'a', 't', 't', 'r', '1', 0 }; + libcerror_error_t *error = NULL; + int result = 0; + + /* Test regular cases + */ + result = libfshfs_attribute_record_compare_name_with_utf16_string( + attribute_record, + utf16_string, + 8, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + LIBUNA_COMPARE_EQUAL ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + /* Test error cases + */ + result = libfshfs_attribute_record_compare_name_with_utf16_string( + NULL, + utf16_string, + 8, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_attribute_record_compare_name_with_utf16_string( + attribute_record, + NULL, + 8, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + return( 1 ); + +on_error: + if( error != NULL ) + { + libcerror_error_free( + &error ); + } + return( 0 ); +} + +/* Tests the libfshfs_attribute_record_get_utf16_name_size function + * Returns 1 if successful or 0 if not + */ +int fshfs_test_attribute_record_get_utf16_name_size( + libfshfs_attribute_record_t *attribute_record ) +{ + libcerror_error_t *error = NULL; + size_t utf16_name_size = 0; + int result = 0; + + /* Test regular cases + */ + result = libfshfs_attribute_record_get_utf16_name_size( + attribute_record, + &utf16_name_size, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + /* Test error cases + */ + result = libfshfs_attribute_record_get_utf16_name_size( + NULL, + &utf16_name_size, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_attribute_record_get_utf16_name_size( + attribute_record, + NULL, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + return( 1 ); + +on_error: + if( error != NULL ) + { + libcerror_error_free( + &error ); + } + return( 0 ); +} + +/* Tests the libfshfs_attribute_record_get_utf16_name function + * Returns 1 if successful or 0 if not + */ +int fshfs_test_attribute_record_get_utf16_name( + libfshfs_attribute_record_t *attribute_record ) +{ + uint16_t utf16_name[ 256 ]; + + libcerror_error_t *error = NULL; + int result = 0; + + /* Test regular cases + */ + result = libfshfs_attribute_record_get_utf16_name( + attribute_record, + utf16_name, + 256, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + /* Test error cases + */ + result = libfshfs_attribute_record_get_utf16_name( + NULL, + utf16_name, + 256, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_attribute_record_get_utf16_name( + attribute_record, + NULL, + 256, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_attribute_record_get_utf16_name( + attribute_record, + utf16_name, + 0, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_attribute_record_get_utf16_name( + attribute_record, + utf16_name, + (size_t) SSIZE_MAX + 1, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + return( 1 ); + +on_error: + if( error != NULL ) + { + libcerror_error_free( + &error ); + } + return( 0 ); +} + +#endif /* defined( __GNUC__ ) && !defined( LIBFSHFS_DLL_IMPORT ) */ + +/* The main program + */ +#if defined( HAVE_WIDE_SYSTEM_CHARACTER ) +int wmain( + int argc FSHFS_TEST_ATTRIBUTE_UNUSED, + wchar_t * const argv[] FSHFS_TEST_ATTRIBUTE_UNUSED ) +#else +int main( + int argc FSHFS_TEST_ATTRIBUTE_UNUSED, + char * const argv[] FSHFS_TEST_ATTRIBUTE_UNUSED ) +#endif +{ +#if defined( __GNUC__ ) && !defined( LIBFSHFS_DLL_IMPORT ) + uint8_t name_data[ 16 ] = { + 0, 'm', 0, 'y', 0, 'x', 0, 'a', 0, 't', 0, 't', 0, 'r', 0, '1' }; + + libcerror_error_t *error = NULL; + libfshfs_attribute_record_t *attribute_record = NULL; + int result = 0; +#endif + + FSHFS_TEST_UNREFERENCED_PARAMETER( argc ) + FSHFS_TEST_UNREFERENCED_PARAMETER( argv ) + +#if defined( __GNUC__ ) && !defined( LIBFSHFS_DLL_IMPORT ) + + FSHFS_TEST_RUN( + "libfshfs_attribute_record_initialize", + fshfs_test_attribute_record_initialize ); + + FSHFS_TEST_RUN( + "libfshfs_attribute_record_free", + fshfs_test_attribute_record_free ); + + /* TODO add tests for libfshfs_attribute_record_read_data */ + + /* TODO add tests for libfshfs_attribute_record_set_name */ + +#if !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) + + /* Initialize attribute_record for tests + */ + result = libfshfs_attribute_record_initialize( + &attribute_record, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "attribute_record", + attribute_record ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + result = libfshfs_attribute_record_set_name( + attribute_record, + name_data, + 16, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + /* Run tests + */ + FSHFS_TEST_RUN_WITH_ARGS( + "libfshfs_attribute_record_compare_name_with_utf8_string", + fsapfs_test_attribute_record_compare_name_with_utf8_string, + attribute_record ); + + FSHFS_TEST_RUN_WITH_ARGS( + "libfshfs_attribute_record_get_utf8_name_size", + fshfs_test_attribute_record_get_utf8_name_size, + attribute_record ); + + FSHFS_TEST_RUN_WITH_ARGS( + "libfshfs_attribute_record_get_utf8_name", + fshfs_test_attribute_record_get_utf8_name, + attribute_record ); + + FSHFS_TEST_RUN_WITH_ARGS( + "libfshfs_attribute_record_compare_name_with_utf16_string", + fsapfs_test_attribute_record_compare_name_with_utf16_string, + attribute_record ); + + FSHFS_TEST_RUN_WITH_ARGS( + "libfshfs_attribute_record_get_utf16_name_size", + fshfs_test_attribute_record_get_utf16_name_size, + attribute_record ); + + FSHFS_TEST_RUN_WITH_ARGS( + "libfshfs_attribute_record_get_utf16_name", + fshfs_test_attribute_record_get_utf16_name, + attribute_record ); + + /* TODO add tests for libfshfs_attribute_record_get_fork_descriptor */ + + /* Clean up + */ + result = libfshfs_attribute_record_free( + &attribute_record, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "attribute_record", + attribute_record ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + +#endif /* !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) */ + +#endif /* defined( __GNUC__ ) && !defined( LIBFSHFS_DLL_IMPORT ) */ + + return( EXIT_SUCCESS ); + +#if defined( __GNUC__ ) && !defined( LIBFSHFS_DLL_IMPORT ) + +on_error: +#if !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) + + if( error != NULL ) + { + libcerror_error_free( + &error ); + } + if( attribute_record != NULL ) + { + libfshfs_attribute_record_free( + &attribute_record, + NULL ); + } +#endif /* !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) */ + + return( EXIT_FAILURE ); + +#endif /* defined( __GNUC__ ) && !defined( LIBFSHFS_DLL_IMPORT ) */ +} + diff -Nru libfshfs-20201104/tests/fshfs_test_attributes_btree_key.c libfshfs-20240221/tests/fshfs_test_attributes_btree_key.c --- libfshfs-20201104/tests/fshfs_test_attributes_btree_key.c 2020-11-04 04:22:26.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_attributes_btree_key.c 2024-02-21 05:50:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * Library attributes_btree_key type test program * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/tests/fshfs_test_bit_stream.c libfshfs-20240221/tests/fshfs_test_bit_stream.c --- libfshfs-20201104/tests/fshfs_test_bit_stream.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_bit_stream.c 2024-02-21 05:50:08.000000000 +0000 @@ -0,0 +1,709 @@ +/* + * Bit-stream testing program + * + * Copyright (C) 2009-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include +#include +#include + +#if defined( HAVE_STDLIB_H ) || defined( WINAPI ) +#include +#endif + +#include "fshfs_test_libcerror.h" +#include "fshfs_test_libcnotify.h" +#include "fshfs_test_macros.h" +#include "fshfs_test_memory.h" +#include "fshfs_test_unused.h" + +#include "../libfshfs/libfshfs_bit_stream.h" + +/* Define to make fshfs_test_bit_stream generate verbose output +#define FSHFS_TEST_BIT_STREAM_VERBOSE + */ + +uint8_t fshfs_test_bit_stream_data[ 16 ] = { + 0x78, 0xda, 0xbd, 0x59, 0x6d, 0x8f, 0xdb, 0xb8, 0x11, 0xfe, 0x7c, 0xfa, 0x15, 0xc4, 0x7e, 0xb9 }; + +#if defined( __GNUC__ ) && !defined( LIBFSHFS_DLL_IMPORT ) + +/* Tests the libfshfs_bit_stream_initialize function + * Returns 1 if successful or 0 if not + */ +int fshfs_test_bit_stream_initialize( + void ) +{ + libcerror_error_t *error = NULL; + libfshfs_bit_stream_t *bit_stream = NULL; + int result = 0; + +#if defined( HAVE_FSHFS_TEST_MEMORY ) + int number_of_malloc_fail_tests = 1; + int number_of_memset_fail_tests = 1; + int test_number = 0; +#endif + + /* Test regular cases + */ + result = libfshfs_bit_stream_initialize( + &bit_stream, + fshfs_test_bit_stream_data, + 16, + 0, + LIBFSHFS_BIT_STREAM_STORAGE_TYPE_BYTE_BACK_TO_FRONT, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "bit_stream", + bit_stream ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + result = libfshfs_bit_stream_free( + &bit_stream, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "bit_stream", + bit_stream ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + /* Test error cases + */ + result = libfshfs_bit_stream_initialize( + NULL, + fshfs_test_bit_stream_data, + 16, + 0, + LIBFSHFS_BIT_STREAM_STORAGE_TYPE_BYTE_BACK_TO_FRONT, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + bit_stream = (libfshfs_bit_stream_t *) 0x12345678UL; + + result = libfshfs_bit_stream_initialize( + &bit_stream, + fshfs_test_bit_stream_data, + 16, + 0, + LIBFSHFS_BIT_STREAM_STORAGE_TYPE_BYTE_BACK_TO_FRONT, + &error ); + + bit_stream = NULL; + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_bit_stream_initialize( + &bit_stream, + NULL, + 16, + 0, + LIBFSHFS_BIT_STREAM_STORAGE_TYPE_BYTE_BACK_TO_FRONT, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_bit_stream_initialize( + &bit_stream, + fshfs_test_bit_stream_data, + (size_t) SSIZE_MAX + 1, + 0, + LIBFSHFS_BIT_STREAM_STORAGE_TYPE_BYTE_BACK_TO_FRONT, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_bit_stream_initialize( + &bit_stream, + fshfs_test_bit_stream_data, + 16, + (size_t) SSIZE_MAX + 1, + LIBFSHFS_BIT_STREAM_STORAGE_TYPE_BYTE_BACK_TO_FRONT, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_bit_stream_initialize( + &bit_stream, + fshfs_test_bit_stream_data, + 16, + 0, + 0xff, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + +#if defined( HAVE_FSHFS_TEST_MEMORY ) + + for( test_number = 0; + test_number < number_of_malloc_fail_tests; + test_number++ ) + { + /* Test libfshfs_bit_stream_initialize with malloc failing + */ + fshfs_test_malloc_attempts_before_fail = test_number; + + result = libfshfs_bit_stream_initialize( + &bit_stream, + fshfs_test_bit_stream_data, + 16, + 0, + LIBFSHFS_BIT_STREAM_STORAGE_TYPE_BYTE_BACK_TO_FRONT, + &error ); + + if( fshfs_test_malloc_attempts_before_fail != -1 ) + { + fshfs_test_malloc_attempts_before_fail = -1; + + if( bit_stream != NULL ) + { + libfshfs_bit_stream_free( + &bit_stream, + NULL ); + } + } + else + { + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "bit_stream", + bit_stream ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + } + } + for( test_number = 0; + test_number < number_of_memset_fail_tests; + test_number++ ) + { + /* Test libfshfs_bit_stream_initialize with memset failing + */ + fshfs_test_memset_attempts_before_fail = test_number; + + result = libfshfs_bit_stream_initialize( + &bit_stream, + fshfs_test_bit_stream_data, + 16, + 0, + LIBFSHFS_BIT_STREAM_STORAGE_TYPE_BYTE_BACK_TO_FRONT, + &error ); + + if( fshfs_test_memset_attempts_before_fail != -1 ) + { + fshfs_test_memset_attempts_before_fail = -1; + + if( bit_stream != NULL ) + { + libfshfs_bit_stream_free( + &bit_stream, + NULL ); + } + } + else + { + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "bit_stream", + bit_stream ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + } + } +#endif /* defined( HAVE_FSHFS_TEST_MEMORY ) */ + + return( 1 ); + +on_error: + if( error != NULL ) + { + libcerror_error_free( + &error ); + } + if( bit_stream != NULL ) + { + libfshfs_bit_stream_free( + &bit_stream, + NULL ); + } + return( 0 ); +} + +/* Tests the libfshfs_bit_stream_free function + * Returns 1 if successful or 0 if not + */ +int fshfs_test_bit_stream_free( + void ) +{ + libcerror_error_t *error = NULL; + int result = 0; + + /* Test error cases + */ + result = libfshfs_bit_stream_free( + NULL, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + return( 1 ); + +on_error: + if( error != NULL ) + { + libcerror_error_free( + &error ); + } + return( 0 ); +} + +/* Tests the libfshfs_bit_stream_get_value function + * Returns 1 if successful or 0 if not + */ +int fshfs_test_bit_stream_get_value( + void ) +{ + libcerror_error_t *error = NULL; + libfshfs_bit_stream_t *bit_stream = NULL; + uint32_t value_32bit = 0; + int result = 0; + + /* Initialize test + */ + result = libfshfs_bit_stream_initialize( + &bit_stream, + fshfs_test_bit_stream_data, + 16, + 0, + LIBFSHFS_BIT_STREAM_STORAGE_TYPE_BYTE_BACK_TO_FRONT, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + /* Test regular cases + */ + result = libfshfs_bit_stream_get_value( + bit_stream, + 0, + &value_32bit, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_EQUAL_UINT32( + "value_32bit", + value_32bit, + (uint32_t) 0x00000000UL ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + FSHFS_TEST_ASSERT_EQUAL_SIZE( + "bit_stream->byte_stream_offset", + bit_stream->byte_stream_offset, + (size_t) 0 ); + + FSHFS_TEST_ASSERT_EQUAL_UINT32( + "bit_stream->bit_buffer", + bit_stream->bit_buffer, + (uint32_t) 0x00000000UL ); + + FSHFS_TEST_ASSERT_EQUAL_UINT8( + "bit_stream->bit_buffer_size", + bit_stream->bit_buffer_size, + (uint8_t) 0 ); + + result = libfshfs_bit_stream_get_value( + bit_stream, + 4, + &value_32bit, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_EQUAL_UINT32( + "value_32bit", + value_32bit, + (uint32_t) 0x00000008UL ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + FSHFS_TEST_ASSERT_EQUAL_SIZE( + "bit_stream->byte_stream_offset", + bit_stream->byte_stream_offset, + (size_t) 1 ); + + FSHFS_TEST_ASSERT_EQUAL_UINT32( + "bit_stream->bit_buffer", + bit_stream->bit_buffer, + (uint32_t) 0x00000007UL ); + + FSHFS_TEST_ASSERT_EQUAL_UINT8( + "bit_stream->bit_buffer_size", + bit_stream->bit_buffer_size, + (uint8_t) 4 ); + + result = libfshfs_bit_stream_get_value( + bit_stream, + 12, + &value_32bit, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_EQUAL_UINT32( + "value_32bit", + value_32bit, + (uint32_t) 0x00000da7UL ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + FSHFS_TEST_ASSERT_EQUAL_SIZE( + "bit_stream->byte_stream_offset", + bit_stream->byte_stream_offset, + (size_t) 2 ); + + FSHFS_TEST_ASSERT_EQUAL_UINT32( + "bit_stream->bit_buffer", + bit_stream->bit_buffer, + (uint32_t) 0x00000000UL ); + + FSHFS_TEST_ASSERT_EQUAL_UINT8( + "bit_stream->bit_buffer_size", + bit_stream->bit_buffer_size, + (uint8_t) 0 ); + + result = libfshfs_bit_stream_get_value( + bit_stream, + 32, + &value_32bit, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_EQUAL_UINT32( + "value_32bit", + value_32bit, + (uint32_t) 0x8f6d59bdUL ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + FSHFS_TEST_ASSERT_EQUAL_SIZE( + "bit_stream->byte_stream_offset", + bit_stream->byte_stream_offset, + (size_t) 6 ); + + FSHFS_TEST_ASSERT_EQUAL_UINT32( + "bit_stream->bit_buffer", + bit_stream->bit_buffer, + (uint32_t) 0x00000000UL ); + + FSHFS_TEST_ASSERT_EQUAL_UINT8( + "bit_stream->bit_buffer_size", + bit_stream->bit_buffer_size, + (uint8_t) 0 ); + + /* Test error cases + */ + result = libfshfs_bit_stream_get_value( + NULL, + 32, + &value_32bit, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_bit_stream_get_value( + bit_stream, + 64, + &value_32bit, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_bit_stream_get_value( + bit_stream, + 32, + NULL, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + bit_stream->byte_stream_offset = 16; + bit_stream->bit_buffer_size = 0; + + result = libfshfs_bit_stream_get_value( + bit_stream, + 32, + &value_32bit, + &error ); + + bit_stream->byte_stream_offset = 0; + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + /* Clean up + */ + result = libfshfs_bit_stream_free( + &bit_stream, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + return( 1 ); + +on_error: + if( bit_stream != NULL ) + { + libfshfs_bit_stream_free( + &bit_stream, + NULL ); + } + return( 0 ); +} + +#endif /* defined( __GNUC__ ) && !defined( LIBFSHFS_DLL_IMPORT ) */ + +/* The main program + */ +#if defined( HAVE_WIDE_SYSTEM_CHARACTER ) +int wmain( + int argc FSHFS_TEST_ATTRIBUTE_UNUSED, + wchar_t * const argv[] FSHFS_TEST_ATTRIBUTE_UNUSED ) +#else +int main( + int argc FSHFS_TEST_ATTRIBUTE_UNUSED, + char * const argv[] FSHFS_TEST_ATTRIBUTE_UNUSED ) +#endif +{ + FSHFS_TEST_UNREFERENCED_PARAMETER( argc ) + FSHFS_TEST_UNREFERENCED_PARAMETER( argv ) + +#if defined( HAVE_DEBUG_OUTPUT ) && defined( FSHFS_TEST_BIT_STREAM_VERBOSE ) + libcnotify_verbose_set( + 1 ); + libcnotify_stream_set( + stderr, + NULL ); +#endif + +#if defined( __GNUC__ ) && !defined( LIBFSHFS_DLL_IMPORT ) + + FSHFS_TEST_RUN( + "libfshfs_bit_stream_initialize", + fshfs_test_bit_stream_initialize ); + + FSHFS_TEST_RUN( + "libfshfs_bit_stream_free", + fshfs_test_bit_stream_free ); + + FSHFS_TEST_RUN( + "libfshfs_bit_stream_get_value", + fshfs_test_bit_stream_get_value ); + +#endif /* defined( __GNUC__ ) && !defined( LIBFSHFS_DLL_IMPORT ) */ + + return( EXIT_SUCCESS ); + +#if defined( __GNUC__ ) && !defined( LIBFSHFS_DLL_IMPORT ) + +on_error: + return( EXIT_FAILURE ); + +#endif /* defined( __GNUC__ ) && !defined( LIBFSHFS_DLL_IMPORT ) */ +} + diff -Nru libfshfs-20201104/tests/fshfs_test_btree_file.c libfshfs-20240221/tests/fshfs_test_btree_file.c --- libfshfs-20201104/tests/fshfs_test_btree_file.c 2020-11-04 05:29:00.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_btree_file.c 2024-02-21 05:50:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * Library btree_file type test program * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/tests/fshfs_test_btree_header.c libfshfs-20240221/tests/fshfs_test_btree_header.c --- libfshfs-20201104/tests/fshfs_test_btree_header.c 2020-11-04 04:19:45.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_btree_header.c 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Library btree_header type test program * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/tests/fshfs_test_btree_node.c libfshfs-20240221/tests/fshfs_test_btree_node.c --- libfshfs-20201104/tests/fshfs_test_btree_node.c 2020-11-04 04:22:26.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_btree_node.c 2024-02-21 05:50:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * Library btree_node type test program * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/tests/fshfs_test_btree_node_descriptor.c libfshfs-20240221/tests/fshfs_test_btree_node_descriptor.c --- libfshfs-20201104/tests/fshfs_test_btree_node_descriptor.c 2020-11-04 04:19:45.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_btree_node_descriptor.c 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Library btree_node_descriptor type test program * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/tests/fshfs_test_btree_node_record.c libfshfs-20240221/tests/fshfs_test_btree_node_record.c --- libfshfs-20201104/tests/fshfs_test_btree_node_record.c 2020-11-04 04:22:26.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_btree_node_record.c 2024-02-21 05:50:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * Library btree_node_record type test program * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/tests/fshfs_test_buffer_data_handle.c libfshfs-20240221/tests/fshfs_test_buffer_data_handle.c --- libfshfs-20201104/tests/fshfs_test_buffer_data_handle.c 2020-11-04 04:22:26.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_buffer_data_handle.c 2024-02-21 05:50:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * Library buffer_data_handle type test program * - * Copyright (C) 2018-2020, Joachim Metz + * Copyright (C) 2018-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/tests/fshfs_test_catalog_btree_key.c libfshfs-20240221/tests/fshfs_test_catalog_btree_key.c --- libfshfs-20201104/tests/fshfs_test_catalog_btree_key.c 2020-11-04 04:22:26.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_catalog_btree_key.c 2024-02-21 05:50:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * Library catalog_btree_key type test program * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -34,6 +34,7 @@ #include "fshfs_test_unused.h" #include "../libfshfs/libfshfs_catalog_btree_key.h" +#include "../libfshfs/libfshfs_io_handle.h" uint8_t fshfs_test_catalog_btree_key_data1[ 14 ] = { 0x00, 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x6f, 0x00, 0x73, 0x00, 0x78 }; @@ -281,10 +282,28 @@ { libcerror_error_t *error = NULL; libfshfs_catalog_btree_key_t *catalog_btree_key = NULL; + libfshfs_io_handle_t *io_handle = NULL; int result = 0; /* Initialize test */ + result = libfshfs_io_handle_initialize( + &io_handle, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "io_handle", + io_handle ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + result = libfshfs_catalog_btree_key_initialize( &catalog_btree_key, &error ); @@ -306,6 +325,7 @@ */ result = libfshfs_catalog_btree_key_read_data( catalog_btree_key, + io_handle, fshfs_test_catalog_btree_key_data1, 14, &error ); @@ -323,6 +343,26 @@ */ result = libfshfs_catalog_btree_key_read_data( NULL, + io_handle, + fshfs_test_catalog_btree_key_data1, + 14, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_catalog_btree_key_read_data( + catalog_btree_key, + NULL, fshfs_test_catalog_btree_key_data1, 14, &error ); @@ -341,6 +381,7 @@ result = libfshfs_catalog_btree_key_read_data( catalog_btree_key, + io_handle, NULL, 14, &error ); @@ -359,6 +400,7 @@ result = libfshfs_catalog_btree_key_read_data( catalog_btree_key, + io_handle, fshfs_test_catalog_btree_key_data1, (size_t) SSIZE_MAX + 1, &error ); @@ -377,6 +419,7 @@ result = libfshfs_catalog_btree_key_read_data( catalog_btree_key, + io_handle, fshfs_test_catalog_btree_key_data1, 0, &error ); @@ -412,6 +455,23 @@ "error", error ); + result = libfshfs_io_handle_free( + &io_handle, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "io_handle", + io_handle ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + return( 1 ); on_error: @@ -426,6 +486,12 @@ &catalog_btree_key, NULL ); } + if( io_handle != NULL ) + { + libfshfs_io_handle_free( + &io_handle, + NULL ); + } return( 0 ); } diff -Nru libfshfs-20201104/tests/fshfs_test_compressed_data_handle.c libfshfs-20240221/tests/fshfs_test_compressed_data_handle.c --- libfshfs-20201104/tests/fshfs_test_compressed_data_handle.c 2020-11-04 04:22:26.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_compressed_data_handle.c 2024-02-21 05:50:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * Library compressed_data_handle type test program * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -34,8 +34,8 @@ #include "fshfs_test_memory.h" #include "fshfs_test_unused.h" +#include "../libfshfs/libfshfs_allocation_block_stream.h" #include "../libfshfs/libfshfs_compressed_data_handle.h" -#include "../libfshfs/libfshfs_data_stream.h" #include "../libfshfs/libfshfs_definitions.h" uint8_t fshfs_test_compressed_data_handle_lzvn_compressed_data1[ 35 ] = { @@ -51,21 +51,21 @@ int fshfs_test_compressed_data_handle_initialize( void ) { - libcerror_error_t *error = NULL; - libfdata_stream_t *compressed_data_stream = NULL; + libcerror_error_t *error = NULL; + libfdata_stream_t *compressed_allocation_block_stream = NULL; libfshfs_compressed_data_handle_t *compressed_data_handle = NULL; - int result = 0; + int result = 0; #if defined( HAVE_FSHFS_TEST_MEMORY ) - int number_of_malloc_fail_tests = 3; - int number_of_memset_fail_tests = 1; - int test_number = 0; + int number_of_malloc_fail_tests = 3; + int number_of_memset_fail_tests = 1; + int test_number = 0; #endif /* Initialize test */ - result = libfshfs_data_stream_initialize_from_data( - &compressed_data_stream, + result = libfshfs_allocation_block_stream_initialize_from_data( + &compressed_allocation_block_stream, fshfs_test_compressed_data_handle_lzvn_compressed_data1, 35, &error ); @@ -76,8 +76,8 @@ 1 ); FSHFS_TEST_ASSERT_IS_NOT_NULL( - "compressed_data_stream", - compressed_data_stream ); + "compressed_allocation_block_stream", + compressed_allocation_block_stream ); FSHFS_TEST_ASSERT_IS_NULL( "error", @@ -87,7 +87,7 @@ */ result = libfshfs_compressed_data_handle_initialize( &compressed_data_handle, - compressed_data_stream, + compressed_allocation_block_stream, 16, LIBFSHFS_COMPRESSION_METHOD_LZVN, &error ); @@ -126,7 +126,7 @@ */ result = libfshfs_compressed_data_handle_initialize( NULL, - compressed_data_stream, + compressed_allocation_block_stream, 16, LIBFSHFS_COMPRESSION_METHOD_LZVN, &error ); @@ -147,7 +147,7 @@ result = libfshfs_compressed_data_handle_initialize( &compressed_data_handle, - compressed_data_stream, + compressed_allocation_block_stream, 16, LIBFSHFS_COMPRESSION_METHOD_LZVN, &error ); @@ -187,7 +187,7 @@ result = libfshfs_compressed_data_handle_initialize( &compressed_data_handle, - compressed_data_stream, + compressed_allocation_block_stream, 16, -1, &error ); @@ -216,7 +216,7 @@ result = libfshfs_compressed_data_handle_initialize( &compressed_data_handle, - compressed_data_stream, + compressed_allocation_block_stream, 16, LIBFSHFS_COMPRESSION_METHOD_LZVN, &error ); @@ -261,7 +261,7 @@ result = libfshfs_compressed_data_handle_initialize( &compressed_data_handle, - compressed_data_stream, + compressed_allocation_block_stream, 16, LIBFSHFS_COMPRESSION_METHOD_LZVN, &error ); @@ -318,7 +318,7 @@ error ); result = libfdata_stream_free( - &compressed_data_stream, + &compressed_allocation_block_stream, &error ); FSHFS_TEST_ASSERT_EQUAL_INT( @@ -327,8 +327,8 @@ 1 ); FSHFS_TEST_ASSERT_IS_NULL( - "compressed_data_stream", - compressed_data_stream ); + "compressed_allocation_block_stream", + compressed_allocation_block_stream ); FSHFS_TEST_ASSERT_IS_NULL( "error", @@ -348,10 +348,10 @@ &compressed_data_handle, NULL ); } - if( compressed_data_stream != NULL ) + if( compressed_allocation_block_stream != NULL ) { libfdata_stream_free( - &compressed_data_stream, + &compressed_allocation_block_stream, NULL ); } return( 0 ); @@ -401,15 +401,15 @@ int fshfs_test_compressed_data_handle_get_compressed_block_offsets( void ) { - libcerror_error_t *error = NULL; - libfdata_stream_t *compressed_data_stream = NULL; + libcerror_error_t *error = NULL; + libfdata_stream_t *compressed_allocation_block_stream = NULL; libfshfs_compressed_data_handle_t *compressed_data_handle = NULL; - int result = 0; + int result = 0; /* Initialize test */ - result = libfshfs_data_stream_initialize_from_data( - &compressed_data_stream, + result = libfshfs_allocation_block_stream_initialize_from_data( + &compressed_allocation_block_stream, fshfs_test_compressed_data_handle_lzvn_compressed_data1, 35, &error ); @@ -420,8 +420,8 @@ 1 ); FSHFS_TEST_ASSERT_IS_NOT_NULL( - "compressed_data_stream", - compressed_data_stream ); + "compressed_allocation_block_stream", + compressed_allocation_block_stream ); FSHFS_TEST_ASSERT_IS_NULL( "error", @@ -429,7 +429,7 @@ result = libfshfs_compressed_data_handle_initialize( &compressed_data_handle, - compressed_data_stream, + compressed_allocation_block_stream, 16, LIBFSHFS_COMPRESSION_METHOD_LZVN, &error ); @@ -502,7 +502,7 @@ error ); result = libfdata_stream_free( - &compressed_data_stream, + &compressed_allocation_block_stream, &error ); FSHFS_TEST_ASSERT_EQUAL_INT( @@ -511,8 +511,8 @@ 1 ); FSHFS_TEST_ASSERT_IS_NULL( - "compressed_data_stream", - compressed_data_stream ); + "compressed_allocation_block_stream", + compressed_allocation_block_stream ); FSHFS_TEST_ASSERT_IS_NULL( "error", @@ -532,10 +532,10 @@ &compressed_data_handle, NULL ); } - if( compressed_data_stream != NULL ) + if( compressed_allocation_block_stream != NULL ) { libfdata_stream_free( - &compressed_data_stream, + &compressed_allocation_block_stream, NULL ); } return( 0 ); @@ -549,16 +549,16 @@ { uint8_t segment_data[ 32 ]; - libcerror_error_t *error = NULL; - libfdata_stream_t *compressed_data_stream = NULL; + libcerror_error_t *error = NULL; + libfdata_stream_t *compressed_allocation_block_stream = NULL; libfshfs_compressed_data_handle_t *compressed_data_handle = NULL; - ssize_t read_count = 0; - int result = 0; + ssize_t read_count = 0; + int result = 0; /* Initialize test */ - result = libfshfs_data_stream_initialize_from_data( - &compressed_data_stream, + result = libfshfs_allocation_block_stream_initialize_from_data( + &compressed_allocation_block_stream, fshfs_test_compressed_data_handle_lzvn_compressed_data1, 35, &error ); @@ -569,8 +569,8 @@ 1 ); FSHFS_TEST_ASSERT_IS_NOT_NULL( - "compressed_data_stream", - compressed_data_stream ); + "compressed_allocation_block_stream", + compressed_allocation_block_stream ); FSHFS_TEST_ASSERT_IS_NULL( "error", @@ -578,7 +578,7 @@ result = libfshfs_compressed_data_handle_initialize( &compressed_data_handle, - compressed_data_stream, + compressed_allocation_block_stream, 16, LIBFSHFS_COMPRESSION_METHOD_LZVN, &error ); @@ -713,7 +713,7 @@ error ); result = libfdata_stream_free( - &compressed_data_stream, + &compressed_allocation_block_stream, &error ); FSHFS_TEST_ASSERT_EQUAL_INT( @@ -722,8 +722,8 @@ 1 ); FSHFS_TEST_ASSERT_IS_NULL( - "compressed_data_stream", - compressed_data_stream ); + "compressed_allocation_block_stream", + compressed_allocation_block_stream ); FSHFS_TEST_ASSERT_IS_NULL( "error", @@ -743,10 +743,10 @@ &compressed_data_handle, NULL ); } - if( compressed_data_stream != NULL ) + if( compressed_allocation_block_stream != NULL ) { libfdata_stream_free( - &compressed_data_stream, + &compressed_allocation_block_stream, NULL ); } return( 0 ); @@ -758,16 +758,16 @@ int fshfs_test_compressed_data_handle_seek_segment_offset( void ) { - libcerror_error_t *error = NULL; - libfdata_stream_t *compressed_data_stream = NULL; + libcerror_error_t *error = NULL; + libfdata_stream_t *compressed_allocation_block_stream = NULL; libfshfs_compressed_data_handle_t *compressed_data_handle = NULL; - off64_t offset = 0; - int result = 0; + off64_t offset = 0; + int result = 0; /* Initialize test */ - result = libfshfs_data_stream_initialize_from_data( - &compressed_data_stream, + result = libfshfs_allocation_block_stream_initialize_from_data( + &compressed_allocation_block_stream, fshfs_test_compressed_data_handle_lzvn_compressed_data1, 35, &error ); @@ -778,8 +778,8 @@ 1 ); FSHFS_TEST_ASSERT_IS_NOT_NULL( - "compressed_data_stream", - compressed_data_stream ); + "compressed_allocation_block_stream", + compressed_allocation_block_stream ); FSHFS_TEST_ASSERT_IS_NULL( "error", @@ -787,7 +787,7 @@ result = libfshfs_compressed_data_handle_initialize( &compressed_data_handle, - compressed_data_stream, + compressed_allocation_block_stream, 16, LIBFSHFS_COMPRESSION_METHOD_LZVN, &error ); @@ -906,7 +906,7 @@ error ); result = libfdata_stream_free( - &compressed_data_stream, + &compressed_allocation_block_stream, &error ); FSHFS_TEST_ASSERT_EQUAL_INT( @@ -915,8 +915,8 @@ 1 ); FSHFS_TEST_ASSERT_IS_NULL( - "compressed_data_stream", - compressed_data_stream ); + "compressed_allocation_block_stream", + compressed_allocation_block_stream ); FSHFS_TEST_ASSERT_IS_NULL( "error", @@ -936,10 +936,10 @@ &compressed_data_handle, NULL ); } - if( compressed_data_stream != NULL ) + if( compressed_allocation_block_stream != NULL ) { libfdata_stream_free( - &compressed_data_stream, + &compressed_allocation_block_stream, NULL ); } return( 0 ); diff -Nru libfshfs-20201104/tests/fshfs_test_compression.c libfshfs-20240221/tests/fshfs_test_compression.c --- libfshfs-20201104/tests/fshfs_test_compression.c 2020-11-04 04:19:45.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_compression.c 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Library compression type test program * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/tests/fshfs_test_deflate.c libfshfs-20240221/tests/fshfs_test_deflate.c --- libfshfs-20201104/tests/fshfs_test_deflate.c 2020-11-04 04:19:45.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_deflate.c 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Library DEFLATE decompression testing program * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -34,13 +34,15 @@ #include "fshfs_test_macros.h" #include "fshfs_test_unused.h" +#include "../libfshfs/libfshfs_bit_stream.h" #include "../libfshfs/libfshfs_deflate.h" +#include "../libfshfs/libfshfs_huffman_tree.h" /* Define to make fshfs_test_deflate generate verbose output #define FSHFS_TEST_DEFLATE */ -uint8_t fshfs_test_deflate_compressed_byte_stream[ 2627 ] = { +uint8_t fshfs_test_deflate_compressed_data[ 2627 ] = { 0x78, 0xda, 0xbd, 0x59, 0x6d, 0x8f, 0xdb, 0xb8, 0x11, 0xfe, 0x7c, 0xfa, 0x15, 0xc4, 0x7e, 0xb9, 0x5d, 0xc0, 0x75, 0x5e, 0x7b, 0x45, 0x0f, 0x45, 0x81, 0xed, 0xde, 0x26, 0xdd, 0x62, 0x2f, 0x0d, 0xb2, 0x97, 0x16, 0xfd, 0x48, 0x4b, 0xb4, 0xcd, 0x46, 0x12, 0x5d, 0x52, 0x5a, 0xc7, 0xfd, 0xf5, @@ -207,7 +209,7 @@ 0x7d, 0x8a, 0x87, 0xf9, 0x9d, 0x74, 0x33, 0x0e, 0x79, 0xc5, 0xf8, 0x73, 0xcd, 0xff, 0x00, 0x30, 0x4a, 0x56, 0xa4 }; -uint8_t fshfs_test_deflate_uncompressed_byte_stream[ 7640 ] = { +uint8_t fshfs_test_deflate_uncompressed_data[ 7640 ] = { 0x09, 0x09, 0x20, 0x20, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x4c, 0x45, 0x53, 0x53, 0x45, 0x52, 0x20, 0x47, 0x45, 0x4e, 0x45, 0x52, 0x41, 0x4c, 0x20, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x20, 0x4c, 0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, @@ -689,42 +691,32 @@ #if defined( __GNUC__ ) && !defined( LIBFSHFS_DLL_IMPORT ) -/* Tests the libfshfs_deflate_bit_stream_get_value function +/* Tests the libfshfs_deflate_build_dynamic_huffman_trees function * Returns 1 if successful or 0 if not */ -int fshfs_test_deflate_bit_stream_get_value( +int fshfs_test_deflate_build_dynamic_huffman_trees( void ) { - libfshfs_deflate_bit_stream_t bit_stream; + libfshfs_bit_stream_t *bit_stream = NULL; + libfshfs_huffman_tree_t *distances_tree = NULL; + libfshfs_huffman_tree_t *literals_tree = NULL; + libcerror_error_t *error = NULL; + uint32_t value_32bit = 0; + int result = 0; - libcerror_error_t *error = NULL; - void *memset_result = NULL; - uint32_t value_32bit = 0; - int result = 0; +#if defined( HAVE_FSHFS_TEST_MEMORY ) + int number_of_memset_fail_tests = 6; + int test_number = 0; +#endif /* Initialize test */ - memset_result = memory_set( - &bit_stream, - 0, - sizeof( libfshfs_deflate_bit_stream_t ) ); - - FSHFS_TEST_ASSERT_IS_NOT_NULL( - "memset_result", - memset_result ); - - /* Test regular cases - */ - bit_stream.byte_stream = fshfs_test_deflate_compressed_byte_stream; - bit_stream.byte_stream_size = 2627; - bit_stream.byte_stream_offset = 0; - bit_stream.bit_buffer = 0; - bit_stream.bit_buffer_size = 0; - - result = libfshfs_deflate_bit_stream_get_value( + result = libfshfs_bit_stream_initialize( &bit_stream, - 0, - &value_32bit, + fshfs_test_deflate_compressed_data, + 2627, + 2, + LIBFSHFS_BIT_STREAM_STORAGE_TYPE_BYTE_BACK_TO_FRONT, &error ); FSHFS_TEST_ASSERT_EQUAL_INT( @@ -732,34 +724,18 @@ result, 1 ); - FSHFS_TEST_ASSERT_EQUAL_UINT32( - "value_32bit", - value_32bit, - (uint32_t) 0x00000000UL ); + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "bit_stream", + bit_stream ); FSHFS_TEST_ASSERT_IS_NULL( "error", error ); - FSHFS_TEST_ASSERT_EQUAL_SIZE( - "bit_stream.byte_stream_offset", - bit_stream.byte_stream_offset, - (size_t) 0 ); - - FSHFS_TEST_ASSERT_EQUAL_UINT32( - "bit_stream.bit_buffer", - bit_stream.bit_buffer, - (uint32_t) 0x00000000UL ); - - FSHFS_TEST_ASSERT_EQUAL_UINT8( - "bit_stream.bit_buffer_size", - bit_stream.bit_buffer_size, - (uint8_t) 0 ); - - result = libfshfs_deflate_bit_stream_get_value( - &bit_stream, - 4, - &value_32bit, + result = libfshfs_huffman_tree_initialize( + &literals_tree, + 288, + 15, &error ); FSHFS_TEST_ASSERT_EQUAL_INT( @@ -767,34 +743,18 @@ result, 1 ); - FSHFS_TEST_ASSERT_EQUAL_UINT32( - "value_32bit", - value_32bit, - (uint32_t) 0x00000008UL ); + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "literals_tree", + literals_tree ); FSHFS_TEST_ASSERT_IS_NULL( "error", error ); - FSHFS_TEST_ASSERT_EQUAL_SIZE( - "bit_stream.byte_stream_offset", - bit_stream.byte_stream_offset, - (size_t) 1 ); - - FSHFS_TEST_ASSERT_EQUAL_UINT32( - "bit_stream.bit_buffer", - bit_stream.bit_buffer, - (uint32_t) 0x00000007UL ); - - FSHFS_TEST_ASSERT_EQUAL_UINT8( - "bit_stream.bit_buffer_size", - bit_stream.bit_buffer_size, - (uint8_t) 4 ); - - result = libfshfs_deflate_bit_stream_get_value( - &bit_stream, - 12, - &value_32bit, + result = libfshfs_huffman_tree_initialize( + &distances_tree, + 30, + 15, &error ); FSHFS_TEST_ASSERT_EQUAL_INT( @@ -802,33 +762,19 @@ result, 1 ); - FSHFS_TEST_ASSERT_EQUAL_UINT32( - "value_32bit", - value_32bit, - (uint32_t) 0x00000da7UL ); + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "distances_tree", + distances_tree ); FSHFS_TEST_ASSERT_IS_NULL( "error", error ); - FSHFS_TEST_ASSERT_EQUAL_SIZE( - "bit_stream.byte_stream_offset", - bit_stream.byte_stream_offset, - (size_t) 2 ); - - FSHFS_TEST_ASSERT_EQUAL_UINT32( - "bit_stream.bit_buffer", - bit_stream.bit_buffer, - (uint32_t) 0x00000000UL ); - - FSHFS_TEST_ASSERT_EQUAL_UINT8( - "bit_stream.bit_buffer_size", - bit_stream.bit_buffer_size, - (uint8_t) 0 ); - - result = libfshfs_deflate_bit_stream_get_value( - &bit_stream, - 32, + /* Test regular cases + */ + result = libfshfs_bit_stream_get_value( + bit_stream, + 3, &value_32bit, &error ); @@ -840,185 +786,75 @@ FSHFS_TEST_ASSERT_EQUAL_UINT32( "value_32bit", value_32bit, - (uint32_t) 0x8f6d59bdUL ); + (uint32_t) 0x00000005UL ); FSHFS_TEST_ASSERT_IS_NULL( "error", error ); - FSHFS_TEST_ASSERT_EQUAL_SIZE( - "bit_stream.byte_stream_offset", - bit_stream.byte_stream_offset, - (size_t) 6 ); - - FSHFS_TEST_ASSERT_EQUAL_UINT32( - "bit_stream.bit_buffer", - bit_stream.bit_buffer, - (uint32_t) 0x00000000UL ); - - FSHFS_TEST_ASSERT_EQUAL_UINT8( - "bit_stream.bit_buffer_size", - bit_stream.bit_buffer_size, - (uint8_t) 0 ); - - /* Test error cases - */ - bit_stream.byte_stream = fshfs_test_deflate_compressed_byte_stream; - bit_stream.byte_stream_size = 2627; - bit_stream.byte_stream_offset = 0; - bit_stream.bit_buffer = 0; - bit_stream.bit_buffer_size = 0; - - result = libfshfs_deflate_bit_stream_get_value( - NULL, - 32, - &value_32bit, + result = libfshfs_deflate_build_dynamic_huffman_trees( + bit_stream, + literals_tree, + distances_tree, &error ); FSHFS_TEST_ASSERT_EQUAL_INT( "result", result, - -1 ); + 1 ); - FSHFS_TEST_ASSERT_IS_NOT_NULL( + FSHFS_TEST_ASSERT_IS_NULL( "error", error ); - libcerror_error_free( - &error ); - - result = libfshfs_deflate_bit_stream_get_value( + /* Clean up + */ + result = libfshfs_bit_stream_free( &bit_stream, - 64, - &value_32bit, &error ); FSHFS_TEST_ASSERT_EQUAL_INT( "result", result, - -1 ); - - FSHFS_TEST_ASSERT_IS_NOT_NULL( - "error", - error ); - - libcerror_error_free( - &error ); - - result = libfshfs_deflate_bit_stream_get_value( - &bit_stream, - 32, - NULL, - &error ); + 1 ); - FSHFS_TEST_ASSERT_EQUAL_INT( - "result", - result, - -1 ); + FSHFS_TEST_ASSERT_IS_NULL( + "bit_stream", + bit_stream ); - FSHFS_TEST_ASSERT_IS_NOT_NULL( + FSHFS_TEST_ASSERT_IS_NULL( "error", error ); - libcerror_error_free( - &error ); - - bit_stream.byte_stream_offset = 2627; - bit_stream.bit_buffer_size = 0; - - result = libfshfs_deflate_bit_stream_get_value( + /* Initialize test + */ + result = libfshfs_bit_stream_initialize( &bit_stream, - 32, - &value_32bit, + fshfs_test_deflate_compressed_data, + 2627, + 2, + LIBFSHFS_BIT_STREAM_STORAGE_TYPE_BYTE_BACK_TO_FRONT, &error ); - bit_stream.byte_stream_offset = 0; - FSHFS_TEST_ASSERT_EQUAL_INT( "result", result, - -1 ); + 1 ); FSHFS_TEST_ASSERT_IS_NOT_NULL( + "bit_stream", + bit_stream ); + + FSHFS_TEST_ASSERT_IS_NULL( "error", error ); - libcerror_error_free( - &error ); - - return( 1 ); - -on_error: - if( error != NULL ) - { - libcerror_error_free( - &error ); - } - return( 0 ); -} - -/* Tests the libfshfs_deflate_huffman_table_construct function - * Returns 1 if successful or 0 if not - */ -int fshfs_test_deflate_huffman_table_construct( - void ) -{ - uint16_t code_size_array[ 318 ]; - - libfshfs_deflate_huffman_table_t table; - - libcerror_error_t *error = NULL; - void *memset_result = NULL; - uint16_t symbol = 0; - int result = 0; - -#if defined( HAVE_FSHFS_TEST_MEMORY ) - int number_of_memset_fail_tests = 2; - int test_number = 0; -#endif - - /* Initialize test - */ - memset_result = memory_set( - &table, - 0, - sizeof( libfshfs_deflate_huffman_table_t ) ); - - FSHFS_TEST_ASSERT_IS_NOT_NULL( - "memset_result", - memset_result ); - - for( symbol = 0; - symbol < 318; - symbol++ ) - { - if( symbol < 144 ) - { - code_size_array[ symbol ] = 8; - } - else if( symbol < 256 ) - { - code_size_array[ symbol ] = 9; - } - else if( symbol < 280 ) - { - code_size_array[ symbol ] = 7; - } - else if( symbol < 288 ) - { - code_size_array[ symbol ] = 8; - } - else - { - code_size_array[ symbol ] = 5; - } - } - /* Test regular cases + /* Test error cases */ - result = libfshfs_deflate_huffman_table_construct( - &table, - code_size_array, - 288, + result = libfshfs_bit_stream_get_value( + bit_stream, + 3, + &value_32bit, &error ); FSHFS_TEST_ASSERT_EQUAL_INT( @@ -1026,16 +862,19 @@ result, 1 ); + FSHFS_TEST_ASSERT_EQUAL_UINT32( + "value_32bit", + value_32bit, + (uint32_t) 0x00000005UL ); + FSHFS_TEST_ASSERT_IS_NULL( "error", error ); - /* Test error cases - */ - result = libfshfs_deflate_huffman_table_construct( + result = libfshfs_deflate_build_dynamic_huffman_trees( NULL, - code_size_array, - 288, + literals_tree, + distances_tree, &error ); FSHFS_TEST_ASSERT_EQUAL_INT( @@ -1050,10 +889,10 @@ libcerror_error_free( &error ); - result = libfshfs_deflate_huffman_table_construct( - &table, + result = libfshfs_deflate_build_dynamic_huffman_trees( + bit_stream, NULL, - 288, + distances_tree, &error ); FSHFS_TEST_ASSERT_EQUAL_INT( @@ -1068,10 +907,10 @@ libcerror_error_free( &error ); - result = libfshfs_deflate_huffman_table_construct( - &table, - code_size_array, - -1, + result = libfshfs_deflate_build_dynamic_huffman_trees( + bit_stream, + literals_tree, + NULL, &error ); FSHFS_TEST_ASSERT_EQUAL_INT( @@ -1096,10 +935,10 @@ */ fshfs_test_memset_attempts_before_fail = test_number; - result = libfshfs_deflate_huffman_table_construct( - &table, - code_size_array, - 288, + result = libfshfs_deflate_build_dynamic_huffman_trees( + bit_stream, + literals_tree, + distances_tree, &error ); if( fshfs_test_memset_attempts_before_fail != -1 ) @@ -1123,66 +962,10 @@ } #endif /* defined( HAVE_FSHFS_TEST_MEMORY ) */ - /* TODO test errornous data */ - - return( 1 ); - -on_error: - if( error != NULL ) - { - libcerror_error_free( - &error ); - } - return( 0 ); -} - -/* Tests the libfshfs_deflate_bit_stream_get_huffman_encoded_value function - * Returns 1 if successful or 0 if not - */ -int fshfs_test_deflate_bit_stream_get_huffman_encoded_value( - void ) -{ - libfshfs_deflate_bit_stream_t bit_stream; - libfshfs_deflate_huffman_table_t distances_table; - libfshfs_deflate_huffman_table_t literals_table; - - libcerror_error_t *error = NULL; - void *memset_result = NULL; - uint32_t value_32bit = 0; - int result = 0; - - /* Initialize test + /* Clean up */ - memset_result = memory_set( - &bit_stream, - 0, - sizeof( libfshfs_deflate_bit_stream_t ) ); - - FSHFS_TEST_ASSERT_IS_NOT_NULL( - "memset_result", - memset_result ); - - memset_result = memory_set( - &distances_table, - 0, - sizeof( libfshfs_deflate_huffman_table_t ) ); - - FSHFS_TEST_ASSERT_IS_NOT_NULL( - "memset_result", - memset_result ); - - memset_result = memory_set( - &literals_table, - 0, - sizeof( libfshfs_deflate_huffman_table_t ) ); - - FSHFS_TEST_ASSERT_IS_NOT_NULL( - "memset_result", - memset_result ); - - result = libfshfs_deflate_initialize_fixed_huffman_tables( - &literals_table, - &distances_table, + result = libfshfs_huffman_tree_free( + &distances_tree, &error ); FSHFS_TEST_ASSERT_EQUAL_INT( @@ -1191,129 +974,68 @@ 1 ); FSHFS_TEST_ASSERT_IS_NULL( - "error", - error ); - - /* Test regular cases - */ - bit_stream.byte_stream = fshfs_test_deflate_compressed_byte_stream; - bit_stream.byte_stream_size = 2627; - bit_stream.byte_stream_offset = 2; - bit_stream.bit_buffer = 0; - bit_stream.bit_buffer_size = 0; - - value_32bit = 0; - - result = libfshfs_deflate_bit_stream_get_huffman_encoded_value( - &bit_stream, - &literals_table, - &value_32bit, - &error ); - - FSHFS_TEST_ASSERT_EQUAL_INT( - "result", - result, - 1 ); - - FSHFS_TEST_ASSERT_EQUAL_UINT32( - "value_32bit", - value_32bit, - (uint32_t) 141 ); + "distances_tree", + distances_tree ); FSHFS_TEST_ASSERT_IS_NULL( "error", error ); - /* Test error cases - */ - bit_stream.byte_stream = fshfs_test_deflate_compressed_byte_stream; - bit_stream.byte_stream_size = 2627; - bit_stream.byte_stream_offset = 2; - bit_stream.bit_buffer = 0; - bit_stream.bit_buffer_size = 0; - - value_32bit = 0; - - result = libfshfs_deflate_bit_stream_get_huffman_encoded_value( - NULL, - &literals_table, - &value_32bit, + result = libfshfs_huffman_tree_free( + &literals_tree, &error ); FSHFS_TEST_ASSERT_EQUAL_INT( "result", result, - -1 ); - - FSHFS_TEST_ASSERT_IS_NOT_NULL( - "error", - error ); - - libcerror_error_free( - &error ); - - result = libfshfs_deflate_bit_stream_get_huffman_encoded_value( - &bit_stream, - NULL, - &value_32bit, - &error ); + 1 ); - FSHFS_TEST_ASSERT_EQUAL_INT( - "result", - result, - -1 ); + FSHFS_TEST_ASSERT_IS_NULL( + "literals_tree", + literals_tree ); - FSHFS_TEST_ASSERT_IS_NOT_NULL( + FSHFS_TEST_ASSERT_IS_NULL( "error", error ); - libcerror_error_free( - &error ); - - result = libfshfs_deflate_bit_stream_get_huffman_encoded_value( + result = libfshfs_bit_stream_free( &bit_stream, - &literals_table, - NULL, &error ); FSHFS_TEST_ASSERT_EQUAL_INT( "result", result, - -1 ); - - FSHFS_TEST_ASSERT_IS_NOT_NULL( - "error", - error ); - - libcerror_error_free( - &error ); - - bit_stream.byte_stream_offset = 2627; - bit_stream.bit_buffer_size = 0; - - result = libfshfs_deflate_bit_stream_get_huffman_encoded_value( - &bit_stream, - &literals_table, - &value_32bit, - &error ); - - bit_stream.byte_stream_offset = 2; + 1 ); - FSHFS_TEST_ASSERT_EQUAL_INT( - "result", - result, - -1 ); + FSHFS_TEST_ASSERT_IS_NULL( + "bit_stream", + bit_stream ); - FSHFS_TEST_ASSERT_IS_NOT_NULL( + FSHFS_TEST_ASSERT_IS_NULL( "error", error ); - libcerror_error_free( - &error ); - return( 1 ); on_error: + if( distances_tree != NULL ) + { + libfshfs_huffman_tree_free( + &distances_tree, + NULL ); + } + if( literals_tree != NULL ) + { + libfshfs_huffman_tree_free( + &literals_tree, + NULL ); + } + if( bit_stream != NULL ) + { + libfshfs_bit_stream_free( + &bit_stream, + NULL ); + } if( error != NULL ) { libcerror_error_free( @@ -1322,67 +1044,28 @@ return( 0 ); } -/* Tests the libfshfs_deflate_initialize_dynamic_huffman_tables function +/* Tests the libfshfs_deflate_build_fixed_huffman_trees function * Returns 1 if successful or 0 if not */ -int fshfs_test_deflate_initialize_dynamic_huffman_tables( +int fshfs_test_deflate_build_fixed_huffman_trees( void ) { - libfshfs_deflate_bit_stream_t bit_stream; - libfshfs_deflate_huffman_table_t distances_table; - libfshfs_deflate_huffman_table_t literals_table; - - libcerror_error_t *error = NULL; - void *memset_result = NULL; - uint32_t value_32bit = 0; - int result = 0; + libfshfs_huffman_tree_t *distances_tree = NULL; + libfshfs_huffman_tree_t *literals_tree = NULL; + libcerror_error_t *error = NULL; + int result = 0; #if defined( HAVE_FSHFS_TEST_MEMORY ) - int number_of_memset_fail_tests = 6; - int test_number = 0; + int number_of_memset_fail_tests = 4; + int test_number = 0; #endif /* Initialize test */ - memset_result = memory_set( - &bit_stream, - 0, - sizeof( libfshfs_deflate_bit_stream_t ) ); - - FSHFS_TEST_ASSERT_IS_NOT_NULL( - "memset_result", - memset_result ); - - memset_result = memory_set( - &distances_table, - 0, - sizeof( libfshfs_deflate_huffman_table_t ) ); - - FSHFS_TEST_ASSERT_IS_NOT_NULL( - "memset_result", - memset_result ); - - memset_result = memory_set( - &literals_table, - 0, - sizeof( libfshfs_deflate_huffman_table_t ) ); - - FSHFS_TEST_ASSERT_IS_NOT_NULL( - "memset_result", - memset_result ); - - /* Test regular cases - */ - bit_stream.byte_stream = fshfs_test_deflate_compressed_byte_stream; - bit_stream.byte_stream_size = 2627; - bit_stream.byte_stream_offset = 2; - bit_stream.bit_buffer = 0; - bit_stream.bit_buffer_size = 0; - - result = libfshfs_deflate_bit_stream_get_value( - &bit_stream, - 3, - &value_32bit, + result = libfshfs_huffman_tree_initialize( + &literals_tree, + 288, + 15, &error ); FSHFS_TEST_ASSERT_EQUAL_INT( @@ -1390,19 +1073,18 @@ result, 1 ); - FSHFS_TEST_ASSERT_EQUAL_UINT32( - "value_32bit", - value_32bit, - (uint32_t) 0x00000005UL ); + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "literals_tree", + literals_tree ); FSHFS_TEST_ASSERT_IS_NULL( "error", error ); - result = libfshfs_deflate_initialize_dynamic_huffman_tables( - &bit_stream, - &literals_table, - &distances_table, + result = libfshfs_huffman_tree_initialize( + &distances_tree, + 30, + 15, &error ); FSHFS_TEST_ASSERT_EQUAL_INT( @@ -1410,22 +1092,19 @@ result, 1 ); + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "distances_tree", + distances_tree ); + FSHFS_TEST_ASSERT_IS_NULL( "error", error ); - /* Test error cases + /* Test regular cases */ - bit_stream.byte_stream = fshfs_test_deflate_compressed_byte_stream; - bit_stream.byte_stream_size = 2627; - bit_stream.byte_stream_offset = 2; - bit_stream.bit_buffer = 0; - bit_stream.bit_buffer_size = 0; - - result = libfshfs_deflate_bit_stream_get_value( - &bit_stream, - 3, - &value_32bit, + result = libfshfs_deflate_build_fixed_huffman_trees( + literals_tree, + distances_tree, &error ); FSHFS_TEST_ASSERT_EQUAL_INT( @@ -1433,37 +1112,15 @@ result, 1 ); - FSHFS_TEST_ASSERT_EQUAL_UINT32( - "value_32bit", - value_32bit, - (uint32_t) 0x00000005UL ); - FSHFS_TEST_ASSERT_IS_NULL( "error", error ); - result = libfshfs_deflate_initialize_dynamic_huffman_tables( - NULL, - &literals_table, - &distances_table, - &error ); - - FSHFS_TEST_ASSERT_EQUAL_INT( - "result", - result, - -1 ); - - FSHFS_TEST_ASSERT_IS_NOT_NULL( - "error", - error ); - - libcerror_error_free( - &error ); - - result = libfshfs_deflate_initialize_dynamic_huffman_tables( - &bit_stream, + /* Test error cases + */ + result = libfshfs_deflate_build_fixed_huffman_trees( NULL, - &distances_table, + distances_tree, &error ); FSHFS_TEST_ASSERT_EQUAL_INT( @@ -1478,9 +1135,8 @@ libcerror_error_free( &error ); - result = libfshfs_deflate_initialize_dynamic_huffman_tables( - &bit_stream, - &literals_table, + result = libfshfs_deflate_build_fixed_huffman_trees( + literals_tree, NULL, &error ); @@ -1506,10 +1162,9 @@ */ fshfs_test_memset_attempts_before_fail = test_number; - result = libfshfs_deflate_initialize_dynamic_huffman_tables( - &bit_stream, - &literals_table, - &distances_table, + result = libfshfs_deflate_build_fixed_huffman_trees( + literals_tree, + distances_tree, &error ); if( fshfs_test_memset_attempts_before_fail != -1 ) @@ -1533,60 +1188,10 @@ } #endif /* defined( HAVE_FSHFS_TEST_MEMORY ) */ - return( 1 ); - -on_error: - if( error != NULL ) - { - libcerror_error_free( - &error ); - } - return( 0 ); -} - -/* Tests the libfshfs_deflate_initialize_fixed_huffman_tables function - * Returns 1 if successful or 0 if not - */ -int fshfs_test_deflate_initialize_fixed_huffman_tables( - void ) -{ - libfshfs_deflate_huffman_table_t distances_table; - libfshfs_deflate_huffman_table_t literals_table; - - libcerror_error_t *error = NULL; - void *memset_result = NULL; - int result = 0; - -#if defined( HAVE_FSHFS_TEST_MEMORY ) - int number_of_memset_fail_tests = 4; - int test_number = 0; -#endif - - /* Initialize test - */ - memset_result = memory_set( - &distances_table, - 0, - sizeof( libfshfs_deflate_huffman_table_t ) ); - - FSHFS_TEST_ASSERT_IS_NOT_NULL( - "memset_result", - memset_result ); - - memset_result = memory_set( - &literals_table, - 0, - sizeof( libfshfs_deflate_huffman_table_t ) ); - - FSHFS_TEST_ASSERT_IS_NOT_NULL( - "memset_result", - memset_result ); - - /* Test regular cases + /* Clean up */ - result = libfshfs_deflate_initialize_fixed_huffman_tables( - &literals_table, - &distances_table, + result = libfshfs_huffman_tree_free( + &distances_tree, &error ); FSHFS_TEST_ASSERT_EQUAL_INT( @@ -1595,84 +1200,45 @@ 1 ); FSHFS_TEST_ASSERT_IS_NULL( - "error", - error ); - - /* Test error cases - */ - result = libfshfs_deflate_initialize_fixed_huffman_tables( - NULL, - &distances_table, - &error ); + "distances_tree", + distances_tree ); - FSHFS_TEST_ASSERT_EQUAL_INT( - "result", - result, - -1 ); - - FSHFS_TEST_ASSERT_IS_NOT_NULL( + FSHFS_TEST_ASSERT_IS_NULL( "error", error ); - libcerror_error_free( - &error ); - - result = libfshfs_deflate_initialize_fixed_huffman_tables( - &literals_table, - NULL, + result = libfshfs_huffman_tree_free( + &literals_tree, &error ); FSHFS_TEST_ASSERT_EQUAL_INT( "result", result, - -1 ); + 1 ); - FSHFS_TEST_ASSERT_IS_NOT_NULL( + FSHFS_TEST_ASSERT_IS_NULL( + "literals_tree", + literals_tree ); + + FSHFS_TEST_ASSERT_IS_NULL( "error", error ); - libcerror_error_free( - &error ); - -#if defined( HAVE_FSHFS_TEST_MEMORY ) - - for( test_number = 0; - test_number < number_of_memset_fail_tests; - test_number++ ) - { - /* Test libfshfs_write_io_handle_initialize with memset failing - */ - fshfs_test_memset_attempts_before_fail = test_number; - - result = libfshfs_deflate_initialize_fixed_huffman_tables( - &literals_table, - &distances_table, - &error ); - - if( fshfs_test_memset_attempts_before_fail != -1 ) - { - fshfs_test_memset_attempts_before_fail = -1; - } - else - { - FSHFS_TEST_ASSERT_EQUAL_INT( - "result", - result, - -1 ); - - FSHFS_TEST_ASSERT_IS_NOT_NULL( - "error", - error ); - - libcerror_error_free( - &error ); - } - } -#endif /* defined( HAVE_FSHFS_TEST_MEMORY ) */ - return( 1 ); on_error: + if( distances_tree != NULL ) + { + libfshfs_huffman_tree_free( + &distances_tree, + NULL ); + } + if( literals_tree != NULL ) + { + libfshfs_huffman_tree_free( + &literals_tree, + NULL ); + } if( error != NULL ) { libcerror_error_free( @@ -1689,55 +1255,79 @@ { uint8_t uncompressed_data[ 8192 ]; - libfshfs_deflate_bit_stream_t bit_stream; - libfshfs_deflate_huffman_table_t distances_table; - libfshfs_deflate_huffman_table_t literals_table; - - libcerror_error_t *error = NULL; - void *memset_result = NULL; - size_t uncompressed_data_offset = 0; - uint32_t value_32bit = 0; - int result = 0; + libfshfs_bit_stream_t *bit_stream = NULL; + libfshfs_huffman_tree_t *distances_tree = NULL; + libfshfs_huffman_tree_t *literals_tree = NULL; + libcerror_error_t *error = NULL; + size_t uncompressed_data_offset = 0; + uint32_t value_32bit = 0; + int result = 0; /* Initialize test */ - memset_result = memory_set( - &bit_stream, - 0, - sizeof( libfshfs_deflate_bit_stream_t ) ); + result = libfshfs_bit_stream_initialize( + &bit_stream, + fshfs_test_deflate_compressed_data, + 2627, + 2, + LIBFSHFS_BIT_STREAM_STORAGE_TYPE_BYTE_BACK_TO_FRONT, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); FSHFS_TEST_ASSERT_IS_NOT_NULL( - "memset_result", - memset_result ); + "bit_stream", + bit_stream ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); - memset_result = memory_set( - &distances_table, - 0, - sizeof( libfshfs_deflate_huffman_table_t ) ); + result = libfshfs_huffman_tree_initialize( + &literals_tree, + 288, + 15, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); FSHFS_TEST_ASSERT_IS_NOT_NULL( - "memset_result", - memset_result ); + "literals_tree", + literals_tree ); - memset_result = memory_set( - &literals_table, - 0, - sizeof( libfshfs_deflate_huffman_table_t ) ); + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + result = libfshfs_huffman_tree_initialize( + &distances_tree, + 30, + 15, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); FSHFS_TEST_ASSERT_IS_NOT_NULL( - "memset_result", - memset_result ); + "distances_tree", + distances_tree ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); /* Test regular cases */ - bit_stream.byte_stream = fshfs_test_deflate_compressed_byte_stream; - bit_stream.byte_stream_size = 2627; - bit_stream.byte_stream_offset = 2; - bit_stream.bit_buffer = 0; - bit_stream.bit_buffer_size = 0; - - result = libfshfs_deflate_bit_stream_get_value( - &bit_stream, + result = libfshfs_bit_stream_get_value( + bit_stream, 3, &value_32bit, &error ); @@ -1756,10 +1346,10 @@ "error", error ); - result = libfshfs_deflate_initialize_dynamic_huffman_tables( - &bit_stream, - &literals_table, - &distances_table, + result = libfshfs_deflate_build_dynamic_huffman_trees( + bit_stream, + literals_tree, + distances_tree, &error ); FSHFS_TEST_ASSERT_EQUAL_INT( @@ -1772,9 +1362,9 @@ error ); result = libfshfs_deflate_decode_huffman( - &bit_stream, - &literals_table, - &distances_table, + bit_stream, + literals_tree, + distances_tree, uncompressed_data, 8192, &uncompressed_data_offset, @@ -1789,16 +1379,52 @@ "error", error ); - /* Test error cases + /* Clean up */ - bit_stream.byte_stream = fshfs_test_deflate_compressed_byte_stream; - bit_stream.byte_stream_size = 2627; - bit_stream.byte_stream_offset = 2; - bit_stream.bit_buffer = 0; - bit_stream.bit_buffer_size = 0; + result = libfshfs_bit_stream_free( + &bit_stream, + &error ); - result = libfshfs_deflate_bit_stream_get_value( + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "bit_stream", + bit_stream ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + /* Initialize test + */ + result = libfshfs_bit_stream_initialize( &bit_stream, + fshfs_test_deflate_compressed_data, + 2627, + 2, + LIBFSHFS_BIT_STREAM_STORAGE_TYPE_BYTE_BACK_TO_FRONT, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "bit_stream", + bit_stream ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + /* Test error cases + */ + result = libfshfs_bit_stream_get_value( + bit_stream, 3, &value_32bit, &error ); @@ -1817,10 +1443,10 @@ "error", error ); - result = libfshfs_deflate_initialize_dynamic_huffman_tables( - &bit_stream, - &literals_table, - &distances_table, + result = libfshfs_deflate_build_dynamic_huffman_trees( + bit_stream, + literals_tree, + distances_tree, &error ); FSHFS_TEST_ASSERT_EQUAL_INT( @@ -1834,8 +1460,8 @@ result = libfshfs_deflate_decode_huffman( NULL, - &literals_table, - &distances_table, + literals_tree, + distances_tree, uncompressed_data, 8192, &uncompressed_data_offset, @@ -1854,9 +1480,9 @@ &error ); result = libfshfs_deflate_decode_huffman( - &bit_stream, + bit_stream, NULL, - &distances_table, + distances_tree, uncompressed_data, 8192, &uncompressed_data_offset, @@ -1875,8 +1501,8 @@ &error ); result = libfshfs_deflate_decode_huffman( - &bit_stream, - &literals_table, + bit_stream, + literals_tree, NULL, uncompressed_data, 8192, @@ -1896,9 +1522,9 @@ &error ); result = libfshfs_deflate_decode_huffman( - &bit_stream, - &literals_table, - &distances_table, + bit_stream, + literals_tree, + distances_tree, NULL, 8192, &uncompressed_data_offset, @@ -1917,9 +1543,9 @@ &error ); result = libfshfs_deflate_decode_huffman( - &bit_stream, - &literals_table, - &distances_table, + bit_stream, + literals_tree, + distances_tree, uncompressed_data, (size_t) SSIZE_MAX + 1, &uncompressed_data_offset, @@ -1938,9 +1564,9 @@ &error ); result = libfshfs_deflate_decode_huffman( - &bit_stream, - &literals_table, - &distances_table, + bit_stream, + literals_tree, + distances_tree, uncompressed_data, 8192, NULL, @@ -1958,9 +1584,80 @@ libcerror_error_free( &error ); + /* Clean up + */ + result = libfshfs_huffman_tree_free( + &distances_tree, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "distances_tree", + distances_tree ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + result = libfshfs_huffman_tree_free( + &literals_tree, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "literals_tree", + literals_tree ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + result = libfshfs_bit_stream_free( + &bit_stream, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "bit_stream", + bit_stream ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + return( 1 ); on_error: + if( distances_tree != NULL ) + { + libfshfs_huffman_tree_free( + &distances_tree, + NULL ); + } + if( literals_tree != NULL ) + { + libfshfs_huffman_tree_free( + &literals_tree, + NULL ); + } + if( bit_stream != NULL ) + { + libfshfs_bit_stream_free( + &bit_stream, + NULL ); + } if( error != NULL ) { libcerror_error_free( @@ -1983,7 +1680,7 @@ */ result = libfshfs_deflate_calculate_adler32( &checksum, - fshfs_test_deflate_uncompressed_byte_stream, + fshfs_test_deflate_uncompressed_data, 7640, 1, &error ); @@ -2006,7 +1703,7 @@ */ result = libfshfs_deflate_calculate_adler32( NULL, - fshfs_test_deflate_uncompressed_byte_stream, + fshfs_test_deflate_uncompressed_data, 7640, 1, &error ); @@ -2044,7 +1741,7 @@ result = libfshfs_deflate_calculate_adler32( &checksum, - fshfs_test_deflate_uncompressed_byte_stream, + fshfs_test_deflate_uncompressed_data, (size_t) SSIZE_MAX + 1, 1, &error ); @@ -2087,7 +1784,7 @@ uncompressed_data_offset = 0; result = libfshfs_deflate_read_data_header( - fshfs_test_deflate_compressed_byte_stream, + fshfs_test_deflate_compressed_data, 2627, &uncompressed_data_offset, &error ); @@ -2129,7 +1826,7 @@ &error ); result = libfshfs_deflate_read_data_header( - fshfs_test_deflate_compressed_byte_stream, + fshfs_test_deflate_compressed_data, (size_t) SSIZE_MAX + 1, &uncompressed_data_offset, &error ); @@ -2147,7 +1844,7 @@ &error ); result = libfshfs_deflate_read_data_header( - fshfs_test_deflate_compressed_byte_stream, + fshfs_test_deflate_compressed_data, 2627, NULL, &error ); @@ -2165,7 +1862,7 @@ &error ); result = libfshfs_deflate_read_data_header( - fshfs_test_deflate_compressed_byte_stream, + fshfs_test_deflate_compressed_data, 1, &uncompressed_data_offset, &error ); @@ -2196,6 +1893,192 @@ return( 0 ); } +/* Tests the deflate_read_block_header function + * Returns 1 if successful or 0 if not + */ +int fshfs_test_deflate_read_block_header( + void ) +{ + libfshfs_bit_stream_t *bit_stream = NULL; + libcerror_error_t *error = NULL; + uint8_t block_type = 0; + uint8_t last_block_flag = 0; + int result = 0; + + /* Initialize test + */ + result = libfshfs_bit_stream_initialize( + &bit_stream, + fshfs_test_deflate_compressed_data, + 2627, + 2, + LIBFSHFS_BIT_STREAM_STORAGE_TYPE_BYTE_BACK_TO_FRONT, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "bit_stream", + bit_stream ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + /* Test regular cases + */ + result = libfshfs_deflate_read_block_header( + bit_stream, + &block_type, + &last_block_flag, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + /* Clean up + */ + result = libfshfs_bit_stream_free( + &bit_stream, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "bit_stream", + bit_stream ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + /* Initialize test + */ + result = libfshfs_bit_stream_initialize( + &bit_stream, + fshfs_test_deflate_compressed_data, + 2627, + 2, + LIBFSHFS_BIT_STREAM_STORAGE_TYPE_BYTE_BACK_TO_FRONT, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "bit_stream", + bit_stream ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + /* Test error cases + */ + result = libfshfs_deflate_read_block_header( + NULL, + &block_type, + &last_block_flag, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_deflate_read_block_header( + bit_stream, + NULL, + &last_block_flag, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_deflate_read_block_header( + bit_stream, + &block_type, + NULL, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + /* Clean up + */ + result = libfshfs_bit_stream_free( + &bit_stream, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "bit_stream", + bit_stream ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + return( 1 ); + +on_error: + if( bit_stream != NULL ) + { + libfshfs_bit_stream_free( + &bit_stream, + NULL ); + } + if( error != NULL ) + { + libcerror_error_free( + &error ); + } + return( 0 ); +} + /* Tests the libfshfs_deflate_read_block function * Returns 1 if successful or 0 if not */ @@ -2204,40 +2087,116 @@ { uint8_t uncompressed_data[ 8192 ]; - libfshfs_deflate_bit_stream_t bit_stream; - - libcerror_error_t *error = NULL; - void *memset_result = NULL; - size_t uncompressed_data_offset = 0; - size_t uncompressed_data_size = 7640; - uint8_t last_block_flag = 0; - int result = 0; + libfshfs_bit_stream_t *bit_stream = NULL; + libfshfs_huffman_tree_t *fixed_distances_tree = NULL; + libfshfs_huffman_tree_t *fixed_literals_tree = NULL; + libcerror_error_t *error = NULL; + size_t uncompressed_data_offset = 0; + size_t uncompressed_data_size = 7640; + uint8_t block_type = 0; + uint8_t last_block_flag = 0; + int result = 0; /* Initialize test */ - memset_result = memory_set( - &bit_stream, - 0, - sizeof( libfshfs_deflate_bit_stream_t ) ); + result = libfshfs_bit_stream_initialize( + &bit_stream, + fshfs_test_deflate_compressed_data, + 2627, + 2, + LIBFSHFS_BIT_STREAM_STORAGE_TYPE_BYTE_BACK_TO_FRONT, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); FSHFS_TEST_ASSERT_IS_NOT_NULL( - "memset_result", - memset_result ); + "bit_stream", + bit_stream ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + result = libfshfs_huffman_tree_initialize( + &fixed_literals_tree, + 288, + 15, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "fixed_literals_tree", + fixed_literals_tree ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + result = libfshfs_huffman_tree_initialize( + &fixed_distances_tree, + 30, + 15, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "fixed_distances_tree", + fixed_distances_tree ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + result = libfshfs_deflate_build_fixed_huffman_trees( + fixed_literals_tree, + fixed_distances_tree, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + result = libfshfs_deflate_read_block_header( + bit_stream, + &block_type, + &last_block_flag, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); /* Test regular cases */ - bit_stream.byte_stream = fshfs_test_deflate_compressed_byte_stream; - bit_stream.byte_stream_size = 2627; - bit_stream.byte_stream_offset = 2; - bit_stream.bit_buffer = 0; - bit_stream.bit_buffer_size = 0; - result = libfshfs_deflate_read_block( - &bit_stream, + bit_stream, + block_type, + fixed_literals_tree, + fixed_distances_tree, uncompressed_data, uncompressed_data_size, &uncompressed_data_offset, - &last_block_flag, &error ); FSHFS_TEST_ASSERT_EQUAL_INT( @@ -2256,20 +2215,58 @@ /* TODO: test uncompressed data too small */ - /* Test error cases + /* Clean up + */ + result = libfshfs_bit_stream_free( + &bit_stream, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "bit_stream", + bit_stream ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + /* Initialize test */ - bit_stream.byte_stream = fshfs_test_deflate_compressed_byte_stream; - bit_stream.byte_stream_size = 2627; - bit_stream.byte_stream_offset = 2; - bit_stream.bit_buffer = 0; - bit_stream.bit_buffer_size = 0; + result = libfshfs_bit_stream_initialize( + &bit_stream, + fshfs_test_deflate_compressed_data, + 2627, + 2, + LIBFSHFS_BIT_STREAM_STORAGE_TYPE_BYTE_BACK_TO_FRONT, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "bit_stream", + bit_stream ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + /* Test error cases + */ result = libfshfs_deflate_read_block( NULL, + block_type, + fixed_literals_tree, + fixed_distances_tree, uncompressed_data, uncompressed_data_size, &uncompressed_data_offset, - &last_block_flag, &error ); FSHFS_TEST_ASSERT_EQUAL_INT( @@ -2285,11 +2282,13 @@ &error ); result = libfshfs_deflate_read_block( - &bit_stream, + bit_stream, + block_type, + fixed_literals_tree, + fixed_distances_tree, NULL, uncompressed_data_size, &uncompressed_data_offset, - &last_block_flag, &error ); FSHFS_TEST_ASSERT_EQUAL_INT( @@ -2305,11 +2304,13 @@ &error ); result = libfshfs_deflate_read_block( - &bit_stream, + bit_stream, + block_type, + fixed_literals_tree, + fixed_distances_tree, uncompressed_data, (size_t) SSIZE_MAX + 1, &uncompressed_data_offset, - &last_block_flag, &error ); FSHFS_TEST_ASSERT_EQUAL_INT( @@ -2325,11 +2326,13 @@ &error ); result = libfshfs_deflate_read_block( - &bit_stream, + bit_stream, + block_type, + fixed_literals_tree, + fixed_distances_tree, uncompressed_data, uncompressed_data_size, NULL, - &last_block_flag, &error ); FSHFS_TEST_ASSERT_EQUAL_INT( @@ -2344,29 +2347,80 @@ libcerror_error_free( &error ); - result = libfshfs_deflate_read_block( - &bit_stream, - uncompressed_data, - uncompressed_data_size, - &uncompressed_data_offset, - NULL, + /* Clean up + */ + result = libfshfs_huffman_tree_free( + &fixed_distances_tree, &error ); FSHFS_TEST_ASSERT_EQUAL_INT( "result", result, - -1 ); + 1 ); - FSHFS_TEST_ASSERT_IS_NOT_NULL( + FSHFS_TEST_ASSERT_IS_NULL( + "fixed_distances_tree", + fixed_distances_tree ); + + FSHFS_TEST_ASSERT_IS_NULL( "error", error ); - libcerror_error_free( - &error ); + result = libfshfs_huffman_tree_free( + &fixed_literals_tree, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "fixed_literals_tree", + fixed_literals_tree ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + result = libfshfs_bit_stream_free( + &bit_stream, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "bit_stream", + bit_stream ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); return( 1 ); on_error: + if( fixed_distances_tree != NULL ) + { + libfshfs_huffman_tree_free( + &fixed_distances_tree, + NULL ); + } + if( fixed_literals_tree != NULL ) + { + libfshfs_huffman_tree_free( + &fixed_literals_tree, + NULL ); + } + if( bit_stream != NULL ) + { + libfshfs_bit_stream_free( + &bit_stream, + NULL ); + } if( error != NULL ) { libcerror_error_free( @@ -2390,7 +2444,7 @@ /* Test regular cases */ result = libfshfs_deflate_decompress( - &( fshfs_test_deflate_compressed_byte_stream[ 2 ] ), + &( fshfs_test_deflate_compressed_data[ 2 ] ), 2627 - 6, uncompressed_data, &uncompressed_data_size, @@ -2434,7 +2488,7 @@ &error ); result = libfshfs_deflate_decompress( - &( fshfs_test_deflate_compressed_byte_stream[ 2 ] ), + &( fshfs_test_deflate_compressed_data[ 2 ] ), (size_t) SSIZE_MAX + 1, uncompressed_data, &uncompressed_data_size, @@ -2453,7 +2507,7 @@ &error ); result = libfshfs_deflate_decompress( - &( fshfs_test_deflate_compressed_byte_stream[ 2 ] ), + &( fshfs_test_deflate_compressed_data[ 2 ] ), 2627 - 6, NULL, &uncompressed_data_size, @@ -2472,7 +2526,7 @@ &error ); result = libfshfs_deflate_decompress( - &( fshfs_test_deflate_compressed_byte_stream[ 2 ] ), + &( fshfs_test_deflate_compressed_data[ 2 ] ), 2627 - 6, uncompressed_data, NULL, @@ -2516,7 +2570,7 @@ /* Test regular cases */ result = libfshfs_deflate_decompress_zlib( - fshfs_test_deflate_compressed_byte_stream, + fshfs_test_deflate_compressed_data, 2627, uncompressed_data, &uncompressed_data_size, @@ -2560,7 +2614,7 @@ &error ); result = libfshfs_deflate_decompress_zlib( - fshfs_test_deflate_compressed_byte_stream, + fshfs_test_deflate_compressed_data, (size_t) SSIZE_MAX + 1, uncompressed_data, &uncompressed_data_size, @@ -2579,7 +2633,7 @@ &error ); result = libfshfs_deflate_decompress_zlib( - fshfs_test_deflate_compressed_byte_stream, + fshfs_test_deflate_compressed_data, 2627, NULL, &uncompressed_data_size, @@ -2598,7 +2652,7 @@ &error ); result = libfshfs_deflate_decompress_zlib( - fshfs_test_deflate_compressed_byte_stream, + fshfs_test_deflate_compressed_data, 2627, uncompressed_data, NULL, @@ -2655,24 +2709,12 @@ #if defined( __GNUC__ ) && !defined( LIBFSHFS_DLL_IMPORT ) FSHFS_TEST_RUN( - "libfshfs_deflate_bit_stream_get_value", - fshfs_test_deflate_bit_stream_get_value ); - - FSHFS_TEST_RUN( - "libfshfs_deflate_huffman_table_construct", - fshfs_test_deflate_huffman_table_construct ); - - FSHFS_TEST_RUN( - "libfshfs_deflate_bit_stream_get_huffman_encoded_value", - fshfs_test_deflate_bit_stream_get_huffman_encoded_value ); + "libfshfs_deflate_build_dynamic_huffman_trees", + fshfs_test_deflate_build_dynamic_huffman_trees ); FSHFS_TEST_RUN( - "libfshfs_deflate_initialize_dynamic_huffman_tables", - fshfs_test_deflate_initialize_dynamic_huffman_tables ); - - FSHFS_TEST_RUN( - "libfshfs_deflate_initialize_fixed_huffman_tables", - fshfs_test_deflate_initialize_fixed_huffman_tables ); + "libfshfs_deflate_build_fixed_huffman_trees", + fshfs_test_deflate_build_fixed_huffman_trees ); FSHFS_TEST_RUN( "libfshfs_deflate_decode_huffman", @@ -2702,7 +2744,11 @@ return( EXIT_SUCCESS ); +#if defined( __GNUC__ ) && !defined( LIBFSHFS_DLL_IMPORT ) + on_error: return( EXIT_FAILURE ); + +#endif /* defined( __GNUC__ ) && !defined( LIBFSHFS_DLL_IMPORT ) */ } diff -Nru libfshfs-20201104/tests/fshfs_test_directory_entry.c libfshfs-20240221/tests/fshfs_test_directory_entry.c --- libfshfs-20201104/tests/fshfs_test_directory_entry.c 2020-11-04 04:22:26.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_directory_entry.c 2024-02-21 05:50:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * Library directory_entry type test program * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -29,6 +29,7 @@ #include "fshfs_test_libcerror.h" #include "fshfs_test_libfshfs.h" +#include "fshfs_test_libuna.h" #include "fshfs_test_macros.h" #include "fshfs_test_memory.h" #include "fshfs_test_unused.h" @@ -1891,6 +1892,7 @@ directory_entry, name_data, 10, + LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN, &error ); FSHFS_TEST_ASSERT_EQUAL_INT( diff -Nru libfshfs-20201104/tests/fshfs_test_directory_record.c libfshfs-20240221/tests/fshfs_test_directory_record.c --- libfshfs-20201104/tests/fshfs_test_directory_record.c 2020-11-04 04:22:26.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_directory_record.c 2024-02-21 05:50:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * Library directory_record type test program * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/tests/fshfs_test_error.c libfshfs-20240221/tests/fshfs_test_error.c --- libfshfs-20201104/tests/fshfs_test_error.c 2020-11-04 04:19:45.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_error.c 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Library error functions test program * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/tests/fshfs_test_extent.c libfshfs-20240221/tests/fshfs_test_extent.c --- libfshfs-20201104/tests/fshfs_test_extent.c 2020-11-04 04:22:26.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_extent.c 2024-02-21 05:50:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * Library extent type test program * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/tests/fshfs_test_extents_btree_key.c libfshfs-20240221/tests/fshfs_test_extents_btree_key.c --- libfshfs-20201104/tests/fshfs_test_extents_btree_key.c 2020-11-04 04:22:26.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_extents_btree_key.c 2024-02-21 05:50:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * Library extents_btree_key type test program * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/tests/fshfs_test_file_entry.c libfshfs-20240221/tests/fshfs_test_file_entry.c --- libfshfs-20201104/tests/fshfs_test_file_entry.c 2020-11-04 04:22:26.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_file_entry.c 2024-02-21 05:50:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * Library file_entry type test program * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -27,15 +27,12 @@ #include #endif -#if defined( TIME_WITH_SYS_TIME ) +#if defined( HAVE_SYS_TIME_H ) #include -#include -#elif defined( HAVE_SYS_TIME_H ) -#include -#else -#include #endif +#include + #include "fshfs_test_libcerror.h" #include "fshfs_test_libfshfs.h" #include "fshfs_test_macros.h" diff -Nru libfshfs-20201104/tests/fshfs_test_file_record.c libfshfs-20240221/tests/fshfs_test_file_record.c --- libfshfs-20201104/tests/fshfs_test_file_record.c 2020-11-04 04:22:26.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_file_record.c 2024-02-21 05:50:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * Library file_record type test program * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -1258,20 +1258,18 @@ FSHFS_TEST_ASSERT_EQUAL_INT( "result", result, - 1 ); + 0 ); FSHFS_TEST_ASSERT_IS_NULL( - "error", - error ); - - FSHFS_TEST_ASSERT_IS_NOT_NULL( "resource_fork_descriptor", resource_fork_descriptor ); + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + /* Test error cases */ - resource_fork_descriptor = NULL; - result = libfshfs_file_record_get_resource_fork_descriptor( NULL, &resource_fork_descriptor, diff -Nru libfshfs-20201104/tests/fshfs_test_file_system.c libfshfs-20240221/tests/fshfs_test_file_system.c --- libfshfs-20201104/tests/fshfs_test_file_system.c 2020-11-04 04:22:26.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_file_system.c 2024-02-21 05:50:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * Library file_system type test program * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/tests/fshfs_test_fork_descriptor.c libfshfs-20240221/tests/fshfs_test_fork_descriptor.c --- libfshfs-20201104/tests/fshfs_test_fork_descriptor.c 2020-11-04 04:22:26.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_fork_descriptor.c 2024-02-21 05:50:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * Library fork_descriptor type test program * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/tests/fshfs_test_functions.c libfshfs-20240221/tests/fshfs_test_functions.c --- libfshfs-20201104/tests/fshfs_test_functions.c 2020-11-04 04:19:45.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_functions.c 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Functions for testing * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/tests/fshfs_test_functions.h libfshfs-20240221/tests/fshfs_test_functions.h --- libfshfs-20201104/tests/fshfs_test_functions.h 2020-11-04 04:19:45.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_functions.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Functions for testing * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/tests/fshfs_test_getopt.c libfshfs-20240221/tests/fshfs_test_getopt.c --- libfshfs-20201104/tests/fshfs_test_getopt.c 2020-11-04 04:19:45.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_getopt.c 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * GetOpt functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/tests/fshfs_test_getopt.h libfshfs-20240221/tests/fshfs_test_getopt.h --- libfshfs-20201104/tests/fshfs_test_getopt.h 2020-11-04 04:19:45.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_getopt.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * GetOpt functions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/tests/fshfs_test_huffman_tree.c libfshfs-20240221/tests/fshfs_test_huffman_tree.c --- libfshfs-20201104/tests/fshfs_test_huffman_tree.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_huffman_tree.c 2024-02-21 05:50:08.000000000 +0000 @@ -0,0 +1,982 @@ +/* + * Huffman tree testing program + * + * Copyright (C) 2009-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include +#include +#include + +#if defined( HAVE_STDLIB_H ) || defined( WINAPI ) +#include +#endif + +#include "fshfs_test_libcerror.h" +#include "fshfs_test_libcnotify.h" +#include "fshfs_test_macros.h" +#include "fshfs_test_memory.h" +#include "fshfs_test_unused.h" + +#include "../libfshfs/libfshfs_bit_stream.h" +#include "../libfshfs/libfshfs_huffman_tree.h" + +uint8_t fshfs_test_huffman_tree_data[ 2627 ] = { + 0x78, 0xda, 0xbd, 0x59, 0x6d, 0x8f, 0xdb, 0xb8, 0x11, 0xfe, 0x7c, 0xfa, 0x15, 0xc4, 0x7e, 0xb9, + 0x5d, 0xc0, 0x75, 0x5e, 0x7b, 0x45, 0x0f, 0x45, 0x81, 0xed, 0xde, 0x26, 0xdd, 0x62, 0x2f, 0x0d, + 0xb2, 0x97, 0x16, 0xfd, 0x48, 0x4b, 0xb4, 0xcd, 0x46, 0x12, 0x5d, 0x52, 0x5a, 0xc7, 0xfd, 0xf5, + 0x7d, 0x66, 0x86, 0x94, 0x28, 0xd9, 0xde, 0xec, 0xe1, 0x80, 0x06, 0x38, 0x5c, 0x62, 0x93, 0xc3, + 0x79, 0x7d, 0xe6, 0x99, 0xf1, 0x77, 0xdf, 0x29, 0xa5, 0xde, 0x7f, 0xf8, 0xac, 0xee, 0x6f, 0x1f, + 0x1e, 0x6e, 0x3f, 0xa9, 0xf7, 0xb7, 0x1f, 0x6e, 0x3f, 0x5d, 0xdf, 0xab, 0x8f, 0x9f, 0xff, 0x72, + 0x7f, 0x77, 0xa3, 0xf0, 0xdf, 0xed, 0x87, 0x87, 0xdb, 0x42, 0x9d, 0xfe, 0xf3, 0x0f, 0xe3, 0x83, + 0x75, 0xad, 0x7a, 0xb3, 0x50, 0xaf, 0xff, 0xa8, 0xfe, 0xd6, 0xb7, 0x46, 0xbd, 0x7e, 0xf9, 0xf2, + 0x0f, 0x45, 0xa1, 0x6e, 0xdc, 0xee, 0xe0, 0xed, 0x66, 0xdb, 0xa9, 0xcb, 0x9b, 0x2b, 0xfe, 0x50, + 0xbd, 0xf3, 0xc6, 0xa8, 0x07, 0xb7, 0xee, 0xf6, 0xda, 0x1b, 0xf5, 0xce, 0xf5, 0x6d, 0xa5, 0x3b, + 0xdc, 0x5e, 0xa8, 0xbb, 0xb6, 0x5c, 0xaa, 0x3f, 0x6d, 0xbb, 0x6e, 0xf7, 0xe3, 0x8b, 0x17, 0xeb, + 0xb0, 0x5e, 0x3a, 0xbf, 0x79, 0xf1, 0xe7, 0x42, 0xdd, 0x3e, 0x1a, 0x7f, 0x70, 0x10, 0x6a, 0x83, + 0xda, 0x19, 0xdf, 0xd8, 0xae, 0x33, 0x95, 0xea, 0x9c, 0x2a, 0x21, 0x5d, 0xe9, 0xb6, 0x52, 0x95, + 0x0d, 0x9d, 0xb7, 0xab, 0xbe, 0x33, 0x0a, 0x67, 0x57, 0x90, 0xd7, 0xd0, 0x97, 0xd6, 0x84, 0x42, + 0xb9, 0xb5, 0xea, 0xb6, 0xb8, 0x59, 0xdb, 0xd2, 0xb4, 0xc1, 0xa8, 0xca, 0x95, 0x7d, 0x63, 0xda, + 0x6e, 0xa1, 0x70, 0x5e, 0x95, 0x5b, 0xdd, 0x6e, 0x6c, 0xbb, 0x51, 0xb6, 0x23, 0xf1, 0xad, 0xeb, + 0x94, 0xae, 0x6b, 0xb7, 0x37, 0xd5, 0xb2, 0x80, 0xfe, 0xea, 0x17, 0xba, 0xfa, 0x18, 0xed, 0x63, + 0x51, 0x46, 0xfc, 0x64, 0x42, 0x30, 0x5e, 0xbd, 0x37, 0xad, 0xf1, 0xba, 0x56, 0x1f, 0xfb, 0x15, + 0xe4, 0xab, 0xfb, 0xf8, 0x86, 0x6d, 0x4b, 0xe7, 0x77, 0xce, 0xeb, 0x0e, 0x1a, 0xd0, 0x95, 0x0e, + 0x6a, 0x07, 0x56, 0xb5, 0x74, 0x6d, 0x65, 0xc9, 0xde, 0x40, 0xe2, 0x92, 0xe4, 0x37, 0xb9, 0xec, + 0xa9, 0xd0, 0x22, 0x0a, 0x5d, 0xa8, 0xd0, 0xef, 0x76, 0xb5, 0x21, 0xdd, 0x61, 0xfe, 0xea, 0xc0, + 0xe7, 0x75, 0x25, 0xd2, 0x70, 0x9c, 0x5d, 0x13, 0x02, 0x8b, 0xae, 0xe1, 0x10, 0x3a, 0x64, 0x60, + 0xca, 0x92, 0xec, 0x78, 0xb9, 0x54, 0xd7, 0xe3, 0xd1, 0x9f, 0xcc, 0xda, 0xb6, 0xa2, 0xc5, 0x52, + 0xd1, 0xd7, 0xd7, 0x41, 0xf5, 0x01, 0x17, 0xb6, 0xc6, 0x1b, 0x8b, 0x50, 0x5c, 0xb0, 0xcb, 0xe2, + 0xcb, 0x17, 0xca, 0x9b, 0x35, 0x14, 0x25, 0x97, 0x9f, 0x54, 0x58, 0x9c, 0x51, 0x9c, 0x76, 0xc6, + 0x82, 0xcd, 0xa6, 0xa3, 0x17, 0x6c, 0xdc, 0xc7, 0xfb, 0x6f, 0xc9, 0x3b, 0x23, 0x88, 0xed, 0xb8, + 0xf8, 0x05, 0x67, 0xee, 0xed, 0xca, 0x6b, 0x7f, 0xc8, 0xe5, 0x68, 0x38, 0x16, 0xb2, 0x60, 0xc2, + 0xde, 0xf9, 0x2f, 0x6a, 0x43, 0xff, 0x68, 0x93, 0x9b, 0x46, 0x53, 0x16, 0x85, 0xc3, 0x23, 0x1e, + 0x9f, 0xe9, 0x16, 0x7a, 0xa9, 0x6b, 0x78, 0xd4, 0x96, 0x9c, 0x7f, 0xca, 0x79, 0x48, 0xb9, 0x71, + 0xcd, 0xca, 0xd2, 0xc5, 0x7f, 0x92, 0x18, 0x1d, 0x54, 0x45, 0xae, 0x9a, 0xb8, 0xf2, 0xba, 0x55, + 0x17, 0xd9, 0xbd, 0x0b, 0xca, 0x1b, 0xdd, 0x1e, 0xe4, 0x61, 0x08, 0xee, 0x54, 0xa3, 0xbf, 0x18, + 0x76, 0x28, 0x19, 0x85, 0x57, 0x2c, 0x22, 0xe6, 0xd7, 0xba, 0x34, 0x6a, 0xe7, 0xdd, 0xa3, 0xad, + 0x4c, 0x55, 0xc4, 0xf0, 0x45, 0x4b, 0x24, 0x17, 0xf7, 0x5b, 0x5b, 0x6e, 0x53, 0x16, 0xb2, 0x9e, + 0x7b, 0x0b, 0x19, 0x2b, 0x4d, 0x91, 0x81, 0x82, 0xd9, 0x85, 0x65, 0x21, 0x21, 0x44, 0xe2, 0x6a, + 0xe4, 0xc5, 0xaa, 0xac, 0x75, 0xe0, 0x84, 0x82, 0x1f, 0xf8, 0xaf, 0x83, 0xda, 0x93, 0x77, 0x48, + 0x78, 0x65, 0x90, 0x42, 0x15, 0x0e, 0x36, 0xae, 0x32, 0x05, 0xae, 0xf4, 0x81, 0xc5, 0x9c, 0x52, + 0x73, 0x76, 0x5d, 0xcc, 0x57, 0x17, 0x13, 0x27, 0x89, 0xfd, 0x62, 0x3d, 0xee, 0x55, 0x7d, 0x29, + 0xf7, 0x4a, 0x3e, 0x44, 0xa2, 0xe1, 0xd8, 0xda, 0xb6, 0x5f, 0xe4, 0x95, 0x22, 0x77, 0xf9, 0xde, + 0x76, 0xdb, 0xc9, 0x03, 0x54, 0x70, 0x78, 0x5e, 0xfb, 0xce, 0x96, 0x7d, 0xad, 0xfd, 0xbc, 0xf4, + 0xe2, 0xb9, 0x82, 0x2f, 0x8a, 0xbf, 0xe8, 0xe3, 0x69, 0xd4, 0xf6, 0x08, 0x5b, 0xa3, 0x2b, 0xc6, + 0x0b, 0x5d, 0x07, 0xe0, 0x04, 0x4a, 0xda, 0xc4, 0x1c, 0xbc, 0x87, 0x26, 0xf0, 0x7f, 0x84, 0xac, + 0x8b, 0xa5, 0x14, 0x39, 0xbe, 0xf8, 0x19, 0xca, 0x36, 0x48, 0xba, 0x1b, 0xe7, 0xbd, 0x09, 0x3b, + 0x2a, 0x53, 0x28, 0xfc, 0xe0, 0x7a, 0x5f, 0xa2, 0x02, 0xd6, 0x27, 0xb2, 0xa3, 0x31, 0x1a, 0xa5, + 0x06, 0xa9, 0xc5, 0xa9, 0x3b, 0x7c, 0xe5, 0x48, 0xb9, 0x85, 0x32, 0x5f, 0xcb, 0xba, 0xaf, 0xc4, + 0x19, 0x07, 0x15, 0xe4, 0x6c, 0x49, 0xb1, 0xa0, 0x0b, 0x00, 0x8d, 0x01, 0x1c, 0x8e, 0x2d, 0xa3, + 0xec, 0x5a, 0x10, 0x84, 0x04, 0x44, 0x87, 0x92, 0xdd, 0x22, 0x6a, 0xc1, 0xd5, 0x11, 0x40, 0x01, + 0xa8, 0xc5, 0x24, 0x5b, 0x32, 0x5f, 0x4b, 0x19, 0x72, 0x66, 0xa5, 0x4c, 0x22, 0x47, 0x24, 0xec, + 0x1e, 0xfd, 0x30, 0xb5, 0x25, 0x8f, 0xd6, 0x0d, 0x94, 0xfc, 0x96, 0x27, 0xdc, 0xea, 0xdf, 0xa6, + 0xec, 0xd8, 0x1e, 0x7a, 0xf0, 0x05, 0x0e, 0x67, 0x26, 0x0e, 0x3e, 0x99, 0x28, 0x06, 0xb4, 0xcc, + 0x3c, 0x82, 0x6e, 0xa0, 0x0b, 0xd2, 0xb5, 0xef, 0x6c, 0x6d, 0xbb, 0x03, 0x25, 0xd5, 0xc6, 0x6b, + 0xc0, 0x67, 0x6b, 0x0c, 0xe5, 0x24, 0xc9, 0xf0, 0x46, 0x52, 0x8d, 0x2e, 0x1d, 0xbb, 0x69, 0xed, + 0x5d, 0xc3, 0xda, 0x4c, 0x9e, 0xa1, 0x12, 0x1b, 0x9d, 0x4f, 0xb7, 0x1e, 0x0e, 0x40, 0xc9, 0x26, + 0x26, 0x15, 0x9a, 0xc5, 0x49, 0xa7, 0xb3, 0x67, 0x5e, 0x2d, 0xd5, 0xed, 0xd7, 0xd2, 0xec, 0xd8, + 0x0f, 0x80, 0x9b, 0x07, 0x18, 0x79, 0x8c, 0xdb, 0x1f, 0xef, 0xf9, 0xf0, 0xbf, 0x5c, 0x8f, 0xfc, + 0xa3, 0x0a, 0x68, 0x1f, 0xcd, 0x61, 0x0e, 0x4d, 0xe8, 0x77, 0x00, 0xa0, 0x20, 0x02, 0x02, 0x24, + 0x90, 0xad, 0x6f, 0x87, 0x36, 0x15, 0x81, 0x8a, 0x33, 0xdc, 0x41, 0xe3, 0x95, 0x21, 0x6d, 0x57, + 0xd4, 0x26, 0xa9, 0xaa, 0xc2, 0x53, 0x0f, 0xbf, 0x5e, 0x42, 0x75, 0x7a, 0x93, 0xae, 0xfc, 0xec, + 0x2a, 0xbb, 0xb6, 0x63, 0x84, 0x03, 0x1f, 0xb9, 0x5b, 0xab, 0x03, 0xa9, 0x47, 0x5f, 0x8a, 0x6a, + 0x68, 0xa1, 0xd3, 0xe2, 0xe2, 0x4c, 0xa1, 0xa8, 0xd0, 0x49, 0x2f, 0x47, 0xa3, 0x13, 0x03, 0xbe, + 0x2b, 0x80, 0x10, 0x12, 0x98, 0x1c, 0x7d, 0xd7, 0x7d, 0x5b, 0x26, 0x14, 0xa5, 0x08, 0xd2, 0xa7, + 0x2b, 0x23, 0x2d, 0xcb, 0x0a, 0x20, 0x4c, 0xe1, 0xb6, 0x60, 0xa4, 0x04, 0x46, 0x72, 0xde, 0xa8, + 0x41, 0xe8, 0x65, 0x0e, 0xd0, 0x04, 0xac, 0xc8, 0xea, 0x0d, 0x37, 0x6c, 0xc0, 0x42, 0xa0, 0xdc, + 0xde, 0x6f, 0x0d, 0x67, 0xf0, 0xa8, 0x08, 0xdc, 0x66, 0xdb, 0x47, 0x87, 0x74, 0xbe, 0x5a, 0xd0, + 0x37, 0xad, 0xd8, 0x38, 0x0d, 0xc1, 0x68, 0x67, 0x13, 0x3d, 0x53, 0x44, 0x70, 0xf9, 0x91, 0x1c, + 0xa3, 0xf4, 0x55, 0x0c, 0xcd, 0xa4, 0x5f, 0x8c, 0x50, 0xc8, 0xfa, 0x8a, 0xdc, 0x2f, 0xc8, 0x6d, + 0xb4, 0x18, 0x87, 0x5c, 0xd4, 0x04, 0x44, 0x66, 0x8d, 0x9c, 0xec, 0x60, 0x32, 0xc9, 0xc1, 0xb5, + 0x1e, 0xc4, 0x46, 0x4a, 0xd5, 0x4a, 0xad, 0x99, 0x47, 0xd2, 0x7f, 0xd6, 0x6f, 0x2a, 0x67, 0x04, + 0xea, 0xd9, 0x49, 0x0c, 0xb4, 0x74, 0x7f, 0xee, 0xc9, 0xc5, 0xd4, 0x3f, 0x01, 0x55, 0x51, 0x2b, + 0x87, 0x66, 0x4f, 0xe4, 0x42, 0xaa, 0x1a, 0xff, 0x80, 0x02, 0x4d, 0xa0, 0xeb, 0x7b, 0xbc, 0x8b, + 0xe7, 0x3c, 0x83, 0x28, 0x59, 0x6c, 0x3b, 0xb0, 0xa6, 0x1e, 0x6c, 0x04, 0xad, 0xc4, 0x9b, 0x46, + 0x5b, 0x24, 0x1d, 0xd5, 0x2b, 0x72, 0x64, 0xdd, 0xd7, 0x0b, 0x3c, 0xc3, 0xe6, 0xaf, 0x46, 0xf3, + 0x87, 0xa4, 0x5a, 0x08, 0x40, 0xb7, 0xc4, 0xbd, 0xa2, 0xef, 0xce, 0xf0, 0x0d, 0xb7, 0x26, 0x19, + 0xb9, 0xe7, 0x94, 0x16, 0x53, 0x57, 0xb5, 0xa1, 0x5c, 0x60, 0xef, 0x51, 0x10, 0x38, 0x0b, 0xdf, + 0x2c, 0xd5, 0xdf, 0x05, 0x28, 0x08, 0x53, 0x88, 0xf8, 0x45, 0xba, 0xc4, 0x89, 0x0b, 0x03, 0xbc, + 0xc5, 0x03, 0x5c, 0xc6, 0xa9, 0x73, 0xfd, 0xd5, 0x68, 0xd2, 0xee, 0x9d, 0xad, 0x4d, 0x18, 0xc0, + 0x2a, 0x47, 0x1b, 0xf2, 0x40, 0xec, 0xb7, 0xb9, 0x97, 0x29, 0x0b, 0x32, 0x3a, 0x86, 0x7f, 0x67, + 0xd2, 0x0b, 0x0d, 0xc6, 0xc3, 0x72, 0xd7, 0xb6, 0x96, 0x98, 0x31, 0xc9, 0x8c, 0xae, 0x9b, 0x76, + 0xa6, 0x59, 0x59, 0x87, 0x1e, 0xcd, 0x47, 0x14, 0x28, 0x58, 0x81, 0xe8, 0x3e, 0x66, 0x7a, 0x6e, + 0x2d, 0xc5, 0x53, 0x6e, 0x1d, 0xdc, 0x31, 0xcb, 0x22, 0xa4, 0x85, 0xc8, 0xce, 0xf4, 0xaa, 0x8a, + 0x41, 0xb1, 0x48, 0x00, 0x6a, 0x0b, 0xa2, 0x2b, 0x3c, 0xb7, 0x45, 0xfe, 0x7b, 0x18, 0x54, 0x93, + 0x66, 0xba, 0x31, 0x38, 0x88, 0xc8, 0x73, 0x99, 0x81, 0xf7, 0xf6, 0x65, 0x87, 0x84, 0x2b, 0x6a, + 0x8d, 0x17, 0x3b, 0x21, 0x99, 0xba, 0x2c, 0x41, 0xc9, 0x1c, 0x9d, 0x22, 0x00, 0x46, 0x5b, 0xab, + 0xa1, 0x7a, 0xe9, 0x5d, 0xa0, 0x94, 0x44, 0x33, 0x36, 0x43, 0x9a, 0xc9, 0x05, 0xc0, 0xe0, 0xae, + 0x66, 0xb6, 0x7a, 0xd9, 0x19, 0x4e, 0xbd, 0xb5, 0xd9, 0x1b, 0xee, 0xdb, 0x86, 0x8a, 0x4b, 0xd5, + 0xa6, 0xdd, 0x74, 0x5b, 0x94, 0x17, 0x55, 0x40, 0x85, 0xda, 0x46, 0x99, 0x26, 0x17, 0xad, 0x1d, + 0x31, 0x66, 0x84, 0x6e, 0x28, 0xa4, 0xf7, 0xf6, 0x91, 0x49, 0x44, 0x83, 0xeb, 0x48, 0x7c, 0x98, + 0x03, 0x2f, 0x48, 0x32, 0x19, 0x0d, 0xb7, 0xe5, 0xd5, 0x98, 0xc7, 0x90, 0x03, 0x10, 0xeb, 0x20, + 0xa3, 0x2c, 0x4c, 0x4d, 0xa9, 0xd5, 0x75, 0x91, 0x4b, 0xca, 0xa9, 0xe1, 0x08, 0x7d, 0x48, 0x69, + 0x4e, 0x8c, 0x8b, 0x7a, 0x20, 0x6e, 0x27, 0xc8, 0x9d, 0xf1, 0xbf, 0x65, 0xca, 0xf5, 0xeb, 0x12, + 0xfc, 0x64, 0x47, 0xfd, 0x66, 0xae, 0x03, 0x6b, 0x39, 0x05, 0x8c, 0x58, 0x0e, 0xf1, 0xf1, 0x71, + 0x96, 0x20, 0x59, 0x69, 0x9c, 0x60, 0xc9, 0x6f, 0x97, 0xd3, 0xde, 0x11, 0x4e, 0xf7, 0x83, 0x69, + 0xb7, 0x3a, 0x9f, 0x37, 0x92, 0x2d, 0x45, 0x07, 0xc0, 0xa1, 0xae, 0xb3, 0x31, 0x04, 0x8d, 0x0b, + 0x82, 0x1b, 0xea, 0x02, 0x8f, 0x06, 0xa0, 0x81, 0x50, 0x50, 0xb2, 0xa0, 0x63, 0x63, 0x00, 0x82, + 0x09, 0x39, 0x5a, 0x47, 0xf5, 0x8b, 0x39, 0xa7, 0x48, 0x6e, 0x83, 0x3e, 0x9d, 0x66, 0x3d, 0x22, + 0x4c, 0xcd, 0xc8, 0x2f, 0xac, 0xf5, 0x04, 0x25, 0x30, 0xd4, 0xd0, 0x90, 0x64, 0x90, 0x84, 0xa8, + 0x4f, 0xea, 0xbf, 0x95, 0x59, 0xf5, 0x1b, 0x9e, 0x9b, 0xb8, 0x0c, 0x66, 0x3d, 0xc2, 0x4a, 0x93, + 0x61, 0xee, 0x05, 0x05, 0x39, 0xe4, 0x40, 0x88, 0xdf, 0x9e, 0x2b, 0xc7, 0x6c, 0x48, 0x60, 0xc7, + 0xfc, 0x5f, 0xb3, 0x65, 0xc6, 0x36, 0x7f, 0x43, 0xbe, 0xa8, 0xf2, 0x0a, 0x13, 0xf0, 0x31, 0x9f, + 0x62, 0x9d, 0x31, 0xd4, 0xa2, 0x26, 0x0f, 0x81, 0x45, 0xcb, 0x10, 0x2d, 0xce, 0x01, 0x87, 0xef, + 0x29, 0x12, 0xdc, 0x6d, 0xbe, 0x9a, 0xb2, 0xcf, 0x69, 0x94, 0x61, 0x0d, 0xe6, 0x57, 0x06, 0xe2, + 0x35, 0x38, 0xa1, 0x71, 0x22, 0x00, 0x1f, 0xc2, 0x0f, 0x51, 0xf0, 0x82, 0x5a, 0xee, 0xde, 0x00, + 0x2d, 0xa8, 0xf5, 0x4a, 0x83, 0x37, 0x2d, 0xae, 0x57, 0xd6, 0x53, 0xca, 0x45, 0xde, 0xd4, 0xd3, + 0xe8, 0xcb, 0xa0, 0x1e, 0xbd, 0xb7, 0xcb, 0xc8, 0xd3, 0x39, 0xe3, 0x67, 0x96, 0x57, 0x57, 0xea, + 0x27, 0xa7, 0xb2, 0xce, 0x32, 0xcb, 0x0c, 0xfa, 0xf3, 0xf2, 0x2a, 0xf2, 0x19, 0x3e, 0xf0, 0x14, + 0x41, 0xcf, 0x7a, 0xd7, 0x50, 0x48, 0xf4, 0x78, 0x92, 0x74, 0x34, 0x8b, 0x3e, 0xcd, 0x72, 0x29, + 0x7d, 0x34, 0x77, 0x94, 0x24, 0x20, 0xf4, 0xb6, 0xe3, 0x5e, 0x86, 0x0f, 0x45, 0x4a, 0x5e, 0xb6, + 0x1c, 0x2f, 0x59, 0x4d, 0x2c, 0x72, 0x0f, 0xa5, 0xdb, 0x70, 0x9e, 0xc4, 0x57, 0x31, 0x77, 0xa5, + 0x69, 0x68, 0x4e, 0x83, 0x53, 0x1e, 0x25, 0x72, 0x92, 0x4d, 0x3e, 0x49, 0xca, 0x31, 0x6b, 0xa7, + 0x20, 0xc4, 0x99, 0x2b, 0xbf, 0x3a, 0x9b, 0x38, 0xa4, 0xba, 0x93, 0x94, 0x46, 0xb7, 0x2d, 0x11, + 0xd0, 0x9d, 0x29, 0xe5, 0x74, 0xc6, 0x2a, 0x7f, 0x98, 0x07, 0x91, 0xd2, 0xa6, 0x4c, 0x94, 0x32, + 0x49, 0x38, 0x15, 0x80, 0xe5, 0x10, 0xb4, 0x57, 0x57, 0xea, 0x33, 0x55, 0xd6, 0xe8, 0xb2, 0xb0, + 0xd5, 0x54, 0x5c, 0x75, 0x4c, 0xbd, 0xc6, 0xd0, 0xd2, 0xc5, 0x86, 0x86, 0xa5, 0xa7, 0xc9, 0x30, + 0x8d, 0x82, 0x63, 0xc4, 0x52, 0xdf, 0xbd, 0x1e, 0x25, 0x8d, 0x57, 0x91, 0x57, 0x94, 0x3b, 0xec, + 0xf8, 0x4b, 0xa2, 0x6e, 0x44, 0x24, 0xf1, 0x77, 0xdf, 0xc3, 0x58, 0xdb, 0x0c, 0x62, 0x4e, 0x32, + 0x5c, 0x20, 0x93, 0x47, 0xdb, 0xa7, 0xd1, 0x02, 0xc9, 0xdf, 0x0e, 0x23, 0x11, 0x45, 0xed, 0x7b, + 0xaa, 0xb7, 0x66, 0xd7, 0x23, 0xb0, 0x43, 0xec, 0x79, 0x4c, 0x90, 0xa8, 0x5f, 0x02, 0x0d, 0xf6, + 0x19, 0x03, 0x23, 0xf7, 0xe3, 0x6f, 0x40, 0xe2, 0x33, 0xf1, 0x4b, 0x42, 0x66, 0x1a, 0x24, 0xaa, + 0x31, 0xcc, 0xdc, 0xbf, 0x63, 0x84, 0xe9, 0x2c, 0x99, 0x99, 0x8d, 0xc5, 0x3c, 0xac, 0x4e, 0xd7, + 0x6c, 0xb2, 0xb1, 0x51, 0xe6, 0x4a, 0x7d, 0x14, 0x56, 0x01, 0xfe, 0x14, 0x3a, 0xb4, 0x78, 0xc9, + 0xa3, 0xbb, 0x96, 0xf2, 0x36, 0x9b, 0x79, 0x5c, 0x0b, 0xed, 0x22, 0x24, 0xef, 0x5d, 0x5f, 0x57, + 0xe3, 0x6e, 0x81, 0xe1, 0x8d, 0x68, 0xe1, 0x7f, 0x7a, 0xeb, 0x85, 0x6b, 0x44, 0xa6, 0x22, 0xb8, + 0x6e, 0x47, 0x59, 0xd3, 0xb9, 0x65, 0xc8, 0x94, 0x22, 0xee, 0x0d, 0x99, 0x2d, 0x92, 0x83, 0xf8, + 0x35, 0xc1, 0x06, 0x80, 0x53, 0x47, 0xde, 0x65, 0x5b, 0x8f, 0xe4, 0x49, 0x71, 0xb6, 0x86, 0x98, + 0x0a, 0x7b, 0xc4, 0xe1, 0x6b, 0xb6, 0x83, 0xe5, 0x08, 0xb0, 0x99, 0xd3, 0x15, 0x91, 0x5e, 0x9e, + 0xa2, 0x66, 0xbe, 0x7d, 0x48, 0x15, 0x17, 0xf7, 0x0f, 0x52, 0x73, 0x11, 0xbf, 0xe8, 0xe6, 0xf3, + 0x2a, 0xef, 0xd4, 0xa0, 0xac, 0x2e, 0xef, 0xb8, 0x22, 0xc9, 0x9d, 0xbc, 0xe2, 0x91, 0xa1, 0xf0, + 0x6d, 0xf5, 0x52, 0x4a, 0xff, 0x5c, 0x30, 0x54, 0xd3, 0x87, 0x8e, 0x98, 0x99, 0x74, 0x92, 0xd4, + 0xb8, 0x9e, 0x44, 0x35, 0x72, 0xc4, 0x59, 0xa4, 0x12, 0x07, 0x54, 0x66, 0x99, 0x86, 0xba, 0x89, + 0x36, 0xaf, 0x84, 0xaa, 0xf1, 0xa3, 0x29, 0xa6, 0x73, 0xf5, 0x48, 0x42, 0xae, 0x61, 0xa4, 0x01, + 0xbf, 0x06, 0x21, 0x78, 0x62, 0xc9, 0x41, 0xe2, 0x34, 0x3a, 0x5c, 0x51, 0xca, 0xfe, 0x3e, 0x63, + 0x47, 0xc3, 0xcc, 0x3d, 0x61, 0x48, 0xe8, 0x77, 0xb0, 0x3a, 0x01, 0x45, 0x9c, 0x79, 0xac, 0x89, + 0x00, 0x4b, 0xfb, 0xe2, 0xb8, 0x68, 0xca, 0xb7, 0x1c, 0x45, 0xaa, 0x29, 0x5a, 0x8a, 0xb0, 0xae, + 0x36, 0x21, 0x38, 0x6d, 0xb6, 0xea, 0x51, 0x60, 0xa2, 0x50, 0x12, 0x71, 0x19, 0x34, 0xe3, 0x77, + 0xc5, 0xa9, 0xc7, 0x88, 0x59, 0x65, 0x0e, 0x8f, 0xdc, 0x3a, 0x7e, 0x31, 0xe3, 0x0c, 0xc5, 0xa4, + 0xc5, 0xe4, 0x33, 0x82, 0x8e, 0xab, 0xb0, 0x0c, 0x02, 0x4f, 0x50, 0xbe, 0x22, 0x8d, 0x0a, 0xb1, + 0x52, 0xbf, 0xc9, 0xb1, 0xa7, 0x9c, 0xe4, 0xe8, 0x89, 0x13, 0xb4, 0x24, 0x60, 0x74, 0xc8, 0xdc, + 0x47, 0x72, 0xa6, 0x5b, 0xc5, 0x05, 0x14, 0x1b, 0x04, 0x89, 0x00, 0x88, 0x9f, 0xf8, 0x29, 0x0b, + 0xca, 0x42, 0x7a, 0x3f, 0x19, 0x6a, 0xaa, 0x73, 0x0d, 0xf8, 0x88, 0x4a, 0x3d, 0x41, 0xf7, 0x4e, + 0xda, 0x21, 0xad, 0x75, 0x98, 0x65, 0x49, 0xca, 0xb8, 0x6f, 0x3c, 0xb5, 0x1a, 0x5d, 0x44, 0xf8, + 0x40, 0x2e, 0x49, 0xf9, 0xef, 0x69, 0xa9, 0x4d, 0xf0, 0xb2, 0xb6, 0xd2, 0xfc, 0xd9, 0x81, 0xc9, + 0x7b, 0x74, 0x22, 0xb3, 0x3a, 0x4d, 0x91, 0x13, 0x7f, 0xb1, 0xf2, 0x3f, 0x2c, 0xd5, 0x27, 0xf3, + 0x68, 0x43, 0xb6, 0x51, 0x79, 0xf6, 0x0f, 0x02, 0xc3, 0xc0, 0x7a, 0xee, 0xc7, 0x0f, 0xc9, 0x7e, + 0xba, 0x13, 0xb6, 0x44, 0xba, 0xf9, 0x99, 0xb8, 0x3f, 0x6b, 0xcd, 0x3e, 0x41, 0x52, 0x28, 0x9e, + 0xfd, 0x13, 0x84, 0xec, 0xc0, 0xd0, 0x09, 0x19, 0x8c, 0xf1, 0xff, 0xa5, 0x7a, 0xa0, 0x6c, 0x84, + 0xb4, 0xb4, 0xf7, 0x08, 0xd2, 0xc9, 0x68, 0x4d, 0x83, 0x59, 0x93, 0xb6, 0xad, 0x28, 0x9a, 0xb0, + 0xb3, 0xde, 0x76, 0x09, 0xc1, 0x53, 0x83, 0x8c, 0x37, 0xa4, 0xa1, 0x40, 0xd7, 0x02, 0x50, 0x09, + 0x6e, 0x48, 0x17, 0x2a, 0x83, 0x21, 0xa2, 0xe6, 0x2d, 0x50, 0x55, 0xe1, 0x78, 0x60, 0x85, 0x11, + 0x61, 0x74, 0x32, 0xca, 0x03, 0xc6, 0x86, 0xd2, 0xf8, 0xb8, 0x80, 0xba, 0x25, 0x4e, 0x9f, 0x10, + 0x16, 0x91, 0xdc, 0x20, 0x1f, 0xa8, 0x54, 0xe9, 0x27, 0x1c, 0xc4, 0xa2, 0x87, 0x03, 0x28, 0x24, + 0xe9, 0x04, 0x46, 0xdf, 0x95, 0xf1, 0x0c, 0x71, 0x79, 0xa9, 0x83, 0x9e, 0x52, 0x91, 0x00, 0xe5, + 0x0d, 0xee, 0x13, 0x9f, 0x1f, 0xe0, 0x2a, 0xd5, 0xaf, 0xc2, 0x9b, 0x34, 0xde, 0x44, 0x11, 0x59, + 0x47, 0x7e, 0xb6, 0x0f, 0x2f, 0x88, 0x9a, 0xa3, 0x02, 0x68, 0x32, 0x1e, 0x56, 0xd1, 0x17, 0x05, + 0x6f, 0x36, 0x0c, 0x2f, 0xbe, 0x88, 0xef, 0x91, 0x22, 0x5b, 0xfd, 0x28, 0xf0, 0x1a, 0xf1, 0x17, + 0x4f, 0x0c, 0x15, 0xab, 0x26, 0x3f, 0x00, 0x15, 0xd9, 0x0f, 0x40, 0xc6, 0x72, 0x69, 0xb1, 0x3e, + 0x94, 0xe5, 0x12, 0xff, 0xbc, 0x03, 0x79, 0xd9, 0x68, 0xcc, 0x54, 0x28, 0xc6, 0x93, 0x71, 0x41, + 0x7f, 0x2e, 0xaf, 0x92, 0xe3, 0xd4, 0xd4, 0x71, 0x45, 0xee, 0xb8, 0x71, 0x0f, 0xc5, 0x1e, 0xa4, + 0x01, 0x75, 0xea, 0xfd, 0x5f, 0xf1, 0x53, 0xcf, 0xb0, 0x77, 0xdb, 0x3a, 0xda, 0x37, 0x91, 0xe6, + 0x67, 0x7f, 0x3c, 0x3b, 0x23, 0x44, 0xc9, 0xf6, 0xea, 0xd9, 0x16, 0xc6, 0xad, 0xe6, 0xb1, 0x91, + 0x4f, 0x67, 0x07, 0x12, 0xf4, 0x2b, 0xf4, 0xd4, 0x94, 0xc0, 0x25, 0x1a, 0x46, 0x01, 0x98, 0xe0, + 0x68, 0xac, 0x7b, 0x5a, 0xa7, 0x0c, 0x15, 0xf7, 0xfc, 0x1f, 0xfd, 0x40, 0x73, 0xeb, 0x9a, 0x93, + 0xe3, 0xb0, 0x88, 0x01, 0xa5, 0x37, 0xbe, 0x0f, 0x62, 0x4c, 0xa9, 0xd0, 0x78, 0x3b, 0xfe, 0xf9, + 0x8e, 0x83, 0x5a, 0xd2, 0x3a, 0x59, 0xd3, 0x70, 0x15, 0x43, 0x3c, 0x16, 0x45, 0x41, 0xa3, 0x84, + 0x66, 0x7c, 0xd4, 0x7d, 0xb7, 0x75, 0xde, 0xfe, 0x57, 0x50, 0x82, 0x3a, 0x2d, 0x59, 0x46, 0xbf, + 0x7d, 0x8a, 0x87, 0xf9, 0x9d, 0x74, 0x33, 0x0e, 0x79, 0xc5, 0xf8, 0x73, 0xcd, 0xff, 0x00, 0x30, + 0x4a, 0x56, 0xa4 }; + +#if defined( __GNUC__ ) && !defined( LIBFSHFS_DLL_IMPORT ) + +/* Tests the libfshfs_huffman_tree_initialize function + * Returns 1 if successful or 0 if not + */ +int fshfs_test_huffman_tree_initialize( + void ) +{ + libcerror_error_t *error = NULL; + libfshfs_huffman_tree_t *huffman_tree = NULL; + int result = 0; + +#if defined( HAVE_FSHFS_TEST_MEMORY ) + int number_of_malloc_fail_tests = 1; + int number_of_memset_fail_tests = 1; + int test_number = 0; +#endif + + /* Test regular cases + */ + result = libfshfs_huffman_tree_initialize( + &huffman_tree, + 288, + 15, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "huffman_tree", + huffman_tree ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + result = libfshfs_huffman_tree_free( + &huffman_tree, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "huffman_tree", + huffman_tree ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + /* Test error cases + */ + result = libfshfs_huffman_tree_initialize( + NULL, + 288, + 15, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + huffman_tree = (libfshfs_huffman_tree_t *) 0x12345678UL; + + result = libfshfs_huffman_tree_initialize( + &huffman_tree, + 288, + 15, + &error ); + + huffman_tree = NULL; + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + +#if defined( HAVE_FSHFS_TEST_MEMORY ) + + for( test_number = 0; + test_number < number_of_malloc_fail_tests; + test_number++ ) + { + /* Test libfshfs_huffman_tree_initialize with malloc failing + */ + fshfs_test_malloc_attempts_before_fail = test_number; + + result = libfshfs_huffman_tree_initialize( + &huffman_tree, + 288, + 15, + &error ); + + if( fshfs_test_malloc_attempts_before_fail != -1 ) + { + fshfs_test_malloc_attempts_before_fail = -1; + + if( huffman_tree != NULL ) + { + libfshfs_huffman_tree_free( + &huffman_tree, + NULL ); + } + } + else + { + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "huffman_tree", + huffman_tree ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + } + } + for( test_number = 0; + test_number < number_of_memset_fail_tests; + test_number++ ) + { + /* Test libfshfs_huffman_tree_initialize with memset failing + */ + fshfs_test_memset_attempts_before_fail = test_number; + + result = libfshfs_huffman_tree_initialize( + &huffman_tree, + 288, + 15, + &error ); + + if( fshfs_test_memset_attempts_before_fail != -1 ) + { + fshfs_test_memset_attempts_before_fail = -1; + + if( huffman_tree != NULL ) + { + libfshfs_huffman_tree_free( + &huffman_tree, + NULL ); + } + } + else + { + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "huffman_tree", + huffman_tree ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + } + } +#endif /* defined( HAVE_FSHFS_TEST_MEMORY ) */ + + return( 1 ); + +on_error: + if( error != NULL ) + { + libcerror_error_free( + &error ); + } + if( huffman_tree != NULL ) + { + libfshfs_huffman_tree_free( + &huffman_tree, + NULL ); + } + return( 0 ); +} + +/* Tests the libfshfs_huffman_tree_free function + * Returns 1 if successful or 0 if not + */ +int fshfs_test_huffman_tree_free( + void ) +{ + libcerror_error_t *error = NULL; + int result = 0; + + /* Test error cases + */ + result = libfshfs_huffman_tree_free( + NULL, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + return( 1 ); + +on_error: + if( error != NULL ) + { + libcerror_error_free( + &error ); + } + return( 0 ); +} + +/* Tests the libfshfs_huffman_tree_build function + * Returns 1 if successful or 0 if not + */ +int fshfs_test_huffman_tree_build( + void ) +{ + uint8_t code_size_array[ 318 ]; + + libfshfs_huffman_tree_t *huffman_tree = NULL; + libcerror_error_t *error = NULL; + uint16_t symbol = 0; + int result = 0; + + /* Initialize test + */ + for( symbol = 0; + symbol < 318; + symbol++ ) + { + if( symbol < 144 ) + { + code_size_array[ symbol ] = 8; + } + else if( symbol < 256 ) + { + code_size_array[ symbol ] = 9; + } + else if( symbol < 280 ) + { + code_size_array[ symbol ] = 7; + } + else if( symbol < 288 ) + { + code_size_array[ symbol ] = 8; + } + else + { + code_size_array[ symbol ] = 5; + } + } + result = libfshfs_huffman_tree_initialize( + &huffman_tree, + 288, + 15, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "huffman_tree", + huffman_tree ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + /* Test regular cases + */ + result = libfshfs_huffman_tree_build( + huffman_tree, + code_size_array, + 288, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + /* Test error cases + */ + result = libfshfs_huffman_tree_build( + NULL, + code_size_array, + 288, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_huffman_tree_build( + huffman_tree, + NULL, + 288, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_huffman_tree_build( + huffman_tree, + code_size_array, + -1, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + +#if defined( HAVE_FSHFS_TEST_MEMORY ) + + /* Test libfshfs_huffman_tree_build with malloc failing + */ + fshfs_test_malloc_attempts_before_fail = 0; + + result = libfshfs_huffman_tree_build( + huffman_tree, + code_size_array, + 288, + &error ); + + if( fshfs_test_malloc_attempts_before_fail != -1 ) + { + fshfs_test_malloc_attempts_before_fail = -1; + } + else + { + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + } +#if defined( OPTIMIZATION_DISABLED ) + + /* Test libfshfs_huffman_tree_build with memset failing + */ + fshfs_test_memset_attempts_before_fail = 0; + + result = libfshfs_huffman_tree_build( + huffman_tree, + code_size_array, + 288, + &error ); + + if( fshfs_test_memset_attempts_before_fail != -1 ) + { + fshfs_test_memset_attempts_before_fail = -1; + } + else + { + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + } +#endif /* defined( OPTIMIZATION_DISABLED ) */ +#endif /* defined( HAVE_FSHFS_TEST_MEMORY ) */ + + /* TODO test errornous data */ + + /* Clean up + */ + result = libfshfs_huffman_tree_free( + &huffman_tree, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "huffman_tree", + huffman_tree ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + return( 1 ); + +on_error: + if( huffman_tree != NULL ) + { + libfshfs_huffman_tree_free( + &huffman_tree, + NULL ); + } + return( 0 ); +} + +/* Tests the libfshfs_huffman_tree_get_symbol_from_bit_stream function + * Returns 1 if successful or 0 if not + */ +int fshfs_test_huffman_tree_get_symbol_from_bit_stream( + void ) +{ + uint8_t code_size_array[ 318 ]; + + libfshfs_bit_stream_t *bit_stream = NULL; + libfshfs_huffman_tree_t *huffman_tree = NULL; + libcerror_error_t *error = NULL; + uint16_t symbol = 0; + int result = 0; + + /* Initialize test + */ + result = libfshfs_bit_stream_initialize( + &bit_stream, + fshfs_test_huffman_tree_data, + 2627, + 2, + LIBFSHFS_BIT_STREAM_STORAGE_TYPE_BYTE_BACK_TO_FRONT, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "bit_stream", + bit_stream ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + for( symbol = 0; + symbol < 318; + symbol++ ) + { + if( symbol < 144 ) + { + code_size_array[ symbol ] = 8; + } + else if( symbol < 256 ) + { + code_size_array[ symbol ] = 9; + } + else if( symbol < 280 ) + { + code_size_array[ symbol ] = 7; + } + else if( symbol < 288 ) + { + code_size_array[ symbol ] = 8; + } + else + { + code_size_array[ symbol ] = 5; + } + } + result = libfshfs_huffman_tree_initialize( + &huffman_tree, + 288, + 15, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "huffman_tree", + huffman_tree ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + result = libfshfs_huffman_tree_build( + huffman_tree, + code_size_array, + 288, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + /* Test regular cases + */ + symbol = 0; + + result = libfshfs_huffman_tree_get_symbol_from_bit_stream( + huffman_tree, + bit_stream, + &symbol, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_EQUAL_UINT16( + "symbol", + symbol, + (uint16_t) 141 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + /* Test error cases + */ + symbol = 0; + + result = libfshfs_huffman_tree_get_symbol_from_bit_stream( + NULL, + bit_stream, + &symbol, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_huffman_tree_get_symbol_from_bit_stream( + huffman_tree, + NULL, + &symbol, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_huffman_tree_get_symbol_from_bit_stream( + huffman_tree, + bit_stream, + NULL, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + +/* TODO add byte stream seek function */ + bit_stream->byte_stream_offset = 2627; + bit_stream->bit_buffer_size = 0; + + result = libfshfs_huffman_tree_get_symbol_from_bit_stream( + huffman_tree, + bit_stream, + &symbol, + &error ); + + bit_stream->byte_stream_offset = 2; + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + /* Clean up + */ + result = libfshfs_huffman_tree_free( + &huffman_tree, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "huffman_tree", + huffman_tree ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + result = libfshfs_bit_stream_free( + &bit_stream, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "bit_stream", + bit_stream ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + return( 1 ); + +on_error: + if( huffman_tree != NULL ) + { + libfshfs_huffman_tree_free( + &huffman_tree, + NULL ); + } + if( bit_stream != NULL ) + { + libfshfs_bit_stream_free( + &bit_stream, + NULL ); + } + return( 0 ); +} + +#endif /* defined( __GNUC__ ) && !defined( LIBFSHFS_DLL_IMPORT ) */ + +/* The main program + */ +#if defined( HAVE_WIDE_SYSTEM_CHARACTER ) +int wmain( + int argc FSHFS_TEST_ATTRIBUTE_UNUSED, + wchar_t * const argv[] FSHFS_TEST_ATTRIBUTE_UNUSED ) +#else +int main( + int argc FSHFS_TEST_ATTRIBUTE_UNUSED, + char * const argv[] FSHFS_TEST_ATTRIBUTE_UNUSED ) +#endif +{ + FSHFS_TEST_UNREFERENCED_PARAMETER( argc ) + FSHFS_TEST_UNREFERENCED_PARAMETER( argv ) + +#if defined( __GNUC__ ) && !defined( LIBFSHFS_DLL_IMPORT ) + + FSHFS_TEST_RUN( + "libfshfs_huffman_tree_initialize", + fshfs_test_huffman_tree_initialize ); + + FSHFS_TEST_RUN( + "libfshfs_huffman_tree_free", + fshfs_test_huffman_tree_free ); + + FSHFS_TEST_RUN( + "libfshfs_huffman_tree_build", + fshfs_test_huffman_tree_build ); + + FSHFS_TEST_RUN( + "libfshfs_huffman_tree_get_symbol_from_bit_stream", + fshfs_test_huffman_tree_get_symbol_from_bit_stream ); + +#endif /* defined( __GNUC__ ) && !defined( LIBFSHFS_DLL_IMPORT ) */ + + return( EXIT_SUCCESS ); + +#if defined( __GNUC__ ) && !defined( LIBFSHFS_DLL_IMPORT ) + +on_error: + return( EXIT_FAILURE ); + +#endif /* defined( __GNUC__ ) && !defined( LIBFSHFS_DLL_IMPORT ) */ +} + diff -Nru libfshfs-20201104/tests/fshfs_test_io_handle.c libfshfs-20240221/tests/fshfs_test_io_handle.c --- libfshfs-20201104/tests/fshfs_test_io_handle.c 2020-11-04 04:19:45.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_io_handle.c 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Library io_handle type test program * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/tests/fshfs_test_libbfio.h libfshfs-20240221/tests/fshfs_test_libbfio.h --- libfshfs-20201104/tests/fshfs_test_libbfio.h 2020-11-04 04:19:45.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_libbfio.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libbfio header wrapper * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/tests/fshfs_test_libcerror.h libfshfs-20240221/tests/fshfs_test_libcerror.h --- libfshfs-20201104/tests/fshfs_test_libcerror.h 2020-11-04 04:19:45.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_libcerror.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libcerror header wrapper * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/tests/fshfs_test_libclocale.h libfshfs-20240221/tests/fshfs_test_libclocale.h --- libfshfs-20201104/tests/fshfs_test_libclocale.h 2020-11-04 04:19:45.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_libclocale.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libclocale header wrapper * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/tests/fshfs_test_libcnotify.h libfshfs-20240221/tests/fshfs_test_libcnotify.h --- libfshfs-20201104/tests/fshfs_test_libcnotify.h 2020-11-04 04:19:45.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_libcnotify.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libcnotify header wrapper * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/tests/fshfs_test_libfdata.h libfshfs-20240221/tests/fshfs_test_libfdata.h --- libfshfs-20201104/tests/fshfs_test_libfdata.h 2020-11-04 04:19:45.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_libfdata.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libfdata header wrapper * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -34,8 +34,6 @@ #include #include #include -#include -#include #include #include diff -Nru libfshfs-20201104/tests/fshfs_test_libfshfs.h libfshfs-20240221/tests/fshfs_test_libfshfs.h --- libfshfs-20201104/tests/fshfs_test_libfshfs.h 2020-11-04 04:19:45.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_libfshfs.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libfshfs header wrapper * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/tests/fshfs_test_libuna.h libfshfs-20240221/tests/fshfs_test_libuna.h --- libfshfs-20201104/tests/fshfs_test_libuna.h 2020-11-04 04:19:45.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_libuna.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The libuna header wrapper * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/tests/fshfs_test_macros.h libfshfs-20240221/tests/fshfs_test_macros.h --- libfshfs-20201104/tests/fshfs_test_macros.h 2020-11-04 04:19:45.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_macros.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Macros for testing * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/tests/fshfs_test_master_directory_block.c libfshfs-20240221/tests/fshfs_test_master_directory_block.c --- libfshfs-20201104/tests/fshfs_test_master_directory_block.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_master_directory_block.c 2024-02-21 05:50:08.000000000 +0000 @@ -0,0 +1,748 @@ +/* + * Library master_directory_block type test program + * + * Copyright (C) 2009-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include +#include + +#if defined( HAVE_STDLIB_H ) || defined( WINAPI ) +#include +#endif + +#include "fshfs_test_functions.h" +#include "fshfs_test_libbfio.h" +#include "fshfs_test_libcerror.h" +#include "fshfs_test_libfshfs.h" +#include "fshfs_test_macros.h" +#include "fshfs_test_memory.h" +#include "fshfs_test_unused.h" + +#include "../libfshfs/libfshfs_master_directory_block.h" + +uint8_t fshfs_test_master_directory_block_data1[ 512 ] = { + 0x42, 0x44, 0xba, 0x97, 0xc2, 0x83, 0xba, 0x97, 0xc2, 0x83, 0x01, 0x00, 0x00, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x3f, 0xf7, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x07, 0x00, 0x00, + 0x00, 0x10, 0x3e, 0xf7, 0x03, 0x48, 0x46, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; + +#if defined( __GNUC__ ) && !defined( LIBFSHFS_DLL_IMPORT ) + +/* Tests the libfshfs_master_directory_block_initialize function + * Returns 1 if successful or 0 if not + */ +int fshfs_test_master_directory_block_initialize( + void ) +{ + libcerror_error_t *error = NULL; + libfshfs_master_directory_block_t *master_directory_block = NULL; + int result = 0; + +#if defined( HAVE_FSHFS_TEST_MEMORY ) + int number_of_malloc_fail_tests = 6; + int number_of_memset_fail_tests = 1; + int test_number = 0; +#endif + + /* Test regular cases + */ + result = libfshfs_master_directory_block_initialize( + &master_directory_block, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "master_directory_block", + master_directory_block ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + result = libfshfs_master_directory_block_free( + &master_directory_block, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "master_directory_block", + master_directory_block ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + /* Test error cases + */ + result = libfshfs_master_directory_block_initialize( + NULL, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + master_directory_block = (libfshfs_master_directory_block_t *) 0x12345678UL; + + result = libfshfs_master_directory_block_initialize( + &master_directory_block, + &error ); + + master_directory_block = NULL; + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + +#if defined( HAVE_FSHFS_TEST_MEMORY ) + + for( test_number = 0; + test_number < number_of_malloc_fail_tests; + test_number++ ) + { + /* Test libfshfs_master_directory_block_initialize with malloc failing + */ + fshfs_test_malloc_attempts_before_fail = test_number; + + result = libfshfs_master_directory_block_initialize( + &master_directory_block, + &error ); + + if( fshfs_test_malloc_attempts_before_fail != -1 ) + { + fshfs_test_malloc_attempts_before_fail = -1; + + if( master_directory_block != NULL ) + { + libfshfs_master_directory_block_free( + &master_directory_block, + NULL ); + } + } + else + { + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "master_directory_block", + master_directory_block ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + } + } + for( test_number = 0; + test_number < number_of_memset_fail_tests; + test_number++ ) + { + /* Test libfshfs_master_directory_block_initialize with memset failing + */ + fshfs_test_memset_attempts_before_fail = test_number; + + result = libfshfs_master_directory_block_initialize( + &master_directory_block, + &error ); + + if( fshfs_test_memset_attempts_before_fail != -1 ) + { + fshfs_test_memset_attempts_before_fail = -1; + + if( master_directory_block != NULL ) + { + libfshfs_master_directory_block_free( + &master_directory_block, + NULL ); + } + } + else + { + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "master_directory_block", + master_directory_block ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + } + } +#endif /* defined( HAVE_FSHFS_TEST_MEMORY ) */ + + return( 1 ); + +on_error: + if( error != NULL ) + { + libcerror_error_free( + &error ); + } + if( master_directory_block != NULL ) + { + libfshfs_master_directory_block_free( + &master_directory_block, + NULL ); + } + return( 0 ); +} + +/* Tests the libfshfs_master_directory_block_free function + * Returns 1 if successful or 0 if not + */ +int fshfs_test_master_directory_block_free( + void ) +{ + libcerror_error_t *error = NULL; + int result = 0; + + /* Test error cases + */ + result = libfshfs_master_directory_block_free( + NULL, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + return( 1 ); + +on_error: + if( error != NULL ) + { + libcerror_error_free( + &error ); + } + return( 0 ); +} + +/* Tests the libfshfs_master_directory_block_read_data function + * Returns 1 if successful or 0 if not + */ +int fshfs_test_master_directory_block_read_data( + void ) +{ + libcerror_error_t *error = NULL; + libfshfs_master_directory_block_t *master_directory_block = NULL; + int result = 0; + + /* Initialize test + */ + result = libfshfs_master_directory_block_initialize( + &master_directory_block, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "master_directory_block", + master_directory_block ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + /* Test regular cases + */ + result = libfshfs_master_directory_block_read_data( + master_directory_block, + fshfs_test_master_directory_block_data1, + 512, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + /* Test error cases + */ + result = libfshfs_master_directory_block_read_data( + NULL, + fshfs_test_master_directory_block_data1, + 512, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_master_directory_block_read_data( + master_directory_block, + NULL, + 512, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_master_directory_block_read_data( + master_directory_block, + fshfs_test_master_directory_block_data1, + (size_t) SSIZE_MAX + 1, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_master_directory_block_read_data( + master_directory_block, + fshfs_test_master_directory_block_data1, + 0, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + /* Clean up + */ + result = libfshfs_master_directory_block_free( + &master_directory_block, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "master_directory_block", + master_directory_block ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + return( 1 ); + +on_error: + if( error != NULL ) + { + libcerror_error_free( + &error ); + } + if( master_directory_block != NULL ) + { + libfshfs_master_directory_block_free( + &master_directory_block, + NULL ); + } + return( 0 ); +} + +/* Tests the libfshfs_master_directory_block_read_file_io_handle function + * Returns 1 if successful or 0 if not + */ +int fshfs_test_master_directory_block_read_file_io_handle( + void ) +{ + libbfio_handle_t *file_io_handle = NULL; + libcerror_error_t *error = NULL; + libfshfs_master_directory_block_t *master_directory_block = NULL; + int result = 0; + + /* Initialize test + */ + result = libfshfs_master_directory_block_initialize( + &master_directory_block, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "master_directory_block", + master_directory_block ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + /* Initialize file IO handle + */ + result = fshfs_test_open_file_io_handle( + &file_io_handle, + fshfs_test_master_directory_block_data1, + 512, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "file_io_handle", + file_io_handle ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + /* Test regular cases + */ + result = libfshfs_master_directory_block_read_file_io_handle( + master_directory_block, + file_io_handle, + 0, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + /* Test error cases + */ + result = libfshfs_master_directory_block_read_file_io_handle( + NULL, + file_io_handle, + 0, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_master_directory_block_read_file_io_handle( + master_directory_block, + NULL, + 0, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_master_directory_block_read_file_io_handle( + master_directory_block, + file_io_handle, + -1, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + /* Clean up file IO handle + */ + result = fshfs_test_close_file_io_handle( + &file_io_handle, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 0 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + /* Test data too small + */ + result = fshfs_test_open_file_io_handle( + &file_io_handle, + fshfs_test_master_directory_block_data1, + 8, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "file_io_handle", + file_io_handle ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + result = libfshfs_master_directory_block_read_file_io_handle( + master_directory_block, + file_io_handle, + 0, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = fshfs_test_close_file_io_handle( + &file_io_handle, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 0 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + /* Test data invalid + */ +/* TODO implement */ + + /* Clean up + */ + result = libfshfs_master_directory_block_free( + &master_directory_block, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "master_directory_block", + master_directory_block ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + return( 1 ); + +on_error: + if( error != NULL ) + { + libcerror_error_free( + &error ); + } + if( file_io_handle != NULL ) + { + libbfio_handle_free( + &file_io_handle, + NULL ); + } + if( master_directory_block != NULL ) + { + libfshfs_master_directory_block_free( + &master_directory_block, + NULL ); + } + return( 0 ); +} + +#endif /* defined( __GNUC__ ) && !defined( LIBFSHFS_DLL_IMPORT ) */ + +/* The main program + */ +#if defined( HAVE_WIDE_SYSTEM_CHARACTER ) +int wmain( + int argc FSHFS_TEST_ATTRIBUTE_UNUSED, + wchar_t * const argv[] FSHFS_TEST_ATTRIBUTE_UNUSED ) +#else +int main( + int argc FSHFS_TEST_ATTRIBUTE_UNUSED, + char * const argv[] FSHFS_TEST_ATTRIBUTE_UNUSED ) +#endif +{ + FSHFS_TEST_UNREFERENCED_PARAMETER( argc ) + FSHFS_TEST_UNREFERENCED_PARAMETER( argv ) + +#if defined( __GNUC__ ) && !defined( LIBFSHFS_DLL_IMPORT ) + + FSHFS_TEST_RUN( + "libfshfs_master_directory_block_initialize", + fshfs_test_master_directory_block_initialize ); + + FSHFS_TEST_RUN( + "libfshfs_master_directory_block_free", + fshfs_test_master_directory_block_free ); + + FSHFS_TEST_RUN( + "libfshfs_master_directory_block_read_data", + fshfs_test_master_directory_block_read_data ); + + FSHFS_TEST_RUN( + "libfshfs_master_directory_block_read_file_io_handle", + fshfs_test_master_directory_block_read_file_io_handle ); + +#endif /* defined( __GNUC__ ) && !defined( LIBFSHFS_DLL_IMPORT ) */ + + return( EXIT_SUCCESS ); + +#if defined( __GNUC__ ) && !defined( LIBFSHFS_DLL_IMPORT ) + +on_error: + return( EXIT_FAILURE ); + +#endif /* defined( __GNUC__ ) && !defined( LIBFSHFS_DLL_IMPORT ) */ +} + diff -Nru libfshfs-20201104/tests/fshfs_test_memory.c libfshfs-20240221/tests/fshfs_test_memory.c --- libfshfs-20201104/tests/fshfs_test_memory.c 2020-11-04 04:19:45.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_memory.c 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Memory allocation functions for testing * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/tests/fshfs_test_memory.h libfshfs-20240221/tests/fshfs_test_memory.h --- libfshfs-20201104/tests/fshfs_test_memory.h 2020-11-04 04:19:45.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_memory.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Memory allocation functions for testing * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -28,7 +28,7 @@ extern "C" { #endif -#if defined( HAVE_GNU_DL_DLSYM ) && defined( __GNUC__ ) && !defined( LIBFSHFS_DLL_IMPORT ) && !defined( __arm__ ) && !defined( __clang__ ) && !defined( __CYGWIN__ ) && !defined( __hppa__ ) && !defined( __mips__ ) && !defined( __sparc__ ) && !defined( HAVE_ASAN ) +#if defined( HAVE_GNU_DL_DLSYM ) && defined( __GNUC__ ) && !defined( LIBFSHFS_DLL_IMPORT ) && !defined( __arm__ ) && !defined( __clang__ ) && !defined( __CYGWIN__ ) && !defined( __hppa__ ) && !defined( __loongarch__ ) && !defined( __mips__ ) && !defined( __riscv ) && !defined( __sparc__ ) && !defined( HAVE_ASAN ) #define HAVE_FSHFS_TEST_MEMORY 1 #endif diff -Nru libfshfs-20201104/tests/fshfs_test_name.c libfshfs-20240221/tests/fshfs_test_name.c --- libfshfs-20201104/tests/fshfs_test_name.c 2020-11-04 05:29:25.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_name.c 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Library name functions test program * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -60,7 +60,7 @@ libfshfs_name_get_case_folding_mapping( unicode_character ); - if( mapping->character != unicode_character ) + if( unicode_character != mapping->character ) { goto on_error; } @@ -117,24 +117,337 @@ return( 0 ); } +/* Tests the libfshfs_name_get_utf8_string_size function + * Returns 1 if successful or 0 if not + */ +int fshfs_test_name_get_utf8_string_size( + void ) +{ + uint8_t name_byte_stream[ 4 ] = { 'T', 'e', 's', 't' }; + uint8_t name_utf16_stream[ 8 ] = { 0, 'T', 0, 'e', 0, 's', 0, 't' }; + libcerror_error_t *error = NULL; + size_t utf8_string_size = 0; + int result = 0; + + /* Test regular cases + */ + result = libfshfs_name_get_utf8_string_size( + name_byte_stream, + 4, + LIBUNA_CODEPAGE_MAC_ROMAN, + &utf8_string_size, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + LIBUNA_COMPARE_EQUAL ); + + FSHFS_TEST_ASSERT_EQUAL_SIZE( + "utf8_string_size", + utf8_string_size, + (size_t) 5 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + result = libfshfs_name_get_utf8_string_size( + name_utf16_stream, + 8, + LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN, + &utf8_string_size, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + LIBUNA_COMPARE_EQUAL ); + + FSHFS_TEST_ASSERT_EQUAL_SIZE( + "utf8_string_size", + utf8_string_size, + (size_t) 5 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + /* Test error cases + */ + result = libfshfs_name_get_utf8_string_size( + NULL, + 8, + LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN, + &utf8_string_size, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_name_get_utf8_string_size( + name_utf16_stream, + (size_t) SSIZE_MAX + 1, + LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN, + &utf8_string_size, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_name_get_utf8_string_size( + name_utf16_stream, + 8, + -1, + &utf8_string_size, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_name_get_utf8_string_size( + name_utf16_stream, + 8, + LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN, + NULL, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + return( 1 ); + +on_error: + if( error != NULL ) + { + libcerror_error_free( + &error ); + } + return( 0 ); +} + +/* Tests the libfshfs_name_get_utf8_string function + * Returns 1 if successful or 0 if not + */ +int fshfs_test_name_get_utf8_string( + void ) +{ + uint8_t utf8_string[ 32 ]; + + uint8_t name_byte_stream[ 4 ] = { 'T', 'e', 's', 't' }; + uint8_t name_utf16_stream[ 8 ] = { 0, 'T', 0, 'e', 0, 's', 0, 't' }; + libcerror_error_t *error = NULL; + int result = 0; + + /* Test regular cases + */ + result = libfshfs_name_get_utf8_string( + name_byte_stream, + 4, + LIBUNA_CODEPAGE_MAC_ROMAN, + utf8_string, + 32, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + LIBUNA_COMPARE_EQUAL ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + result = libfshfs_name_get_utf8_string( + name_utf16_stream, + 8, + LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN, + utf8_string, + 32, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + LIBUNA_COMPARE_EQUAL ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + /* Test error cases + */ + result = libfshfs_name_get_utf8_string( + NULL, + 8, + LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN, + utf8_string, + 32, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_name_get_utf8_string( + name_utf16_stream, + (size_t) SSIZE_MAX + 1, + LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN, + utf8_string, + 32, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_name_get_utf8_string( + name_utf16_stream, + 8, + -1, + utf8_string, + 32, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_name_get_utf8_string( + name_utf16_stream, + 8, + LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN, + NULL, + 32, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_name_get_utf8_string( + name_utf16_stream, + 8, + LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN, + utf8_string, + 0, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + return( 1 ); + +on_error: + if( error != NULL ) + { + libcerror_error_free( + &error ); + } + return( 0 ); +} + /* Tests the libfshfs_name_compare_with_utf8_string function * Returns 1 if successful or 0 if not */ int fshfs_test_name_compare_with_utf8_string( void ) { - uint8_t utf8_string_equal[ 6 ] = { 'e', 'q', 'u', 'a', 'l', 0 }; - uint8_t utf8_string_greater[ 7 ] = { 'g', 'r', 'e', 'a', 't', 'e', 'r' }; - uint8_t utf8_string_less[ 4 ] = { 'l', 'e', 's', 's' }; - uint8_t utf8_string_more[ 4 ] = { 'm', 'o', 'r', 'e' }; - libcerror_error_t *error = NULL; - int result = 0; + uint8_t utf8_string_equal[ 6 ] = { 'e', 'q', 'u', 'a', 'l', 0 }; + uint8_t utf8_string_greater[ 7 ] = { 'g', 'r', 'e', 'a', 't', 'e', 'r' }; + uint8_t utf8_string_less[ 4 ] = { 'l', 'e', 's', 's' }; + uint8_t utf8_string_more[ 4 ] = { 'm', 'o', 'r', 'e' }; + uint8_t name_utf16_stream_equal[ 10 ] = { 0, 'e', 0, 'q', 0, 'u', 0, 'a', 0, 'l' }; + uint8_t name_utf16_stream_great[ 10 ] = { 0, 'g', 0, 'r', 0, 'e', 0, 'a', 0, 't' }; + uint8_t name_utf16_stream_less[ 8 ] = { 0, 'l', 0, 'e', 0, 's', 0, 's' }; + uint8_t name_utf16_stream_lesser[ 12 ] = { 0, 'l', 0, 'e', 0, 's', 0, 's', 0, 'e', 0, 'r' }; + uint8_t name_utf16_stream_more[ 8 ] = { 0, 'm', 0, 'o', 0, 'r', 0, 'e' }; + libcerror_error_t *error = NULL; + int result = 0; /* Test regular cases */ result = libfshfs_name_compare_with_utf8_string( - (uint8_t *) "equal", - 6, + name_utf16_stream_equal, + 10, + LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN, utf8_string_equal, 5, 0, @@ -150,8 +463,9 @@ error ); result = libfshfs_name_compare_with_utf8_string( - (uint8_t *) "equal", - 6, + name_utf16_stream_equal, + 10, + LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN, utf8_string_equal, 6, 0, @@ -167,8 +481,9 @@ error ); result = libfshfs_name_compare_with_utf8_string( - (uint8_t *) "great", - 6, + name_utf16_stream_great, + 10, + LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN, utf8_string_greater, 7, 0, @@ -177,15 +492,16 @@ FSHFS_TEST_ASSERT_EQUAL_INT( "result", result, - LIBUNA_COMPARE_GREATER ); + LIBUNA_COMPARE_LESS ); FSHFS_TEST_ASSERT_IS_NULL( "error", error ); result = libfshfs_name_compare_with_utf8_string( - (uint8_t *) "less", - 5, + name_utf16_stream_less, + 8, + LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN, utf8_string_more, 4, 0, @@ -194,15 +510,16 @@ FSHFS_TEST_ASSERT_EQUAL_INT( "result", result, - LIBUNA_COMPARE_GREATER ); + LIBUNA_COMPARE_LESS ); FSHFS_TEST_ASSERT_IS_NULL( "error", error ); result = libfshfs_name_compare_with_utf8_string( - (uint8_t *) "more", - 5, + name_utf16_stream_more, + 8, + LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN, utf8_string_less, 4, 0, @@ -211,15 +528,16 @@ FSHFS_TEST_ASSERT_EQUAL_INT( "result", result, - LIBUNA_COMPARE_LESS ); + LIBUNA_COMPARE_GREATER ); FSHFS_TEST_ASSERT_IS_NULL( "error", error ); result = libfshfs_name_compare_with_utf8_string( - (uint8_t *) "lesser", - 7, + name_utf16_stream_lesser, + 12, + LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN, utf8_string_less, 4, 0, @@ -228,7 +546,7 @@ FSHFS_TEST_ASSERT_EQUAL_INT( "result", result, - LIBUNA_COMPARE_LESS ); + LIBUNA_COMPARE_GREATER ); FSHFS_TEST_ASSERT_IS_NULL( "error", @@ -239,6 +557,7 @@ result = libfshfs_name_compare_with_utf8_string( NULL, 6, + LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN, utf8_string_equal, 5, 0, @@ -257,8 +576,9 @@ &error ); result = libfshfs_name_compare_with_utf8_string( - (uint8_t *) "equal", + name_utf16_stream_equal, (size_t) SSIZE_MAX + 1, + LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN, utf8_string_equal, 5, 0, @@ -277,8 +597,9 @@ &error ); result = libfshfs_name_compare_with_utf8_string( - (uint8_t *) "equal", - 6, + name_utf16_stream_equal, + 10, + LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN, NULL, 5, 0, @@ -297,8 +618,9 @@ &error ); result = libfshfs_name_compare_with_utf8_string( - (uint8_t *) "equal", - 6, + name_utf16_stream_equal, + 10, + LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN, utf8_string_equal, (size_t) SSIZE_MAX + 1, 0, @@ -327,24 +649,337 @@ return( 0 ); } +/* Tests the libfshfs_name_get_utf16_string_size function + * Returns 1 if successful or 0 if not + */ +int fshfs_test_name_get_utf16_string_size( + void ) +{ + uint8_t name_byte_stream[ 4 ] = { 'T', 'e', 's', 't' }; + uint8_t name_utf16_stream[ 8 ] = { 0, 'T', 0, 'e', 0, 's', 0, 't' }; + libcerror_error_t *error = NULL; + size_t utf16_string_size = 0; + int result = 0; + + /* Test regular cases + */ + result = libfshfs_name_get_utf16_string_size( + name_byte_stream, + 4, + LIBUNA_CODEPAGE_MAC_ROMAN, + &utf16_string_size, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + LIBUNA_COMPARE_EQUAL ); + + FSHFS_TEST_ASSERT_EQUAL_SIZE( + "utf16_string_size", + utf16_string_size, + (size_t) 5 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + result = libfshfs_name_get_utf16_string_size( + name_utf16_stream, + 8, + LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN, + &utf16_string_size, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + LIBUNA_COMPARE_EQUAL ); + + FSHFS_TEST_ASSERT_EQUAL_SIZE( + "utf16_string_size", + utf16_string_size, + (size_t) 5 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + /* Test error cases + */ + result = libfshfs_name_get_utf16_string_size( + NULL, + 8, + LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN, + &utf16_string_size, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_name_get_utf16_string_size( + name_utf16_stream, + (size_t) SSIZE_MAX + 1, + LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN, + &utf16_string_size, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_name_get_utf16_string_size( + name_utf16_stream, + 8, + -1, + &utf16_string_size, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_name_get_utf16_string_size( + name_utf16_stream, + 8, + LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN, + NULL, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + return( 1 ); + +on_error: + if( error != NULL ) + { + libcerror_error_free( + &error ); + } + return( 0 ); +} + +/* Tests the libfshfs_name_get_utf16_string function + * Returns 1 if successful or 0 if not + */ +int fshfs_test_name_get_utf16_string( + void ) +{ + uint16_t utf16_string[ 32 ]; + + uint8_t name_byte_stream[ 4 ] = { 'T', 'e', 's', 't' }; + uint8_t name_utf16_stream[ 8 ] = { 0, 'T', 0, 'e', 0, 's', 0, 't' }; + libcerror_error_t *error = NULL; + int result = 0; + + /* Test regular cases + */ + result = libfshfs_name_get_utf16_string( + name_byte_stream, + 4, + LIBUNA_CODEPAGE_MAC_ROMAN, + utf16_string, + 32, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + LIBUNA_COMPARE_EQUAL ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + result = libfshfs_name_get_utf16_string( + name_utf16_stream, + 8, + LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN, + utf16_string, + 32, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + LIBUNA_COMPARE_EQUAL ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + /* Test error cases + */ + result = libfshfs_name_get_utf16_string( + NULL, + 8, + LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN, + utf16_string, + 32, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_name_get_utf16_string( + name_utf16_stream, + (size_t) SSIZE_MAX + 1, + LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN, + utf16_string, + 32, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_name_get_utf16_string( + name_utf16_stream, + 8, + -1, + utf16_string, + 32, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_name_get_utf16_string( + name_utf16_stream, + 8, + LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN, + NULL, + 32, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_name_get_utf16_string( + name_utf16_stream, + 8, + LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN, + utf16_string, + 0, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + return( 1 ); + +on_error: + if( error != NULL ) + { + libcerror_error_free( + &error ); + } + return( 0 ); +} + /* Tests the libfshfs_name_compare_with_utf16_string function * Returns 1 if successful or 0 if not */ int fshfs_test_name_compare_with_utf16_string( void ) { - uint16_t utf16_string_equal[ 6 ] = { 'e', 'q', 'u', 'a', 'l', 0 }; - uint16_t utf16_string_greater[ 7 ] = { 'g', 'r', 'e', 'a', 't', 'e', 'r' }; - uint16_t utf16_string_less[ 4 ] = { 'l', 'e', 's', 's' }; - uint16_t utf16_string_more[ 4 ] = { 'm', 'o', 'r', 'e' }; - libcerror_error_t *error = NULL; - int result = 0; + uint16_t utf16_string_equal[ 6 ] = { 'e', 'q', 'u', 'a', 'l', 0 }; + uint16_t utf16_string_greater[ 7 ] = { 'g', 'r', 'e', 'a', 't', 'e', 'r' }; + uint16_t utf16_string_less[ 4 ] = { 'l', 'e', 's', 's' }; + uint16_t utf16_string_more[ 4 ] = { 'm', 'o', 'r', 'e' }; + uint8_t name_utf16_stream_equal[ 10 ] = { 0, 'e', 0, 'q', 0, 'u', 0, 'a', 0, 'l' }; + uint8_t name_utf16_stream_great[ 10 ] = { 0, 'g', 0, 'r', 0, 'e', 0, 'a', 0, 't' }; + uint8_t name_utf16_stream_less[ 10 ] = { 0, 'l', 0, 'e', 0, 's', 0, 's' }; + uint8_t name_utf16_stream_lesser[ 12 ] = { 0, 'l', 0, 'e', 0, 's', 0, 's', 0, 'e', 0, 'r' }; + uint8_t name_utf16_stream_more[ 10 ] = { 0, 'm', 0, 'o', 0, 'r', 0, 'e' }; + libcerror_error_t *error = NULL; + int result = 0; /* Test regular cases */ result = libfshfs_name_compare_with_utf16_string( - (uint8_t *) "equal", - 6, + name_utf16_stream_equal, + 10, + LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN, utf16_string_equal, 5, 0, @@ -360,8 +995,9 @@ error ); result = libfshfs_name_compare_with_utf16_string( - (uint8_t *) "equal", - 6, + name_utf16_stream_equal, + 10, + LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN, utf16_string_equal, 6, 0, @@ -377,8 +1013,9 @@ error ); result = libfshfs_name_compare_with_utf16_string( - (uint8_t *) "great", - 6, + name_utf16_stream_great, + 10, + LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN, utf16_string_greater, 7, 0, @@ -387,15 +1024,16 @@ FSHFS_TEST_ASSERT_EQUAL_INT( "result", result, - LIBUNA_COMPARE_GREATER ); + LIBUNA_COMPARE_LESS ); FSHFS_TEST_ASSERT_IS_NULL( "error", error ); result = libfshfs_name_compare_with_utf16_string( - (uint8_t *) "less", - 5, + name_utf16_stream_less, + 8, + LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN, utf16_string_more, 4, 0, @@ -404,15 +1042,16 @@ FSHFS_TEST_ASSERT_EQUAL_INT( "result", result, - LIBUNA_COMPARE_GREATER ); + LIBUNA_COMPARE_LESS ); FSHFS_TEST_ASSERT_IS_NULL( "error", error ); result = libfshfs_name_compare_with_utf16_string( - (uint8_t *) "more", - 5, + name_utf16_stream_more, + 8, + LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN, utf16_string_less, 4, 0, @@ -421,15 +1060,16 @@ FSHFS_TEST_ASSERT_EQUAL_INT( "result", result, - LIBUNA_COMPARE_LESS ); + LIBUNA_COMPARE_GREATER ); FSHFS_TEST_ASSERT_IS_NULL( "error", error ); result = libfshfs_name_compare_with_utf16_string( - (uint8_t *) "lesser", - 7, + name_utf16_stream_lesser, + 12, + LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN, utf16_string_less, 4, 0, @@ -438,7 +1078,7 @@ FSHFS_TEST_ASSERT_EQUAL_INT( "result", result, - LIBUNA_COMPARE_LESS ); + LIBUNA_COMPARE_GREATER ); FSHFS_TEST_ASSERT_IS_NULL( "error", @@ -449,6 +1089,7 @@ result = libfshfs_name_compare_with_utf16_string( NULL, 6, + LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN, utf16_string_equal, 5, 0, @@ -467,8 +1108,9 @@ &error ); result = libfshfs_name_compare_with_utf16_string( - (uint8_t *) "equal", + name_utf16_stream_equal, (size_t) SSIZE_MAX + 1, + LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN, utf16_string_equal, 5, 0, @@ -487,8 +1129,9 @@ &error ); result = libfshfs_name_compare_with_utf16_string( - (uint8_t *) "equal", - 6, + name_utf16_stream_equal, + 10, + LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN, NULL, 5, 0, @@ -507,8 +1150,9 @@ &error ); result = libfshfs_name_compare_with_utf16_string( - (uint8_t *) "equal", - 6, + name_utf16_stream_equal, + 10, + LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN, utf16_string_equal, (size_t) SSIZE_MAX + 1, 0, @@ -537,6 +1181,385 @@ return( 0 ); } +/* Tests the libfshfs_name_calculate_hash function + * Returns 1 if successful or 0 if not + */ +int fshfs_test_name_calculate_hash( + void ) +{ + uint8_t name_byte_stream[ 4 ] = { 'T', 'e', 's', 't' }; + uint8_t name_utf16_stream[ 8 ] = { 0, 'T', 0, 'e', 0, 's', 0, 't' }; + libcerror_error_t *error = NULL; + uint32_t name_hash = 0; + int result = 0; + + /* Test regular cases + */ + result = libfshfs_name_calculate_hash( + name_byte_stream, + 4, + LIBUNA_CODEPAGE_MAC_ROMAN, + 0, + &name_hash, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + LIBUNA_COMPARE_EQUAL ); + + FSHFS_TEST_ASSERT_EQUAL_UINT32( + "name_hash", + name_hash, + (uint32_t) 0x9d989383UL ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + result = libfshfs_name_calculate_hash( + name_utf16_stream, + 8, + LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN, + 0, + &name_hash, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + LIBUNA_COMPARE_EQUAL ); + + FSHFS_TEST_ASSERT_EQUAL_UINT32( + "name_hash", + name_hash, + (uint32_t) 0x9d989383UL ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + /* Test error cases + */ + result = libfshfs_name_calculate_hash( + NULL, + 8, + LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN, + 0, + &name_hash, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_name_calculate_hash( + name_utf16_stream, + 0, + LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN, + 0, + &name_hash, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_name_calculate_hash( + name_utf16_stream, + (size_t) SSIZE_MAX + 1, + LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN, + 0, + &name_hash, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_name_calculate_hash( + name_utf16_stream, + 8, + -1, + 0, + &name_hash, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_name_calculate_hash( + name_utf16_stream, + 8, + LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN, + 0, + NULL, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + return( 1 ); + +on_error: + if( error != NULL ) + { + libcerror_error_free( + &error ); + } + return( 0 ); +} + +/* Tests the libfshfs_name_calculate_hash_utf8_string function + * Returns 1 if successful or 0 if not + */ +int fshfs_test_name_calculate_hash_utf8_string( + void ) +{ + uint8_t name_utf8_string[ 5 ] = { 'T', 'e', 's', 't', 0 }; + libcerror_error_t *error = NULL; + uint32_t name_hash = 0; + int result = 0; + + /* Test regular cases + */ + result = libfshfs_name_calculate_hash_utf8_string( + name_utf8_string, + 4, + 0, + &name_hash, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + LIBUNA_COMPARE_EQUAL ); + + FSHFS_TEST_ASSERT_EQUAL_UINT32( + "name_hash", + name_hash, + (uint32_t) 0x9d989383UL ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + /* Test error cases + */ + result = libfshfs_name_calculate_hash_utf8_string( + NULL, + 4, + 0, + &name_hash, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_name_calculate_hash_utf8_string( + name_utf8_string, + (size_t) SSIZE_MAX + 1, + 0, + &name_hash, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_name_calculate_hash_utf8_string( + name_utf8_string, + 4, + 0, + NULL, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + return( 1 ); + +on_error: + if( error != NULL ) + { + libcerror_error_free( + &error ); + } + return( 0 ); +} + +/* Tests the libfshfs_name_calculate_hash_utf16_string function + * Returns 1 if successful or 0 if not + */ +int fshfs_test_name_calculate_hash_utf16_string( + void ) +{ + uint16_t name_utf16_string[ 5 ] = { 'T', 'e', 's', 't', 0 }; + libcerror_error_t *error = NULL; + uint32_t name_hash = 0; + int result = 0; + + /* Test regular cases + */ + result = libfshfs_name_calculate_hash_utf16_string( + name_utf16_string, + 4, + 0, + &name_hash, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + LIBUNA_COMPARE_EQUAL ); + + FSHFS_TEST_ASSERT_EQUAL_UINT32( + "name_hash", + name_hash, + (uint32_t) 0x9d989383UL ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + /* Test error cases + */ + result = libfshfs_name_calculate_hash_utf16_string( + NULL, + 4, + 0, + &name_hash, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_name_calculate_hash_utf16_string( + name_utf16_string, + (size_t) SSIZE_MAX + 1, + 0, + &name_hash, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + result = libfshfs_name_calculate_hash_utf16_string( + name_utf16_string, + 4, + 0, + NULL, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + return( 1 ); + +on_error: + if( error != NULL ) + { + libcerror_error_free( + &error ); + } + return( 0 ); +} + #endif /* defined( __GNUC__ ) && !defined( LIBFSHFS_DLL_IMPORT ) */ /* The main program @@ -556,8 +1579,6 @@ #if defined( __GNUC__ ) && !defined( LIBFSHFS_DLL_IMPORT ) -/* TODO complete tests - FSHFS_TEST_RUN( "libfshfs_name_case_folding_mappings", fshfs_test_name_case_folding_mappings ); @@ -567,13 +1588,40 @@ fshfs_test_name_decomposition_mappings ); FSHFS_TEST_RUN( + "libfshfs_name_get_utf8_string_size", + fshfs_test_name_get_utf8_string_size ); + + FSHFS_TEST_RUN( + "libfshfs_name_get_utf8_string", + fshfs_test_name_get_utf8_string ); + + FSHFS_TEST_RUN( "libfshfs_name_compare_with_utf8_string", fshfs_test_name_compare_with_utf8_string ); FSHFS_TEST_RUN( + "libfshfs_name_get_utf16_string_size", + fshfs_test_name_get_utf16_string_size ); + + FSHFS_TEST_RUN( + "libfshfs_name_get_utf16_string", + fshfs_test_name_get_utf16_string ); + + FSHFS_TEST_RUN( "libfshfs_name_compare_with_utf16_string", fshfs_test_name_compare_with_utf16_string ); -*/ + + FSHFS_TEST_RUN( + "libfshfs_name_calculate_hash", + fshfs_test_name_calculate_hash ); + + FSHFS_TEST_RUN( + "libfshfs_name_calculate_hash_utf8_string", + fshfs_test_name_calculate_hash_utf8_string ); + + FSHFS_TEST_RUN( + "libfshfs_name_calculate_hash_utf16_string", + fshfs_test_name_calculate_hash_utf16_string ); #endif /* defined( __GNUC__ ) && !defined( LIBFSHFS_DLL_IMPORT ) */ diff -Nru libfshfs-20201104/tests/fshfs_test_notify.c libfshfs-20240221/tests/fshfs_test_notify.c --- libfshfs-20201104/tests/fshfs_test_notify.c 2020-11-04 04:19:45.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_notify.c 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Library notification functions test program * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/tests/fshfs_test_profiler.c libfshfs-20240221/tests/fshfs_test_profiler.c --- libfshfs-20201104/tests/fshfs_test_profiler.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_profiler.c 2024-02-21 05:50:08.000000000 +0000 @@ -0,0 +1,371 @@ +/* + * Library profiler type test program + * + * Copyright (C) 2009-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include +#include + +#if defined( HAVE_STDLIB_H ) || defined( WINAPI ) +#include +#endif + +#include "fshfs_test_libcerror.h" +#include "fshfs_test_libfshfs.h" +#include "fshfs_test_macros.h" +#include "fshfs_test_memory.h" +#include "fshfs_test_unused.h" + +#include "../libfshfs/libfshfs_profiler.h" + +#if defined( HAVE_PROFILER ) + +#if defined( __GNUC__ ) && !defined( LIBFSHFS_DLL_IMPORT ) + +/* Tests the libfshfs_profiler_initialize function + * Returns 1 if successful or 0 if not + */ +int fshfs_test_profiler_initialize( + void ) +{ + libcerror_error_t *error = NULL; + libfshfs_profiler_t *profiler = NULL; + int result = 0; + +#if defined( HAVE_FSHFS_TEST_MEMORY ) + int number_of_malloc_fail_tests = 1; + int number_of_memset_fail_tests = 1; + int test_number = 0; +#endif + + /* Test regular cases + */ + result = libfshfs_profiler_initialize( + &profiler, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "profiler", + profiler ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + result = libfshfs_profiler_free( + &profiler, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "profiler", + profiler ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + /* Test error cases + */ + result = libfshfs_profiler_initialize( + NULL, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + profiler = (libfshfs_profiler_t *) 0x12345678UL; + + result = libfshfs_profiler_initialize( + &profiler, + &error ); + + profiler = NULL; + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + +#if defined( HAVE_FSHFS_TEST_MEMORY ) + + for( test_number = 0; + test_number < number_of_malloc_fail_tests; + test_number++ ) + { + /* Test libfshfs_profiler_initialize with malloc failing + */ + fshfs_test_malloc_attempts_before_fail = test_number; + + result = libfshfs_profiler_initialize( + &profiler, + &error ); + + if( fshfs_test_malloc_attempts_before_fail != -1 ) + { + fshfs_test_malloc_attempts_before_fail = -1; + + if( profiler != NULL ) + { + libfshfs_profiler_free( + &profiler, + NULL ); + } + } + else + { + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "profiler", + profiler ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + } + } + for( test_number = 0; + test_number < number_of_memset_fail_tests; + test_number++ ) + { + /* Test libfshfs_profiler_initialize with memset failing + */ + fshfs_test_memset_attempts_before_fail = test_number; + + result = libfshfs_profiler_initialize( + &profiler, + &error ); + + if( fshfs_test_memset_attempts_before_fail != -1 ) + { + fshfs_test_memset_attempts_before_fail = -1; + + if( profiler != NULL ) + { + libfshfs_profiler_free( + &profiler, + NULL ); + } + } + else + { + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "profiler", + profiler ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + } + } +#endif /* defined( HAVE_FSHFS_TEST_MEMORY ) */ + + return( 1 ); + +on_error: + if( error != NULL ) + { + libcerror_error_free( + &error ); + } + if( profiler != NULL ) + { + libfshfs_profiler_free( + &profiler, + NULL ); + } + return( 0 ); +} + +/* Tests the libfshfs_profiler_free function + * Returns 1 if successful or 0 if not + */ +int fshfs_test_profiler_free( + void ) +{ + libcerror_error_t *error = NULL; + int result = 0; + + /* Test error cases + */ + result = libfshfs_profiler_free( + NULL, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + return( 1 ); + +on_error: + if( error != NULL ) + { + libcerror_error_free( + &error ); + } + return( 0 ); +} + +/* Tests the libfshfs_profiler_close function + * Returns 1 if successful or 0 if not + */ +int fshfs_test_profiler_close( + void ) +{ + libcerror_error_t *error = NULL; + int result = 0; + + /* Test error cases + */ + result = libfshfs_profiler_close( + NULL, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + return( 1 ); + +on_error: + if( error != NULL ) + { + libcerror_error_free( + &error ); + } + return( 0 ); +} + +#endif /* defined( __GNUC__ ) && !defined( LIBFSHFS_DLL_IMPORT ) */ + +#endif /* defined( HAVE_PROFILER ) */ + +/* The main program + */ +#if defined( HAVE_WIDE_SYSTEM_CHARACTER ) +int wmain( + int argc FSHFS_TEST_ATTRIBUTE_UNUSED, + wchar_t * const argv[] FSHFS_TEST_ATTRIBUTE_UNUSED ) +#else +int main( + int argc FSHFS_TEST_ATTRIBUTE_UNUSED, + char * const argv[] FSHFS_TEST_ATTRIBUTE_UNUSED ) +#endif +{ + FSHFS_TEST_UNREFERENCED_PARAMETER( argc ) + FSHFS_TEST_UNREFERENCED_PARAMETER( argv ) + +#if defined( HAVE_PROFILER ) + +#if defined( __GNUC__ ) && !defined( LIBFSHFS_DLL_IMPORT ) + + FSHFS_TEST_RUN( + "libfshfs_profiler_initialize", + fshfs_test_profiler_initialize ); + + FSHFS_TEST_RUN( + "libfshfs_profiler_free", + fshfs_test_profiler_free ); + + /* TODO: add tests for libfshfs_profiler_open */ + + FSHFS_TEST_RUN( + "libfshfs_profiler_close", + fshfs_test_profiler_close ); + + /* TODO: add tests for libfshfs_profiler_start_timing */ + + /* TODO: add tests for libfshfs_profiler_stop_timing */ + +#endif /* defined( __GNUC__ ) && !defined( LIBFSHFS_DLL_IMPORT ) */ + +#endif /* defined( HAVE_PROFILER ) */ + + return( EXIT_SUCCESS ); + +#if defined( HAVE_PROFILER ) + +#if defined( __GNUC__ ) && !defined( LIBFSHFS_DLL_IMPORT ) + +on_error: + return( EXIT_FAILURE ); + +#endif /* defined( __GNUC__ ) && !defined( LIBFSHFS_DLL_IMPORT ) */ + +#endif /* defined( HAVE_PROFILER ) */ +} + diff -Nru libfshfs-20201104/tests/fshfs_test_support.c libfshfs-20240221/tests/fshfs_test_support.c --- libfshfs-20201104/tests/fshfs_test_support.c 2020-11-04 04:19:45.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_support.c 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Library support functions test program * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/tests/fshfs_test_thread_record.c libfshfs-20240221/tests/fshfs_test_thread_record.c --- libfshfs-20201104/tests/fshfs_test_thread_record.c 2020-11-04 04:22:26.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_thread_record.c 2024-02-21 05:50:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * Library thread_record type test program * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/tests/fshfs_test_tools_info_handle.c libfshfs-20240221/tests/fshfs_test_tools_info_handle.c --- libfshfs-20201104/tests/fshfs_test_tools_info_handle.c 1970-01-01 00:00:00.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_tools_info_handle.c 2024-02-21 05:48:50.000000000 +0000 @@ -0,0 +1,304 @@ +/* + * Tools info_handle type test program + * + * Copyright (C) 2009-2024, Joachim Metz + * + * Refer to AUTHORS for acknowledgements. + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include +#include +#include + +#if defined( HAVE_STDLIB_H ) || defined( WINAPI ) +#include +#endif + +#include "fshfs_test_libcerror.h" +#include "fshfs_test_macros.h" +#include "fshfs_test_memory.h" +#include "fshfs_test_unused.h" + +#include "../fshfstools/info_handle.h" + +/* Tests the info_handle_initialize function + * Returns 1 if successful or 0 if not + */ +int fshfs_test_tools_info_handle_initialize( + void ) +{ + info_handle_t *info_handle = NULL; + libcerror_error_t *error = NULL; + int result = 0; + +#if defined( HAVE_FSHFS_TEST_MEMORY ) + int number_of_malloc_fail_tests = 1; + int number_of_memset_fail_tests = 1; + int test_number = 0; +#endif + + /* Test regular cases + */ + result = info_handle_initialize( + &info_handle, + 0, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "info_handle", + info_handle ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + result = info_handle_free( + &info_handle, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + 1 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "info_handle", + info_handle ); + + FSHFS_TEST_ASSERT_IS_NULL( + "error", + error ); + + /* Test error cases + */ + result = info_handle_initialize( + NULL, + 0, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + info_handle = (info_handle_t *) 0x12345678UL; + + result = info_handle_initialize( + &info_handle, + 0, + &error ); + + info_handle = NULL; + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + +#if defined( HAVE_FSHFS_TEST_MEMORY ) + + for( test_number = 0; + test_number < number_of_malloc_fail_tests; + test_number++ ) + { + /* Test info_handle_initialize with malloc failing + */ + fshfs_test_malloc_attempts_before_fail = test_number; + + result = info_handle_initialize( + &info_handle, + 0, + &error ); + + if( fshfs_test_malloc_attempts_before_fail != -1 ) + { + fshfs_test_malloc_attempts_before_fail = -1; + + if( info_handle != NULL ) + { + info_handle_free( + &info_handle, + NULL ); + } + } + else + { + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "info_handle", + info_handle ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + } + } + for( test_number = 0; + test_number < number_of_memset_fail_tests; + test_number++ ) + { + /* Test info_handle_initialize with memset failing + */ + fshfs_test_memset_attempts_before_fail = test_number; + + result = info_handle_initialize( + &info_handle, + 0, + &error ); + + if( fshfs_test_memset_attempts_before_fail != -1 ) + { + fshfs_test_memset_attempts_before_fail = -1; + + if( info_handle != NULL ) + { + info_handle_free( + &info_handle, + NULL ); + } + } + else + { + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NULL( + "info_handle", + info_handle ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + } + } +#endif /* defined( HAVE_FSHFS_TEST_MEMORY ) */ + + return( 1 ); + +on_error: + if( error != NULL ) + { + libcerror_error_free( + &error ); + } + if( info_handle != NULL ) + { + info_handle_free( + &info_handle, + NULL ); + } + return( 0 ); +} + +/* Tests the info_handle_free function + * Returns 1 if successful or 0 if not + */ +int fshfs_test_tools_info_handle_free( + void ) +{ + libcerror_error_t *error = NULL; + int result = 0; + + /* Test error cases + */ + result = info_handle_free( + NULL, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + + return( 1 ); + +on_error: + if( error != NULL ) + { + libcerror_error_free( + &error ); + } + return( 0 ); +} + +/* The main program + */ +#if defined( HAVE_WIDE_SYSTEM_CHARACTER ) +int wmain( + int argc FSHFS_TEST_ATTRIBUTE_UNUSED, + wchar_t * const argv[] FSHFS_TEST_ATTRIBUTE_UNUSED ) +#else +int main( + int argc FSHFS_TEST_ATTRIBUTE_UNUSED, + char * const argv[] FSHFS_TEST_ATTRIBUTE_UNUSED ) +#endif +{ + FSHFS_TEST_UNREFERENCED_PARAMETER( argc ) + FSHFS_TEST_UNREFERENCED_PARAMETER( argv ) + + FSHFS_TEST_RUN( + "info_handle_initialize", + fshfs_test_tools_info_handle_initialize ); + + FSHFS_TEST_RUN( + "info_handle_free", + fshfs_test_tools_info_handle_free ); + + return( EXIT_SUCCESS ); + +on_error: + return( EXIT_FAILURE ); +} + diff -Nru libfshfs-20201104/tests/fshfs_test_tools_output.c libfshfs-20240221/tests/fshfs_test_tools_output.c --- libfshfs-20201104/tests/fshfs_test_tools_output.c 2020-11-04 04:19:45.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_tools_output.c 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Tools output functions test program * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -39,7 +39,7 @@ #include "../fshfstools/fshfstools_output.h" -/* Tests the fshfstools_output_initialize and function +/* Tests the fshfstools_output_initialize function * Returns 1 if successful or 0 if not */ int fshfs_test_tools_output_initialize( diff -Nru libfshfs-20201104/tests/fshfs_test_tools_signal.c libfshfs-20240221/tests/fshfs_test_tools_signal.c --- libfshfs-20201104/tests/fshfs_test_tools_signal.c 2020-11-04 04:19:45.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_tools_signal.c 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Tools signal functions test program * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -33,13 +33,55 @@ #include "../fshfstools/fshfstools_signal.h" -void fshfs_test_tools_signal_handler( +void fshfs_test_tools_signal_handler_function( fshfstools_signal_t signal FSHFS_TEST_ATTRIBUTE_UNUSED ) { FSHFS_TEST_UNREFERENCED_PARAMETER( signal ) } -/* Tests the fshfstools_signal_attach and function +#if defined( WINAPI ) + +/* Tests the fshfstools_signal_handler function + * Returns 1 if successful or 0 if not + */ +int fshfs_test_tools_signal_handler( + void ) +{ + BOOL result = 0; + + /* Test regular cases + */ + result = fshfstools_signal_handler( + CTRL_C_EVENT ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + (int) TRUE ); + + result = fshfstools_signal_handler( + CTRL_LOGOFF_EVENT ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + (int) FALSE ); + + return( 1 ); + +on_error: + return( 0 ); +} + +#if defined( _MSC_VER ) + + /* TODO add tests for fshfstools_signal_initialize_memory_debug */ + +#endif /* defined( _MSC_VER ) */ + +#endif /* defined( WINAPI ) */ + +/* Tests the fshfstools_signal_attach function * Returns 1 if successful or 0 if not */ int fshfs_test_tools_signal_attach( @@ -48,8 +90,10 @@ libcerror_error_t *error = NULL; int result = 0; + /* Test regular cases + */ result = fshfstools_signal_attach( - fshfs_test_tools_signal_handler, + fshfs_test_tools_signal_handler_function, &error ); FSHFS_TEST_ASSERT_EQUAL_INT( @@ -61,6 +105,24 @@ "error", error ); + /* Test error cases + */ + result = fshfstools_signal_attach( + NULL, + &error ); + + FSHFS_TEST_ASSERT_EQUAL_INT( + "result", + result, + -1 ); + + FSHFS_TEST_ASSERT_IS_NOT_NULL( + "error", + error ); + + libcerror_error_free( + &error ); + return( 1 ); on_error: @@ -72,7 +134,7 @@ return( 0 ); } -/* Tests the fshfstools_signal_detach and function +/* Tests the fshfstools_signal_detach function * Returns 1 if successful or 0 if not */ int fshfs_test_tools_signal_detach( @@ -81,6 +143,8 @@ libcerror_error_t *error = NULL; int result = 0; + /* Test regular cases + */ result = fshfstools_signal_detach( &error ); @@ -121,13 +185,17 @@ #if defined( WINAPI ) - /* TODO add tests for fshfstools_signal_handler */ -#endif + FSHFS_TEST_RUN( + "fshfstools_signal_handler", + fshfs_test_tools_signal_handler ) -#if defined( WINAPI ) && defined( _MSC_VER ) +#if defined( _MSC_VER ) /* TODO add tests for fshfstools_signal_initialize_memory_debug */ -#endif + +#endif /* defined( _MSC_VER ) */ + +#endif /* defined( WINAPI ) */ FSHFS_TEST_RUN( "fshfstools_signal_attach", diff -Nru libfshfs-20201104/tests/fshfs_test_types.h libfshfs-20240221/tests/fshfs_test_types.h --- libfshfs-20201104/tests/fshfs_test_types.h 2020-11-04 04:19:45.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_types.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The type definitions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/tests/fshfs_test_unicode_case_folding_mappings.h libfshfs-20240221/tests/fshfs_test_unicode_case_folding_mappings.h --- libfshfs-20201104/tests/fshfs_test_unicode_case_folding_mappings.h 2020-11-04 04:19:45.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_unicode_case_folding_mappings.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The Unicode case folding mappings definitions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -322,7 +322,6 @@ { 0x000003f4, 0x000003b8 }, { 0x000003f5, 0x000003b5 }, { 0x000003f7, 0x000003f8 }, - { 0x000003f9, 0x000003f2 }, { 0x000003fa, 0x000003fb }, { 0x000003fd, 0x0000037b }, { 0x000003fe, 0x0000037c }, diff -Nru libfshfs-20201104/tests/fshfs_test_unicode_decomposition_mappings.h libfshfs-20240221/tests/fshfs_test_unicode_decomposition_mappings.h --- libfshfs-20201104/tests/fshfs_test_unicode_decomposition_mappings.h 2020-11-04 04:19:45.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_unicode_decomposition_mappings.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * The Unicode decomposition mappings definitions * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -6036,19 +6036,19 @@ { 0x00001b03, 1, { 0x00001b03 } }, { 0x00001b04, 1, { 0x00001b04 } }, { 0x00001b05, 1, { 0x00001b05 } }, - { 0x00001b06, 2, { 0x00001b05, 0x00001b35 } }, + { 0x00001b06, 1, { 0x00001b06 } }, { 0x00001b07, 1, { 0x00001b07 } }, - { 0x00001b08, 2, { 0x00001b07, 0x00001b35 } }, + { 0x00001b08, 1, { 0x00001b08 } }, { 0x00001b09, 1, { 0x00001b09 } }, - { 0x00001b0a, 2, { 0x00001b09, 0x00001b35 } }, + { 0x00001b0a, 1, { 0x00001b0a } }, { 0x00001b0b, 1, { 0x00001b0b } }, - { 0x00001b0c, 2, { 0x00001b0b, 0x00001b35 } }, + { 0x00001b0c, 1, { 0x00001b0c } }, { 0x00001b0d, 1, { 0x00001b0d } }, - { 0x00001b0e, 2, { 0x00001b0d, 0x00001b35 } }, + { 0x00001b0e, 1, { 0x00001b0e } }, { 0x00001b0f, 1, { 0x00001b0f } }, { 0x00001b10, 1, { 0x00001b10 } }, { 0x00001b11, 1, { 0x00001b11 } }, - { 0x00001b12, 2, { 0x00001b11, 0x00001b35 } }, + { 0x00001b12, 1, { 0x00001b12 } }, { 0x00001b13, 1, { 0x00001b13 } }, { 0x00001b14, 1, { 0x00001b14 } }, { 0x00001b15, 1, { 0x00001b15 } }, @@ -6089,15 +6089,15 @@ { 0x00001b38, 1, { 0x00001b38 } }, { 0x00001b39, 1, { 0x00001b39 } }, { 0x00001b3a, 1, { 0x00001b3a } }, - { 0x00001b3b, 2, { 0x00001b3a, 0x00001b35 } }, + { 0x00001b3b, 1, { 0x00001b3b } }, { 0x00001b3c, 1, { 0x00001b3c } }, - { 0x00001b3d, 2, { 0x00001b3c, 0x00001b35 } }, + { 0x00001b3d, 1, { 0x00001b3d } }, { 0x00001b3e, 1, { 0x00001b3e } }, { 0x00001b3f, 1, { 0x00001b3f } }, - { 0x00001b40, 2, { 0x00001b3e, 0x00001b35 } }, - { 0x00001b41, 2, { 0x00001b3f, 0x00001b35 } }, + { 0x00001b40, 1, { 0x00001b40 } }, + { 0x00001b41, 1, { 0x00001b41 } }, { 0x00001b42, 1, { 0x00001b42 } }, - { 0x00001b43, 2, { 0x00001b42, 0x00001b35 } }, + { 0x00001b43, 1, { 0x00001b43 } }, { 0x00001b44, 1, { 0x00001b44 } }, { 0x00001b45, 1, { 0x00001b45 } }, { 0x00001b46, 1, { 0x00001b46 } }, @@ -7191,8 +7191,8 @@ { 0x00001ffc, 2, { 0x000003a9, 0x00000345 } }, { 0x00001ffd, 1, { 0x000000b4 } }, { 0x00001ffe, 1, { 0x00001ffe } }, - { 0x00002000, 1, { 0x00002002 } }, - { 0x00002001, 1, { 0x00002003 } }, + { 0x00002000, 1, { 0x00002000 } }, + { 0x00002001, 1, { 0x00002001 } }, { 0x00002002, 1, { 0x00002002 } }, { 0x00002003, 1, { 0x00002003 } }, { 0x00002004, 1, { 0x00002004 } }, @@ -7446,12 +7446,12 @@ { 0x00002123, 1, { 0x00002123 } }, { 0x00002124, 1, { 0x00002124 } }, { 0x00002125, 1, { 0x00002125 } }, - { 0x00002126, 1, { 0x000003a9 } }, + { 0x00002126, 1, { 0x00002126 } }, { 0x00002127, 1, { 0x00002127 } }, { 0x00002128, 1, { 0x00002128 } }, { 0x00002129, 1, { 0x00002129 } }, - { 0x0000212a, 1, { 0x0000004b } }, - { 0x0000212b, 2, { 0x00000041, 0x0000030a } }, + { 0x0000212a, 1, { 0x0000212a } }, + { 0x0000212b, 1, { 0x0000212b } }, { 0x0000212c, 1, { 0x0000212c } }, { 0x0000212d, 1, { 0x0000212d } }, { 0x0000212e, 1, { 0x0000212e } }, @@ -7558,8 +7558,8 @@ { 0x00002197, 1, { 0x00002197 } }, { 0x00002198, 1, { 0x00002198 } }, { 0x00002199, 1, { 0x00002199 } }, - { 0x0000219a, 2, { 0x00002190, 0x00000338 } }, - { 0x0000219b, 2, { 0x00002192, 0x00000338 } }, + { 0x0000219a, 1, { 0x0000219a } }, + { 0x0000219b, 1, { 0x0000219b } }, { 0x0000219c, 1, { 0x0000219c } }, { 0x0000219d, 1, { 0x0000219d } }, { 0x0000219e, 1, { 0x0000219e } }, @@ -7578,7 +7578,7 @@ { 0x000021ab, 1, { 0x000021ab } }, { 0x000021ac, 1, { 0x000021ac } }, { 0x000021ad, 1, { 0x000021ad } }, - { 0x000021ae, 2, { 0x00002194, 0x00000338 } }, + { 0x000021ae, 1, { 0x000021ae } }, { 0x000021af, 1, { 0x000021af } }, { 0x000021b0, 1, { 0x000021b0 } }, { 0x000021b1, 1, { 0x000021b1 } }, @@ -7609,9 +7609,9 @@ { 0x000021ca, 1, { 0x000021ca } }, { 0x000021cb, 1, { 0x000021cb } }, { 0x000021cc, 1, { 0x000021cc } }, - { 0x000021cd, 2, { 0x000021d0, 0x00000338 } }, - { 0x000021ce, 2, { 0x000021d4, 0x00000338 } }, - { 0x000021cf, 2, { 0x000021d2, 0x00000338 } }, + { 0x000021cd, 1, { 0x000021cd } }, + { 0x000021ce, 1, { 0x000021ce } }, + { 0x000021cf, 1, { 0x000021cf } }, { 0x000021d0, 1, { 0x000021d0 } }, { 0x000021d1, 1, { 0x000021d1 } }, { 0x000021d2, 1, { 0x000021d2 } }, @@ -7664,15 +7664,15 @@ { 0x00002201, 1, { 0x00002201 } }, { 0x00002202, 1, { 0x00002202 } }, { 0x00002203, 1, { 0x00002203 } }, - { 0x00002204, 2, { 0x00002203, 0x00000338 } }, + { 0x00002204, 1, { 0x00002204 } }, { 0x00002205, 1, { 0x00002205 } }, { 0x00002206, 1, { 0x00002206 } }, { 0x00002207, 1, { 0x00002207 } }, { 0x00002208, 1, { 0x00002208 } }, - { 0x00002209, 2, { 0x00002208, 0x00000338 } }, + { 0x00002209, 1, { 0x00002209 } }, { 0x0000220a, 1, { 0x0000220a } }, { 0x0000220b, 1, { 0x0000220b } }, - { 0x0000220c, 2, { 0x0000220b, 0x00000338 } }, + { 0x0000220c, 1, { 0x0000220c } }, { 0x0000220d, 1, { 0x0000220d } }, { 0x0000220e, 1, { 0x0000220e } }, { 0x0000220f, 1, { 0x0000220f } }, @@ -7696,9 +7696,9 @@ { 0x00002221, 1, { 0x00002221 } }, { 0x00002222, 1, { 0x00002222 } }, { 0x00002223, 1, { 0x00002223 } }, - { 0x00002224, 2, { 0x00002223, 0x00000338 } }, + { 0x00002224, 1, { 0x00002224 } }, { 0x00002225, 1, { 0x00002225 } }, - { 0x00002226, 2, { 0x00002225, 0x00000338 } }, + { 0x00002226, 1, { 0x00002226 } }, { 0x00002227, 1, { 0x00002227 } }, { 0x00002228, 1, { 0x00002228 } }, { 0x00002229, 1, { 0x00002229 } }, @@ -7725,15 +7725,15 @@ { 0x0000223e, 1, { 0x0000223e } }, { 0x0000223f, 1, { 0x0000223f } }, { 0x00002240, 1, { 0x00002240 } }, - { 0x00002241, 2, { 0x0000223c, 0x00000338 } }, + { 0x00002241, 1, { 0x00002241 } }, { 0x00002242, 1, { 0x00002242 } }, { 0x00002243, 1, { 0x00002243 } }, - { 0x00002244, 2, { 0x00002243, 0x00000338 } }, + { 0x00002244, 1, { 0x00002244 } }, { 0x00002245, 1, { 0x00002245 } }, { 0x00002246, 1, { 0x00002246 } }, - { 0x00002247, 2, { 0x00002245, 0x00000338 } }, + { 0x00002247, 1, { 0x00002247 } }, { 0x00002248, 1, { 0x00002248 } }, - { 0x00002249, 2, { 0x00002248, 0x00000338 } }, + { 0x00002249, 1, { 0x00002249 } }, { 0x0000224a, 1, { 0x0000224a } }, { 0x0000224b, 1, { 0x0000224b } }, { 0x0000224c, 1, { 0x0000224c } }, @@ -7756,9 +7756,9 @@ { 0x0000225d, 1, { 0x0000225d } }, { 0x0000225e, 1, { 0x0000225e } }, { 0x0000225f, 1, { 0x0000225f } }, - { 0x00002260, 2, { 0x0000003d, 0x00000338 } }, + { 0x00002260, 1, { 0x00002260 } }, { 0x00002261, 1, { 0x00002261 } }, - { 0x00002262, 2, { 0x00002261, 0x00000338 } }, + { 0x00002262, 1, { 0x00002262 } }, { 0x00002263, 1, { 0x00002263 } }, { 0x00002264, 1, { 0x00002264 } }, { 0x00002265, 1, { 0x00002265 } }, @@ -7769,35 +7769,35 @@ { 0x0000226a, 1, { 0x0000226a } }, { 0x0000226b, 1, { 0x0000226b } }, { 0x0000226c, 1, { 0x0000226c } }, - { 0x0000226d, 2, { 0x0000224d, 0x00000338 } }, - { 0x0000226e, 2, { 0x0000003c, 0x00000338 } }, - { 0x0000226f, 2, { 0x0000003e, 0x00000338 } }, - { 0x00002270, 2, { 0x00002264, 0x00000338 } }, - { 0x00002271, 2, { 0x00002265, 0x00000338 } }, + { 0x0000226d, 1, { 0x0000226d } }, + { 0x0000226e, 1, { 0x0000226e } }, + { 0x0000226f, 1, { 0x0000226f } }, + { 0x00002270, 1, { 0x00002270 } }, + { 0x00002271, 1, { 0x00002271 } }, { 0x00002272, 1, { 0x00002272 } }, { 0x00002273, 1, { 0x00002273 } }, - { 0x00002274, 2, { 0x00002272, 0x00000338 } }, - { 0x00002275, 2, { 0x00002273, 0x00000338 } }, + { 0x00002274, 1, { 0x00002274 } }, + { 0x00002275, 1, { 0x00002275 } }, { 0x00002276, 1, { 0x00002276 } }, { 0x00002277, 1, { 0x00002277 } }, - { 0x00002278, 2, { 0x00002276, 0x00000338 } }, - { 0x00002279, 2, { 0x00002277, 0x00000338 } }, + { 0x00002278, 1, { 0x00002278 } }, + { 0x00002279, 1, { 0x00002279 } }, { 0x0000227a, 1, { 0x0000227a } }, { 0x0000227b, 1, { 0x0000227b } }, { 0x0000227c, 1, { 0x0000227c } }, { 0x0000227d, 1, { 0x0000227d } }, { 0x0000227e, 1, { 0x0000227e } }, { 0x0000227f, 1, { 0x0000227f } }, - { 0x00002280, 2, { 0x0000227a, 0x00000338 } }, - { 0x00002281, 2, { 0x0000227b, 0x00000338 } }, + { 0x00002280, 1, { 0x00002280 } }, + { 0x00002281, 1, { 0x00002281 } }, { 0x00002282, 1, { 0x00002282 } }, { 0x00002283, 1, { 0x00002283 } }, - { 0x00002284, 2, { 0x00002282, 0x00000338 } }, - { 0x00002285, 2, { 0x00002283, 0x00000338 } }, + { 0x00002284, 1, { 0x00002284 } }, + { 0x00002285, 1, { 0x00002285 } }, { 0x00002286, 1, { 0x00002286 } }, { 0x00002287, 1, { 0x00002287 } }, - { 0x00002288, 2, { 0x00002286, 0x00000338 } }, - { 0x00002289, 2, { 0x00002287, 0x00000338 } }, + { 0x00002288, 1, { 0x00002288 } }, + { 0x00002289, 1, { 0x00002289 } }, { 0x0000228a, 1, { 0x0000228a } }, { 0x0000228b, 1, { 0x0000228b } }, { 0x0000228c, 1, { 0x0000228c } }, @@ -7832,10 +7832,10 @@ { 0x000022a9, 1, { 0x000022a9 } }, { 0x000022aa, 1, { 0x000022aa } }, { 0x000022ab, 1, { 0x000022ab } }, - { 0x000022ac, 2, { 0x000022a2, 0x00000338 } }, - { 0x000022ad, 2, { 0x000022a8, 0x00000338 } }, - { 0x000022ae, 2, { 0x000022a9, 0x00000338 } }, - { 0x000022af, 2, { 0x000022ab, 0x00000338 } }, + { 0x000022ac, 1, { 0x000022ac } }, + { 0x000022ad, 1, { 0x000022ad } }, + { 0x000022ae, 1, { 0x000022ae } }, + { 0x000022af, 1, { 0x000022af } }, { 0x000022b0, 1, { 0x000022b0 } }, { 0x000022b1, 1, { 0x000022b1 } }, { 0x000022b2, 1, { 0x000022b2 } }, @@ -7884,20 +7884,20 @@ { 0x000022dd, 1, { 0x000022dd } }, { 0x000022de, 1, { 0x000022de } }, { 0x000022df, 1, { 0x000022df } }, - { 0x000022e0, 2, { 0x0000227c, 0x00000338 } }, - { 0x000022e1, 2, { 0x0000227d, 0x00000338 } }, - { 0x000022e2, 2, { 0x00002291, 0x00000338 } }, - { 0x000022e3, 2, { 0x00002292, 0x00000338 } }, + { 0x000022e0, 1, { 0x000022e0 } }, + { 0x000022e1, 1, { 0x000022e1 } }, + { 0x000022e2, 1, { 0x000022e2 } }, + { 0x000022e3, 1, { 0x000022e3 } }, { 0x000022e4, 1, { 0x000022e4 } }, { 0x000022e5, 1, { 0x000022e5 } }, { 0x000022e6, 1, { 0x000022e6 } }, { 0x000022e7, 1, { 0x000022e7 } }, { 0x000022e8, 1, { 0x000022e8 } }, { 0x000022e9, 1, { 0x000022e9 } }, - { 0x000022ea, 2, { 0x000022b2, 0x00000338 } }, - { 0x000022eb, 2, { 0x000022b3, 0x00000338 } }, - { 0x000022ec, 2, { 0x000022b4, 0x00000338 } }, - { 0x000022ed, 2, { 0x000022b5, 0x00000338 } }, + { 0x000022ea, 1, { 0x000022ea } }, + { 0x000022eb, 1, { 0x000022eb } }, + { 0x000022ec, 1, { 0x000022ec } }, + { 0x000022ed, 1, { 0x000022ed } }, { 0x000022ee, 1, { 0x000022ee } }, { 0x000022ef, 1, { 0x000022ef } }, { 0x000022f0, 1, { 0x000022f0 } }, @@ -7957,8 +7957,8 @@ { 0x00002326, 1, { 0x00002326 } }, { 0x00002327, 1, { 0x00002327 } }, { 0x00002328, 1, { 0x00002328 } }, - { 0x00002329, 1, { 0x00003008 } }, - { 0x0000232a, 1, { 0x00003009 } }, + { 0x00002329, 1, { 0x00002329 } }, + { 0x0000232a, 1, { 0x0000232a } }, { 0x0000232b, 1, { 0x0000232b } }, { 0x0000232c, 1, { 0x0000232c } }, { 0x0000232d, 1, { 0x0000232d } }, @@ -9881,7 +9881,7 @@ { 0x00002ad9, 1, { 0x00002ad9 } }, { 0x00002ada, 1, { 0x00002ada } }, { 0x00002adb, 1, { 0x00002adb } }, - { 0x00002adc, 2, { 0x00002add, 0x00000338 } }, + { 0x00002adc, 1, { 0x00002adc } }, { 0x00002add, 1, { 0x00002add } }, { 0x00002ade, 1, { 0x00002ade } }, { 0x00002adf, 1, { 0x00002adf } }, @@ -14969,478 +14969,478 @@ { 0x0000dfff, 1, { 0x0000dfff } }, { 0x0000e000, 1, { 0x0000e000 } }, { 0x0000f8ff, 1, { 0x0000f8ff } }, - { 0x0000f900, 1, { 0x00008c48 } }, - { 0x0000f901, 1, { 0x000066f4 } }, - { 0x0000f902, 1, { 0x00008eca } }, - { 0x0000f903, 1, { 0x00008cc8 } }, - { 0x0000f904, 1, { 0x00006ed1 } }, - { 0x0000f905, 1, { 0x00004e32 } }, - { 0x0000f906, 1, { 0x000053e5 } }, - { 0x0000f907, 1, { 0x00009f9c } }, - { 0x0000f908, 1, { 0x00009f9c } }, - { 0x0000f909, 1, { 0x00005951 } }, - { 0x0000f90a, 1, { 0x000091d1 } }, - { 0x0000f90b, 1, { 0x00005587 } }, - { 0x0000f90c, 1, { 0x00005948 } }, - { 0x0000f90d, 1, { 0x000061f6 } }, - { 0x0000f90e, 1, { 0x00007669 } }, - { 0x0000f90f, 1, { 0x00007f85 } }, - { 0x0000f910, 1, { 0x0000863f } }, - { 0x0000f911, 1, { 0x000087ba } }, - { 0x0000f912, 1, { 0x000088f8 } }, - { 0x0000f913, 1, { 0x0000908f } }, - { 0x0000f914, 1, { 0x00006a02 } }, - { 0x0000f915, 1, { 0x00006d1b } }, - { 0x0000f916, 1, { 0x000070d9 } }, - { 0x0000f917, 1, { 0x000073de } }, - { 0x0000f918, 1, { 0x0000843d } }, - { 0x0000f919, 1, { 0x0000916a } }, - { 0x0000f91a, 1, { 0x000099f1 } }, - { 0x0000f91b, 1, { 0x00004e82 } }, - { 0x0000f91c, 1, { 0x00005375 } }, - { 0x0000f91d, 1, { 0x00006b04 } }, - { 0x0000f91e, 1, { 0x0000721b } }, - { 0x0000f91f, 1, { 0x0000862d } }, - { 0x0000f920, 1, { 0x00009e1e } }, - { 0x0000f921, 1, { 0x00005d50 } }, - { 0x0000f922, 1, { 0x00006feb } }, - { 0x0000f923, 1, { 0x000085cd } }, - { 0x0000f924, 1, { 0x00008964 } }, - { 0x0000f925, 1, { 0x000062c9 } }, - { 0x0000f926, 1, { 0x000081d8 } }, - { 0x0000f927, 1, { 0x0000881f } }, - { 0x0000f928, 1, { 0x00005eca } }, - { 0x0000f929, 1, { 0x00006717 } }, - { 0x0000f92a, 1, { 0x00006d6a } }, - { 0x0000f92b, 1, { 0x000072fc } }, - { 0x0000f92c, 1, { 0x000090ce } }, - { 0x0000f92d, 1, { 0x00004f86 } }, - { 0x0000f92e, 1, { 0x000051b7 } }, - { 0x0000f92f, 1, { 0x000052de } }, - { 0x0000f930, 1, { 0x000064c4 } }, - { 0x0000f931, 1, { 0x00006ad3 } }, - { 0x0000f932, 1, { 0x00007210 } }, - { 0x0000f933, 1, { 0x000076e7 } }, - { 0x0000f934, 1, { 0x00008001 } }, - { 0x0000f935, 1, { 0x00008606 } }, - { 0x0000f936, 1, { 0x0000865c } }, - { 0x0000f937, 1, { 0x00008def } }, - { 0x0000f938, 1, { 0x00009732 } }, - { 0x0000f939, 1, { 0x00009b6f } }, - { 0x0000f93a, 1, { 0x00009dfa } }, - { 0x0000f93b, 1, { 0x0000788c } }, - { 0x0000f93c, 1, { 0x0000797f } }, - { 0x0000f93d, 1, { 0x00007da0 } }, - { 0x0000f93e, 1, { 0x000083c9 } }, - { 0x0000f93f, 1, { 0x00009304 } }, - { 0x0000f940, 1, { 0x00009e7f } }, - { 0x0000f941, 1, { 0x00008ad6 } }, - { 0x0000f942, 1, { 0x000058df } }, - { 0x0000f943, 1, { 0x00005f04 } }, - { 0x0000f944, 1, { 0x00007c60 } }, - { 0x0000f945, 1, { 0x0000807e } }, - { 0x0000f946, 1, { 0x00007262 } }, - { 0x0000f947, 1, { 0x000078ca } }, - { 0x0000f948, 1, { 0x00008cc2 } }, - { 0x0000f949, 1, { 0x000096f7 } }, - { 0x0000f94a, 1, { 0x000058d8 } }, - { 0x0000f94b, 1, { 0x00005c62 } }, - { 0x0000f94c, 1, { 0x00006a13 } }, - { 0x0000f94d, 1, { 0x00006dda } }, - { 0x0000f94e, 1, { 0x00006f0f } }, - { 0x0000f94f, 1, { 0x00007d2f } }, - { 0x0000f950, 1, { 0x00007e37 } }, - { 0x0000f951, 1, { 0x0000964b } }, - { 0x0000f952, 1, { 0x000052d2 } }, - { 0x0000f953, 1, { 0x0000808b } }, - { 0x0000f954, 1, { 0x000051dc } }, - { 0x0000f955, 1, { 0x000051cc } }, - { 0x0000f956, 1, { 0x00007a1c } }, - { 0x0000f957, 1, { 0x00007dbe } }, - { 0x0000f958, 1, { 0x000083f1 } }, - { 0x0000f959, 1, { 0x00009675 } }, - { 0x0000f95a, 1, { 0x00008b80 } }, - { 0x0000f95b, 1, { 0x000062cf } }, - { 0x0000f95c, 1, { 0x00006a02 } }, - { 0x0000f95d, 1, { 0x00008afe } }, - { 0x0000f95e, 1, { 0x00004e39 } }, - { 0x0000f95f, 1, { 0x00005be7 } }, - { 0x0000f960, 1, { 0x00006012 } }, - { 0x0000f961, 1, { 0x00007387 } }, - { 0x0000f962, 1, { 0x00007570 } }, - { 0x0000f963, 1, { 0x00005317 } }, - { 0x0000f964, 1, { 0x000078fb } }, - { 0x0000f965, 1, { 0x00004fbf } }, - { 0x0000f966, 1, { 0x00005fa9 } }, - { 0x0000f967, 1, { 0x00004e0d } }, - { 0x0000f968, 1, { 0x00006ccc } }, - { 0x0000f969, 1, { 0x00006578 } }, - { 0x0000f96a, 1, { 0x00007d22 } }, - { 0x0000f96b, 1, { 0x000053c3 } }, - { 0x0000f96c, 1, { 0x0000585e } }, - { 0x0000f96d, 1, { 0x00007701 } }, - { 0x0000f96e, 1, { 0x00008449 } }, - { 0x0000f96f, 1, { 0x00008aaa } }, - { 0x0000f970, 1, { 0x00006bba } }, - { 0x0000f971, 1, { 0x00008fb0 } }, - { 0x0000f972, 1, { 0x00006c88 } }, - { 0x0000f973, 1, { 0x000062fe } }, - { 0x0000f974, 1, { 0x000082e5 } }, - { 0x0000f975, 1, { 0x000063a0 } }, - { 0x0000f976, 1, { 0x00007565 } }, - { 0x0000f977, 1, { 0x00004eae } }, - { 0x0000f978, 1, { 0x00005169 } }, - { 0x0000f979, 1, { 0x000051c9 } }, - { 0x0000f97a, 1, { 0x00006881 } }, - { 0x0000f97b, 1, { 0x00007ce7 } }, - { 0x0000f97c, 1, { 0x0000826f } }, - { 0x0000f97d, 1, { 0x00008ad2 } }, - { 0x0000f97e, 1, { 0x000091cf } }, - { 0x0000f97f, 1, { 0x000052f5 } }, - { 0x0000f980, 1, { 0x00005442 } }, - { 0x0000f981, 1, { 0x00005973 } }, - { 0x0000f982, 1, { 0x00005eec } }, - { 0x0000f983, 1, { 0x000065c5 } }, - { 0x0000f984, 1, { 0x00006ffe } }, - { 0x0000f985, 1, { 0x0000792a } }, - { 0x0000f986, 1, { 0x000095ad } }, - { 0x0000f987, 1, { 0x00009a6a } }, - { 0x0000f988, 1, { 0x00009e97 } }, - { 0x0000f989, 1, { 0x00009ece } }, - { 0x0000f98a, 1, { 0x0000529b } }, - { 0x0000f98b, 1, { 0x000066c6 } }, - { 0x0000f98c, 1, { 0x00006b77 } }, - { 0x0000f98d, 1, { 0x00008f62 } }, - { 0x0000f98e, 1, { 0x00005e74 } }, - { 0x0000f98f, 1, { 0x00006190 } }, - { 0x0000f990, 1, { 0x00006200 } }, - { 0x0000f991, 1, { 0x0000649a } }, - { 0x0000f992, 1, { 0x00006f23 } }, - { 0x0000f993, 1, { 0x00007149 } }, - { 0x0000f994, 1, { 0x00007489 } }, - { 0x0000f995, 1, { 0x000079ca } }, - { 0x0000f996, 1, { 0x00007df4 } }, - { 0x0000f997, 1, { 0x0000806f } }, - { 0x0000f998, 1, { 0x00008f26 } }, - { 0x0000f999, 1, { 0x000084ee } }, - { 0x0000f99a, 1, { 0x00009023 } }, - { 0x0000f99b, 1, { 0x0000934a } }, - { 0x0000f99c, 1, { 0x00005217 } }, - { 0x0000f99d, 1, { 0x000052a3 } }, - { 0x0000f99e, 1, { 0x000054bd } }, - { 0x0000f99f, 1, { 0x000070c8 } }, - { 0x0000f9a0, 1, { 0x000088c2 } }, - { 0x0000f9a1, 1, { 0x00008aaa } }, - { 0x0000f9a2, 1, { 0x00005ec9 } }, - { 0x0000f9a3, 1, { 0x00005ff5 } }, - { 0x0000f9a4, 1, { 0x0000637b } }, - { 0x0000f9a5, 1, { 0x00006bae } }, - { 0x0000f9a6, 1, { 0x00007c3e } }, - { 0x0000f9a7, 1, { 0x00007375 } }, - { 0x0000f9a8, 1, { 0x00004ee4 } }, - { 0x0000f9a9, 1, { 0x000056f9 } }, - { 0x0000f9aa, 1, { 0x00005be7 } }, - { 0x0000f9ab, 1, { 0x00005dba } }, - { 0x0000f9ac, 1, { 0x0000601c } }, - { 0x0000f9ad, 1, { 0x000073b2 } }, - { 0x0000f9ae, 1, { 0x00007469 } }, - { 0x0000f9af, 1, { 0x00007f9a } }, - { 0x0000f9b0, 1, { 0x00008046 } }, - { 0x0000f9b1, 1, { 0x00009234 } }, - { 0x0000f9b2, 1, { 0x000096f6 } }, - { 0x0000f9b3, 1, { 0x00009748 } }, - { 0x0000f9b4, 1, { 0x00009818 } }, - { 0x0000f9b5, 1, { 0x00004f8b } }, - { 0x0000f9b6, 1, { 0x000079ae } }, - { 0x0000f9b7, 1, { 0x000091b4 } }, - { 0x0000f9b8, 1, { 0x000096b8 } }, - { 0x0000f9b9, 1, { 0x000060e1 } }, - { 0x0000f9ba, 1, { 0x00004e86 } }, - { 0x0000f9bb, 1, { 0x000050da } }, - { 0x0000f9bc, 1, { 0x00005bee } }, - { 0x0000f9bd, 1, { 0x00005c3f } }, - { 0x0000f9be, 1, { 0x00006599 } }, - { 0x0000f9bf, 1, { 0x00006a02 } }, - { 0x0000f9c0, 1, { 0x000071ce } }, - { 0x0000f9c1, 1, { 0x00007642 } }, - { 0x0000f9c2, 1, { 0x000084fc } }, - { 0x0000f9c3, 1, { 0x0000907c } }, - { 0x0000f9c4, 1, { 0x00009f8d } }, - { 0x0000f9c5, 1, { 0x00006688 } }, - { 0x0000f9c6, 1, { 0x0000962e } }, - { 0x0000f9c7, 1, { 0x00005289 } }, - { 0x0000f9c8, 1, { 0x0000677b } }, - { 0x0000f9c9, 1, { 0x000067f3 } }, - { 0x0000f9ca, 1, { 0x00006d41 } }, - { 0x0000f9cb, 1, { 0x00006e9c } }, - { 0x0000f9cc, 1, { 0x00007409 } }, - { 0x0000f9cd, 1, { 0x00007559 } }, - { 0x0000f9ce, 1, { 0x0000786b } }, - { 0x0000f9cf, 1, { 0x00007d10 } }, - { 0x0000f9d0, 1, { 0x0000985e } }, - { 0x0000f9d1, 1, { 0x0000516d } }, - { 0x0000f9d2, 1, { 0x0000622e } }, - { 0x0000f9d3, 1, { 0x00009678 } }, - { 0x0000f9d4, 1, { 0x0000502b } }, - { 0x0000f9d5, 1, { 0x00005d19 } }, - { 0x0000f9d6, 1, { 0x00006dea } }, - { 0x0000f9d7, 1, { 0x00008f2a } }, - { 0x0000f9d8, 1, { 0x00005f8b } }, - { 0x0000f9d9, 1, { 0x00006144 } }, - { 0x0000f9da, 1, { 0x00006817 } }, - { 0x0000f9db, 1, { 0x00007387 } }, - { 0x0000f9dc, 1, { 0x00009686 } }, - { 0x0000f9dd, 1, { 0x00005229 } }, - { 0x0000f9de, 1, { 0x0000540f } }, - { 0x0000f9df, 1, { 0x00005c65 } }, - { 0x0000f9e0, 1, { 0x00006613 } }, - { 0x0000f9e1, 1, { 0x0000674e } }, - { 0x0000f9e2, 1, { 0x000068a8 } }, - { 0x0000f9e3, 1, { 0x00006ce5 } }, - { 0x0000f9e4, 1, { 0x00007406 } }, - { 0x0000f9e5, 1, { 0x000075e2 } }, - { 0x0000f9e6, 1, { 0x00007f79 } }, - { 0x0000f9e7, 1, { 0x000088cf } }, - { 0x0000f9e8, 1, { 0x000088e1 } }, - { 0x0000f9e9, 1, { 0x000091cc } }, - { 0x0000f9ea, 1, { 0x000096e2 } }, - { 0x0000f9eb, 1, { 0x0000533f } }, - { 0x0000f9ec, 1, { 0x00006eba } }, - { 0x0000f9ed, 1, { 0x0000541d } }, - { 0x0000f9ee, 1, { 0x000071d0 } }, - { 0x0000f9ef, 1, { 0x00007498 } }, - { 0x0000f9f0, 1, { 0x000085fa } }, - { 0x0000f9f1, 1, { 0x000096a3 } }, - { 0x0000f9f2, 1, { 0x00009c57 } }, - { 0x0000f9f3, 1, { 0x00009e9f } }, - { 0x0000f9f4, 1, { 0x00006797 } }, - { 0x0000f9f5, 1, { 0x00006dcb } }, - { 0x0000f9f6, 1, { 0x000081e8 } }, - { 0x0000f9f7, 1, { 0x00007acb } }, - { 0x0000f9f8, 1, { 0x00007b20 } }, - { 0x0000f9f9, 1, { 0x00007c92 } }, - { 0x0000f9fa, 1, { 0x000072c0 } }, - { 0x0000f9fb, 1, { 0x00007099 } }, - { 0x0000f9fc, 1, { 0x00008b58 } }, - { 0x0000f9fd, 1, { 0x00004ec0 } }, - { 0x0000f9fe, 1, { 0x00008336 } }, - { 0x0000f9ff, 1, { 0x0000523a } }, - { 0x0000fa00, 1, { 0x00005207 } }, - { 0x0000fa01, 1, { 0x00005ea6 } }, - { 0x0000fa02, 1, { 0x000062d3 } }, - { 0x0000fa03, 1, { 0x00007cd6 } }, - { 0x0000fa04, 1, { 0x00005b85 } }, - { 0x0000fa05, 1, { 0x00006d1e } }, - { 0x0000fa06, 1, { 0x000066b4 } }, - { 0x0000fa07, 1, { 0x00008f3b } }, - { 0x0000fa08, 1, { 0x0000884c } }, - { 0x0000fa09, 1, { 0x0000964d } }, - { 0x0000fa0a, 1, { 0x0000898b } }, - { 0x0000fa0b, 1, { 0x00005ed3 } }, - { 0x0000fa0c, 1, { 0x00005140 } }, - { 0x0000fa0d, 1, { 0x000055c0 } }, + { 0x0000f900, 1, { 0x0000f900 } }, + { 0x0000f901, 1, { 0x0000f901 } }, + { 0x0000f902, 1, { 0x0000f902 } }, + { 0x0000f903, 1, { 0x0000f903 } }, + { 0x0000f904, 1, { 0x0000f904 } }, + { 0x0000f905, 1, { 0x0000f905 } }, + { 0x0000f906, 1, { 0x0000f906 } }, + { 0x0000f907, 1, { 0x0000f907 } }, + { 0x0000f908, 1, { 0x0000f908 } }, + { 0x0000f909, 1, { 0x0000f909 } }, + { 0x0000f90a, 1, { 0x0000f90a } }, + { 0x0000f90b, 1, { 0x0000f90b } }, + { 0x0000f90c, 1, { 0x0000f90c } }, + { 0x0000f90d, 1, { 0x0000f90d } }, + { 0x0000f90e, 1, { 0x0000f90e } }, + { 0x0000f90f, 1, { 0x0000f90f } }, + { 0x0000f910, 1, { 0x0000f910 } }, + { 0x0000f911, 1, { 0x0000f911 } }, + { 0x0000f912, 1, { 0x0000f912 } }, + { 0x0000f913, 1, { 0x0000f913 } }, + { 0x0000f914, 1, { 0x0000f914 } }, + { 0x0000f915, 1, { 0x0000f915 } }, + { 0x0000f916, 1, { 0x0000f916 } }, + { 0x0000f917, 1, { 0x0000f917 } }, + { 0x0000f918, 1, { 0x0000f918 } }, + { 0x0000f919, 1, { 0x0000f919 } }, + { 0x0000f91a, 1, { 0x0000f91a } }, + { 0x0000f91b, 1, { 0x0000f91b } }, + { 0x0000f91c, 1, { 0x0000f91c } }, + { 0x0000f91d, 1, { 0x0000f91d } }, + { 0x0000f91e, 1, { 0x0000f91e } }, + { 0x0000f91f, 1, { 0x0000f91f } }, + { 0x0000f920, 1, { 0x0000f920 } }, + { 0x0000f921, 1, { 0x0000f921 } }, + { 0x0000f922, 1, { 0x0000f922 } }, + { 0x0000f923, 1, { 0x0000f923 } }, + { 0x0000f924, 1, { 0x0000f924 } }, + { 0x0000f925, 1, { 0x0000f925 } }, + { 0x0000f926, 1, { 0x0000f926 } }, + { 0x0000f927, 1, { 0x0000f927 } }, + { 0x0000f928, 1, { 0x0000f928 } }, + { 0x0000f929, 1, { 0x0000f929 } }, + { 0x0000f92a, 1, { 0x0000f92a } }, + { 0x0000f92b, 1, { 0x0000f92b } }, + { 0x0000f92c, 1, { 0x0000f92c } }, + { 0x0000f92d, 1, { 0x0000f92d } }, + { 0x0000f92e, 1, { 0x0000f92e } }, + { 0x0000f92f, 1, { 0x0000f92f } }, + { 0x0000f930, 1, { 0x0000f930 } }, + { 0x0000f931, 1, { 0x0000f931 } }, + { 0x0000f932, 1, { 0x0000f932 } }, + { 0x0000f933, 1, { 0x0000f933 } }, + { 0x0000f934, 1, { 0x0000f934 } }, + { 0x0000f935, 1, { 0x0000f935 } }, + { 0x0000f936, 1, { 0x0000f936 } }, + { 0x0000f937, 1, { 0x0000f937 } }, + { 0x0000f938, 1, { 0x0000f938 } }, + { 0x0000f939, 1, { 0x0000f939 } }, + { 0x0000f93a, 1, { 0x0000f93a } }, + { 0x0000f93b, 1, { 0x0000f93b } }, + { 0x0000f93c, 1, { 0x0000f93c } }, + { 0x0000f93d, 1, { 0x0000f93d } }, + { 0x0000f93e, 1, { 0x0000f93e } }, + { 0x0000f93f, 1, { 0x0000f93f } }, + { 0x0000f940, 1, { 0x0000f940 } }, + { 0x0000f941, 1, { 0x0000f941 } }, + { 0x0000f942, 1, { 0x0000f942 } }, + { 0x0000f943, 1, { 0x0000f943 } }, + { 0x0000f944, 1, { 0x0000f944 } }, + { 0x0000f945, 1, { 0x0000f945 } }, + { 0x0000f946, 1, { 0x0000f946 } }, + { 0x0000f947, 1, { 0x0000f947 } }, + { 0x0000f948, 1, { 0x0000f948 } }, + { 0x0000f949, 1, { 0x0000f949 } }, + { 0x0000f94a, 1, { 0x0000f94a } }, + { 0x0000f94b, 1, { 0x0000f94b } }, + { 0x0000f94c, 1, { 0x0000f94c } }, + { 0x0000f94d, 1, { 0x0000f94d } }, + { 0x0000f94e, 1, { 0x0000f94e } }, + { 0x0000f94f, 1, { 0x0000f94f } }, + { 0x0000f950, 1, { 0x0000f950 } }, + { 0x0000f951, 1, { 0x0000f951 } }, + { 0x0000f952, 1, { 0x0000f952 } }, + { 0x0000f953, 1, { 0x0000f953 } }, + { 0x0000f954, 1, { 0x0000f954 } }, + { 0x0000f955, 1, { 0x0000f955 } }, + { 0x0000f956, 1, { 0x0000f956 } }, + { 0x0000f957, 1, { 0x0000f957 } }, + { 0x0000f958, 1, { 0x0000f958 } }, + { 0x0000f959, 1, { 0x0000f959 } }, + { 0x0000f95a, 1, { 0x0000f95a } }, + { 0x0000f95b, 1, { 0x0000f95b } }, + { 0x0000f95c, 1, { 0x0000f95c } }, + { 0x0000f95d, 1, { 0x0000f95d } }, + { 0x0000f95e, 1, { 0x0000f95e } }, + { 0x0000f95f, 1, { 0x0000f95f } }, + { 0x0000f960, 1, { 0x0000f960 } }, + { 0x0000f961, 1, { 0x0000f961 } }, + { 0x0000f962, 1, { 0x0000f962 } }, + { 0x0000f963, 1, { 0x0000f963 } }, + { 0x0000f964, 1, { 0x0000f964 } }, + { 0x0000f965, 1, { 0x0000f965 } }, + { 0x0000f966, 1, { 0x0000f966 } }, + { 0x0000f967, 1, { 0x0000f967 } }, + { 0x0000f968, 1, { 0x0000f968 } }, + { 0x0000f969, 1, { 0x0000f969 } }, + { 0x0000f96a, 1, { 0x0000f96a } }, + { 0x0000f96b, 1, { 0x0000f96b } }, + { 0x0000f96c, 1, { 0x0000f96c } }, + { 0x0000f96d, 1, { 0x0000f96d } }, + { 0x0000f96e, 1, { 0x0000f96e } }, + { 0x0000f96f, 1, { 0x0000f96f } }, + { 0x0000f970, 1, { 0x0000f970 } }, + { 0x0000f971, 1, { 0x0000f971 } }, + { 0x0000f972, 1, { 0x0000f972 } }, + { 0x0000f973, 1, { 0x0000f973 } }, + { 0x0000f974, 1, { 0x0000f974 } }, + { 0x0000f975, 1, { 0x0000f975 } }, + { 0x0000f976, 1, { 0x0000f976 } }, + { 0x0000f977, 1, { 0x0000f977 } }, + { 0x0000f978, 1, { 0x0000f978 } }, + { 0x0000f979, 1, { 0x0000f979 } }, + { 0x0000f97a, 1, { 0x0000f97a } }, + { 0x0000f97b, 1, { 0x0000f97b } }, + { 0x0000f97c, 1, { 0x0000f97c } }, + { 0x0000f97d, 1, { 0x0000f97d } }, + { 0x0000f97e, 1, { 0x0000f97e } }, + { 0x0000f97f, 1, { 0x0000f97f } }, + { 0x0000f980, 1, { 0x0000f980 } }, + { 0x0000f981, 1, { 0x0000f981 } }, + { 0x0000f982, 1, { 0x0000f982 } }, + { 0x0000f983, 1, { 0x0000f983 } }, + { 0x0000f984, 1, { 0x0000f984 } }, + { 0x0000f985, 1, { 0x0000f985 } }, + { 0x0000f986, 1, { 0x0000f986 } }, + { 0x0000f987, 1, { 0x0000f987 } }, + { 0x0000f988, 1, { 0x0000f988 } }, + { 0x0000f989, 1, { 0x0000f989 } }, + { 0x0000f98a, 1, { 0x0000f98a } }, + { 0x0000f98b, 1, { 0x0000f98b } }, + { 0x0000f98c, 1, { 0x0000f98c } }, + { 0x0000f98d, 1, { 0x0000f98d } }, + { 0x0000f98e, 1, { 0x0000f98e } }, + { 0x0000f98f, 1, { 0x0000f98f } }, + { 0x0000f990, 1, { 0x0000f990 } }, + { 0x0000f991, 1, { 0x0000f991 } }, + { 0x0000f992, 1, { 0x0000f992 } }, + { 0x0000f993, 1, { 0x0000f993 } }, + { 0x0000f994, 1, { 0x0000f994 } }, + { 0x0000f995, 1, { 0x0000f995 } }, + { 0x0000f996, 1, { 0x0000f996 } }, + { 0x0000f997, 1, { 0x0000f997 } }, + { 0x0000f998, 1, { 0x0000f998 } }, + { 0x0000f999, 1, { 0x0000f999 } }, + { 0x0000f99a, 1, { 0x0000f99a } }, + { 0x0000f99b, 1, { 0x0000f99b } }, + { 0x0000f99c, 1, { 0x0000f99c } }, + { 0x0000f99d, 1, { 0x0000f99d } }, + { 0x0000f99e, 1, { 0x0000f99e } }, + { 0x0000f99f, 1, { 0x0000f99f } }, + { 0x0000f9a0, 1, { 0x0000f9a0 } }, + { 0x0000f9a1, 1, { 0x0000f9a1 } }, + { 0x0000f9a2, 1, { 0x0000f9a2 } }, + { 0x0000f9a3, 1, { 0x0000f9a3 } }, + { 0x0000f9a4, 1, { 0x0000f9a4 } }, + { 0x0000f9a5, 1, { 0x0000f9a5 } }, + { 0x0000f9a6, 1, { 0x0000f9a6 } }, + { 0x0000f9a7, 1, { 0x0000f9a7 } }, + { 0x0000f9a8, 1, { 0x0000f9a8 } }, + { 0x0000f9a9, 1, { 0x0000f9a9 } }, + { 0x0000f9aa, 1, { 0x0000f9aa } }, + { 0x0000f9ab, 1, { 0x0000f9ab } }, + { 0x0000f9ac, 1, { 0x0000f9ac } }, + { 0x0000f9ad, 1, { 0x0000f9ad } }, + { 0x0000f9ae, 1, { 0x0000f9ae } }, + { 0x0000f9af, 1, { 0x0000f9af } }, + { 0x0000f9b0, 1, { 0x0000f9b0 } }, + { 0x0000f9b1, 1, { 0x0000f9b1 } }, + { 0x0000f9b2, 1, { 0x0000f9b2 } }, + { 0x0000f9b3, 1, { 0x0000f9b3 } }, + { 0x0000f9b4, 1, { 0x0000f9b4 } }, + { 0x0000f9b5, 1, { 0x0000f9b5 } }, + { 0x0000f9b6, 1, { 0x0000f9b6 } }, + { 0x0000f9b7, 1, { 0x0000f9b7 } }, + { 0x0000f9b8, 1, { 0x0000f9b8 } }, + { 0x0000f9b9, 1, { 0x0000f9b9 } }, + { 0x0000f9ba, 1, { 0x0000f9ba } }, + { 0x0000f9bb, 1, { 0x0000f9bb } }, + { 0x0000f9bc, 1, { 0x0000f9bc } }, + { 0x0000f9bd, 1, { 0x0000f9bd } }, + { 0x0000f9be, 1, { 0x0000f9be } }, + { 0x0000f9bf, 1, { 0x0000f9bf } }, + { 0x0000f9c0, 1, { 0x0000f9c0 } }, + { 0x0000f9c1, 1, { 0x0000f9c1 } }, + { 0x0000f9c2, 1, { 0x0000f9c2 } }, + { 0x0000f9c3, 1, { 0x0000f9c3 } }, + { 0x0000f9c4, 1, { 0x0000f9c4 } }, + { 0x0000f9c5, 1, { 0x0000f9c5 } }, + { 0x0000f9c6, 1, { 0x0000f9c6 } }, + { 0x0000f9c7, 1, { 0x0000f9c7 } }, + { 0x0000f9c8, 1, { 0x0000f9c8 } }, + { 0x0000f9c9, 1, { 0x0000f9c9 } }, + { 0x0000f9ca, 1, { 0x0000f9ca } }, + { 0x0000f9cb, 1, { 0x0000f9cb } }, + { 0x0000f9cc, 1, { 0x0000f9cc } }, + { 0x0000f9cd, 1, { 0x0000f9cd } }, + { 0x0000f9ce, 1, { 0x0000f9ce } }, + { 0x0000f9cf, 1, { 0x0000f9cf } }, + { 0x0000f9d0, 1, { 0x0000f9d0 } }, + { 0x0000f9d1, 1, { 0x0000f9d1 } }, + { 0x0000f9d2, 1, { 0x0000f9d2 } }, + { 0x0000f9d3, 1, { 0x0000f9d3 } }, + { 0x0000f9d4, 1, { 0x0000f9d4 } }, + { 0x0000f9d5, 1, { 0x0000f9d5 } }, + { 0x0000f9d6, 1, { 0x0000f9d6 } }, + { 0x0000f9d7, 1, { 0x0000f9d7 } }, + { 0x0000f9d8, 1, { 0x0000f9d8 } }, + { 0x0000f9d9, 1, { 0x0000f9d9 } }, + { 0x0000f9da, 1, { 0x0000f9da } }, + { 0x0000f9db, 1, { 0x0000f9db } }, + { 0x0000f9dc, 1, { 0x0000f9dc } }, + { 0x0000f9dd, 1, { 0x0000f9dd } }, + { 0x0000f9de, 1, { 0x0000f9de } }, + { 0x0000f9df, 1, { 0x0000f9df } }, + { 0x0000f9e0, 1, { 0x0000f9e0 } }, + { 0x0000f9e1, 1, { 0x0000f9e1 } }, + { 0x0000f9e2, 1, { 0x0000f9e2 } }, + { 0x0000f9e3, 1, { 0x0000f9e3 } }, + { 0x0000f9e4, 1, { 0x0000f9e4 } }, + { 0x0000f9e5, 1, { 0x0000f9e5 } }, + { 0x0000f9e6, 1, { 0x0000f9e6 } }, + { 0x0000f9e7, 1, { 0x0000f9e7 } }, + { 0x0000f9e8, 1, { 0x0000f9e8 } }, + { 0x0000f9e9, 1, { 0x0000f9e9 } }, + { 0x0000f9ea, 1, { 0x0000f9ea } }, + { 0x0000f9eb, 1, { 0x0000f9eb } }, + { 0x0000f9ec, 1, { 0x0000f9ec } }, + { 0x0000f9ed, 1, { 0x0000f9ed } }, + { 0x0000f9ee, 1, { 0x0000f9ee } }, + { 0x0000f9ef, 1, { 0x0000f9ef } }, + { 0x0000f9f0, 1, { 0x0000f9f0 } }, + { 0x0000f9f1, 1, { 0x0000f9f1 } }, + { 0x0000f9f2, 1, { 0x0000f9f2 } }, + { 0x0000f9f3, 1, { 0x0000f9f3 } }, + { 0x0000f9f4, 1, { 0x0000f9f4 } }, + { 0x0000f9f5, 1, { 0x0000f9f5 } }, + { 0x0000f9f6, 1, { 0x0000f9f6 } }, + { 0x0000f9f7, 1, { 0x0000f9f7 } }, + { 0x0000f9f8, 1, { 0x0000f9f8 } }, + { 0x0000f9f9, 1, { 0x0000f9f9 } }, + { 0x0000f9fa, 1, { 0x0000f9fa } }, + { 0x0000f9fb, 1, { 0x0000f9fb } }, + { 0x0000f9fc, 1, { 0x0000f9fc } }, + { 0x0000f9fd, 1, { 0x0000f9fd } }, + { 0x0000f9fe, 1, { 0x0000f9fe } }, + { 0x0000f9ff, 1, { 0x0000f9ff } }, + { 0x0000fa00, 1, { 0x0000fa00 } }, + { 0x0000fa01, 1, { 0x0000fa01 } }, + { 0x0000fa02, 1, { 0x0000fa02 } }, + { 0x0000fa03, 1, { 0x0000fa03 } }, + { 0x0000fa04, 1, { 0x0000fa04 } }, + { 0x0000fa05, 1, { 0x0000fa05 } }, + { 0x0000fa06, 1, { 0x0000fa06 } }, + { 0x0000fa07, 1, { 0x0000fa07 } }, + { 0x0000fa08, 1, { 0x0000fa08 } }, + { 0x0000fa09, 1, { 0x0000fa09 } }, + { 0x0000fa0a, 1, { 0x0000fa0a } }, + { 0x0000fa0b, 1, { 0x0000fa0b } }, + { 0x0000fa0c, 1, { 0x0000fa0c } }, + { 0x0000fa0d, 1, { 0x0000fa0d } }, { 0x0000fa0e, 1, { 0x0000fa0e } }, { 0x0000fa0f, 1, { 0x0000fa0f } }, - { 0x0000fa10, 1, { 0x0000585a } }, + { 0x0000fa10, 1, { 0x0000fa10 } }, { 0x0000fa11, 1, { 0x0000fa11 } }, - { 0x0000fa12, 1, { 0x00006674 } }, + { 0x0000fa12, 1, { 0x0000fa12 } }, { 0x0000fa13, 1, { 0x0000fa13 } }, { 0x0000fa14, 1, { 0x0000fa14 } }, - { 0x0000fa15, 1, { 0x000051de } }, - { 0x0000fa16, 1, { 0x0000732a } }, - { 0x0000fa17, 1, { 0x000076ca } }, - { 0x0000fa18, 1, { 0x0000793c } }, - { 0x0000fa19, 1, { 0x0000795e } }, - { 0x0000fa1a, 1, { 0x00007965 } }, - { 0x0000fa1b, 1, { 0x0000798f } }, - { 0x0000fa1c, 1, { 0x00009756 } }, - { 0x0000fa1d, 1, { 0x00007cbe } }, - { 0x0000fa1e, 1, { 0x00007fbd } }, + { 0x0000fa15, 1, { 0x0000fa15 } }, + { 0x0000fa16, 1, { 0x0000fa16 } }, + { 0x0000fa17, 1, { 0x0000fa17 } }, + { 0x0000fa18, 1, { 0x0000fa18 } }, + { 0x0000fa19, 1, { 0x0000fa19 } }, + { 0x0000fa1a, 1, { 0x0000fa1a } }, + { 0x0000fa1b, 1, { 0x0000fa1b } }, + { 0x0000fa1c, 1, { 0x0000fa1c } }, + { 0x0000fa1d, 1, { 0x0000fa1d } }, + { 0x0000fa1e, 1, { 0x0000fa1e } }, { 0x0000fa1f, 1, { 0x0000fa1f } }, - { 0x0000fa20, 1, { 0x00008612 } }, + { 0x0000fa20, 1, { 0x0000fa20 } }, { 0x0000fa21, 1, { 0x0000fa21 } }, - { 0x0000fa22, 1, { 0x00008af8 } }, + { 0x0000fa22, 1, { 0x0000fa22 } }, { 0x0000fa23, 1, { 0x0000fa23 } }, { 0x0000fa24, 1, { 0x0000fa24 } }, - { 0x0000fa25, 1, { 0x00009038 } }, - { 0x0000fa26, 1, { 0x000090fd } }, + { 0x0000fa25, 1, { 0x0000fa25 } }, + { 0x0000fa26, 1, { 0x0000fa26 } }, { 0x0000fa27, 1, { 0x0000fa27 } }, { 0x0000fa28, 1, { 0x0000fa28 } }, { 0x0000fa29, 1, { 0x0000fa29 } }, - { 0x0000fa2a, 1, { 0x000098ef } }, - { 0x0000fa2b, 1, { 0x000098fc } }, - { 0x0000fa2c, 1, { 0x00009928 } }, - { 0x0000fa2d, 1, { 0x00009db4 } }, - { 0x0000fa2e, 1, { 0x000090de } }, - { 0x0000fa2f, 1, { 0x000096b7 } }, - { 0x0000fa30, 1, { 0x00004fae } }, - { 0x0000fa31, 1, { 0x000050e7 } }, - { 0x0000fa32, 1, { 0x0000514d } }, - { 0x0000fa33, 1, { 0x000052c9 } }, - { 0x0000fa34, 1, { 0x000052e4 } }, - { 0x0000fa35, 1, { 0x00005351 } }, - { 0x0000fa36, 1, { 0x0000559d } }, - { 0x0000fa37, 1, { 0x00005606 } }, - { 0x0000fa38, 1, { 0x00005668 } }, - { 0x0000fa39, 1, { 0x00005840 } }, - { 0x0000fa3a, 1, { 0x000058a8 } }, - { 0x0000fa3b, 1, { 0x00005c64 } }, - { 0x0000fa3c, 1, { 0x00005c6e } }, - { 0x0000fa3d, 1, { 0x00006094 } }, - { 0x0000fa3e, 1, { 0x00006168 } }, - { 0x0000fa3f, 1, { 0x0000618e } }, - { 0x0000fa40, 1, { 0x000061f2 } }, - { 0x0000fa41, 1, { 0x0000654f } }, - { 0x0000fa42, 1, { 0x000065e2 } }, - { 0x0000fa43, 1, { 0x00006691 } }, - { 0x0000fa44, 1, { 0x00006885 } }, - { 0x0000fa45, 1, { 0x00006d77 } }, - { 0x0000fa46, 1, { 0x00006e1a } }, - { 0x0000fa47, 1, { 0x00006f22 } }, - { 0x0000fa48, 1, { 0x0000716e } }, - { 0x0000fa49, 1, { 0x0000722b } }, - { 0x0000fa4a, 1, { 0x00007422 } }, - { 0x0000fa4b, 1, { 0x00007891 } }, - { 0x0000fa4c, 1, { 0x0000793e } }, - { 0x0000fa4d, 1, { 0x00007949 } }, - { 0x0000fa4e, 1, { 0x00007948 } }, - { 0x0000fa4f, 1, { 0x00007950 } }, - { 0x0000fa50, 1, { 0x00007956 } }, - { 0x0000fa51, 1, { 0x0000795d } }, - { 0x0000fa52, 1, { 0x0000798d } }, - { 0x0000fa53, 1, { 0x0000798e } }, - { 0x0000fa54, 1, { 0x00007a40 } }, - { 0x0000fa55, 1, { 0x00007a81 } }, - { 0x0000fa56, 1, { 0x00007bc0 } }, - { 0x0000fa57, 1, { 0x00007df4 } }, - { 0x0000fa58, 1, { 0x00007e09 } }, - { 0x0000fa59, 1, { 0x00007e41 } }, - { 0x0000fa5a, 1, { 0x00007f72 } }, - { 0x0000fa5b, 1, { 0x00008005 } }, - { 0x0000fa5c, 1, { 0x000081ed } }, - { 0x0000fa5d, 1, { 0x00008279 } }, - { 0x0000fa5e, 1, { 0x00008279 } }, - { 0x0000fa5f, 1, { 0x00008457 } }, - { 0x0000fa60, 1, { 0x00008910 } }, - { 0x0000fa61, 1, { 0x00008996 } }, - { 0x0000fa62, 1, { 0x00008b01 } }, - { 0x0000fa63, 1, { 0x00008b39 } }, - { 0x0000fa64, 1, { 0x00008cd3 } }, - { 0x0000fa65, 1, { 0x00008d08 } }, - { 0x0000fa66, 1, { 0x00008fb6 } }, - { 0x0000fa67, 1, { 0x00009038 } }, - { 0x0000fa68, 1, { 0x000096e3 } }, - { 0x0000fa69, 1, { 0x000097ff } }, - { 0x0000fa6a, 1, { 0x0000983b } }, - { 0x0000fa6b, 1, { 0x00006075 } }, - { 0x0000fa6c, 1, { 0x000242ee } }, - { 0x0000fa6d, 1, { 0x00008218 } }, - { 0x0000fa70, 1, { 0x00004e26 } }, - { 0x0000fa71, 1, { 0x000051b5 } }, - { 0x0000fa72, 1, { 0x00005168 } }, - { 0x0000fa73, 1, { 0x00004f80 } }, - { 0x0000fa74, 1, { 0x00005145 } }, - { 0x0000fa75, 1, { 0x00005180 } }, - { 0x0000fa76, 1, { 0x000052c7 } }, - { 0x0000fa77, 1, { 0x000052fa } }, - { 0x0000fa78, 1, { 0x0000559d } }, - { 0x0000fa79, 1, { 0x00005555 } }, - { 0x0000fa7a, 1, { 0x00005599 } }, - { 0x0000fa7b, 1, { 0x000055e2 } }, - { 0x0000fa7c, 1, { 0x0000585a } }, - { 0x0000fa7d, 1, { 0x000058b3 } }, - { 0x0000fa7e, 1, { 0x00005944 } }, - { 0x0000fa7f, 1, { 0x00005954 } }, - { 0x0000fa80, 1, { 0x00005a62 } }, - { 0x0000fa81, 1, { 0x00005b28 } }, - { 0x0000fa82, 1, { 0x00005ed2 } }, - { 0x0000fa83, 1, { 0x00005ed9 } }, - { 0x0000fa84, 1, { 0x00005f69 } }, - { 0x0000fa85, 1, { 0x00005fad } }, - { 0x0000fa86, 1, { 0x000060d8 } }, - { 0x0000fa87, 1, { 0x0000614e } }, - { 0x0000fa88, 1, { 0x00006108 } }, - { 0x0000fa89, 1, { 0x0000618e } }, - { 0x0000fa8a, 1, { 0x00006160 } }, - { 0x0000fa8b, 1, { 0x000061f2 } }, - { 0x0000fa8c, 1, { 0x00006234 } }, - { 0x0000fa8d, 1, { 0x000063c4 } }, - { 0x0000fa8e, 1, { 0x0000641c } }, - { 0x0000fa8f, 1, { 0x00006452 } }, - { 0x0000fa90, 1, { 0x00006556 } }, - { 0x0000fa91, 1, { 0x00006674 } }, - { 0x0000fa92, 1, { 0x00006717 } }, - { 0x0000fa93, 1, { 0x0000671b } }, - { 0x0000fa94, 1, { 0x00006756 } }, - { 0x0000fa95, 1, { 0x00006b79 } }, - { 0x0000fa96, 1, { 0x00006bba } }, - { 0x0000fa97, 1, { 0x00006d41 } }, - { 0x0000fa98, 1, { 0x00006edb } }, - { 0x0000fa99, 1, { 0x00006ecb } }, - { 0x0000fa9a, 1, { 0x00006f22 } }, - { 0x0000fa9b, 1, { 0x0000701e } }, - { 0x0000fa9c, 1, { 0x0000716e } }, - { 0x0000fa9d, 1, { 0x000077a7 } }, - { 0x0000fa9e, 1, { 0x00007235 } }, - { 0x0000fa9f, 1, { 0x000072af } }, - { 0x0000faa0, 1, { 0x0000732a } }, - { 0x0000faa1, 1, { 0x00007471 } }, - { 0x0000faa2, 1, { 0x00007506 } }, - { 0x0000faa3, 1, { 0x0000753b } }, - { 0x0000faa4, 1, { 0x0000761d } }, - { 0x0000faa5, 1, { 0x0000761f } }, - { 0x0000faa6, 1, { 0x000076ca } }, - { 0x0000faa7, 1, { 0x000076db } }, - { 0x0000faa8, 1, { 0x000076f4 } }, - { 0x0000faa9, 1, { 0x0000774a } }, - { 0x0000faaa, 1, { 0x00007740 } }, - { 0x0000faab, 1, { 0x000078cc } }, - { 0x0000faac, 1, { 0x00007ab1 } }, - { 0x0000faad, 1, { 0x00007bc0 } }, - { 0x0000faae, 1, { 0x00007c7b } }, - { 0x0000faaf, 1, { 0x00007d5b } }, - { 0x0000fab0, 1, { 0x00007df4 } }, - { 0x0000fab1, 1, { 0x00007f3e } }, - { 0x0000fab2, 1, { 0x00008005 } }, - { 0x0000fab3, 1, { 0x00008352 } }, - { 0x0000fab4, 1, { 0x000083ef } }, - { 0x0000fab5, 1, { 0x00008779 } }, - { 0x0000fab6, 1, { 0x00008941 } }, - { 0x0000fab7, 1, { 0x00008986 } }, - { 0x0000fab8, 1, { 0x00008996 } }, - { 0x0000fab9, 1, { 0x00008abf } }, - { 0x0000faba, 1, { 0x00008af8 } }, - { 0x0000fabb, 1, { 0x00008acb } }, - { 0x0000fabc, 1, { 0x00008b01 } }, - { 0x0000fabd, 1, { 0x00008afe } }, - { 0x0000fabe, 1, { 0x00008aed } }, - { 0x0000fabf, 1, { 0x00008b39 } }, - { 0x0000fac0, 1, { 0x00008b8a } }, - { 0x0000fac1, 1, { 0x00008d08 } }, - { 0x0000fac2, 1, { 0x00008f38 } }, - { 0x0000fac3, 1, { 0x00009072 } }, - { 0x0000fac4, 1, { 0x00009199 } }, - { 0x0000fac5, 1, { 0x00009276 } }, - { 0x0000fac6, 1, { 0x0000967c } }, - { 0x0000fac7, 1, { 0x000096e3 } }, - { 0x0000fac8, 1, { 0x00009756 } }, - { 0x0000fac9, 1, { 0x000097db } }, - { 0x0000faca, 1, { 0x000097ff } }, - { 0x0000facb, 1, { 0x0000980b } }, - { 0x0000facc, 1, { 0x0000983b } }, - { 0x0000facd, 1, { 0x00009b12 } }, - { 0x0000face, 1, { 0x00009f9c } }, - { 0x0000facf, 1, { 0x0002284a } }, - { 0x0000fad0, 1, { 0x00022844 } }, - { 0x0000fad1, 1, { 0x000233d5 } }, - { 0x0000fad2, 1, { 0x00003b9d } }, - { 0x0000fad3, 1, { 0x00004018 } }, - { 0x0000fad4, 1, { 0x00004039 } }, - { 0x0000fad5, 1, { 0x00025249 } }, - { 0x0000fad6, 1, { 0x00025cd0 } }, - { 0x0000fad7, 1, { 0x00027ed3 } }, - { 0x0000fad8, 1, { 0x00009f43 } }, - { 0x0000fad9, 1, { 0x00009f8e } }, + { 0x0000fa2a, 1, { 0x0000fa2a } }, + { 0x0000fa2b, 1, { 0x0000fa2b } }, + { 0x0000fa2c, 1, { 0x0000fa2c } }, + { 0x0000fa2d, 1, { 0x0000fa2d } }, + { 0x0000fa2e, 1, { 0x0000fa2e } }, + { 0x0000fa2f, 1, { 0x0000fa2f } }, + { 0x0000fa30, 1, { 0x0000fa30 } }, + { 0x0000fa31, 1, { 0x0000fa31 } }, + { 0x0000fa32, 1, { 0x0000fa32 } }, + { 0x0000fa33, 1, { 0x0000fa33 } }, + { 0x0000fa34, 1, { 0x0000fa34 } }, + { 0x0000fa35, 1, { 0x0000fa35 } }, + { 0x0000fa36, 1, { 0x0000fa36 } }, + { 0x0000fa37, 1, { 0x0000fa37 } }, + { 0x0000fa38, 1, { 0x0000fa38 } }, + { 0x0000fa39, 1, { 0x0000fa39 } }, + { 0x0000fa3a, 1, { 0x0000fa3a } }, + { 0x0000fa3b, 1, { 0x0000fa3b } }, + { 0x0000fa3c, 1, { 0x0000fa3c } }, + { 0x0000fa3d, 1, { 0x0000fa3d } }, + { 0x0000fa3e, 1, { 0x0000fa3e } }, + { 0x0000fa3f, 1, { 0x0000fa3f } }, + { 0x0000fa40, 1, { 0x0000fa40 } }, + { 0x0000fa41, 1, { 0x0000fa41 } }, + { 0x0000fa42, 1, { 0x0000fa42 } }, + { 0x0000fa43, 1, { 0x0000fa43 } }, + { 0x0000fa44, 1, { 0x0000fa44 } }, + { 0x0000fa45, 1, { 0x0000fa45 } }, + { 0x0000fa46, 1, { 0x0000fa46 } }, + { 0x0000fa47, 1, { 0x0000fa47 } }, + { 0x0000fa48, 1, { 0x0000fa48 } }, + { 0x0000fa49, 1, { 0x0000fa49 } }, + { 0x0000fa4a, 1, { 0x0000fa4a } }, + { 0x0000fa4b, 1, { 0x0000fa4b } }, + { 0x0000fa4c, 1, { 0x0000fa4c } }, + { 0x0000fa4d, 1, { 0x0000fa4d } }, + { 0x0000fa4e, 1, { 0x0000fa4e } }, + { 0x0000fa4f, 1, { 0x0000fa4f } }, + { 0x0000fa50, 1, { 0x0000fa50 } }, + { 0x0000fa51, 1, { 0x0000fa51 } }, + { 0x0000fa52, 1, { 0x0000fa52 } }, + { 0x0000fa53, 1, { 0x0000fa53 } }, + { 0x0000fa54, 1, { 0x0000fa54 } }, + { 0x0000fa55, 1, { 0x0000fa55 } }, + { 0x0000fa56, 1, { 0x0000fa56 } }, + { 0x0000fa57, 1, { 0x0000fa57 } }, + { 0x0000fa58, 1, { 0x0000fa58 } }, + { 0x0000fa59, 1, { 0x0000fa59 } }, + { 0x0000fa5a, 1, { 0x0000fa5a } }, + { 0x0000fa5b, 1, { 0x0000fa5b } }, + { 0x0000fa5c, 1, { 0x0000fa5c } }, + { 0x0000fa5d, 1, { 0x0000fa5d } }, + { 0x0000fa5e, 1, { 0x0000fa5e } }, + { 0x0000fa5f, 1, { 0x0000fa5f } }, + { 0x0000fa60, 1, { 0x0000fa60 } }, + { 0x0000fa61, 1, { 0x0000fa61 } }, + { 0x0000fa62, 1, { 0x0000fa62 } }, + { 0x0000fa63, 1, { 0x0000fa63 } }, + { 0x0000fa64, 1, { 0x0000fa64 } }, + { 0x0000fa65, 1, { 0x0000fa65 } }, + { 0x0000fa66, 1, { 0x0000fa66 } }, + { 0x0000fa67, 1, { 0x0000fa67 } }, + { 0x0000fa68, 1, { 0x0000fa68 } }, + { 0x0000fa69, 1, { 0x0000fa69 } }, + { 0x0000fa6a, 1, { 0x0000fa6a } }, + { 0x0000fa6b, 1, { 0x0000fa6b } }, + { 0x0000fa6c, 1, { 0x0000fa6c } }, + { 0x0000fa6d, 1, { 0x0000fa6d } }, + { 0x0000fa70, 1, { 0x0000fa70 } }, + { 0x0000fa71, 1, { 0x0000fa71 } }, + { 0x0000fa72, 1, { 0x0000fa72 } }, + { 0x0000fa73, 1, { 0x0000fa73 } }, + { 0x0000fa74, 1, { 0x0000fa74 } }, + { 0x0000fa75, 1, { 0x0000fa75 } }, + { 0x0000fa76, 1, { 0x0000fa76 } }, + { 0x0000fa77, 1, { 0x0000fa77 } }, + { 0x0000fa78, 1, { 0x0000fa78 } }, + { 0x0000fa79, 1, { 0x0000fa79 } }, + { 0x0000fa7a, 1, { 0x0000fa7a } }, + { 0x0000fa7b, 1, { 0x0000fa7b } }, + { 0x0000fa7c, 1, { 0x0000fa7c } }, + { 0x0000fa7d, 1, { 0x0000fa7d } }, + { 0x0000fa7e, 1, { 0x0000fa7e } }, + { 0x0000fa7f, 1, { 0x0000fa7f } }, + { 0x0000fa80, 1, { 0x0000fa80 } }, + { 0x0000fa81, 1, { 0x0000fa81 } }, + { 0x0000fa82, 1, { 0x0000fa82 } }, + { 0x0000fa83, 1, { 0x0000fa83 } }, + { 0x0000fa84, 1, { 0x0000fa84 } }, + { 0x0000fa85, 1, { 0x0000fa85 } }, + { 0x0000fa86, 1, { 0x0000fa86 } }, + { 0x0000fa87, 1, { 0x0000fa87 } }, + { 0x0000fa88, 1, { 0x0000fa88 } }, + { 0x0000fa89, 1, { 0x0000fa89 } }, + { 0x0000fa8a, 1, { 0x0000fa8a } }, + { 0x0000fa8b, 1, { 0x0000fa8b } }, + { 0x0000fa8c, 1, { 0x0000fa8c } }, + { 0x0000fa8d, 1, { 0x0000fa8d } }, + { 0x0000fa8e, 1, { 0x0000fa8e } }, + { 0x0000fa8f, 1, { 0x0000fa8f } }, + { 0x0000fa90, 1, { 0x0000fa90 } }, + { 0x0000fa91, 1, { 0x0000fa91 } }, + { 0x0000fa92, 1, { 0x0000fa92 } }, + { 0x0000fa93, 1, { 0x0000fa93 } }, + { 0x0000fa94, 1, { 0x0000fa94 } }, + { 0x0000fa95, 1, { 0x0000fa95 } }, + { 0x0000fa96, 1, { 0x0000fa96 } }, + { 0x0000fa97, 1, { 0x0000fa97 } }, + { 0x0000fa98, 1, { 0x0000fa98 } }, + { 0x0000fa99, 1, { 0x0000fa99 } }, + { 0x0000fa9a, 1, { 0x0000fa9a } }, + { 0x0000fa9b, 1, { 0x0000fa9b } }, + { 0x0000fa9c, 1, { 0x0000fa9c } }, + { 0x0000fa9d, 1, { 0x0000fa9d } }, + { 0x0000fa9e, 1, { 0x0000fa9e } }, + { 0x0000fa9f, 1, { 0x0000fa9f } }, + { 0x0000faa0, 1, { 0x0000faa0 } }, + { 0x0000faa1, 1, { 0x0000faa1 } }, + { 0x0000faa2, 1, { 0x0000faa2 } }, + { 0x0000faa3, 1, { 0x0000faa3 } }, + { 0x0000faa4, 1, { 0x0000faa4 } }, + { 0x0000faa5, 1, { 0x0000faa5 } }, + { 0x0000faa6, 1, { 0x0000faa6 } }, + { 0x0000faa7, 1, { 0x0000faa7 } }, + { 0x0000faa8, 1, { 0x0000faa8 } }, + { 0x0000faa9, 1, { 0x0000faa9 } }, + { 0x0000faaa, 1, { 0x0000faaa } }, + { 0x0000faab, 1, { 0x0000faab } }, + { 0x0000faac, 1, { 0x0000faac } }, + { 0x0000faad, 1, { 0x0000faad } }, + { 0x0000faae, 1, { 0x0000faae } }, + { 0x0000faaf, 1, { 0x0000faaf } }, + { 0x0000fab0, 1, { 0x0000fab0 } }, + { 0x0000fab1, 1, { 0x0000fab1 } }, + { 0x0000fab2, 1, { 0x0000fab2 } }, + { 0x0000fab3, 1, { 0x0000fab3 } }, + { 0x0000fab4, 1, { 0x0000fab4 } }, + { 0x0000fab5, 1, { 0x0000fab5 } }, + { 0x0000fab6, 1, { 0x0000fab6 } }, + { 0x0000fab7, 1, { 0x0000fab7 } }, + { 0x0000fab8, 1, { 0x0000fab8 } }, + { 0x0000fab9, 1, { 0x0000fab9 } }, + { 0x0000faba, 1, { 0x0000faba } }, + { 0x0000fabb, 1, { 0x0000fabb } }, + { 0x0000fabc, 1, { 0x0000fabc } }, + { 0x0000fabd, 1, { 0x0000fabd } }, + { 0x0000fabe, 1, { 0x0000fabe } }, + { 0x0000fabf, 1, { 0x0000fabf } }, + { 0x0000fac0, 1, { 0x0000fac0 } }, + { 0x0000fac1, 1, { 0x0000fac1 } }, + { 0x0000fac2, 1, { 0x0000fac2 } }, + { 0x0000fac3, 1, { 0x0000fac3 } }, + { 0x0000fac4, 1, { 0x0000fac4 } }, + { 0x0000fac5, 1, { 0x0000fac5 } }, + { 0x0000fac6, 1, { 0x0000fac6 } }, + { 0x0000fac7, 1, { 0x0000fac7 } }, + { 0x0000fac8, 1, { 0x0000fac8 } }, + { 0x0000fac9, 1, { 0x0000fac9 } }, + { 0x0000faca, 1, { 0x0000faca } }, + { 0x0000facb, 1, { 0x0000facb } }, + { 0x0000facc, 1, { 0x0000facc } }, + { 0x0000facd, 1, { 0x0000facd } }, + { 0x0000face, 1, { 0x0000face } }, + { 0x0000facf, 1, { 0x0000facf } }, + { 0x0000fad0, 1, { 0x0000fad0 } }, + { 0x0000fad1, 1, { 0x0000fad1 } }, + { 0x0000fad2, 1, { 0x0000fad2 } }, + { 0x0000fad3, 1, { 0x0000fad3 } }, + { 0x0000fad4, 1, { 0x0000fad4 } }, + { 0x0000fad5, 1, { 0x0000fad5 } }, + { 0x0000fad6, 1, { 0x0000fad6 } }, + { 0x0000fad7, 1, { 0x0000fad7 } }, + { 0x0000fad8, 1, { 0x0000fad8 } }, + { 0x0000fad9, 1, { 0x0000fad9 } }, { 0x0000fb00, 1, { 0x0000fb00 } }, { 0x0000fb01, 1, { 0x0000fb01 } }, { 0x0000fb02, 1, { 0x0000fb02 } }, @@ -18990,9 +18990,9 @@ { 0x00011097, 1, { 0x00011097 } }, { 0x00011098, 1, { 0x00011098 } }, { 0x00011099, 1, { 0x00011099 } }, - { 0x0001109a, 2, { 0x00011099, 0x000110ba } }, + { 0x0001109a, 1, { 0x0001109a } }, { 0x0001109b, 1, { 0x0001109b } }, - { 0x0001109c, 2, { 0x0001109b, 0x000110ba } }, + { 0x0001109c, 1, { 0x0001109c } }, { 0x0001109d, 1, { 0x0001109d } }, { 0x0001109e, 1, { 0x0001109e } }, { 0x0001109f, 1, { 0x0001109f } }, @@ -19007,7 +19007,7 @@ { 0x000110a8, 1, { 0x000110a8 } }, { 0x000110a9, 1, { 0x000110a9 } }, { 0x000110aa, 1, { 0x000110aa } }, - { 0x000110ab, 2, { 0x000110a5, 0x000110ba } }, + { 0x000110ab, 1, { 0x000110ab } }, { 0x000110ac, 1, { 0x000110ac } }, { 0x000110ad, 1, { 0x000110ad } }, { 0x000110ae, 1, { 0x000110ae } }, @@ -19111,8 +19111,8 @@ { 0x0001112b, 1, { 0x0001112b } }, { 0x0001112c, 1, { 0x0001112c } }, { 0x0001112d, 1, { 0x0001112d } }, - { 0x0001112e, 2, { 0x00011131, 0x00011127 } }, - { 0x0001112f, 2, { 0x00011132, 0x00011127 } }, + { 0x0001112e, 1, { 0x0001112e } }, + { 0x0001112f, 1, { 0x0001112f } }, { 0x00011130, 1, { 0x00011130 } }, { 0x00011131, 1, { 0x00011131 } }, { 0x00011132, 1, { 0x00011132 } }, @@ -19515,8 +19515,8 @@ { 0x00011344, 1, { 0x00011344 } }, { 0x00011347, 1, { 0x00011347 } }, { 0x00011348, 1, { 0x00011348 } }, - { 0x0001134b, 2, { 0x00011347, 0x0001133e } }, - { 0x0001134c, 2, { 0x00011347, 0x00011357 } }, + { 0x0001134b, 1, { 0x0001134b } }, + { 0x0001134c, 1, { 0x0001134c } }, { 0x0001134d, 1, { 0x0001134d } }, { 0x00011350, 1, { 0x00011350 } }, { 0x00011357, 1, { 0x00011357 } }, @@ -19690,10 +19690,10 @@ { 0x000114b8, 1, { 0x000114b8 } }, { 0x000114b9, 1, { 0x000114b9 } }, { 0x000114ba, 1, { 0x000114ba } }, - { 0x000114bb, 2, { 0x000114b9, 0x000114ba } }, - { 0x000114bc, 2, { 0x000114b9, 0x000114b0 } }, + { 0x000114bb, 1, { 0x000114bb } }, + { 0x000114bc, 1, { 0x000114bc } }, { 0x000114bd, 1, { 0x000114bd } }, - { 0x000114be, 2, { 0x000114b9, 0x000114bd } }, + { 0x000114be, 1, { 0x000114be } }, { 0x000114bf, 1, { 0x000114bf } }, { 0x000114c0, 1, { 0x000114c0 } }, { 0x000114c1, 1, { 0x000114c1 } }, @@ -19769,8 +19769,8 @@ { 0x000115b5, 1, { 0x000115b5 } }, { 0x000115b8, 1, { 0x000115b8 } }, { 0x000115b9, 1, { 0x000115b9 } }, - { 0x000115ba, 2, { 0x000115b8, 0x000115af } }, - { 0x000115bb, 2, { 0x000115b9, 0x000115af } }, + { 0x000115ba, 1, { 0x000115ba } }, + { 0x000115bb, 1, { 0x000115bb } }, { 0x000115bc, 1, { 0x000115bc } }, { 0x000115bd, 1, { 0x000115bd } }, { 0x000115be, 1, { 0x000115be } }, @@ -25367,13 +25367,13 @@ { 0x0001d15b, 1, { 0x0001d15b } }, { 0x0001d15c, 1, { 0x0001d15c } }, { 0x0001d15d, 1, { 0x0001d15d } }, - { 0x0001d15e, 2, { 0x0001d157, 0x0001d165 } }, - { 0x0001d15f, 2, { 0x0001d158, 0x0001d165 } }, - { 0x0001d160, 3, { 0x0001d158, 0x0001d165, 0x0001d16e } }, - { 0x0001d161, 3, { 0x0001d158, 0x0001d165, 0x0001d16f } }, - { 0x0001d162, 3, { 0x0001d158, 0x0001d165, 0x0001d170 } }, - { 0x0001d163, 3, { 0x0001d158, 0x0001d165, 0x0001d171 } }, - { 0x0001d164, 3, { 0x0001d158, 0x0001d165, 0x0001d172 } }, + { 0x0001d15e, 1, { 0x0001d15e } }, + { 0x0001d15f, 1, { 0x0001d15f } }, + { 0x0001d160, 1, { 0x0001d160 } }, + { 0x0001d161, 1, { 0x0001d161 } }, + { 0x0001d162, 1, { 0x0001d162 } }, + { 0x0001d163, 1, { 0x0001d163 } }, + { 0x0001d164, 1, { 0x0001d164 } }, { 0x0001d165, 1, { 0x0001d165 } }, { 0x0001d166, 1, { 0x0001d166 } }, { 0x0001d167, 1, { 0x0001d167 } }, @@ -25460,12 +25460,12 @@ { 0x0001d1b8, 1, { 0x0001d1b8 } }, { 0x0001d1b9, 1, { 0x0001d1b9 } }, { 0x0001d1ba, 1, { 0x0001d1ba } }, - { 0x0001d1bb, 2, { 0x0001d1b9, 0x0001d165 } }, - { 0x0001d1bc, 2, { 0x0001d1ba, 0x0001d165 } }, - { 0x0001d1bd, 3, { 0x0001d1b9, 0x0001d165, 0x0001d16e } }, - { 0x0001d1be, 3, { 0x0001d1ba, 0x0001d165, 0x0001d16e } }, - { 0x0001d1bf, 3, { 0x0001d1b9, 0x0001d165, 0x0001d16f } }, - { 0x0001d1c0, 3, { 0x0001d1ba, 0x0001d165, 0x0001d16f } }, + { 0x0001d1bb, 1, { 0x0001d1bb } }, + { 0x0001d1bc, 1, { 0x0001d1bc } }, + { 0x0001d1bd, 1, { 0x0001d1bd } }, + { 0x0001d1be, 1, { 0x0001d1be } }, + { 0x0001d1bf, 1, { 0x0001d1bf } }, + { 0x0001d1c0, 1, { 0x0001d1c0 } }, { 0x0001d1c1, 1, { 0x0001d1c1 } }, { 0x0001d1c2, 1, { 0x0001d1c2 } }, { 0x0001d1c3, 1, { 0x0001d1c3 } }, @@ -29743,548 +29743,548 @@ { 0x0002b81d, 1, { 0x0002b81d } }, { 0x0002b820, 1, { 0x0002b820 } }, { 0x0002cea1, 1, { 0x0002cea1 } }, - { 0x0002f800, 1, { 0x00004e3d } }, - { 0x0002f801, 1, { 0x00004e38 } }, - { 0x0002f802, 1, { 0x00004e41 } }, - { 0x0002f803, 1, { 0x00020122 } }, - { 0x0002f804, 1, { 0x00004f60 } }, - { 0x0002f805, 1, { 0x00004fae } }, - { 0x0002f806, 1, { 0x00004fbb } }, - { 0x0002f807, 1, { 0x00005002 } }, - { 0x0002f808, 1, { 0x0000507a } }, - { 0x0002f809, 1, { 0x00005099 } }, - { 0x0002f80a, 1, { 0x000050e7 } }, - { 0x0002f80b, 1, { 0x000050cf } }, - { 0x0002f80c, 1, { 0x0000349e } }, - { 0x0002f80d, 1, { 0x0002063a } }, - { 0x0002f80e, 1, { 0x0000514d } }, - { 0x0002f80f, 1, { 0x00005154 } }, - { 0x0002f810, 1, { 0x00005164 } }, - { 0x0002f811, 1, { 0x00005177 } }, - { 0x0002f812, 1, { 0x0002051c } }, - { 0x0002f813, 1, { 0x000034b9 } }, - { 0x0002f814, 1, { 0x00005167 } }, - { 0x0002f815, 1, { 0x0000518d } }, - { 0x0002f816, 1, { 0x0002054b } }, - { 0x0002f817, 1, { 0x00005197 } }, - { 0x0002f818, 1, { 0x000051a4 } }, - { 0x0002f819, 1, { 0x00004ecc } }, - { 0x0002f81a, 1, { 0x000051ac } }, - { 0x0002f81b, 1, { 0x000051b5 } }, - { 0x0002f81c, 1, { 0x000291df } }, - { 0x0002f81d, 1, { 0x000051f5 } }, - { 0x0002f81e, 1, { 0x00005203 } }, - { 0x0002f81f, 1, { 0x000034df } }, - { 0x0002f820, 1, { 0x0000523b } }, - { 0x0002f821, 1, { 0x00005246 } }, - { 0x0002f822, 1, { 0x00005272 } }, - { 0x0002f823, 1, { 0x00005277 } }, - { 0x0002f824, 1, { 0x00003515 } }, - { 0x0002f825, 1, { 0x000052c7 } }, - { 0x0002f826, 1, { 0x000052c9 } }, - { 0x0002f827, 1, { 0x000052e4 } }, - { 0x0002f828, 1, { 0x000052fa } }, - { 0x0002f829, 1, { 0x00005305 } }, - { 0x0002f82a, 1, { 0x00005306 } }, - { 0x0002f82b, 1, { 0x00005317 } }, - { 0x0002f82c, 1, { 0x00005349 } }, - { 0x0002f82d, 1, { 0x00005351 } }, - { 0x0002f82e, 1, { 0x0000535a } }, - { 0x0002f82f, 1, { 0x00005373 } }, - { 0x0002f830, 1, { 0x0000537d } }, - { 0x0002f831, 1, { 0x0000537f } }, - { 0x0002f832, 1, { 0x0000537f } }, - { 0x0002f833, 1, { 0x0000537f } }, - { 0x0002f834, 1, { 0x00020a2c } }, - { 0x0002f835, 1, { 0x00007070 } }, - { 0x0002f836, 1, { 0x000053ca } }, - { 0x0002f837, 1, { 0x000053df } }, - { 0x0002f838, 1, { 0x00020b63 } }, - { 0x0002f839, 1, { 0x000053eb } }, - { 0x0002f83a, 1, { 0x000053f1 } }, - { 0x0002f83b, 1, { 0x00005406 } }, - { 0x0002f83c, 1, { 0x0000549e } }, - { 0x0002f83d, 1, { 0x00005438 } }, - { 0x0002f83e, 1, { 0x00005448 } }, - { 0x0002f83f, 1, { 0x00005468 } }, - { 0x0002f840, 1, { 0x000054a2 } }, - { 0x0002f841, 1, { 0x000054f6 } }, - { 0x0002f842, 1, { 0x00005510 } }, - { 0x0002f843, 1, { 0x00005553 } }, - { 0x0002f844, 1, { 0x00005563 } }, - { 0x0002f845, 1, { 0x00005584 } }, - { 0x0002f846, 1, { 0x00005584 } }, - { 0x0002f847, 1, { 0x00005599 } }, - { 0x0002f848, 1, { 0x000055ab } }, - { 0x0002f849, 1, { 0x000055b3 } }, - { 0x0002f84a, 1, { 0x000055c2 } }, - { 0x0002f84b, 1, { 0x00005716 } }, - { 0x0002f84c, 1, { 0x00005606 } }, - { 0x0002f84d, 1, { 0x00005717 } }, - { 0x0002f84e, 1, { 0x00005651 } }, - { 0x0002f84f, 1, { 0x00005674 } }, - { 0x0002f850, 1, { 0x00005207 } }, - { 0x0002f851, 1, { 0x000058ee } }, - { 0x0002f852, 1, { 0x000057ce } }, - { 0x0002f853, 1, { 0x000057f4 } }, - { 0x0002f854, 1, { 0x0000580d } }, - { 0x0002f855, 1, { 0x0000578b } }, - { 0x0002f856, 1, { 0x00005832 } }, - { 0x0002f857, 1, { 0x00005831 } }, - { 0x0002f858, 1, { 0x000058ac } }, - { 0x0002f859, 1, { 0x000214e4 } }, - { 0x0002f85a, 1, { 0x000058f2 } }, - { 0x0002f85b, 1, { 0x000058f7 } }, - { 0x0002f85c, 1, { 0x00005906 } }, - { 0x0002f85d, 1, { 0x0000591a } }, - { 0x0002f85e, 1, { 0x00005922 } }, - { 0x0002f85f, 1, { 0x00005962 } }, - { 0x0002f860, 1, { 0x000216a8 } }, - { 0x0002f861, 1, { 0x000216ea } }, - { 0x0002f862, 1, { 0x000059ec } }, - { 0x0002f863, 1, { 0x00005a1b } }, - { 0x0002f864, 1, { 0x00005a27 } }, - { 0x0002f865, 1, { 0x000059d8 } }, - { 0x0002f866, 1, { 0x00005a66 } }, - { 0x0002f867, 1, { 0x000036ee } }, - { 0x0002f868, 1, { 0x000036fc } }, - { 0x0002f869, 1, { 0x00005b08 } }, - { 0x0002f86a, 1, { 0x00005b3e } }, - { 0x0002f86b, 1, { 0x00005b3e } }, - { 0x0002f86c, 1, { 0x000219c8 } }, - { 0x0002f86d, 1, { 0x00005bc3 } }, - { 0x0002f86e, 1, { 0x00005bd8 } }, - { 0x0002f86f, 1, { 0x00005be7 } }, - { 0x0002f870, 1, { 0x00005bf3 } }, - { 0x0002f871, 1, { 0x00021b18 } }, - { 0x0002f872, 1, { 0x00005bff } }, - { 0x0002f873, 1, { 0x00005c06 } }, - { 0x0002f874, 1, { 0x00005f53 } }, - { 0x0002f875, 1, { 0x00005c22 } }, - { 0x0002f876, 1, { 0x00003781 } }, - { 0x0002f877, 1, { 0x00005c60 } }, - { 0x0002f878, 1, { 0x00005c6e } }, - { 0x0002f879, 1, { 0x00005cc0 } }, - { 0x0002f87a, 1, { 0x00005c8d } }, - { 0x0002f87b, 1, { 0x00021de4 } }, - { 0x0002f87c, 1, { 0x00005d43 } }, - { 0x0002f87d, 1, { 0x00021de6 } }, - { 0x0002f87e, 1, { 0x00005d6e } }, - { 0x0002f87f, 1, { 0x00005d6b } }, - { 0x0002f880, 1, { 0x00005d7c } }, - { 0x0002f881, 1, { 0x00005de1 } }, - { 0x0002f882, 1, { 0x00005de2 } }, - { 0x0002f883, 1, { 0x0000382f } }, - { 0x0002f884, 1, { 0x00005dfd } }, - { 0x0002f885, 1, { 0x00005e28 } }, - { 0x0002f886, 1, { 0x00005e3d } }, - { 0x0002f887, 1, { 0x00005e69 } }, - { 0x0002f888, 1, { 0x00003862 } }, - { 0x0002f889, 1, { 0x00022183 } }, - { 0x0002f88a, 1, { 0x0000387c } }, - { 0x0002f88b, 1, { 0x00005eb0 } }, - { 0x0002f88c, 1, { 0x00005eb3 } }, - { 0x0002f88d, 1, { 0x00005eb6 } }, - { 0x0002f88e, 1, { 0x00005eca } }, - { 0x0002f88f, 1, { 0x0002a392 } }, - { 0x0002f890, 1, { 0x00005efe } }, - { 0x0002f891, 1, { 0x00022331 } }, - { 0x0002f892, 1, { 0x00022331 } }, - { 0x0002f893, 1, { 0x00008201 } }, - { 0x0002f894, 1, { 0x00005f22 } }, - { 0x0002f895, 1, { 0x00005f22 } }, - { 0x0002f896, 1, { 0x000038c7 } }, - { 0x0002f897, 1, { 0x000232b8 } }, - { 0x0002f898, 1, { 0x000261da } }, - { 0x0002f899, 1, { 0x00005f62 } }, - { 0x0002f89a, 1, { 0x00005f6b } }, - { 0x0002f89b, 1, { 0x000038e3 } }, - { 0x0002f89c, 1, { 0x00005f9a } }, - { 0x0002f89d, 1, { 0x00005fcd } }, - { 0x0002f89e, 1, { 0x00005fd7 } }, - { 0x0002f89f, 1, { 0x00005ff9 } }, - { 0x0002f8a0, 1, { 0x00006081 } }, - { 0x0002f8a1, 1, { 0x0000393a } }, - { 0x0002f8a2, 1, { 0x0000391c } }, - { 0x0002f8a3, 1, { 0x00006094 } }, - { 0x0002f8a4, 1, { 0x000226d4 } }, - { 0x0002f8a5, 1, { 0x000060c7 } }, - { 0x0002f8a6, 1, { 0x00006148 } }, - { 0x0002f8a7, 1, { 0x0000614c } }, - { 0x0002f8a8, 1, { 0x0000614e } }, - { 0x0002f8a9, 1, { 0x0000614c } }, - { 0x0002f8aa, 1, { 0x0000617a } }, - { 0x0002f8ab, 1, { 0x0000618e } }, - { 0x0002f8ac, 1, { 0x000061b2 } }, - { 0x0002f8ad, 1, { 0x000061a4 } }, - { 0x0002f8ae, 1, { 0x000061af } }, - { 0x0002f8af, 1, { 0x000061de } }, - { 0x0002f8b0, 1, { 0x000061f2 } }, - { 0x0002f8b1, 1, { 0x000061f6 } }, - { 0x0002f8b2, 1, { 0x00006210 } }, - { 0x0002f8b3, 1, { 0x0000621b } }, - { 0x0002f8b4, 1, { 0x0000625d } }, - { 0x0002f8b5, 1, { 0x000062b1 } }, - { 0x0002f8b6, 1, { 0x000062d4 } }, - { 0x0002f8b7, 1, { 0x00006350 } }, - { 0x0002f8b8, 1, { 0x00022b0c } }, - { 0x0002f8b9, 1, { 0x0000633d } }, - { 0x0002f8ba, 1, { 0x000062fc } }, - { 0x0002f8bb, 1, { 0x00006368 } }, - { 0x0002f8bc, 1, { 0x00006383 } }, - { 0x0002f8bd, 1, { 0x000063e4 } }, - { 0x0002f8be, 1, { 0x00022bf1 } }, - { 0x0002f8bf, 1, { 0x00006422 } }, - { 0x0002f8c0, 1, { 0x000063c5 } }, - { 0x0002f8c1, 1, { 0x000063a9 } }, - { 0x0002f8c2, 1, { 0x00003a2e } }, - { 0x0002f8c3, 1, { 0x00006469 } }, - { 0x0002f8c4, 1, { 0x0000647e } }, - { 0x0002f8c5, 1, { 0x0000649d } }, - { 0x0002f8c6, 1, { 0x00006477 } }, - { 0x0002f8c7, 1, { 0x00003a6c } }, - { 0x0002f8c8, 1, { 0x0000654f } }, - { 0x0002f8c9, 1, { 0x0000656c } }, - { 0x0002f8ca, 1, { 0x0002300a } }, - { 0x0002f8cb, 1, { 0x000065e3 } }, - { 0x0002f8cc, 1, { 0x000066f8 } }, - { 0x0002f8cd, 1, { 0x00006649 } }, - { 0x0002f8ce, 1, { 0x00003b19 } }, - { 0x0002f8cf, 1, { 0x00006691 } }, - { 0x0002f8d0, 1, { 0x00003b08 } }, - { 0x0002f8d1, 1, { 0x00003ae4 } }, - { 0x0002f8d2, 1, { 0x00005192 } }, - { 0x0002f8d3, 1, { 0x00005195 } }, - { 0x0002f8d4, 1, { 0x00006700 } }, - { 0x0002f8d5, 1, { 0x0000669c } }, - { 0x0002f8d6, 1, { 0x000080ad } }, - { 0x0002f8d7, 1, { 0x000043d9 } }, - { 0x0002f8d8, 1, { 0x00006717 } }, - { 0x0002f8d9, 1, { 0x0000671b } }, - { 0x0002f8da, 1, { 0x00006721 } }, - { 0x0002f8db, 1, { 0x0000675e } }, - { 0x0002f8dc, 1, { 0x00006753 } }, - { 0x0002f8dd, 1, { 0x000233c3 } }, - { 0x0002f8de, 1, { 0x00003b49 } }, - { 0x0002f8df, 1, { 0x000067fa } }, - { 0x0002f8e0, 1, { 0x00006785 } }, - { 0x0002f8e1, 1, { 0x00006852 } }, - { 0x0002f8e2, 1, { 0x00006885 } }, - { 0x0002f8e3, 1, { 0x0002346d } }, - { 0x0002f8e4, 1, { 0x0000688e } }, - { 0x0002f8e5, 1, { 0x0000681f } }, - { 0x0002f8e6, 1, { 0x00006914 } }, - { 0x0002f8e7, 1, { 0x00003b9d } }, - { 0x0002f8e8, 1, { 0x00006942 } }, - { 0x0002f8e9, 1, { 0x000069a3 } }, - { 0x0002f8ea, 1, { 0x000069ea } }, - { 0x0002f8eb, 1, { 0x00006aa8 } }, - { 0x0002f8ec, 1, { 0x000236a3 } }, - { 0x0002f8ed, 1, { 0x00006adb } }, - { 0x0002f8ee, 1, { 0x00003c18 } }, - { 0x0002f8ef, 1, { 0x00006b21 } }, - { 0x0002f8f0, 1, { 0x000238a7 } }, - { 0x0002f8f1, 1, { 0x00006b54 } }, - { 0x0002f8f2, 1, { 0x00003c4e } }, - { 0x0002f8f3, 1, { 0x00006b72 } }, - { 0x0002f8f4, 1, { 0x00006b9f } }, - { 0x0002f8f5, 1, { 0x00006bba } }, - { 0x0002f8f6, 1, { 0x00006bbb } }, - { 0x0002f8f7, 1, { 0x00023a8d } }, - { 0x0002f8f8, 1, { 0x00021d0b } }, - { 0x0002f8f9, 1, { 0x00023afa } }, - { 0x0002f8fa, 1, { 0x00006c4e } }, - { 0x0002f8fb, 1, { 0x00023cbc } }, - { 0x0002f8fc, 1, { 0x00006cbf } }, - { 0x0002f8fd, 1, { 0x00006ccd } }, - { 0x0002f8fe, 1, { 0x00006c67 } }, - { 0x0002f8ff, 1, { 0x00006d16 } }, - { 0x0002f900, 1, { 0x00006d3e } }, - { 0x0002f901, 1, { 0x00006d77 } }, - { 0x0002f902, 1, { 0x00006d41 } }, - { 0x0002f903, 1, { 0x00006d69 } }, - { 0x0002f904, 1, { 0x00006d78 } }, - { 0x0002f905, 1, { 0x00006d85 } }, - { 0x0002f906, 1, { 0x00023d1e } }, - { 0x0002f907, 1, { 0x00006d34 } }, - { 0x0002f908, 1, { 0x00006e2f } }, - { 0x0002f909, 1, { 0x00006e6e } }, - { 0x0002f90a, 1, { 0x00003d33 } }, - { 0x0002f90b, 1, { 0x00006ecb } }, - { 0x0002f90c, 1, { 0x00006ec7 } }, - { 0x0002f90d, 1, { 0x00023ed1 } }, - { 0x0002f90e, 1, { 0x00006df9 } }, - { 0x0002f90f, 1, { 0x00006f6e } }, - { 0x0002f910, 1, { 0x00023f5e } }, - { 0x0002f911, 1, { 0x00023f8e } }, - { 0x0002f912, 1, { 0x00006fc6 } }, - { 0x0002f913, 1, { 0x00007039 } }, - { 0x0002f914, 1, { 0x0000701e } }, - { 0x0002f915, 1, { 0x0000701b } }, - { 0x0002f916, 1, { 0x00003d96 } }, - { 0x0002f917, 1, { 0x0000704a } }, - { 0x0002f918, 1, { 0x0000707d } }, - { 0x0002f919, 1, { 0x00007077 } }, - { 0x0002f91a, 1, { 0x000070ad } }, - { 0x0002f91b, 1, { 0x00020525 } }, - { 0x0002f91c, 1, { 0x00007145 } }, - { 0x0002f91d, 1, { 0x00024263 } }, - { 0x0002f91e, 1, { 0x0000719c } }, - { 0x0002f91f, 1, { 0x000243ab } }, - { 0x0002f920, 1, { 0x00007228 } }, - { 0x0002f921, 1, { 0x00007235 } }, - { 0x0002f922, 1, { 0x00007250 } }, - { 0x0002f923, 1, { 0x00024608 } }, - { 0x0002f924, 1, { 0x00007280 } }, - { 0x0002f925, 1, { 0x00007295 } }, - { 0x0002f926, 1, { 0x00024735 } }, - { 0x0002f927, 1, { 0x00024814 } }, - { 0x0002f928, 1, { 0x0000737a } }, - { 0x0002f929, 1, { 0x0000738b } }, - { 0x0002f92a, 1, { 0x00003eac } }, - { 0x0002f92b, 1, { 0x000073a5 } }, - { 0x0002f92c, 1, { 0x00003eb8 } }, - { 0x0002f92d, 1, { 0x00003eb8 } }, - { 0x0002f92e, 1, { 0x00007447 } }, - { 0x0002f92f, 1, { 0x0000745c } }, - { 0x0002f930, 1, { 0x00007471 } }, - { 0x0002f931, 1, { 0x00007485 } }, - { 0x0002f932, 1, { 0x000074ca } }, - { 0x0002f933, 1, { 0x00003f1b } }, - { 0x0002f934, 1, { 0x00007524 } }, - { 0x0002f935, 1, { 0x00024c36 } }, - { 0x0002f936, 1, { 0x0000753e } }, - { 0x0002f937, 1, { 0x00024c92 } }, - { 0x0002f938, 1, { 0x00007570 } }, - { 0x0002f939, 1, { 0x0002219f } }, - { 0x0002f93a, 1, { 0x00007610 } }, - { 0x0002f93b, 1, { 0x00024fa1 } }, - { 0x0002f93c, 1, { 0x00024fb8 } }, - { 0x0002f93d, 1, { 0x00025044 } }, - { 0x0002f93e, 1, { 0x00003ffc } }, - { 0x0002f93f, 1, { 0x00004008 } }, - { 0x0002f940, 1, { 0x000076f4 } }, - { 0x0002f941, 1, { 0x000250f3 } }, - { 0x0002f942, 1, { 0x000250f2 } }, - { 0x0002f943, 1, { 0x00025119 } }, - { 0x0002f944, 1, { 0x00025133 } }, - { 0x0002f945, 1, { 0x0000771e } }, - { 0x0002f946, 1, { 0x0000771f } }, - { 0x0002f947, 1, { 0x0000771f } }, - { 0x0002f948, 1, { 0x0000774a } }, - { 0x0002f949, 1, { 0x00004039 } }, - { 0x0002f94a, 1, { 0x0000778b } }, - { 0x0002f94b, 1, { 0x00004046 } }, - { 0x0002f94c, 1, { 0x00004096 } }, - { 0x0002f94d, 1, { 0x0002541d } }, - { 0x0002f94e, 1, { 0x0000784e } }, - { 0x0002f94f, 1, { 0x0000788c } }, - { 0x0002f950, 1, { 0x000078cc } }, - { 0x0002f951, 1, { 0x000040e3 } }, - { 0x0002f952, 1, { 0x00025626 } }, - { 0x0002f953, 1, { 0x00007956 } }, - { 0x0002f954, 1, { 0x0002569a } }, - { 0x0002f955, 1, { 0x000256c5 } }, - { 0x0002f956, 1, { 0x0000798f } }, - { 0x0002f957, 1, { 0x000079eb } }, - { 0x0002f958, 1, { 0x0000412f } }, - { 0x0002f959, 1, { 0x00007a40 } }, - { 0x0002f95a, 1, { 0x00007a4a } }, - { 0x0002f95b, 1, { 0x00007a4f } }, - { 0x0002f95c, 1, { 0x0002597c } }, - { 0x0002f95d, 1, { 0x00025aa7 } }, - { 0x0002f95e, 1, { 0x00025aa7 } }, - { 0x0002f95f, 1, { 0x00007aee } }, - { 0x0002f960, 1, { 0x00004202 } }, - { 0x0002f961, 1, { 0x00025bab } }, - { 0x0002f962, 1, { 0x00007bc6 } }, - { 0x0002f963, 1, { 0x00007bc9 } }, - { 0x0002f964, 1, { 0x00004227 } }, - { 0x0002f965, 1, { 0x00025c80 } }, - { 0x0002f966, 1, { 0x00007cd2 } }, - { 0x0002f967, 1, { 0x000042a0 } }, - { 0x0002f968, 1, { 0x00007ce8 } }, - { 0x0002f969, 1, { 0x00007ce3 } }, - { 0x0002f96a, 1, { 0x00007d00 } }, - { 0x0002f96b, 1, { 0x00025f86 } }, - { 0x0002f96c, 1, { 0x00007d63 } }, - { 0x0002f96d, 1, { 0x00004301 } }, - { 0x0002f96e, 1, { 0x00007dc7 } }, - { 0x0002f96f, 1, { 0x00007e02 } }, - { 0x0002f970, 1, { 0x00007e45 } }, - { 0x0002f971, 1, { 0x00004334 } }, - { 0x0002f972, 1, { 0x00026228 } }, - { 0x0002f973, 1, { 0x00026247 } }, - { 0x0002f974, 1, { 0x00004359 } }, - { 0x0002f975, 1, { 0x000262d9 } }, - { 0x0002f976, 1, { 0x00007f7a } }, - { 0x0002f977, 1, { 0x0002633e } }, - { 0x0002f978, 1, { 0x00007f95 } }, - { 0x0002f979, 1, { 0x00007ffa } }, - { 0x0002f97a, 1, { 0x00008005 } }, - { 0x0002f97b, 1, { 0x000264da } }, - { 0x0002f97c, 1, { 0x00026523 } }, - { 0x0002f97d, 1, { 0x00008060 } }, - { 0x0002f97e, 1, { 0x000265a8 } }, - { 0x0002f97f, 1, { 0x00008070 } }, - { 0x0002f980, 1, { 0x0002335f } }, - { 0x0002f981, 1, { 0x000043d5 } }, - { 0x0002f982, 1, { 0x000080b2 } }, - { 0x0002f983, 1, { 0x00008103 } }, - { 0x0002f984, 1, { 0x0000440b } }, - { 0x0002f985, 1, { 0x0000813e } }, - { 0x0002f986, 1, { 0x00005ab5 } }, - { 0x0002f987, 1, { 0x000267a7 } }, - { 0x0002f988, 1, { 0x000267b5 } }, - { 0x0002f989, 1, { 0x00023393 } }, - { 0x0002f98a, 1, { 0x0002339c } }, - { 0x0002f98b, 1, { 0x00008201 } }, - { 0x0002f98c, 1, { 0x00008204 } }, - { 0x0002f98d, 1, { 0x00008f9e } }, - { 0x0002f98e, 1, { 0x0000446b } }, - { 0x0002f98f, 1, { 0x00008291 } }, - { 0x0002f990, 1, { 0x0000828b } }, - { 0x0002f991, 1, { 0x0000829d } }, - { 0x0002f992, 1, { 0x000052b3 } }, - { 0x0002f993, 1, { 0x000082b1 } }, - { 0x0002f994, 1, { 0x000082b3 } }, - { 0x0002f995, 1, { 0x000082bd } }, - { 0x0002f996, 1, { 0x000082e6 } }, - { 0x0002f997, 1, { 0x00026b3c } }, - { 0x0002f998, 1, { 0x000082e5 } }, - { 0x0002f999, 1, { 0x0000831d } }, - { 0x0002f99a, 1, { 0x00008363 } }, - { 0x0002f99b, 1, { 0x000083ad } }, - { 0x0002f99c, 1, { 0x00008323 } }, - { 0x0002f99d, 1, { 0x000083bd } }, - { 0x0002f99e, 1, { 0x000083e7 } }, - { 0x0002f99f, 1, { 0x00008457 } }, - { 0x0002f9a0, 1, { 0x00008353 } }, - { 0x0002f9a1, 1, { 0x000083ca } }, - { 0x0002f9a2, 1, { 0x000083cc } }, - { 0x0002f9a3, 1, { 0x000083dc } }, - { 0x0002f9a4, 1, { 0x00026c36 } }, - { 0x0002f9a5, 1, { 0x00026d6b } }, - { 0x0002f9a6, 1, { 0x00026cd5 } }, - { 0x0002f9a7, 1, { 0x0000452b } }, - { 0x0002f9a8, 1, { 0x000084f1 } }, - { 0x0002f9a9, 1, { 0x000084f3 } }, - { 0x0002f9aa, 1, { 0x00008516 } }, - { 0x0002f9ab, 1, { 0x000273ca } }, - { 0x0002f9ac, 1, { 0x00008564 } }, - { 0x0002f9ad, 1, { 0x00026f2c } }, - { 0x0002f9ae, 1, { 0x0000455d } }, - { 0x0002f9af, 1, { 0x00004561 } }, - { 0x0002f9b0, 1, { 0x00026fb1 } }, - { 0x0002f9b1, 1, { 0x000270d2 } }, - { 0x0002f9b2, 1, { 0x0000456b } }, - { 0x0002f9b3, 1, { 0x00008650 } }, - { 0x0002f9b4, 1, { 0x0000865c } }, - { 0x0002f9b5, 1, { 0x00008667 } }, - { 0x0002f9b6, 1, { 0x00008669 } }, - { 0x0002f9b7, 1, { 0x000086a9 } }, - { 0x0002f9b8, 1, { 0x00008688 } }, - { 0x0002f9b9, 1, { 0x0000870e } }, - { 0x0002f9ba, 1, { 0x000086e2 } }, - { 0x0002f9bb, 1, { 0x00008779 } }, - { 0x0002f9bc, 1, { 0x00008728 } }, - { 0x0002f9bd, 1, { 0x0000876b } }, - { 0x0002f9be, 1, { 0x00008786 } }, - { 0x0002f9bf, 1, { 0x000045d7 } }, - { 0x0002f9c0, 1, { 0x000087e1 } }, - { 0x0002f9c1, 1, { 0x00008801 } }, - { 0x0002f9c2, 1, { 0x000045f9 } }, - { 0x0002f9c3, 1, { 0x00008860 } }, - { 0x0002f9c4, 1, { 0x00008863 } }, - { 0x0002f9c5, 1, { 0x00027667 } }, - { 0x0002f9c6, 1, { 0x000088d7 } }, - { 0x0002f9c7, 1, { 0x000088de } }, - { 0x0002f9c8, 1, { 0x00004635 } }, - { 0x0002f9c9, 1, { 0x000088fa } }, - { 0x0002f9ca, 1, { 0x000034bb } }, - { 0x0002f9cb, 1, { 0x000278ae } }, - { 0x0002f9cc, 1, { 0x00027966 } }, - { 0x0002f9cd, 1, { 0x000046be } }, - { 0x0002f9ce, 1, { 0x000046c7 } }, - { 0x0002f9cf, 1, { 0x00008aa0 } }, - { 0x0002f9d0, 1, { 0x00008aed } }, - { 0x0002f9d1, 1, { 0x00008b8a } }, - { 0x0002f9d2, 1, { 0x00008c55 } }, - { 0x0002f9d3, 1, { 0x00027ca8 } }, - { 0x0002f9d4, 1, { 0x00008cab } }, - { 0x0002f9d5, 1, { 0x00008cc1 } }, - { 0x0002f9d6, 1, { 0x00008d1b } }, - { 0x0002f9d7, 1, { 0x00008d77 } }, - { 0x0002f9d8, 1, { 0x00027f2f } }, - { 0x0002f9d9, 1, { 0x00020804 } }, - { 0x0002f9da, 1, { 0x00008dcb } }, - { 0x0002f9db, 1, { 0x00008dbc } }, - { 0x0002f9dc, 1, { 0x00008df0 } }, - { 0x0002f9dd, 1, { 0x000208de } }, - { 0x0002f9de, 1, { 0x00008ed4 } }, - { 0x0002f9df, 1, { 0x00008f38 } }, - { 0x0002f9e0, 1, { 0x000285d2 } }, - { 0x0002f9e1, 1, { 0x000285ed } }, - { 0x0002f9e2, 1, { 0x00009094 } }, - { 0x0002f9e3, 1, { 0x000090f1 } }, - { 0x0002f9e4, 1, { 0x00009111 } }, - { 0x0002f9e5, 1, { 0x0002872e } }, - { 0x0002f9e6, 1, { 0x0000911b } }, - { 0x0002f9e7, 1, { 0x00009238 } }, - { 0x0002f9e8, 1, { 0x000092d7 } }, - { 0x0002f9e9, 1, { 0x000092d8 } }, - { 0x0002f9ea, 1, { 0x0000927c } }, - { 0x0002f9eb, 1, { 0x000093f9 } }, - { 0x0002f9ec, 1, { 0x00009415 } }, - { 0x0002f9ed, 1, { 0x00028bfa } }, - { 0x0002f9ee, 1, { 0x0000958b } }, - { 0x0002f9ef, 1, { 0x00004995 } }, - { 0x0002f9f0, 1, { 0x000095b7 } }, - { 0x0002f9f1, 1, { 0x00028d77 } }, - { 0x0002f9f2, 1, { 0x000049e6 } }, - { 0x0002f9f3, 1, { 0x000096c3 } }, - { 0x0002f9f4, 1, { 0x00005db2 } }, - { 0x0002f9f5, 1, { 0x00009723 } }, - { 0x0002f9f6, 1, { 0x00029145 } }, - { 0x0002f9f7, 1, { 0x0002921a } }, - { 0x0002f9f8, 1, { 0x00004a6e } }, - { 0x0002f9f9, 1, { 0x00004a76 } }, - { 0x0002f9fa, 1, { 0x000097e0 } }, - { 0x0002f9fb, 1, { 0x0002940a } }, - { 0x0002f9fc, 1, { 0x00004ab2 } }, - { 0x0002f9fd, 1, { 0x00029496 } }, - { 0x0002f9fe, 1, { 0x0000980b } }, - { 0x0002f9ff, 1, { 0x0000980b } }, - { 0x0002fa00, 1, { 0x00009829 } }, - { 0x0002fa01, 1, { 0x000295b6 } }, - { 0x0002fa02, 1, { 0x000098e2 } }, - { 0x0002fa03, 1, { 0x00004b33 } }, - { 0x0002fa04, 1, { 0x00009929 } }, - { 0x0002fa05, 1, { 0x000099a7 } }, - { 0x0002fa06, 1, { 0x000099c2 } }, - { 0x0002fa07, 1, { 0x000099fe } }, - { 0x0002fa08, 1, { 0x00004bce } }, - { 0x0002fa09, 1, { 0x00029b30 } }, - { 0x0002fa0a, 1, { 0x00009b12 } }, - { 0x0002fa0b, 1, { 0x00009c40 } }, - { 0x0002fa0c, 1, { 0x00009cfd } }, - { 0x0002fa0d, 1, { 0x00004cce } }, - { 0x0002fa0e, 1, { 0x00004ced } }, - { 0x0002fa0f, 1, { 0x00009d67 } }, - { 0x0002fa10, 1, { 0x0002a0ce } }, - { 0x0002fa11, 1, { 0x00004cf8 } }, - { 0x0002fa12, 1, { 0x0002a105 } }, - { 0x0002fa13, 1, { 0x0002a20e } }, - { 0x0002fa14, 1, { 0x0002a291 } }, - { 0x0002fa15, 1, { 0x00009ebb } }, - { 0x0002fa16, 1, { 0x00004d56 } }, - { 0x0002fa17, 1, { 0x00009ef9 } }, - { 0x0002fa18, 1, { 0x00009efe } }, - { 0x0002fa19, 1, { 0x00009f05 } }, - { 0x0002fa1a, 1, { 0x00009f0f } }, - { 0x0002fa1b, 1, { 0x00009f16 } }, - { 0x0002fa1c, 1, { 0x00009f3b } }, - { 0x0002fa1d, 1, { 0x0002a600 } }, + { 0x0002f800, 1, { 0x0002f800 } }, + { 0x0002f801, 1, { 0x0002f801 } }, + { 0x0002f802, 1, { 0x0002f802 } }, + { 0x0002f803, 1, { 0x0002f803 } }, + { 0x0002f804, 1, { 0x0002f804 } }, + { 0x0002f805, 1, { 0x0002f805 } }, + { 0x0002f806, 1, { 0x0002f806 } }, + { 0x0002f807, 1, { 0x0002f807 } }, + { 0x0002f808, 1, { 0x0002f808 } }, + { 0x0002f809, 1, { 0x0002f809 } }, + { 0x0002f80a, 1, { 0x0002f80a } }, + { 0x0002f80b, 1, { 0x0002f80b } }, + { 0x0002f80c, 1, { 0x0002f80c } }, + { 0x0002f80d, 1, { 0x0002f80d } }, + { 0x0002f80e, 1, { 0x0002f80e } }, + { 0x0002f80f, 1, { 0x0002f80f } }, + { 0x0002f810, 1, { 0x0002f810 } }, + { 0x0002f811, 1, { 0x0002f811 } }, + { 0x0002f812, 1, { 0x0002f812 } }, + { 0x0002f813, 1, { 0x0002f813 } }, + { 0x0002f814, 1, { 0x0002f814 } }, + { 0x0002f815, 1, { 0x0002f815 } }, + { 0x0002f816, 1, { 0x0002f816 } }, + { 0x0002f817, 1, { 0x0002f817 } }, + { 0x0002f818, 1, { 0x0002f818 } }, + { 0x0002f819, 1, { 0x0002f819 } }, + { 0x0002f81a, 1, { 0x0002f81a } }, + { 0x0002f81b, 1, { 0x0002f81b } }, + { 0x0002f81c, 1, { 0x0002f81c } }, + { 0x0002f81d, 1, { 0x0002f81d } }, + { 0x0002f81e, 1, { 0x0002f81e } }, + { 0x0002f81f, 1, { 0x0002f81f } }, + { 0x0002f820, 1, { 0x0002f820 } }, + { 0x0002f821, 1, { 0x0002f821 } }, + { 0x0002f822, 1, { 0x0002f822 } }, + { 0x0002f823, 1, { 0x0002f823 } }, + { 0x0002f824, 1, { 0x0002f824 } }, + { 0x0002f825, 1, { 0x0002f825 } }, + { 0x0002f826, 1, { 0x0002f826 } }, + { 0x0002f827, 1, { 0x0002f827 } }, + { 0x0002f828, 1, { 0x0002f828 } }, + { 0x0002f829, 1, { 0x0002f829 } }, + { 0x0002f82a, 1, { 0x0002f82a } }, + { 0x0002f82b, 1, { 0x0002f82b } }, + { 0x0002f82c, 1, { 0x0002f82c } }, + { 0x0002f82d, 1, { 0x0002f82d } }, + { 0x0002f82e, 1, { 0x0002f82e } }, + { 0x0002f82f, 1, { 0x0002f82f } }, + { 0x0002f830, 1, { 0x0002f830 } }, + { 0x0002f831, 1, { 0x0002f831 } }, + { 0x0002f832, 1, { 0x0002f832 } }, + { 0x0002f833, 1, { 0x0002f833 } }, + { 0x0002f834, 1, { 0x0002f834 } }, + { 0x0002f835, 1, { 0x0002f835 } }, + { 0x0002f836, 1, { 0x0002f836 } }, + { 0x0002f837, 1, { 0x0002f837 } }, + { 0x0002f838, 1, { 0x0002f838 } }, + { 0x0002f839, 1, { 0x0002f839 } }, + { 0x0002f83a, 1, { 0x0002f83a } }, + { 0x0002f83b, 1, { 0x0002f83b } }, + { 0x0002f83c, 1, { 0x0002f83c } }, + { 0x0002f83d, 1, { 0x0002f83d } }, + { 0x0002f83e, 1, { 0x0002f83e } }, + { 0x0002f83f, 1, { 0x0002f83f } }, + { 0x0002f840, 1, { 0x0002f840 } }, + { 0x0002f841, 1, { 0x0002f841 } }, + { 0x0002f842, 1, { 0x0002f842 } }, + { 0x0002f843, 1, { 0x0002f843 } }, + { 0x0002f844, 1, { 0x0002f844 } }, + { 0x0002f845, 1, { 0x0002f845 } }, + { 0x0002f846, 1, { 0x0002f846 } }, + { 0x0002f847, 1, { 0x0002f847 } }, + { 0x0002f848, 1, { 0x0002f848 } }, + { 0x0002f849, 1, { 0x0002f849 } }, + { 0x0002f84a, 1, { 0x0002f84a } }, + { 0x0002f84b, 1, { 0x0002f84b } }, + { 0x0002f84c, 1, { 0x0002f84c } }, + { 0x0002f84d, 1, { 0x0002f84d } }, + { 0x0002f84e, 1, { 0x0002f84e } }, + { 0x0002f84f, 1, { 0x0002f84f } }, + { 0x0002f850, 1, { 0x0002f850 } }, + { 0x0002f851, 1, { 0x0002f851 } }, + { 0x0002f852, 1, { 0x0002f852 } }, + { 0x0002f853, 1, { 0x0002f853 } }, + { 0x0002f854, 1, { 0x0002f854 } }, + { 0x0002f855, 1, { 0x0002f855 } }, + { 0x0002f856, 1, { 0x0002f856 } }, + { 0x0002f857, 1, { 0x0002f857 } }, + { 0x0002f858, 1, { 0x0002f858 } }, + { 0x0002f859, 1, { 0x0002f859 } }, + { 0x0002f85a, 1, { 0x0002f85a } }, + { 0x0002f85b, 1, { 0x0002f85b } }, + { 0x0002f85c, 1, { 0x0002f85c } }, + { 0x0002f85d, 1, { 0x0002f85d } }, + { 0x0002f85e, 1, { 0x0002f85e } }, + { 0x0002f85f, 1, { 0x0002f85f } }, + { 0x0002f860, 1, { 0x0002f860 } }, + { 0x0002f861, 1, { 0x0002f861 } }, + { 0x0002f862, 1, { 0x0002f862 } }, + { 0x0002f863, 1, { 0x0002f863 } }, + { 0x0002f864, 1, { 0x0002f864 } }, + { 0x0002f865, 1, { 0x0002f865 } }, + { 0x0002f866, 1, { 0x0002f866 } }, + { 0x0002f867, 1, { 0x0002f867 } }, + { 0x0002f868, 1, { 0x0002f868 } }, + { 0x0002f869, 1, { 0x0002f869 } }, + { 0x0002f86a, 1, { 0x0002f86a } }, + { 0x0002f86b, 1, { 0x0002f86b } }, + { 0x0002f86c, 1, { 0x0002f86c } }, + { 0x0002f86d, 1, { 0x0002f86d } }, + { 0x0002f86e, 1, { 0x0002f86e } }, + { 0x0002f86f, 1, { 0x0002f86f } }, + { 0x0002f870, 1, { 0x0002f870 } }, + { 0x0002f871, 1, { 0x0002f871 } }, + { 0x0002f872, 1, { 0x0002f872 } }, + { 0x0002f873, 1, { 0x0002f873 } }, + { 0x0002f874, 1, { 0x0002f874 } }, + { 0x0002f875, 1, { 0x0002f875 } }, + { 0x0002f876, 1, { 0x0002f876 } }, + { 0x0002f877, 1, { 0x0002f877 } }, + { 0x0002f878, 1, { 0x0002f878 } }, + { 0x0002f879, 1, { 0x0002f879 } }, + { 0x0002f87a, 1, { 0x0002f87a } }, + { 0x0002f87b, 1, { 0x0002f87b } }, + { 0x0002f87c, 1, { 0x0002f87c } }, + { 0x0002f87d, 1, { 0x0002f87d } }, + { 0x0002f87e, 1, { 0x0002f87e } }, + { 0x0002f87f, 1, { 0x0002f87f } }, + { 0x0002f880, 1, { 0x0002f880 } }, + { 0x0002f881, 1, { 0x0002f881 } }, + { 0x0002f882, 1, { 0x0002f882 } }, + { 0x0002f883, 1, { 0x0002f883 } }, + { 0x0002f884, 1, { 0x0002f884 } }, + { 0x0002f885, 1, { 0x0002f885 } }, + { 0x0002f886, 1, { 0x0002f886 } }, + { 0x0002f887, 1, { 0x0002f887 } }, + { 0x0002f888, 1, { 0x0002f888 } }, + { 0x0002f889, 1, { 0x0002f889 } }, + { 0x0002f88a, 1, { 0x0002f88a } }, + { 0x0002f88b, 1, { 0x0002f88b } }, + { 0x0002f88c, 1, { 0x0002f88c } }, + { 0x0002f88d, 1, { 0x0002f88d } }, + { 0x0002f88e, 1, { 0x0002f88e } }, + { 0x0002f88f, 1, { 0x0002f88f } }, + { 0x0002f890, 1, { 0x0002f890 } }, + { 0x0002f891, 1, { 0x0002f891 } }, + { 0x0002f892, 1, { 0x0002f892 } }, + { 0x0002f893, 1, { 0x0002f893 } }, + { 0x0002f894, 1, { 0x0002f894 } }, + { 0x0002f895, 1, { 0x0002f895 } }, + { 0x0002f896, 1, { 0x0002f896 } }, + { 0x0002f897, 1, { 0x0002f897 } }, + { 0x0002f898, 1, { 0x0002f898 } }, + { 0x0002f899, 1, { 0x0002f899 } }, + { 0x0002f89a, 1, { 0x0002f89a } }, + { 0x0002f89b, 1, { 0x0002f89b } }, + { 0x0002f89c, 1, { 0x0002f89c } }, + { 0x0002f89d, 1, { 0x0002f89d } }, + { 0x0002f89e, 1, { 0x0002f89e } }, + { 0x0002f89f, 1, { 0x0002f89f } }, + { 0x0002f8a0, 1, { 0x0002f8a0 } }, + { 0x0002f8a1, 1, { 0x0002f8a1 } }, + { 0x0002f8a2, 1, { 0x0002f8a2 } }, + { 0x0002f8a3, 1, { 0x0002f8a3 } }, + { 0x0002f8a4, 1, { 0x0002f8a4 } }, + { 0x0002f8a5, 1, { 0x0002f8a5 } }, + { 0x0002f8a6, 1, { 0x0002f8a6 } }, + { 0x0002f8a7, 1, { 0x0002f8a7 } }, + { 0x0002f8a8, 1, { 0x0002f8a8 } }, + { 0x0002f8a9, 1, { 0x0002f8a9 } }, + { 0x0002f8aa, 1, { 0x0002f8aa } }, + { 0x0002f8ab, 1, { 0x0002f8ab } }, + { 0x0002f8ac, 1, { 0x0002f8ac } }, + { 0x0002f8ad, 1, { 0x0002f8ad } }, + { 0x0002f8ae, 1, { 0x0002f8ae } }, + { 0x0002f8af, 1, { 0x0002f8af } }, + { 0x0002f8b0, 1, { 0x0002f8b0 } }, + { 0x0002f8b1, 1, { 0x0002f8b1 } }, + { 0x0002f8b2, 1, { 0x0002f8b2 } }, + { 0x0002f8b3, 1, { 0x0002f8b3 } }, + { 0x0002f8b4, 1, { 0x0002f8b4 } }, + { 0x0002f8b5, 1, { 0x0002f8b5 } }, + { 0x0002f8b6, 1, { 0x0002f8b6 } }, + { 0x0002f8b7, 1, { 0x0002f8b7 } }, + { 0x0002f8b8, 1, { 0x0002f8b8 } }, + { 0x0002f8b9, 1, { 0x0002f8b9 } }, + { 0x0002f8ba, 1, { 0x0002f8ba } }, + { 0x0002f8bb, 1, { 0x0002f8bb } }, + { 0x0002f8bc, 1, { 0x0002f8bc } }, + { 0x0002f8bd, 1, { 0x0002f8bd } }, + { 0x0002f8be, 1, { 0x0002f8be } }, + { 0x0002f8bf, 1, { 0x0002f8bf } }, + { 0x0002f8c0, 1, { 0x0002f8c0 } }, + { 0x0002f8c1, 1, { 0x0002f8c1 } }, + { 0x0002f8c2, 1, { 0x0002f8c2 } }, + { 0x0002f8c3, 1, { 0x0002f8c3 } }, + { 0x0002f8c4, 1, { 0x0002f8c4 } }, + { 0x0002f8c5, 1, { 0x0002f8c5 } }, + { 0x0002f8c6, 1, { 0x0002f8c6 } }, + { 0x0002f8c7, 1, { 0x0002f8c7 } }, + { 0x0002f8c8, 1, { 0x0002f8c8 } }, + { 0x0002f8c9, 1, { 0x0002f8c9 } }, + { 0x0002f8ca, 1, { 0x0002f8ca } }, + { 0x0002f8cb, 1, { 0x0002f8cb } }, + { 0x0002f8cc, 1, { 0x0002f8cc } }, + { 0x0002f8cd, 1, { 0x0002f8cd } }, + { 0x0002f8ce, 1, { 0x0002f8ce } }, + { 0x0002f8cf, 1, { 0x0002f8cf } }, + { 0x0002f8d0, 1, { 0x0002f8d0 } }, + { 0x0002f8d1, 1, { 0x0002f8d1 } }, + { 0x0002f8d2, 1, { 0x0002f8d2 } }, + { 0x0002f8d3, 1, { 0x0002f8d3 } }, + { 0x0002f8d4, 1, { 0x0002f8d4 } }, + { 0x0002f8d5, 1, { 0x0002f8d5 } }, + { 0x0002f8d6, 1, { 0x0002f8d6 } }, + { 0x0002f8d7, 1, { 0x0002f8d7 } }, + { 0x0002f8d8, 1, { 0x0002f8d8 } }, + { 0x0002f8d9, 1, { 0x0002f8d9 } }, + { 0x0002f8da, 1, { 0x0002f8da } }, + { 0x0002f8db, 1, { 0x0002f8db } }, + { 0x0002f8dc, 1, { 0x0002f8dc } }, + { 0x0002f8dd, 1, { 0x0002f8dd } }, + { 0x0002f8de, 1, { 0x0002f8de } }, + { 0x0002f8df, 1, { 0x0002f8df } }, + { 0x0002f8e0, 1, { 0x0002f8e0 } }, + { 0x0002f8e1, 1, { 0x0002f8e1 } }, + { 0x0002f8e2, 1, { 0x0002f8e2 } }, + { 0x0002f8e3, 1, { 0x0002f8e3 } }, + { 0x0002f8e4, 1, { 0x0002f8e4 } }, + { 0x0002f8e5, 1, { 0x0002f8e5 } }, + { 0x0002f8e6, 1, { 0x0002f8e6 } }, + { 0x0002f8e7, 1, { 0x0002f8e7 } }, + { 0x0002f8e8, 1, { 0x0002f8e8 } }, + { 0x0002f8e9, 1, { 0x0002f8e9 } }, + { 0x0002f8ea, 1, { 0x0002f8ea } }, + { 0x0002f8eb, 1, { 0x0002f8eb } }, + { 0x0002f8ec, 1, { 0x0002f8ec } }, + { 0x0002f8ed, 1, { 0x0002f8ed } }, + { 0x0002f8ee, 1, { 0x0002f8ee } }, + { 0x0002f8ef, 1, { 0x0002f8ef } }, + { 0x0002f8f0, 1, { 0x0002f8f0 } }, + { 0x0002f8f1, 1, { 0x0002f8f1 } }, + { 0x0002f8f2, 1, { 0x0002f8f2 } }, + { 0x0002f8f3, 1, { 0x0002f8f3 } }, + { 0x0002f8f4, 1, { 0x0002f8f4 } }, + { 0x0002f8f5, 1, { 0x0002f8f5 } }, + { 0x0002f8f6, 1, { 0x0002f8f6 } }, + { 0x0002f8f7, 1, { 0x0002f8f7 } }, + { 0x0002f8f8, 1, { 0x0002f8f8 } }, + { 0x0002f8f9, 1, { 0x0002f8f9 } }, + { 0x0002f8fa, 1, { 0x0002f8fa } }, + { 0x0002f8fb, 1, { 0x0002f8fb } }, + { 0x0002f8fc, 1, { 0x0002f8fc } }, + { 0x0002f8fd, 1, { 0x0002f8fd } }, + { 0x0002f8fe, 1, { 0x0002f8fe } }, + { 0x0002f8ff, 1, { 0x0002f8ff } }, + { 0x0002f900, 1, { 0x0002f900 } }, + { 0x0002f901, 1, { 0x0002f901 } }, + { 0x0002f902, 1, { 0x0002f902 } }, + { 0x0002f903, 1, { 0x0002f903 } }, + { 0x0002f904, 1, { 0x0002f904 } }, + { 0x0002f905, 1, { 0x0002f905 } }, + { 0x0002f906, 1, { 0x0002f906 } }, + { 0x0002f907, 1, { 0x0002f907 } }, + { 0x0002f908, 1, { 0x0002f908 } }, + { 0x0002f909, 1, { 0x0002f909 } }, + { 0x0002f90a, 1, { 0x0002f90a } }, + { 0x0002f90b, 1, { 0x0002f90b } }, + { 0x0002f90c, 1, { 0x0002f90c } }, + { 0x0002f90d, 1, { 0x0002f90d } }, + { 0x0002f90e, 1, { 0x0002f90e } }, + { 0x0002f90f, 1, { 0x0002f90f } }, + { 0x0002f910, 1, { 0x0002f910 } }, + { 0x0002f911, 1, { 0x0002f911 } }, + { 0x0002f912, 1, { 0x0002f912 } }, + { 0x0002f913, 1, { 0x0002f913 } }, + { 0x0002f914, 1, { 0x0002f914 } }, + { 0x0002f915, 1, { 0x0002f915 } }, + { 0x0002f916, 1, { 0x0002f916 } }, + { 0x0002f917, 1, { 0x0002f917 } }, + { 0x0002f918, 1, { 0x0002f918 } }, + { 0x0002f919, 1, { 0x0002f919 } }, + { 0x0002f91a, 1, { 0x0002f91a } }, + { 0x0002f91b, 1, { 0x0002f91b } }, + { 0x0002f91c, 1, { 0x0002f91c } }, + { 0x0002f91d, 1, { 0x0002f91d } }, + { 0x0002f91e, 1, { 0x0002f91e } }, + { 0x0002f91f, 1, { 0x0002f91f } }, + { 0x0002f920, 1, { 0x0002f920 } }, + { 0x0002f921, 1, { 0x0002f921 } }, + { 0x0002f922, 1, { 0x0002f922 } }, + { 0x0002f923, 1, { 0x0002f923 } }, + { 0x0002f924, 1, { 0x0002f924 } }, + { 0x0002f925, 1, { 0x0002f925 } }, + { 0x0002f926, 1, { 0x0002f926 } }, + { 0x0002f927, 1, { 0x0002f927 } }, + { 0x0002f928, 1, { 0x0002f928 } }, + { 0x0002f929, 1, { 0x0002f929 } }, + { 0x0002f92a, 1, { 0x0002f92a } }, + { 0x0002f92b, 1, { 0x0002f92b } }, + { 0x0002f92c, 1, { 0x0002f92c } }, + { 0x0002f92d, 1, { 0x0002f92d } }, + { 0x0002f92e, 1, { 0x0002f92e } }, + { 0x0002f92f, 1, { 0x0002f92f } }, + { 0x0002f930, 1, { 0x0002f930 } }, + { 0x0002f931, 1, { 0x0002f931 } }, + { 0x0002f932, 1, { 0x0002f932 } }, + { 0x0002f933, 1, { 0x0002f933 } }, + { 0x0002f934, 1, { 0x0002f934 } }, + { 0x0002f935, 1, { 0x0002f935 } }, + { 0x0002f936, 1, { 0x0002f936 } }, + { 0x0002f937, 1, { 0x0002f937 } }, + { 0x0002f938, 1, { 0x0002f938 } }, + { 0x0002f939, 1, { 0x0002f939 } }, + { 0x0002f93a, 1, { 0x0002f93a } }, + { 0x0002f93b, 1, { 0x0002f93b } }, + { 0x0002f93c, 1, { 0x0002f93c } }, + { 0x0002f93d, 1, { 0x0002f93d } }, + { 0x0002f93e, 1, { 0x0002f93e } }, + { 0x0002f93f, 1, { 0x0002f93f } }, + { 0x0002f940, 1, { 0x0002f940 } }, + { 0x0002f941, 1, { 0x0002f941 } }, + { 0x0002f942, 1, { 0x0002f942 } }, + { 0x0002f943, 1, { 0x0002f943 } }, + { 0x0002f944, 1, { 0x0002f944 } }, + { 0x0002f945, 1, { 0x0002f945 } }, + { 0x0002f946, 1, { 0x0002f946 } }, + { 0x0002f947, 1, { 0x0002f947 } }, + { 0x0002f948, 1, { 0x0002f948 } }, + { 0x0002f949, 1, { 0x0002f949 } }, + { 0x0002f94a, 1, { 0x0002f94a } }, + { 0x0002f94b, 1, { 0x0002f94b } }, + { 0x0002f94c, 1, { 0x0002f94c } }, + { 0x0002f94d, 1, { 0x0002f94d } }, + { 0x0002f94e, 1, { 0x0002f94e } }, + { 0x0002f94f, 1, { 0x0002f94f } }, + { 0x0002f950, 1, { 0x0002f950 } }, + { 0x0002f951, 1, { 0x0002f951 } }, + { 0x0002f952, 1, { 0x0002f952 } }, + { 0x0002f953, 1, { 0x0002f953 } }, + { 0x0002f954, 1, { 0x0002f954 } }, + { 0x0002f955, 1, { 0x0002f955 } }, + { 0x0002f956, 1, { 0x0002f956 } }, + { 0x0002f957, 1, { 0x0002f957 } }, + { 0x0002f958, 1, { 0x0002f958 } }, + { 0x0002f959, 1, { 0x0002f959 } }, + { 0x0002f95a, 1, { 0x0002f95a } }, + { 0x0002f95b, 1, { 0x0002f95b } }, + { 0x0002f95c, 1, { 0x0002f95c } }, + { 0x0002f95d, 1, { 0x0002f95d } }, + { 0x0002f95e, 1, { 0x0002f95e } }, + { 0x0002f95f, 1, { 0x0002f95f } }, + { 0x0002f960, 1, { 0x0002f960 } }, + { 0x0002f961, 1, { 0x0002f961 } }, + { 0x0002f962, 1, { 0x0002f962 } }, + { 0x0002f963, 1, { 0x0002f963 } }, + { 0x0002f964, 1, { 0x0002f964 } }, + { 0x0002f965, 1, { 0x0002f965 } }, + { 0x0002f966, 1, { 0x0002f966 } }, + { 0x0002f967, 1, { 0x0002f967 } }, + { 0x0002f968, 1, { 0x0002f968 } }, + { 0x0002f969, 1, { 0x0002f969 } }, + { 0x0002f96a, 1, { 0x0002f96a } }, + { 0x0002f96b, 1, { 0x0002f96b } }, + { 0x0002f96c, 1, { 0x0002f96c } }, + { 0x0002f96d, 1, { 0x0002f96d } }, + { 0x0002f96e, 1, { 0x0002f96e } }, + { 0x0002f96f, 1, { 0x0002f96f } }, + { 0x0002f970, 1, { 0x0002f970 } }, + { 0x0002f971, 1, { 0x0002f971 } }, + { 0x0002f972, 1, { 0x0002f972 } }, + { 0x0002f973, 1, { 0x0002f973 } }, + { 0x0002f974, 1, { 0x0002f974 } }, + { 0x0002f975, 1, { 0x0002f975 } }, + { 0x0002f976, 1, { 0x0002f976 } }, + { 0x0002f977, 1, { 0x0002f977 } }, + { 0x0002f978, 1, { 0x0002f978 } }, + { 0x0002f979, 1, { 0x0002f979 } }, + { 0x0002f97a, 1, { 0x0002f97a } }, + { 0x0002f97b, 1, { 0x0002f97b } }, + { 0x0002f97c, 1, { 0x0002f97c } }, + { 0x0002f97d, 1, { 0x0002f97d } }, + { 0x0002f97e, 1, { 0x0002f97e } }, + { 0x0002f97f, 1, { 0x0002f97f } }, + { 0x0002f980, 1, { 0x0002f980 } }, + { 0x0002f981, 1, { 0x0002f981 } }, + { 0x0002f982, 1, { 0x0002f982 } }, + { 0x0002f983, 1, { 0x0002f983 } }, + { 0x0002f984, 1, { 0x0002f984 } }, + { 0x0002f985, 1, { 0x0002f985 } }, + { 0x0002f986, 1, { 0x0002f986 } }, + { 0x0002f987, 1, { 0x0002f987 } }, + { 0x0002f988, 1, { 0x0002f988 } }, + { 0x0002f989, 1, { 0x0002f989 } }, + { 0x0002f98a, 1, { 0x0002f98a } }, + { 0x0002f98b, 1, { 0x0002f98b } }, + { 0x0002f98c, 1, { 0x0002f98c } }, + { 0x0002f98d, 1, { 0x0002f98d } }, + { 0x0002f98e, 1, { 0x0002f98e } }, + { 0x0002f98f, 1, { 0x0002f98f } }, + { 0x0002f990, 1, { 0x0002f990 } }, + { 0x0002f991, 1, { 0x0002f991 } }, + { 0x0002f992, 1, { 0x0002f992 } }, + { 0x0002f993, 1, { 0x0002f993 } }, + { 0x0002f994, 1, { 0x0002f994 } }, + { 0x0002f995, 1, { 0x0002f995 } }, + { 0x0002f996, 1, { 0x0002f996 } }, + { 0x0002f997, 1, { 0x0002f997 } }, + { 0x0002f998, 1, { 0x0002f998 } }, + { 0x0002f999, 1, { 0x0002f999 } }, + { 0x0002f99a, 1, { 0x0002f99a } }, + { 0x0002f99b, 1, { 0x0002f99b } }, + { 0x0002f99c, 1, { 0x0002f99c } }, + { 0x0002f99d, 1, { 0x0002f99d } }, + { 0x0002f99e, 1, { 0x0002f99e } }, + { 0x0002f99f, 1, { 0x0002f99f } }, + { 0x0002f9a0, 1, { 0x0002f9a0 } }, + { 0x0002f9a1, 1, { 0x0002f9a1 } }, + { 0x0002f9a2, 1, { 0x0002f9a2 } }, + { 0x0002f9a3, 1, { 0x0002f9a3 } }, + { 0x0002f9a4, 1, { 0x0002f9a4 } }, + { 0x0002f9a5, 1, { 0x0002f9a5 } }, + { 0x0002f9a6, 1, { 0x0002f9a6 } }, + { 0x0002f9a7, 1, { 0x0002f9a7 } }, + { 0x0002f9a8, 1, { 0x0002f9a8 } }, + { 0x0002f9a9, 1, { 0x0002f9a9 } }, + { 0x0002f9aa, 1, { 0x0002f9aa } }, + { 0x0002f9ab, 1, { 0x0002f9ab } }, + { 0x0002f9ac, 1, { 0x0002f9ac } }, + { 0x0002f9ad, 1, { 0x0002f9ad } }, + { 0x0002f9ae, 1, { 0x0002f9ae } }, + { 0x0002f9af, 1, { 0x0002f9af } }, + { 0x0002f9b0, 1, { 0x0002f9b0 } }, + { 0x0002f9b1, 1, { 0x0002f9b1 } }, + { 0x0002f9b2, 1, { 0x0002f9b2 } }, + { 0x0002f9b3, 1, { 0x0002f9b3 } }, + { 0x0002f9b4, 1, { 0x0002f9b4 } }, + { 0x0002f9b5, 1, { 0x0002f9b5 } }, + { 0x0002f9b6, 1, { 0x0002f9b6 } }, + { 0x0002f9b7, 1, { 0x0002f9b7 } }, + { 0x0002f9b8, 1, { 0x0002f9b8 } }, + { 0x0002f9b9, 1, { 0x0002f9b9 } }, + { 0x0002f9ba, 1, { 0x0002f9ba } }, + { 0x0002f9bb, 1, { 0x0002f9bb } }, + { 0x0002f9bc, 1, { 0x0002f9bc } }, + { 0x0002f9bd, 1, { 0x0002f9bd } }, + { 0x0002f9be, 1, { 0x0002f9be } }, + { 0x0002f9bf, 1, { 0x0002f9bf } }, + { 0x0002f9c0, 1, { 0x0002f9c0 } }, + { 0x0002f9c1, 1, { 0x0002f9c1 } }, + { 0x0002f9c2, 1, { 0x0002f9c2 } }, + { 0x0002f9c3, 1, { 0x0002f9c3 } }, + { 0x0002f9c4, 1, { 0x0002f9c4 } }, + { 0x0002f9c5, 1, { 0x0002f9c5 } }, + { 0x0002f9c6, 1, { 0x0002f9c6 } }, + { 0x0002f9c7, 1, { 0x0002f9c7 } }, + { 0x0002f9c8, 1, { 0x0002f9c8 } }, + { 0x0002f9c9, 1, { 0x0002f9c9 } }, + { 0x0002f9ca, 1, { 0x0002f9ca } }, + { 0x0002f9cb, 1, { 0x0002f9cb } }, + { 0x0002f9cc, 1, { 0x0002f9cc } }, + { 0x0002f9cd, 1, { 0x0002f9cd } }, + { 0x0002f9ce, 1, { 0x0002f9ce } }, + { 0x0002f9cf, 1, { 0x0002f9cf } }, + { 0x0002f9d0, 1, { 0x0002f9d0 } }, + { 0x0002f9d1, 1, { 0x0002f9d1 } }, + { 0x0002f9d2, 1, { 0x0002f9d2 } }, + { 0x0002f9d3, 1, { 0x0002f9d3 } }, + { 0x0002f9d4, 1, { 0x0002f9d4 } }, + { 0x0002f9d5, 1, { 0x0002f9d5 } }, + { 0x0002f9d6, 1, { 0x0002f9d6 } }, + { 0x0002f9d7, 1, { 0x0002f9d7 } }, + { 0x0002f9d8, 1, { 0x0002f9d8 } }, + { 0x0002f9d9, 1, { 0x0002f9d9 } }, + { 0x0002f9da, 1, { 0x0002f9da } }, + { 0x0002f9db, 1, { 0x0002f9db } }, + { 0x0002f9dc, 1, { 0x0002f9dc } }, + { 0x0002f9dd, 1, { 0x0002f9dd } }, + { 0x0002f9de, 1, { 0x0002f9de } }, + { 0x0002f9df, 1, { 0x0002f9df } }, + { 0x0002f9e0, 1, { 0x0002f9e0 } }, + { 0x0002f9e1, 1, { 0x0002f9e1 } }, + { 0x0002f9e2, 1, { 0x0002f9e2 } }, + { 0x0002f9e3, 1, { 0x0002f9e3 } }, + { 0x0002f9e4, 1, { 0x0002f9e4 } }, + { 0x0002f9e5, 1, { 0x0002f9e5 } }, + { 0x0002f9e6, 1, { 0x0002f9e6 } }, + { 0x0002f9e7, 1, { 0x0002f9e7 } }, + { 0x0002f9e8, 1, { 0x0002f9e8 } }, + { 0x0002f9e9, 1, { 0x0002f9e9 } }, + { 0x0002f9ea, 1, { 0x0002f9ea } }, + { 0x0002f9eb, 1, { 0x0002f9eb } }, + { 0x0002f9ec, 1, { 0x0002f9ec } }, + { 0x0002f9ed, 1, { 0x0002f9ed } }, + { 0x0002f9ee, 1, { 0x0002f9ee } }, + { 0x0002f9ef, 1, { 0x0002f9ef } }, + { 0x0002f9f0, 1, { 0x0002f9f0 } }, + { 0x0002f9f1, 1, { 0x0002f9f1 } }, + { 0x0002f9f2, 1, { 0x0002f9f2 } }, + { 0x0002f9f3, 1, { 0x0002f9f3 } }, + { 0x0002f9f4, 1, { 0x0002f9f4 } }, + { 0x0002f9f5, 1, { 0x0002f9f5 } }, + { 0x0002f9f6, 1, { 0x0002f9f6 } }, + { 0x0002f9f7, 1, { 0x0002f9f7 } }, + { 0x0002f9f8, 1, { 0x0002f9f8 } }, + { 0x0002f9f9, 1, { 0x0002f9f9 } }, + { 0x0002f9fa, 1, { 0x0002f9fa } }, + { 0x0002f9fb, 1, { 0x0002f9fb } }, + { 0x0002f9fc, 1, { 0x0002f9fc } }, + { 0x0002f9fd, 1, { 0x0002f9fd } }, + { 0x0002f9fe, 1, { 0x0002f9fe } }, + { 0x0002f9ff, 1, { 0x0002f9ff } }, + { 0x0002fa00, 1, { 0x0002fa00 } }, + { 0x0002fa01, 1, { 0x0002fa01 } }, + { 0x0002fa02, 1, { 0x0002fa02 } }, + { 0x0002fa03, 1, { 0x0002fa03 } }, + { 0x0002fa04, 1, { 0x0002fa04 } }, + { 0x0002fa05, 1, { 0x0002fa05 } }, + { 0x0002fa06, 1, { 0x0002fa06 } }, + { 0x0002fa07, 1, { 0x0002fa07 } }, + { 0x0002fa08, 1, { 0x0002fa08 } }, + { 0x0002fa09, 1, { 0x0002fa09 } }, + { 0x0002fa0a, 1, { 0x0002fa0a } }, + { 0x0002fa0b, 1, { 0x0002fa0b } }, + { 0x0002fa0c, 1, { 0x0002fa0c } }, + { 0x0002fa0d, 1, { 0x0002fa0d } }, + { 0x0002fa0e, 1, { 0x0002fa0e } }, + { 0x0002fa0f, 1, { 0x0002fa0f } }, + { 0x0002fa10, 1, { 0x0002fa10 } }, + { 0x0002fa11, 1, { 0x0002fa11 } }, + { 0x0002fa12, 1, { 0x0002fa12 } }, + { 0x0002fa13, 1, { 0x0002fa13 } }, + { 0x0002fa14, 1, { 0x0002fa14 } }, + { 0x0002fa15, 1, { 0x0002fa15 } }, + { 0x0002fa16, 1, { 0x0002fa16 } }, + { 0x0002fa17, 1, { 0x0002fa17 } }, + { 0x0002fa18, 1, { 0x0002fa18 } }, + { 0x0002fa19, 1, { 0x0002fa19 } }, + { 0x0002fa1a, 1, { 0x0002fa1a } }, + { 0x0002fa1b, 1, { 0x0002fa1b } }, + { 0x0002fa1c, 1, { 0x0002fa1c } }, + { 0x0002fa1d, 1, { 0x0002fa1d } }, { 0x000e0001, 1, { 0x000e0001 } }, { 0x000e0020, 1, { 0x000e0020 } }, { 0x000e0021, 1, { 0x000e0021 } }, diff -Nru libfshfs-20201104/tests/fshfs_test_unused.h libfshfs-20240221/tests/fshfs_test_unused.h --- libfshfs-20201104/tests/fshfs_test_unused.h 2020-11-04 04:19:45.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_unused.h 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Definitions to silence compiler warnings about unused function attributes/parameters. * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/tests/fshfs_test_volume.c libfshfs-20240221/tests/fshfs_test_volume.c --- libfshfs-20201104/tests/fshfs_test_volume.c 2020-11-04 04:22:26.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_volume.c 2024-02-21 05:50:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * Library volume type test program * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/tests/fshfs_test_volume_header.c libfshfs-20240221/tests/fshfs_test_volume_header.c --- libfshfs-20201104/tests/fshfs_test_volume_header.c 2020-11-04 04:22:26.000000000 +0000 +++ libfshfs-20240221/tests/fshfs_test_volume_header.c 2024-02-21 05:50:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * Library volume_header type test program * - * Copyright (C) 2009-2020, Joachim Metz + * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * diff -Nru libfshfs-20201104/tests/pyfshfs_test_support.py libfshfs-20240221/tests/pyfshfs_test_support.py --- libfshfs-20201104/tests/pyfshfs_test_support.py 2020-11-04 04:22:54.000000000 +0000 +++ libfshfs-20240221/tests/pyfshfs_test_support.py 2024-02-21 05:50:44.000000000 +0000 @@ -2,7 +2,7 @@ # # Python-bindings support functions test script # -# Copyright (C) 2009-2020, Joachim Metz +# Copyright (C) 2009-2024, Joachim Metz # # Refer to AUTHORS for acknowledgements. # @@ -37,27 +37,33 @@ def test_check_volume_signature(self): """Tests the check_volume_signature function.""" - if not unittest.source: + test_source = getattr(unittest, "source", None) + if not test_source: raise unittest.SkipTest("missing source") - result = pyfshfs.check_volume_signature(unittest.source) + result = pyfshfs.check_volume_signature(test_source) self.assertTrue(result) def test_check_volume_signature_file_object(self): """Tests the check_volume_signature_file_object function.""" - if not unittest.source: + test_source = getattr(unittest, "source", None) + if not test_source: raise unittest.SkipTest("missing source") - with open(unittest.source, "rb") as file_object: + if not os.path.isfile(test_source): + raise unittest.SkipTest("source not a regular file") + + with open(test_source, "rb") as file_object: result = pyfshfs.check_volume_signature_file_object(file_object) self.assertTrue(result) def test_open(self): """Tests the open function.""" - if not unittest.source: + test_source = getattr(unittest, "source", None) + if not test_source: raise unittest.SkipTest("missing source") - fshfs_volume = pyfshfs.open(unittest.source) + fshfs_volume = pyfshfs.open(test_source) self.assertIsNotNone(fshfs_volume) fshfs_volume.close() @@ -66,17 +72,18 @@ pyfshfs.open(None) with self.assertRaises(ValueError): - pyfshfs.open(unittest.source, mode="w") + pyfshfs.open(test_source, mode="w") def test_open_file_object(self): """Tests the open_file_object function.""" - if not unittest.source: + test_source = getattr(unittest, "source", None) + if not test_source: raise unittest.SkipTest("missing source") - if not os.path.isfile(unittest.source): + if not os.path.isfile(test_source): raise unittest.SkipTest("source not a regular file") - with open(unittest.source, "rb") as file_object: + with open(test_source, "rb") as file_object: fshfs_volume = pyfshfs.open_file_object(file_object) self.assertIsNotNone(fshfs_volume) diff -Nru libfshfs-20201104/tests/pyfshfs_test_volume.py libfshfs-20240221/tests/pyfshfs_test_volume.py --- libfshfs-20201104/tests/pyfshfs_test_volume.py 2020-11-04 04:22:54.000000000 +0000 +++ libfshfs-20240221/tests/pyfshfs_test_volume.py 2024-02-21 05:50:44.000000000 +0000 @@ -2,7 +2,7 @@ # # Python-bindings volume type test script # -# Copyright (C) 2009-2020, Joachim Metz +# Copyright (C) 2009-2024, Joachim Metz # # Refer to AUTHORS for acknowledgements. # @@ -157,18 +157,20 @@ def test_open(self): """Tests the open function.""" - if not unittest.source: + test_source = getattr(unittest, "source", None) + if not test_source: raise unittest.SkipTest("missing source") - if unittest.offset: + test_offset = getattr(unittest, "offset", None) + if test_offset: raise unittest.SkipTest("source defines offset") fshfs_volume = pyfshfs.volume() - fshfs_volume.open(unittest.source) + fshfs_volume.open(test_source) with self.assertRaises(IOError): - fshfs_volume.open(unittest.source) + fshfs_volume.open(test_source) fshfs_volume.close() @@ -176,18 +178,21 @@ fshfs_volume.open(None) with self.assertRaises(ValueError): - fshfs_volume.open(unittest.source, mode="w") + fshfs_volume.open(test_source, mode="w") def test_open_file_object(self): """Tests the open_file_object function.""" - if not unittest.source: + test_source = getattr(unittest, "source", None) + if not test_source: raise unittest.SkipTest("missing source") - if not os.path.isfile(unittest.source): + if not os.path.isfile(test_source): raise unittest.SkipTest("source not a regular file") + test_offset = getattr(unittest, "offset", None) + with DataRangeFileObject( - unittest.source, unittest.offset or 0, None) as file_object: + test_source, test_offset or 0, None) as file_object: fshfs_volume = pyfshfs.volume() fshfs_volume.open_file_object(file_object) @@ -205,7 +210,8 @@ def test_close(self): """Tests the close function.""" - if not unittest.source: + test_source = getattr(unittest, "source", None) + if not test_source: raise unittest.SkipTest("missing source") fshfs_volume = pyfshfs.volume() @@ -215,24 +221,26 @@ def test_open_close(self): """Tests the open and close functions.""" - if not unittest.source: + test_source = getattr(unittest, "source", None) + if not test_source: return - if unittest.offset: + test_offset = getattr(unittest, "offset", None) + if test_offset: raise unittest.SkipTest("source defines offset") fshfs_volume = pyfshfs.volume() # Test open and close. - fshfs_volume.open(unittest.source) + fshfs_volume.open(test_source) fshfs_volume.close() # Test open and close a second time to validate clean up on close. - fshfs_volume.open(unittest.source) + fshfs_volume.open(test_source) fshfs_volume.close() - if os.path.isfile(unittest.source): - with open(unittest.source, "rb") as file_object: + if os.path.isfile(test_source): + with open(test_source, "rb") as file_object: # Test open_file_object and close. fshfs_volume.open_file_object(file_object) @@ -249,11 +257,14 @@ def test_get_name(self): """Tests the get_name function and name property.""" - if not unittest.source: + test_source = getattr(unittest, "source", None) + if not test_source: raise unittest.SkipTest("missing source") + test_offset = getattr(unittest, "offset", None) + with DataRangeFileObject( - unittest.source, unittest.offset or 0, None) as file_object: + test_source, test_offset or 0, None) as file_object: fshfs_volume = pyfshfs.volume() fshfs_volume.open_file_object(file_object) @@ -267,11 +278,14 @@ def test_get_root_directory(self): """Tests the get_root_directory function.""" - if not unittest.source: + test_source = getattr(unittest, "source", None) + if not test_source: raise unittest.SkipTest("missing source") + test_offset = getattr(unittest, "offset", None) + with DataRangeFileObject( - unittest.source, unittest.offset or 0, None) as file_object: + test_source, test_offset or 0, None) as file_object: fshfs_volume = pyfshfs.volume() fshfs_volume.open_file_object(file_object) diff -Nru libfshfs-20201104/tests/test_fshfsinfo.sh libfshfs-20240221/tests/test_fshfsinfo.sh --- libfshfs-20201104/tests/test_fshfsinfo.sh 2020-11-04 04:19:45.000000000 +0000 +++ libfshfs-20240221/tests/test_fshfsinfo.sh 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ -#!/bin/bash +#!/usr/bin/env bash # Info tool testing script # -# Version: 20200705 +# Version: 20231005 EXIT_SUCCESS=0; EXIT_FAILURE=1; @@ -9,7 +9,7 @@ PROFILES=("fshfsinfo" "fshfsinfo_fs"); OPTIONS_PER_PROFILE=("" "-H"); -OPTION_SETS="offset"; +OPTION_SETS=("offset"); INPUT_GLOB="*"; @@ -71,7 +71,7 @@ IGNORE_LIST=$(read_ignore_list "${TEST_PROFILE_DIRECTORY}"); - IFS=" " read -a OPTIONS <<< ${OPTIONS_PER_PROFILE[${PROFILE_INDEX}]}; + IFS=" " read -a PROFILE_OPTIONS <<< ${OPTIONS_PER_PROFILE[${PROFILE_INDEX}]}; RESULT=${EXIT_SUCCESS}; @@ -89,8 +89,49 @@ fi TEST_SET_DIRECTORY=$(get_test_set_directory "${TEST_PROFILE_DIRECTORY}" "${TEST_SET_INPUT_DIRECTORY}"); - run_test_on_test_set_with_options "${TEST_SET_DIRECTORY}" "fshfsinfo" "with_stdout_reference" "${OPTION_SETS}" "${TEST_EXECUTABLE}" "${OPTIONS[@]}"; - RESULT=$?; + RESULT=${EXIT_SUCCESS}; + + if test -f "${TEST_SET_DIRECTORY}/files"; + then + IFS="" read -a INPUT_FILES <<< $(cat ${TEST_SET_DIRECTORY}/files | sed "s?^?${TEST_SET_INPUT_DIRECTORY}/?"); + else + IFS="" read -a INPUT_FILES <<< $(ls -1d ${TEST_SET_INPUT_DIRECTORY}/${INPUT_GLOB}); + fi + for INPUT_FILE in "${INPUT_FILES[@]}"; + do + TESTED_WITH_OPTIONS=0; + + for OPTION_SET in ${OPTION_SETS[@]}; + do + TEST_DATA_OPTION_FILE=$(get_test_data_option_file "${TEST_SET_DIRECTORY}" "${INPUT_FILE}" "${OPTION_SET}"); + + if test -f ${TEST_DATA_OPTION_FILE}; + then + TESTED_WITH_OPTIONS=1; + + IFS=" " read -a OPTIONS <<< $(read_test_data_option_file "${TEST_SET_DIRECTORY}" "${INPUT_FILE}" "${OPTION_SET}"); + + run_test_on_input_file "${TEST_SET_DIRECTORY}" "fshfsinfo" "with_stdout_reference" "${OPTION_SET}" "${TEST_EXECUTABLE}" "${INPUT_FILE}" "${PROFILE_OPTIONS[@]}" "${OPTIONS[@]}"; + RESULT=$?; + + if test ${RESULT} -ne ${EXIT_SUCCESS}; + then + break; + fi + fi + done + + if test ${TESTED_WITH_OPTIONS} -eq 0; + then + run_test_on_input_file "${TEST_SET_DIRECTORY}" "fshfsinfo" "with_stdout_reference" "" "${TEST_EXECUTABLE}" "${INPUT_FILE}" "${PROFILE_OPTIONS[@]}"; + RESULT=$?; + fi + + if test ${RESULT} -ne ${EXIT_SUCCESS}; + then + break; + fi + done # Ignore failures due to corrupted data. if test "${TEST_SET}" = "corrupted"; diff -Nru libfshfs-20201104/tests/test_library.sh libfshfs-20240221/tests/test_library.sh --- libfshfs-20201104/tests/test_library.sh 2020-11-04 04:22:54.000000000 +0000 +++ libfshfs-20240221/tests/test_library.sh 2024-02-21 05:50:44.000000000 +0000 @@ -1,15 +1,15 @@ -#!/bin/bash +#!/usr/bin/env bash # Tests library functions and types. # -# Version: 20200705 +# Version: 20231007 EXIT_SUCCESS=0; EXIT_FAILURE=1; EXIT_IGNORE=77; -LIBRARY_TESTS="attributes_btree_key btree_file btree_header btree_node btree_node_descriptor btree_node_record buffer_data_handle catalog_btree_key compressed_data_handle compression deflate directory_entry directory_record error extent extents_btree_key file_entry file_record file_system fork_descriptor io_handle name notify thread_record volume_header"; +LIBRARY_TESTS="attribute_record attributes_btree_key bit_stream btree_file btree_header btree_node btree_node_descriptor btree_node_record buffer_data_handle catalog_btree_key compressed_data_handle compression deflate directory_entry directory_record error extent extents_btree_key file_entry file_record file_system fork_descriptor huffman_tree io_handle master_directory_block name notify profiler thread_record volume_header"; LIBRARY_TESTS_WITH_INPUT="support volume"; -OPTION_SETS="offset"; +OPTION_SETS=("offset"); INPUT_GLOB="*"; @@ -78,47 +78,54 @@ local TEST_SET_DIRECTORY=$(get_test_set_directory "${TEST_PROFILE_DIRECTORY}" "${TEST_SET_INPUT_DIRECTORY}"); - local OLDIFS=${IFS}; - - # IFS="\n" is not supported by all platforms. - IFS=" -"; - if test -f "${TEST_SET_DIRECTORY}/files"; then - for INPUT_FILE in `cat ${TEST_SET_DIRECTORY}/files | sed "s?^?${TEST_SET_INPUT_DIRECTORY}/?"`; + IFS="" read -a INPUT_FILES <<< $(cat ${TEST_SET_DIRECTORY}/files | sed "s?^?${TEST_SET_INPUT_DIRECTORY}/?"); + else + IFS="" read -a INPUT_FILES <<< $(ls -1d ${TEST_SET_INPUT_DIRECTORY}/${INPUT_GLOB}); + fi + for INPUT_FILE in "${INPUT_FILES[@]}"; + do + OPTION_INPUT_FILE="${INPUT_FILE}"; + + if test "${OSTYPE}" = "msys"; + then + # A test executable built with MinGW expects a Windows path. + INPUT_FILE=`echo ${INPUT_FILE} | sed 's?/?\\\\?g'`; + fi + local TESTED_WITH_OPTIONS=0; + + for OPTION_SET in ${OPTION_SETS[@]}; do - if test "${OSTYPE}" = "msys"; - then - # A test executable built with MinGW expects a Windows path. - INPUT_FILE=`echo ${INPUT_FILE} | sed 's?/?\\\\?g'`; - fi - run_test_on_input_file_with_options "${TEST_SET_DIRECTORY}" "${TEST_DESCRIPTION}" "default" "${OPTION_SETS}" "${TEST_EXECUTABLE}" "${INPUT_FILE}"; - RESULT=$?; + local TEST_DATA_OPTION_FILE=$(get_test_data_option_file "${TEST_SET_DIRECTORY}" "${OPTION_INPUT_FILE}" "${OPTION_SET}"); - if test ${RESULT} -ne ${EXIT_SUCCESS}; + if test -f ${TEST_DATA_OPTION_FILE}; then - break; + TESTED_WITH_OPTIONS=1; + + IFS=" " read -a OPTIONS <<< $(read_test_data_option_file "${TEST_SET_DIRECTORY}" "${INPUT_FILE}" "${OPTION_SET}"); + + run_test_on_input_file "${TEST_SET_DIRECTORY}" "${TEST_DESCRIPTION}" "default" "${OPTION_SET}" "${TEST_EXECUTABLE}" "${INPUT_FILE}" "${OPTIONS[@]}"; + RESULT=$?; + + if test ${RESULT} -ne ${EXIT_SUCCESS}; + then + break; + fi fi done - else - for INPUT_FILE in `ls -1d ${TEST_SET_INPUT_DIRECTORY}/${INPUT_GLOB}`; - do - if test "${OSTYPE}" = "msys"; - then - # A test executable built with MinGW expects a Windows path. - INPUT_FILE=`echo ${INPUT_FILE} | sed 's?/?\\\\?g'`; - fi - run_test_on_input_file_with_options "${TEST_SET_DIRECTORY}" "${TEST_DESCRIPTION}" "default" "${OPTION_SETS}" "${TEST_EXECUTABLE}" "${INPUT_FILE}"; + + if test ${TESTED_WITH_OPTIONS} -eq 0; + then + run_test_on_input_file "${TEST_SET_DIRECTORY}" "${TEST_DESCRIPTION}" "default" "" "${TEST_EXECUTABLE}" "${INPUT_FILE}"; RESULT=$?; + fi - if test ${RESULT} -ne ${EXIT_SUCCESS}; - then - break; - fi - done - fi - IFS=${OLDIFS}; + if test ${RESULT} -ne ${EXIT_SUCCESS}; + then + break; + fi + done if test ${RESULT} -ne ${EXIT_SUCCESS}; then diff -Nru libfshfs-20201104/tests/test_python_module.sh libfshfs-20240221/tests/test_python_module.sh --- libfshfs-20201104/tests/test_python_module.sh 2020-11-04 04:19:45.000000000 +0000 +++ libfshfs-20240221/tests/test_python_module.sh 2024-02-21 05:48:50.000000000 +0000 @@ -1,15 +1,16 @@ -#!/bin/bash +#!/usr/bin/env bash # Tests Python module functions and types. # -# Version: 20200705 +# Version: 20240120 EXIT_SUCCESS=0; EXIT_FAILURE=1; +EXIT_NO_TESTS_RAN=5; EXIT_IGNORE=77; TEST_FUNCTIONS="support"; TEST_FUNCTIONS_WITH_INPUT="volume"; -OPTION_SETS="offset"; +OPTION_SETS=("offset"); TEST_TOOL_DIRECTORY="."; INPUT_GLOB="*"; @@ -68,37 +69,47 @@ local TEST_SET_DIRECTORY=$(get_test_set_directory "${TEST_PROFILE_DIRECTORY}" "${TEST_SET_INPUT_DIRECTORY}"); - local OLDIFS=${IFS}; - - # IFS="\n"; is not supported by all platforms. - IFS=" -"; - if test -f "${TEST_SET_DIRECTORY}/files"; then - for INPUT_FILE in `cat ${TEST_SET_DIRECTORY}/files | sed "s?^?${TEST_SET_INPUT_DIRECTORY}/?"`; + IFS="" read -a INPUT_FILES <<< $(cat ${TEST_SET_DIRECTORY}/files | sed "s?^?${TEST_SET_INPUT_DIRECTORY}/?"); + else + IFS="" read -a INPUT_FILES <<< $(ls -1d ${TEST_SET_INPUT_DIRECTORY}/${INPUT_GLOB}); + fi + for INPUT_FILE in "${INPUT_FILES[@]}"; + do + local TESTED_WITH_OPTIONS=0; + + for OPTION_SET in ${OPTION_SETS[@]}; do - run_test_on_input_file_with_options "${TEST_SET_DIRECTORY}" "${TEST_DESCRIPTION}" "default" "${OPTION_SETS}" "${TEST_SCRIPT}" "${INPUT_FILE}"; - RESULT=$?; + local TEST_DATA_OPTION_FILE=$(get_test_data_option_file "${TEST_SET_DIRECTORY}" "${INPUT_FILE}" "${OPTION_SET}"); - if test ${RESULT} -ne ${EXIT_SUCCESS}; + if test -f ${TEST_DATA_OPTION_FILE}; then - break; + TESTED_WITH_OPTIONS=1; + + IFS=" " read -a OPTIONS <<< $(read_test_data_option_file "${TEST_SET_DIRECTORY}" "${INPUT_FILE}" "${OPTION_SET}"); + + run_test_on_input_file "${TEST_SET_DIRECTORY}" "${TEST_DESCRIPTION}" "default" "${OPTION_SET}" "${TEST_SCRIPT}" "${INPUT_FILE}" "${OPTIONS[@]}"; + RESULT=$?; + + if test ${RESULT} -ne ${EXIT_SUCCESS}; + then + break; + fi fi done - else - for INPUT_FILE in `ls -1d ${TEST_SET_INPUT_DIRECTORY}/${INPUT_GLOB}`; - do - run_test_on_input_file_with_options "${TEST_SET_DIRECTORY}" "${TEST_DESCRIPTION}" "default" "${OPTION_SETS}" "${TEST_SCRIPT}" "${INPUT_FILE}"; + + if test ${TESTED_WITH_OPTIONS} -eq 0; + then + run_test_on_input_file "${TEST_SET_DIRECTORY}" "${TEST_DESCRIPTION}" "default" "" "${TEST_SCRIPT}" "${INPUT_FILE}"; RESULT=$?; + fi - if test ${RESULT} -ne ${EXIT_SUCCESS}; - then - break; - fi - done - fi - IFS=${OLDIFS}; + if test ${RESULT} -ne ${EXIT_SUCCESS}; + then + break; + fi + done if test ${RESULT} -ne ${EXIT_SUCCESS}; then @@ -137,7 +148,11 @@ test_python_function "${TEST_FUNCTION}"; RESULT=$?; - if test ${RESULT} -ne ${EXIT_SUCCESS}; + if test ${RESULT} -eq ${EXIT_NO_TESTS_RAN}; + then + RESULT=${EXIT_IGNORE}; + fi + if test ${RESULT} -ne ${EXIT_SUCCESS} && test ${RESULT} -ne ${EXIT_IGNORE}; then break; fi @@ -158,8 +173,11 @@ test_python_function "${TEST_FUNCTION}"; RESULT=$?; fi - - if test ${RESULT} -ne ${EXIT_SUCCESS}; + if test ${RESULT} -eq ${EXIT_NO_TESTS_RAN}; + then + RESULT=${EXIT_IGNORE}; + fi + if test ${RESULT} -ne ${EXIT_SUCCESS} && test ${RESULT} -ne ${EXIT_IGNORE}; then break; fi diff -Nru libfshfs-20201104/tests/test_runner.sh libfshfs-20240221/tests/test_runner.sh --- libfshfs-20201104/tests/test_runner.sh 2020-11-04 04:19:45.000000000 +0000 +++ libfshfs-20240221/tests/test_runner.sh 2024-02-21 05:48:50.000000000 +0000 @@ -1,7 +1,7 @@ -#!/bin/bash +#!/usr/bin/env bash # Bash functions to run an executable for testing. # -# Version: 20200417 +# Version: 20231119 # # When CHECK_WITH_ASAN is set to a non-empty value the test executable # is run with asan, otherwise it is run without. @@ -14,6 +14,8 @@ # # When CHECK_WITH_VALGRIND is set to a non-empty value the test executable # is run with valgrind, otherwise it is run without. +# +# PYTHON is used to determine the Python interpreter. EXIT_SUCCESS=0; EXIT_FAILURE=1; @@ -188,14 +190,24 @@ find_binary_library_path() { local TEST_EXECUTABLE=$1; - local LIBRARY_NAME="${TEST_EXECUTABLE}"; + local LIBRARY_NAME=`dirname ${TEST_EXECUTABLE}`; - echo ${LIBRARY_NAME} | grep 'tools' > /dev/null 2>&1; + local NAME=`basename ${LIBRARY_NAME}`; - if test $? -eq ${EXIT_SUCCESS}; + if test ${NAME} = ".libs"; then LIBRARY_NAME=`dirname ${LIBRARY_NAME}`; + NAME=`basename ${LIBRARY_NAME}`; + fi + if test ${NAME} = "tests"; + then LIBRARY_NAME=`dirname ${LIBRARY_NAME}`; + NAME=`basename ${LIBRARY_NAME}`; + fi + echo ${LIBRARY_NAME} | grep 'tools' > /dev/null 2>&1; + + if test $? -eq ${EXIT_SUCCESS}; + then LIBRARY_NAME=`basename ${LIBRARY_NAME} | sed 's/\(.*\)tools$/lib\1/'`; else LIBRARY_NAME=`basename ${LIBRARY_NAME} | sed 's/^py//' | sed 's/^\([^_]*\)_test_.*$/lib\1/'`; @@ -215,9 +227,6 @@ # Searches for the path to the binary variant of the Python module # -# Globals: -# PYTHON_VERSION -# # Arguments: # a string containing the path of the test executable # @@ -234,18 +243,8 @@ TEST_EXECUTABLE=`dirname ${TEST_EXECUTABLE}`; TEST_EXECUTABLE=`dirname ${TEST_EXECUTABLE}`; - PYTHON_VERSION=`echo ${PYTHON_VERSION} | cut -c1`; + local PYTHON_MODULE_PATH="${TEST_EXECUTABLE}/${PYTHON_MODULE_NAME}/.libs"; - local PYTHON_MODULE_PATH="${TEST_EXECUTABLE}/${PYTHON_MODULE_NAME}-python${PYTHON_VERSION}/.libs"; - - if ! test -d "${PYTHON_MODULE_PATH}"; - then - PYTHON_MODULE_PATH="../${PYTHON_MODULE_NAME}-python${PYTHON_VERSION}/.libs"; - fi - if ! test -d "${PYTHON_MODULE_PATH}"; - then - PYTHON_MODULE_PATH="${TEST_EXECUTABLE}/${PYTHON_MODULE_NAME}/.libs"; - fi if ! test -d "${PYTHON_MODULE_PATH}"; then PYTHON_MODULE_PATH="../${PYTHON_MODULE_NAME}/.libs"; @@ -366,7 +365,7 @@ if test -f "${IGNORE_FILE}"; then - IGNORE_LIST=`cat ${IGNORE_FILE} | sed '/^#/d'`; + IGNORE_LIST=`cat ${IGNORE_FILE} | sed '/^#/d' | tr '\n' ' '`; fi echo ${IGNORE_LIST}; } @@ -394,9 +393,12 @@ TEST_DATA_OPTION_FILE=$(get_test_data_option_file "${TEST_SET_DIRECTORY}" "${INPUT_FILE}" "${OPTION_SET}"); fi - local OPTIONS=() - local OPTIONS_STRING=`cat "${TEST_DATA_OPTION_FILE}" | head -n 1 | sed 's/[\r\n]*$//'`; + local OPTIONS_STRING=`head -n 1 "${TEST_DATA_OPTION_FILE}" | sed 's/[\r\n]*$//'`; + if test "${OPTIONS_STRING}" = "# libyal test data options"; + then + OPTIONS_STRING=`tail -n +2 "${TEST_DATA_OPTION_FILE}" | sed 's/^offset=/-o/;s/^password=/-p/;s/^recovery_password=/-r/;s/^startup_key=/-s/;s/virtual_address=/-v/' | tr '\n' ' '`; + fi echo "${OPTIONS_STRING}"; } @@ -407,7 +409,6 @@ # CHECK_WITH_GDB # CHECK_WITH_STDERR # CHECK_WITH_VALGRIND -# PYTHON_VERSION # # Arguments: # a string containing the test description @@ -442,9 +443,9 @@ echo "${EXECUTABLE_TYPE}" | grep -i "python script" > /dev/null 2>&1; local IS_PYTHON_SCRIPT=$?; - if test ${IS_PYTHON_SCRIPT} -eq 0; + if test ${IS_PYTHON_SCRIPT} -eq 0 && test -z ${PYTHON}; then - local PYTHON=`which python${PYTHON_VERSION} 2> /dev/null`; + local PYTHON=`which python 2> /dev/null`; if ! test -x ${PYTHON}; then @@ -653,6 +654,7 @@ return ${EXIT_FAILURE}; fi + local TEST_EXECUTABLE=$( find_binary_executable ${TEST_EXECUTABLE} ); local LIBRARY_PATH=$( find_binary_library_path ${TEST_EXECUTABLE} ); local PYTHON_MODULE_PATH=$( find_binary_python_module_path ${TEST_EXECUTABLE} ); @@ -727,7 +729,6 @@ # CHECK_WITH_GDB # CHECK_WITH_STDERR # CHECK_WITH_VALGRIND -# PYTHON_VERSION # # Arguments: # a string containing the path of the test executable @@ -762,9 +763,9 @@ echo "${EXECUTABLE_TYPE}" | grep -i "python script" > /dev/null 2>&1; local IS_PYTHON_SCRIPT=$?; - if test ${IS_PYTHON_SCRIPT} -eq 0; + if test ${IS_PYTHON_SCRIPT} -eq 0 && test -z ${PYTHON}; then - local PYTHON=`which python${PYTHON_VERSION} 2> /dev/null`; + local PYTHON=`which python 2> /dev/null`; if ! test -x ${PYTHON}; then @@ -974,6 +975,7 @@ return ${EXIT_FAILURE}; fi + local TEST_EXECUTABLE=$( find_binary_executable ${TEST_EXECUTABLE} ); local LIBRARY_PATH=$( find_binary_library_path ${TEST_EXECUTABLE} ); local PYTHON_MODULE_PATH=$( find_binary_python_module_path ${TEST_EXECUTABLE} ); @@ -1059,14 +1061,10 @@ local ARGUMENTS=("$@"); local INPUT_NAME=`basename "${INPUT_FILE}"`; - local OPTIONS=(); local TEST_OUTPUT="${INPUT_NAME}"; if test -n "${OPTION_SET}"; then - OPTIONS_STRING=$(read_test_data_option_file "${TEST_SET_DIRECTORY}" "${INPUT_FILE}" "${OPTION_SET}"); - IFS=" " read -a OPTIONS <<< "${OPTIONS_STRING}"; - TEST_OUTPUT="${INPUT_NAME}-${OPTION_SET}"; fi @@ -1078,7 +1076,7 @@ if test "${TEST_MODE}" = "with_callback"; then - test_callback "${TMPDIR}" "${TEST_SET_DIRECTORY}" "${TEST_OUTPUT}" "${TEST_EXECUTABLE}" "${TEST_INPUT}" ${ARGUMENTS[@]} "${OPTIONS[@]}"; + test_callback "${TMPDIR}" "${TEST_SET_DIRECTORY}" "${TEST_OUTPUT}" "${TEST_EXECUTABLE}" "${TEST_INPUT}" ${ARGUMENTS[@]}; RESULT=$?; elif test "${TEST_MODE}" = "with_stdout_reference"; @@ -1095,7 +1093,7 @@ local INPUT_FILE_FULL_PATH=$( readlink_f "${INPUT_FILE}" ); local TEST_LOG="${TEST_OUTPUT}.log"; - (cd ${TMPDIR} && run_test_with_input_and_arguments "${TEST_EXECUTABLE}" "${INPUT_FILE_FULL_PATH}" ${ARGUMENTS[@]} "${OPTIONS[@]}" > "${TEST_LOG}"); + (cd ${TMPDIR} && run_test_with_input_and_arguments "${TEST_EXECUTABLE}" "${INPUT_FILE_FULL_PATH}" ${ARGUMENTS[@]} > "${TEST_LOG}"); RESULT=$?; # Compare output if test ran successfully. @@ -1121,7 +1119,7 @@ fi else - run_test_with_input_and_arguments "${TEST_EXECUTABLE}" "${INPUT_FILE}" ${ARGUMENTS[@]} "${OPTIONS[@]}"; + run_test_with_input_and_arguments "${TEST_EXECUTABLE}" "${INPUT_FILE}" ${ARGUMENTS[@]}; RESULT=$?; fi @@ -1130,22 +1128,12 @@ if test -n "${TEST_DESCRIPTION}"; then ARGUMENTS=`echo "${ARGUMENTS[*]}" | tr '\n' ' ' | sed 's/[ ]\$//'`; - OPTIONS=`echo "${OPTIONS[*]}" | tr '\n' ' ' | sed 's/[ ]\$//'`; - if test -z "${ARGUMENTS}" && test -z "${OPTIONS}"; + if test -z "${ARGUMENTS}"; then echo -n "${TEST_DESCRIPTION} with input: ${INPUT_FILE}"; - - elif test -z "${ARGUMENTS}"; - then - echo -n "${TEST_DESCRIPTION} with options: '${OPTIONS}' and input: ${INPUT_FILE}"; - - elif test -z "${OPTIONS}"; - then - echo -n "${TEST_DESCRIPTION} with options: '${ARGUMENTS}' and input: ${INPUT_FILE}"; - else - echo -n "${TEST_DESCRIPTION} with options: '${ARGUMENTS} ${OPTIONS}' and input: ${INPUT_FILE}"; + echo -n "${TEST_DESCRIPTION} with options: '${ARGUMENTS}' and input: ${INPUT_FILE}"; fi if test ${RESULT} -ne ${EXIT_SUCCESS}; @@ -1158,122 +1146,3 @@ return ${RESULT}; } -# Runs the test with options on the input file. -# -# Note that this function is not intended to be directly invoked -# from outside the test runner script. -# -# Arguments: -# a string containing the path of the test set directory -# a string containing the description of the test -# a string containing the test mode -# a string containing the name of the test data option sets -# a string containing the path of the test executable -# a string containing the path of the test input file -# an array containing the arguments for the test executable -# -# Returns: -# an integer containg the exit status of the test executable -# -run_test_on_input_file_with_options() -{ - local TEST_SET_DIRECTORY=$1; - local TEST_DESCRIPTION=$2; - local TEST_MODE=$3; - local OPTION_SETS=$4; - local TEST_EXECUTABLE=$5; - local INPUT_FILE=$6; - shift 6; - local ARGUMENTS=("$@"); - - local RESULT=${EXIT_SUCCESS}; - local TESTED_WITH_OPTIONS=0; - - for OPTION_SET in `echo ${OPTION_SETS} | tr ' ' '\n'`; - do - local TEST_DATA_OPTION_FILE=$(get_test_data_option_file "${TEST_SET_DIRECTORY}" "${INPUT_FILE}" "${OPTION_SET}"); - - if ! test -f ${TEST_DATA_OPTION_FILE}; - then - continue - fi - - run_test_on_input_file "${TEST_SET_DIRECTORY}" "${TEST_DESCRIPTION}" "${TEST_MODE}" "${OPTION_SET}" "${TEST_EXECUTABLE}" "${INPUT_FILE}" ${ARGUMENTS[@]}; - RESULT=$?; - - if test ${RESULT} -ne ${EXIT_SUCCESS}; - then - break; - fi - TESTED_WITH_OPTIONS=1; - done - - if test ${RESULT} -eq ${EXIT_SUCCESS} && test ${TESTED_WITH_OPTIONS} -eq 0; - then - run_test_on_input_file "${TEST_SET_DIRECTORY}" "${TEST_DESCRIPTION}" "${TEST_MODE}" "" "${TEST_EXECUTABLE}" "${INPUT_FILE}" ${ARGUMENTS[@]}; - RESULT=$?; - fi - return ${RESULT}; -} - -# Runs the test with options on the file entries in the test set directory. -# -# Note that this function is not intended to be directly invoked -# from outside the test runner script. -# -# Arguments: -# a string containing the path of the test set directory -# a string containing the description of the test -# a string containing the test mode -# a string containing the name of the test data option sets -# a string containing the path of the test executable -# an array containing the arguments for the test executable -# -# Returns: -# an integer containg the exit status of the test executable -# -run_test_on_test_set_with_options() -{ - local TEST_SET_DIRECTORY=$1; - local TEST_DESCRIPTION=$2; - local TEST_MODE=$3; - local OPTION_SETS=$4; - local TEST_EXECUTABLE=$5; - shift 5; - local ARGUMENTS=("$@"); - - local RESULT=${EXIT_SUCCESS}; - - # IFS="\n"; is not supported by all platforms. - IFS=" -"; - - if test -f "${TEST_SET_DIRECTORY}/files"; - then - for INPUT_FILE in `cat ${TEST_SET_DIRECTORY}/files | sed "s?^?${TEST_SET_INPUT_DIRECTORY}/?"`; - do - run_test_on_input_file_with_options "${TEST_SET_DIRECTORY}" "${TEST_DESCRIPTION}" "${TEST_MODE}" "${OPTION_SETS}" "${TEST_EXECUTABLE}" "${INPUT_FILE}" ${ARGUMENTS[@]}; - RESULT=$?; - - if test ${RESULT} -ne ${EXIT_SUCCESS}; - then - break; - fi - done - else - for INPUT_FILE in `ls -1d ${TEST_SET_INPUT_DIRECTORY}/${INPUT_GLOB}`; - do - run_test_on_input_file_with_options "${TEST_SET_DIRECTORY}" "${TEST_DESCRIPTION}" "${TEST_MODE}" "${OPTION_SETS}" "${TEST_EXECUTABLE}" "${INPUT_FILE}" ${ARGUMENTS[@]}; - RESULT=$?; - - if test ${RESULT} -ne ${EXIT_SUCCESS}; - then - break; - fi - done - fi - IFS=${OLDIFS}; - - return ${RESULT}; -} - diff -Nru libfshfs-20201104/tests/test_tools.sh libfshfs-20240221/tests/test_tools.sh --- libfshfs-20201104/tests/test_tools.sh 2020-11-04 04:22:54.000000000 +0000 +++ libfshfs-20240221/tests/test_tools.sh 2024-02-21 05:50:44.000000000 +0000 @@ -1,15 +1,15 @@ -#!/bin/bash +#!/usr/bin/env bash # Tests tools functions and types. # -# Version: 20200705 +# Version: 20231007 EXIT_SUCCESS=0; EXIT_FAILURE=1; EXIT_IGNORE=77; -TOOLS_TESTS="output signal"; +TOOLS_TESTS="info_handle output signal"; TOOLS_TESTS_WITH_INPUT=""; -OPTION_SETS="offset"; +OPTION_SETS=("offset"); INPUT_GLOB="*"; @@ -78,47 +78,54 @@ local TEST_SET_DIRECTORY=$(get_test_set_directory "${TEST_PROFILE_DIRECTORY}" "${TEST_SET_INPUT_DIRECTORY}"); - local OLDIFS=${IFS}; - - # IFS="\n" is not supported by all platforms. - IFS=" -"; - if test -f "${TEST_SET_DIRECTORY}/files"; then - for INPUT_FILE in `cat ${TEST_SET_DIRECTORY}/files | sed "s?^?${TEST_SET_INPUT_DIRECTORY}/?"`; + IFS="" read -a INPUT_FILES <<< $(cat ${TEST_SET_DIRECTORY}/files | sed "s?^?${TEST_SET_INPUT_DIRECTORY}/?"); + else + IFS="" read -a INPUT_FILES <<< $(ls -1d ${TEST_SET_INPUT_DIRECTORY}/${INPUT_GLOB}); + fi + for INPUT_FILE in "${INPUT_FILES[@]}"; + do + OPTION_INPUT_FILE="${INPUT_FILE}"; + + if test "${OSTYPE}" = "msys"; + then + # A test executable built with MinGW expects a Windows path. + INPUT_FILE=`echo ${INPUT_FILE} | sed 's?/?\\\\?g'`; + fi + local TESTED_WITH_OPTIONS=0; + + for OPTION_SET in ${OPTION_SETS[@]}; do - if test "${OSTYPE}" = "msys"; - then - # A test executable built with MinGW expects a Windows path. - INPUT_FILE=`echo ${INPUT_FILE} | sed 's?/?\\\\?g'`; - fi - run_test_on_input_file_with_options "${TEST_SET_DIRECTORY}" "${TEST_DESCRIPTION}" "default" "${OPTION_SETS}" "${TEST_EXECUTABLE}" "${INPUT_FILE}"; - RESULT=$?; + local TEST_DATA_OPTION_FILE=$(get_test_data_option_file "${TEST_SET_DIRECTORY}" "${OPTION_INPUT_FILE}" "${OPTION_SET}"); - if test ${RESULT} -ne ${EXIT_SUCCESS}; + if test -f ${TEST_DATA_OPTION_FILE}; then - break; + TESTED_WITH_OPTIONS=1; + + IFS=" " read -a OPTIONS <<< $(read_test_data_option_file "${TEST_SET_DIRECTORY}" "${INPUT_FILE}" "${OPTION_SET}"); + + run_test_on_input_file "${TEST_SET_DIRECTORY}" "${TEST_DESCRIPTION}" "default" "${OPTION_SET}" "${TEST_EXECUTABLE}" "${INPUT_FILE}" "${OPTIONS[@]}"; + RESULT=$?; + + if test ${RESULT} -ne ${EXIT_SUCCESS}; + then + break; + fi fi done - else - for INPUT_FILE in `ls -1d ${TEST_SET_INPUT_DIRECTORY}/${INPUT_GLOB}`; - do - if test "${OSTYPE}" = "msys"; - then - # A test executable built with MinGW expects a Windows path. - INPUT_FILE=`echo ${INPUT_FILE} | sed 's?/?\\\\?g'`; - fi - run_test_on_input_file_with_options "${TEST_SET_DIRECTORY}" "${TEST_DESCRIPTION}" "default" "${OPTION_SETS}" "${TEST_EXECUTABLE}" "${INPUT_FILE}"; + + if test ${TESTED_WITH_OPTIONS} -eq 0; + then + run_test_on_input_file "${TEST_SET_DIRECTORY}" "${TEST_DESCRIPTION}" "default" "" "${TEST_EXECUTABLE}" "${INPUT_FILE}"; RESULT=$?; + fi - if test ${RESULT} -ne ${EXIT_SUCCESS}; - then - break; - fi - done - fi - IFS=${OLDIFS}; + if test ${RESULT} -ne ${EXIT_SUCCESS}; + then + break; + fi + done if test ${RESULT} -ne ${EXIT_SUCCESS}; then